Following on from Nick's point, I cannot imagine that users will want
or expect to sort a list of groups except possibly by some criterion
provided by the user (e.g. size of the group, or something).  But
apart from that we need to be able to have a default sorting or more
or less anything in Sage so that we can have consistent output where
possible and meaningful.

John

2008/5/23 David Joyner <[EMAIL PROTECTED]>:
>
> I agree with Nick and John.
>
> On Fri, May 23, 2008 at 12: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
-~----------~----~----~----~------~----~------~--~---

Reply via email to