Permutations

&GAP; offers a data type permutation to describe the elements of permutation groups.

The points on which permutations in &GAP; act are the positive integers up to a certain architecture dependent limit, and the image of a point i under a permutation p is written i^p, which is expressed as i^p in &GAP;. (This action is also implemented by the function .) If i^p is different from i, we say that i is moved by p, otherwise it is fixed. Permutations in &GAP; are entered and displayed in cycle notation, such as (1,2,3)(4,5).

The preimage of the point i under the permutation p can be computed as i/p, without constructing the inverse of p.

For arithmetic operations for permutations and their precedence, see .

In the names of the &GAP; functions that deal with permutations, the word Permutation is usually abbreviated to Perm, to save typing. For example, the category test function for permutations is .

IsPerm (Filter)
<#Include Label="[1]{permutat}"> <#Include Label="IsPerm"> <#Include Label="IsPermCollection"> <#Include Label="PermutationsFamily">

Comparison of Permutations
equality test
precedence test
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 \neq p2 and i^{{p1}} < i^{{p2}}, where i is the smallest point with i^{{p1}} \neq i^{{p2}}. Therefore the identity permutation is the smallest permutation, see also Section .

Permutations can be compared with certain other &GAP; objects, see 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
<#Include Label="DistancePerms"> <#Include Label="SmallestGeneratorPerm">

Moved Points of Permutations
<#Include Label="SmallestMovedPoint"> <#Include Label="LargestMovedPoint"> <#Include Label="MovedPoints"> <#Include Label="NrMovedPoints">

Sign and Cycle Structure
<#Include Label="SignPerm"> <#Include Label="CycleStructurePerm">

Creating Permutations
<#Include Label="ListPerm"> <#Include Label="PermList"> <#Include Label="MappingPermListList"> <#Include Label="RestrictedPerm">