Hello,

During the last bug day, I found several tickets related to
inconsistencies in abelian groups. I think I've fixed the circular
logic, etc. causing the problems in the patch included in #1284.
However, there is a difference of opinion on notation that I need to
ask about here.

Q: Should the output of
sage: G <= H
for G and H abelian groups be whether G is a subgroup of H?

I know the answer seems simple, but here's why you might want to
answer no (William suggested this to me). If you have a list of
abelian groups L = [G1,...,Gn], and you want to quickly sort it, if
you do sorted(L), you may not get back what you are expecting, since
the subgroup ordering on abelian groups isn't linear.

gfurnish proposes the alternative sorted(L,
cmp=canonical_ab_group_cmp), with G <= H returning whether G is a
subgroup of H. I think I favor this approach.

The other option is G.is_subgroup(H).
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to