SmallestGeneratorPerm( perm )
SmallestGeneratorPerm
returns the smallest permutation that generates
the same cyclic group as the permutation perm.
gap> SmallestGeneratorPerm( (1,4,3,2) ); (1,2,3,4)
Note that SmallestGeneratorPerm
is very efficient, even when perm has
huge order.
GAP 3.4.4