We represent a permutation as two lists of equal length representing preimages and images of moved points. I.e., fixed points do not occur in either of these lists. This enables us to compute the set of fixed points and the set of moved points easily.
p := coercePreimagesImages([[1,2,3],[1,2,3]])
1
Type: Permutation PositiveInteger
movedPoints p
{}
Type: Set PositiveInteger
even? p
true
Type: Boolean
p := coercePreimagesImages([[0,1,2,3],[3,0,2,1]])$PERM ZMOD 4
(1 0 3)
Type: Permutation IntegerMod 4
fixedPoints p
{2}
Type: Set IntegerMod 4
q := coercePreimagesImages([[0,1,2,3],[1,0]])$PERM ZMOD 4
(1 0)
Type: Permutation IntegerMod 4
fixedPoints(p*q)
{2,0}
Type: Set IntegerMod 4
even?(p*q)
false
Type: Boolean
See Also: