Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
158 stars 60 forks source link

Structure for R-algebras #693

Open ulthiel opened 3 years ago

ulthiel commented 3 years ago

You have a structure for rings and now one for modules. Could you combine the two and implement a generic structure for algebras over a commutative ring?

I want to implement (e.g.) Iwahori-Hecke algebras, which are algebras free of finite dimension over a Laurent polynomial ring. It would be very convenient to have the generic structures available.

fieker commented 3 years ago

On Thu, Dec 10, 2020 at 02:01:25AM -0800, Ulrich Thiel wrote:

You have a structure for rings and now one for modules. Could you combine the two and implement a generic structure for algebras over a commutative ring?

I want to implement (e.g.) Iwahori-Hecke algebras, which are algebras free of finite dimension over a Laurent polynomial ring. It would be very convenient to have the generic structures available.

What does this mean? Ie, what algorithms/ functionality could be done genericly?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/693

thofma commented 3 years ago

What is the most generic way that you think of? Arbitrary module M and algebra structure defined by a bilinear map/linear map on M x M/M \otimes M?

Are structure constant algebras sufficient? We have those for associative algebras in Hecke (implemented by Johannes).

ulthiel commented 3 years ago

I see, so let's summarize of what I want to do and then think about how generic this is. Take a Coxeter system (W,S). We don't have this yet, but I'll try to implement something one day. The Coxeter group may be infinite (e.g. affine). The Iwahori-Hecke algebra attached to W is a free Z[v,v^{-1}]-algebra with a basis (\deltax){x \in W} and I have a combinatorial rule to compute products of basis elements (thus of arbitrary elements) and express the product in the basis. I would (need to) implement this combinatorial rule, so it's not a structure constant algebra a priori and this is also not how I would work with it because it's too big.

So, actually, what I basically need is a structure of (possibly infinite-dimensional) free modules over a commutative ring for which I can then define a multiplication – making this both an AbstractAlgebra ring and module. In this context it would be nice to have an arbitrary indexing set of basis elements of the module, in this case W. Is this too special for you?

There are many other examples of algebras that go along a very similar line: free module with multiplication and I have a rule to multiply basis elements and express the products in the basis (very special case of algebras with confluent rewrite system).

wbhart commented 3 years ago

I guess the formal answer to the question is no, that's not possible. Julia doesn't have multiple inheritance of abstract types. But you probably want to ask yourself whether there is any benefit to doing so in the first place. Will any of the algorithms we have implemented be of generic use in your situation. The answer is likely no, unless you want to define matrices or polynomials over this ring (in which case you might make your algebra a descendent of our abstract Ring type).

There's almost certainly nothing we've implemented for modules that is going to be of use to you, so there's probably no point in even trying to inherit from that.

So you might decide to add an Algebra abstract type, and if you really want to build polynomials and matrices over algebras, then assuming it is commutative you might want to make Algebra inherit from Ring (only).

fieker commented 3 years ago

I guess one could create a generic algebra from a module and a function to compute products of generators. But in particular here, the module is already missing. We have the tools - and, unless the dimension of the elements used is huge, there is no probelm implementing this....

On Thu, Dec 10, 2020 at 02:54:31AM -0800, Ulrich Thiel wrote:

I see, so let's summarize of what I want to do and then think about how generic this is. Take a Coxeter system (W,S). We don't have this yet, but I'll try to implement something one day. The Coxeter group may be infinite (e.g. affine). The Iwahori-Hecke algebra attached to W is a free Z[v,v^{-1]-algebra with a basis (\deltax){x \in W} and I have a combinatorial rule to compute products of basis elements (thus of arbitrary elements). I would (need to) implement this combinatorial rule, so it's not a structure constant algebra a priori and this is also not how I would work with it because it's too big.

So, actually, what I basically need is a structure of (possibly infinite-dimensional) free modules over a commutative ring for which I can then define a multiplication – making this both an AbstractAlgebra ring and module. In this context it would be nice to have an arbitrary indexing set of basis elements of the module, in this case W. Is this too special for you?

There are many other examples of algebras that go along a very similar line: free module with multiplication and I have a rule to multiply basis elements and express the products in the basis (very special case of algebras with confluent rewrite system).

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/693#issuecomment-742445374

ulthiel commented 3 years ago

Okay, maybe I create a BasedAlgebra structure by myself, maybe it's too special for AbstractAlgebra. For the future, is there a way to discuss such matters elsewhere? Opening an issue is not really the right thing – in retrospect.

fieker commented 3 years ago

On Thu, Dec 10, 2020 at 04:29:13AM -0800, Ulrich Thiel wrote:

Okay, maybe I create a BasedAlgebra structure by myself, maybe it's too special for AbstractAlgebra. For the future, is there a way to discuss such matters elsewhere? Opening an issue is not really the right thing – in retrospect.

Wait 10 min - I have a prototype... -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/693#issuecomment-742491398

fieker commented 3 years ago

On Thu, Dec 10, 2020 at 04:29:13AM -0800, Ulrich Thiel wrote:

Okay, maybe I create a BasedAlgebra structure by myself, maybe it's too special for AbstractAlgebra. For the future, is there a way to discuss such matters elsewhere? Opening an issue is not really the right thing – in retrospect.

My office.... An issue in Oscar? The OscarMeeting Fr 1500 and/or Wed 1300? -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/693#issuecomment-742491398

wbhart commented 3 years ago

I don't think it's wrong to open a ticket to discuss stuff like this. I think that's precisely the right way to start a discussion. If it is too technical beyond that, we can discuss in another forum for sure.

And even if you decide to do this in Oscar.jl rather than AbstractAlgebra.jl directly, it most likely has implications for AbstractAlgebra. So fair game, I say.

ulthiel commented 3 years ago

Well, I tried that with the office today, but you know...the drill...

fieker commented 3 years ago

On Thu, Dec 10, 2020 at 04:47:57AM -0800, Ulrich Thiel wrote:

Well, I tried that with the office today, but you know...the drill...

I though in your case it was the music? -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/693#issuecomment-742499911

ulthiel commented 3 years ago

Oh yeah, they turned off the radio after my request but then started the drill instead.