Looks to me like there is a problem with free module equality. Note that this seems to be for general PID's, but not ZZ, thus the simple example over a polynomial ring.
sage: R = PolynomialRing(QQ, 'a') sage: x = vector(R, [1, 0]) sage: y = vector(R, [0, 1]) sage: z = vector(R, [0,-1]) sage: A = (R^2).span([x, y]) sage: B = (R^2).span([x, z]) sage: A == B False sage: A.is_submodule(B) True sage: B.is_submodule(A) True Root cause looks like an assumption that echelon form (Hermite form) over PIDs is unique. sage: S = matrix([x, y]) sage: S._echelon_form_PID()[1] [1 0] [0 1] sage: T = matrix([x, z]) sage: T._echelon_form_PID()[1] [ 1 0] [ 0 -1] (a) Can this echelon form be made unique, or is that too much to expect over general PIDs? (b) Should __cmp__ for free modules be adjusted to test submodules, as above, when the echelon forms are different? It appears that it would be easy to exploit the non-uniqueness of the echelon form to get inconsistencies in the ordering of free modules, since presently the ordering of free modules uses the ordering of the module's echelonized basis matrices as its final characterizing property. Rob -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org