#20154: train-tracks
-------------------------------------+-------------------------------------
Reporter: dbenielli | Owner:
Type: task | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: group theory | Resolution:
Keywords: free-group | Merged in:
automorphism |
Authors: Dominique | Reviewers:
Benielli, Thierry Coulbois |
Report Upstream: N/A | Work issues:
Branch: public/train- | Commit:
track | 7a7da77df0eac29dc6b5783f023336cdaa44f51d
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:56 coulbois]:
> No problem for the order of the generators and their inverses. However
the reason for rewriting the _cmp_ method was that I want the neutral
element to be smaller than all other elements of the free group. Which was
not the case with the previous version.
It was
{{{
sage: F = FreeGroup(['a','b'])
sage: a,b = F.gens()
sage: l = [a,b,~a,~b,a*b,~a*b,F.one()]
sage: sorted(l)
[1, a^-1, a, b^-1, b, a^-1*b, a*b]
sage: F.one() < a
True
sage: a < F.one()
False
}}}
What is wrong with the above? It is first sorted by length and then
(almost) lexicographically. This is indeed different from order on lists
which is straight lexicographic.
> I do not know how the previous order was implemented (deep inside GAP ?)
It indeed used the gap comparison which seems reasonable to me.
--
Ticket URL: <https://trac.sagemath.org/ticket/20154#comment:59>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.