p_1 = p_2
p_1 < p_2
Two permutations are equal if they move the same points and all these points have the same images under both permutations.
The permutation p1 is smaller than p2 if p1 ¹ p2 and ip1 < ip2 where i is the smallest point with ip1 ¹ ip2. Therefore the identity permutation is the smallest permutation. (see also Comparison Operations for Elements)
Permutations can be compared with certain other GAP objects, see Comparisons for the details.
gap> (1,2,3) = (2,3,1); true gap> (1,2,3) * (2,3,4) = (1,3)(2,4); true gap> (1,2,3) < (1,3,2); # 1^(1,2,3) = 2 < 3 = 1^(1,3,2) true gap> (1,3,2,4) < (1,3,4,2); # 2^(1,3,2,4) = 4 > 1 = 2^(1,3,4,2) false
SmallestGeneratorPerm( perm ) F
is the smallest permutation that generates the same cyclic group as the permutation perm. This is very efficient, even when perm has large order.
gap> SmallestGeneratorPerm( (1,4,3,2) ); (1,2,3,4)
GAP 4 manual