GAP is a system especially designed for the computations in groups. Permutation groups are a very important class of groups and GAP offers a data type permutation to describe the elements of permutation groups.
Permutations in GAP operate on positive integers. Whenever group elements operate on a domain we call the elements of this domain points. Thus in this chapter we often call positive integers points, if we want to emphasize that a permutation operates on them. An integer i is said to be moved by a permutation p if the image i^p of i under p is not i. The largest integer moved by any permutation may not be larger than 2^{28}-1.
Note that permutations do not belong to a specific group. That means
that you can work with permutations without defining a permutation group
that contains them. This is just like it is with integers, with which
you can compute without caring about the domain Integers
that contains
them. It also means that you can multiply any two permutations.
Permutations are entered and displayed in cycle notation.
gap> (1,2,3); (1,2,3) gap> (1,2,3) * (2,3,4); (1,3)(2,4)
The first sections in this chapter describe the operations that are available for permutations (see Comparisons of Permutations and Operations for Permutations). The next section describes the function that tests whether an object is a permutation (see IsPerm). The next sections describe the functions that find the largest and smallest point moved by a permutation (see LargestMovedPointPerm and SmallestMovedPointPerm). The next section describes the function that computes the sign of a permutation (see SignPerm). The next section describes the function that computes the smallest permutation that generates the same cyclic subgroup as a given permutation (see SmallestGeneratorPerm). The final sections describe the functions that convert between lists and permutations (see ListPerm, PermList, RestrictedPerm, and MappingPermListList).
Permutations are elements of groups operating on positive integers in a natural way, thus see chapter Groups and chapter Operations for more functions.
The external functions are in the file LIBNAME/"permutat.g"
.
GAP 3.4.4