I have put an implementation of Todd-Coxeter algorithm here:
Patch is here:
https://github.com/martinbaker/fricasAlgTop/blob/master/gpresent5.patch
Full code is here:
https://github.com/martinbaker/fricasAlgTop/blob/master/gpresent.spad
This goes together with the conversion in the opposite direction which I
already posted here:
https://groups.google.com/forum/?hl=en#!topic/fricas-devel/EtLwgd2dWNU
Patch for regression tests of these conversions is here:
https://github.com/martinbaker/fricasAlgTop/blob/master/gpresentRegression5.patch
Full regression test code is here:
https://github.com/martinbaker/fricasAlgTop/blob/master/gpresent.input
So when we compose these two functions we should get back to the same
point like this:
(1) -> c5a := cyclicGroup(5)$PermutationGroupExamples
(1) <(1 2 3 4 5)>
Type: PermutationGroup(Integer)
(2) -> c5b := c5a::GroupPresentation
(2) <a | a*a*a*a*a>
Type: GroupPresentation
(3) -> c5c := toPermutationIfCan(c5b) :: PermutationGroup(Integer)
(3) <(1 2 3 4 5)>
Type: PermutationGroup(Integer)
As discussed before, anything more complicated than this wont get back
to the same point but somewhere isomorphic like this:
(4) -> d3x := dihedralGroup(3)$PermutationGroupExamples
(4) <(1 2 3),(1 3)>
Type: PermutationGroup(Integer)
(5) -> d3y := d3x::GroupPresentation
(5)
<a b |
a*a*a, a*a*b*a*a*b, a*a*b*a*a*-b, a*b*a*b, a*b*a*-b, b*b,
a*a*b*-a*b
,
a*b*-a*-a*b, b*a*a*-b*-a, a*a*b*-a*-b, a*a*-b*a*a*-b, a*-b*a*-b
>
Type: GroupPresentation
(6) -> d3z := toPermutationIfCan(d3y) :: PermutationGroup(Integer)
(6) <(1 2 4)(3 6 5),(1 3)(2 5)(4 6)>
Type: PermutationGroup(Integer)
If you wish to see how the algorithm works (or does not work) try
calling the function like this:
(7) -> toPermutationIfCan(d3a,true)
This will display the relatorTables at each stage and the deductions
being made from the tables.
The conversions in both directions can be improved by implementing
better simplifications but since there is no canonical form the
simplifications can never be perfect. The Todd-Coxeter does not yet
detect and remove 'coincidences', that is, duplicated points. So this in
the next improvement that needs to be made.
I would like to get back to homology and homotopy so I am hoping that
this is good enough for the FriCAS library for now?
Martin B
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" 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/fricas-devel.
For more options, visit https://groups.google.com/d/optout.