We should maintain consistency with other algebraic structures. If G<=H means "G is a subgroup of H" when G and H are groups, then I would similarly expect <= to mean "is a subspace of" for vector spaces, etc. Some of these cases might be hard (number fields?); so if the functionality is not (yet) implemented for a similar type, a reasonable NotImplementedError should occur.
I'll try reviewing the patch itself now... John On May 23, 5:45 pm, Robert Miller <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---