On Nov 26, 2007 12:55 PM, Francis Clarke <[EMAIL PROTECTED]> wrote: > > Subgroups of abelian groups: > > sage: G.<a, b> = AbelianGroup(2) > sage: A = G.subgroup([a]) > sage: B = G.subgroup([b]) > sage: A == B > True > > Surely not!
I agree that this is dumb, and have made it trac ticket #1284. http://trac.sagemath.org/sage_trac/ticket/1284 The problem is that the cmp method is just comparing the groups abstract structure: if not is_AbelianGroup(right): return -1 return cmp(self.invariants(), right.invariants()) It should also take into account the embedding. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---