What you're asking for is checking if two matrices defining the linear transformations are similar, which involves computing the Smith normal forms of the matrices. This is computationally expensive. Instead, what we do is == becomes a weaker form of equality that is fast (equivalently has stronger conditions). This is something we do for graphs where we have a separate method is_isomorphic(). Therefore, I think that equal linear maps not being == is okay if they are given by different matrices.
That being said, there is a definite issue with the false equality a == c, which because sage: a.parent()(c) Vector space morphism represented by the matrix: [1 0] [0 1] Domain: Vector space of dimension 2 over Finite Field of size 2 Codomain: Vector space of dimension 2 over Finite Field of size 2 which is not the correct map. This is a result of the fact the __call__ does not check that the the (co)domains match and compose with the corresponding coercion maps. Best, Travis On Thursday, December 24, 2020 at 2:07:35 AM UTC+10 enriqu...@gmail.com wrote: > I have posted a bug in hom method for vector spaces in > https://groups.google.com/g/sage-support/c/1VDRFjZePCo/m/sFimwoV2BgAJ > > If one defines linear mappings using hom, distinct morphisms may be told > to be equal and viceversa > > Following a colleague advice (Miguel Marco) I looked at the method > _richcmp_ and it seems that it checks if the matrices of the morphisms are > equal. Since the same vector space can be defined in Sage with distinct > associated bases, this is the reason of the error. > > I guess that equality of domains (and maybe codomains) is the first > condition to be checked and then the equality of the images of self. > > Best, Enrique. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/c4fe174a-ee85-4189-8a47-98ade0293363n%40googlegroups.com.