Nemocas / AbstractAlgebra.jl

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

Endomorphism space #636

Open hwjsnc opened 4 years ago

hwjsnc commented 4 years ago

Would it be possible to add an EndomorphismSpace (endowed with a ring structure) for endomorphisms on modules/vector spaces, similar to the MatrixAlgebra type for square matrices?

Possibly relevant: The discussion in issue #572 on whether all modules over the same ring and with the same dimension should be considered identical.

wbhart commented 4 years ago

Note that you can take the inverse of a ModuleHomomorphism. The inverse map is stored in there. (We have an MapWithInverse type.)

In any event, I don't see what's wrong with isinvertible. I think adding an AutomorphismSpace might be overkill, unless you have a specific application for it.

fieker commented 4 years ago

On Thu, Aug 27, 2020 at 11:30:06AM -0700, Lukas Himbert wrote:

Would it be possible to add an AutomorphismSpace (endowed with a ring structure) for automorphisms between modules and vector spaces, similar to the MatrixAlgebra type for square matrices?

Possibly relevant: The discussion in issue #572 on whether all modules over the same ring and with the same dimension should be considered identical.

-- 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/636

Firstly, the Automorphisms don't form a ring, that would be the Endpomorphisms, The automorphisms are the units in the EndpomorphismAlgebra - and in general hard to find...

Secondly, what I'd propose, if there is a demand:

End(V) -> SomeAlgebra, Map The map will take an element in the algebra and transform it into a "proper" endomorphism. Why: If we do a "new type" EndomorphismRing, this implies also a new type EndomorphismRingElement. This new type will have to be made to support all operations that are allowed for Algebras - which eventually is a lot. Plus the elements will have to serve a double role: as maps and as ring elements which is going to produce (sooner or later) ambiguities. Thus the model of splitting the worlds: have a map object and do not make the maps ring elements and an algebra where the elements are not maps, and a function to translate.

(Un)related example: take End for a field, say K = Q(sqrt 2), then End will just be the identity and the conjugation (sqrt 2 -> -sqrt 2)

What is phi * phi? it can be

Both are meaningful and useful (and yes, in Julia I could try to implement .* for the pointwise multiplication)

By splitting the model as above, there is no ambiguity...

My thoughts... Greetings Claus

hwjsnc commented 4 years ago

Firstly, the Automorphisms don't form a ring […]

Indeed! I meant endomorphisms (i.e. linear maps with identical domain and codomain) but confused the terms, sorry about that.

My motivation for this proposal is twofold: First, I have a problem that is stated in terms of endomorphisms, and it would be nice to have this reflected in the type. (This is not a big priority, using a homomorphism works just as well.) Second, I may need to take (functional) powers of an endomorphism, which only makes sense for maps that can actually be composed with themselves. And at that point, it seems straightforward to make the endomorphisms a ring.

Perhaps there could be a map ModuleEndomorphism → MatrixAlgebra (or a partial map ModuleHomomorphism → MatrixAlgebra) and vice versa? Then the matrix algebra would be used for calculations in the ring of endomorphisms, and the corresponding endomorphism (obtained via the inverse of the above map) would be applied to an element of the module. This seems like a relatively easy way to implement the split model, since MatrixAlgebra is already a ring. Of course this approach conflates the maps with their matrix representation which may not be desirable in general.