A permutation group G is a group of bijections from a set X to itself. The elements of G are called permutations, and X is called the natural G-set for G.
The points of a G-set are the elements of X. The fixed-point set of G is the subset of points fixed by every permutation in G. The support of G is the subset of points moved by at least one permutation in G.
The degree of G is the cardinality of its natural G-set. The degree of an element g is the number of points it moves, i.e. the cardinality of its support.
Permutation groups in Magma are limited to degree less than 2^30.
All permutation groups belong to the Magma category GrpPerm. Every permutation group is constructed as a subgroup of a symmetric group Sym(X).
Constructing the Symmetric Group
The symmetric group on {1, 2, ..., n} is created with Sym(n) or SymmetricGroup(n). Initially only a structure table is created; generators are defined dynamically when structural computation is attempted.
> S6 := Sym(6);
You can also construct the symmetric group over any finite set X of cardinality n using Sym(X). Internally Magma maps X to {1, ..., n}; the Labelling function reveals this correspondence.
> S4 := Sym({"a", "b", "c", "d"});
> S4;
Symmetric group S4 acting on a set of cardinality 4
Order = 24 = 2^3 * 3
> GSet(S4);
GSet{@ c, b, a, d @}
StandardGroup(G) returns a group H isomorphic to G but acting on the standard set {1, ..., n}, together with the isomorphism from G to H. If G already acts on the standard set, G itself is returned.
Constructing Permutations
Given G acting on X = {x1, ..., xn}, a permutation mapping xi to ai can be built in three equivalent ways.
List constructor — provide the images as a list inside elt<>:
> x := elt<S6 | 1,3,2,5,6,4>;
> x;
(2, 3)(4, 5, 6)
Sequence coercion — coerce a sequence of images using !:
> y := S6![1,3,2,5,6,4];
> y;
(2, 3)(4, 5, 6)
Cycle notation — write the permutation directly in disjoint-cycle form:
> z := S6!(2,3)(4,5,6);
> z;
(2, 3)(4, 5, 6)
For large permutations, using literal cycle notation G!\(...) is strongly recommended to avoid unnecessary parse-tree overhead.
All three methods test membership in G. If the constructed permutation is not in G, the construction fails.
The sequence of images of g over the G-set is recovered with ElementToSequence(g) or Eltseq(g).
The identity permutation is constructed with Identity(G), Id(G), or G!1.
Constructing a General Permutation Group
A permutation group generated by a given list of permutations is constructed with PermutationGroup<n | L>, where n is the degree and L lists the generators.
> H := PermutationGroup<9 | (1,2,4)(5,6,8)(3,9,7), (4,5,6)(7,9,8)>;
> H;
Permutation group H acting on a set of cardinality 9
(1, 2, 4)(3, 9, 7)(5, 6, 8)
(4, 5, 6)(7, 9, 8)
You can also use a set X in place of n with PermutationGroup<X | L>. This is shorthand for creating Sym(n) and then using the sub<> subgroup constructor.
Generators in L may be image sequences, cycle expressions, elements of Sym(X), or subgroups of Sym(X).