# Building Permutation Groups

Examples of permutation groups are routinely constructed by taking one or more standard groups and applying some extension procedure to construct a group having the given groups as subgroups or quotient groups. In the first subsection we describe functions which construct some well-known groups and in the following subsection we give functions for constructing direct and wreath products.

## Some Standard Permutation Groups

A number of functions are provided which construct various standard groups. The effect of these functions is to construct the group on some standard set of generating permutations.

### `AbelianGroup(GrpPerm, Q): Cat, [ RngIntElt ] -> GrpPerm`

Construct the abelian group defined by the sequence $Q = [n_1,\ldots,n_r]$ of positive integers. The function constructs the direct product of cyclic groups

$$
Z(n_1) \times Z(n_2) \times \cdots \times Z(n_r).
$$

### `AlternatingGroup(GrpPerm, n): Cat, RngIntElt -> GrpPerm`

### `AlternatingGroup(n): RngIntElt -> GrpPerm`

### `Alt(n): RngIntElt -> GrpPerm`

Construct the alternating group of degree $n$ on generators $(3,4,\ldots,n)$ and $(1,2,3)$, if $n$ is odd, or $(1,2)(3,4$, $\ldots$, $n)$ and $(1,2,3)$, if $n$ is even.

### `CyclicGroup(GrpPerm, n): Cat, RngIntElt -> GrpPerm`

### `CyclicGroup(n): RngIntElt -> GrpPerm`

Construct the cyclic group of order $n$ with generator $(1,2,\ldots,n)$.

### `DihedralGroup(GrpPerm, n): Cat, RngIntElt -> GrpPerm`

### `DihedralGroup(n): RngIntElt -> GrpPerm`

Construct the dihedral group of degree $n$ and order $2*n$ on generators $(1,2,\ldots,n)$ and $(1,n)(2,n-1)\cdots$.

### `Sym(GrpPerm, n): Cat, RngIntElt -> GrpPerm`

### `SymmetricGroup(GrpPerm, n): Cat, RngIntElt -> GrpPerm`

### `Sym(n): RngIntElt -> GrpPerm`

### `SymmetricGroup(n): RngIntElt -> GrpPerm`

Construct the symmetric group of degree $n$ on generators $(1,2,\ldots,n)$ and $(1,2)$.

### `ExtraSpecialGroup(GrpPerm, p, n : parameters): Cat, RngIntElt, RngIntElt -> GrpPerm`

### `ExtraSpecialGroup(p, n : parameters): RngIntElt, RngIntElt -> GrpPerm`

```magma
Type: MonStgElt                    Default: "+"
```

Given a small prime $p$ and a small positive integer $n$, construct an extra-special group $G$ of order $p^{2n+1}$ in the category `GrpPerm`. The isomorphism type of $G$ can be selected using the parameter `Type`.

Possible values for this parameter are “$+$” (default) and “$-$“.

If `Type` is set to “$+$”, the function returns for $p = 2$ the central product of $n$ copies of the dihedral group of order 8, and for $p > 2$ it returns the unique extra-special group of order $p^{2n+1}$ and exponent $p$.

If `Type` is set to “$-$”, the function returns for $p = 2$ the central product of a quaternion group of order 8 and $n-1$ copies of the dihedral group of order 8, and for $p > 2$ it returns the unique extra-special group of order $p^{2n+1}$ and exponent $p^2$.

### `YoungSubgroup(L): [RngIntElt] -> GrpPerm`

```magma
Full: RngIntElt                    Default: false
```

Given a sequence $L$ of positive integers, compute the Young subgroup parameterized by $L$, i.e., the direct product of the symmetric groups on $L_i$ points. If the optional parameter `Full` is given, construct the group as a subgroup of the symmetric group on `Full` elements.

### `Example: Standard Groups (ex-98baac)`

The abelian group $Z_2 \times Z_2 \times Z_4$:

```magma
> A := AbelianGroup(GrpPerm, [2, 2, 4] );
> A;
Permutation group A acting on a set of cardinality 8
Order = 16 = 2^4
    (1, 2)
    (3, 4)
    (5, 6, 7, 8)

```

The alternating group of degree $12$:

```magma
> A12 := AlternatingGroup(GrpPerm, 12);
> A12;
Permutation group A12 acting on a set of cardinality 12
Order = 239500800 = 2^9 * 3^5 * 5^2 * 7 * 11
    (1, 2)(3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
    (1, 2, 3)

```

The cyclic group $Z_{24}$:

```magma
> Z24 := CyclicGroup(GrpPerm, 24);
> Z24;
Permutation group Z24 on a set of cardinality 24
Order = 24 = 2^3 * 3
    (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19, 20, 21, 22, 23, 24)

```

The dihedral group of order $24$:

```magma
> D12 := DihedralGroup(GrpPerm, 12);
> D12;
Permutation group D12 acting on a set of cardinality 12
Order = 24 = 2^3 * 3
    (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
    (1, 12)(2, 11)(3, 10)(4, 9)(5, 8)(6, 7)

```

The symmetric group of degree $8$:

```magma
> S8 := SymmetricGroup(GrpPerm, 8);
> S8;
Symmetric group S8 acting on a set of cardinality 8
Order = 40320 = 2^7 * 3^2 * 5 * 7

```

## Direct Products and Wreath Products

### `DirectProduct(G, H): GrpPerm, GrpPerm -> GrpPerm, [ Hom(Grp) ], [ Hom(Grp) ]`

Given two permutation groups $G$ and $H$, construct the direct product $D$ of $G$ and $H$ as an intransitive group having degree equal to the sum of the degrees of $G$ and $H$. In addition, the sequences $I$ of inclusions and $P$ of projections are returned, satisfying $I[i]: K_i\rightarrow D(K_i)$ and $P[i]: D\rightarrow K_i$ (where $K_1 = G, K_2 = H$ and $D(K)$ is the group $K$ represented naturally as a subgroup of $D$).

### `DirectProduct(Q): [ GrpPerm ] -> GrpPerm, [ Hom(Grp) ], [ Hom(Grp) ]`

Given a sequence $Q$ of $n$ permutation groups, construct the direct product $Q[1] \times Q[2] \times \ldots \times Q[n]$ as an intransitive group of degree equal to the sum of the degrees of the groups $Q[i]$, $(i = 1, \ldots, n)$. In addition, the sequences $I$ of inclusion and $P$ of projections are returned, satisfying $I[i]: Q[i]\rightarrow D(Q[i])$ and $P[i]: D\rightarrow Q[i]$ (where $D(K)$ is the group $K$ represented naturally as a subgroup of $D$).

### `PrimitiveWreathProduct(G, H): GrpPerm, GrpPerm -> GrpPerm`

Given permutation groups $G$ and $H$, construct the wreath product $G\wr H$ of $G$ and $H$, where $G\wr H$ has product action.

### `PrimitiveWreathProduct(Q): [ GrpPerm ] -> GrpPerm`

Given a sequence $Q$ of $n$ permutation groups, construct the iterated wreath product $T = ( \ldots (Q[1] \wr Q[2]) \wr \ldots \wr Q[n])$, where $T$ has product action.

### `WreathProduct(G, H): GrpPerm, GrpPerm -> GrpPerm, SeqEnum[Map], Map, Map`

Given permutation groups $G$ and $H$, construct the wreath product $W = G\wr H$ of $G$ and $H$, where $G\wr H$ has imprimitive action. The function also returns the sequence of `Degree(H)` inclusions of $G$ into $W$, the inclusion of $H$ into $W$ and the projection of $W$ onto $H$.

### `WreathProduct(Q): [ GrpPerm ] -> GrpPerm`

Given a sequence $Q$ of $n$ permutation groups, construct the iterated wreath product $W = ( \ldots (Q[1] \wr Q[2]) \wr \ldots \wr Q[n])$, where $W$ has imprimitive action.

### `WreathProduct(B): GSet -> GrpPerm, GrpPerm, GrpPerm`

Given a block system $B$ of some permutation group $G$, compute the wreath-product corresponding to $B$.

### `WreathProduct(G, B): GrpPerm, GSet -> GrpPerm, GrpPerm, GrpPerm`

Compute the smallest wreath product $W$ to the block system $B$ of $G$ such that $G \subseteq W$. Also return the complement as a subgroup of $W$. The third parameter is a subgroup which is isomorphic to the action within a block.

### `Example: Products (ex-4e2871)`

We define $G$ to be the symmetric group of degree $4$ and $H$ to be the dihedral group of order $8$. We then proceed to form the direct, primitive-wreath and wreath products of $G$ and $H$.

```magma
> G := SymmetricGroup(GrpPerm, 4);
> H := DihedralGroup(GrpPerm, 3);
> D := DirectProduct(G, H);
> D;
Permutation group D acting on a set of cardinality 7
Order = 144 = 2^4 * 3^2
    (1, 2, 3, 4)
    (1, 2)
    (5, 6, 7)
    (5, 6)
> T := PrimitiveWreathProduct(G, H);
> T;
Permutation group T acting on a set of cardinality 64
Order = 82944 = 2^10 * 3^4
    (2, 5, 17)(3, 9, 33)(4, 13, 49)(6, 21, 18)(7, 25, 34)(8, 29, 50)
       (10, 37, 19) (11, 41, 35)(12, 45, 51) (14, 53, 20)(15, 57, 36)
       (16, 61, 52)(23, 26, 38) (24, 30, 54)(27, 42, 39)(28, 46, 55)
       (31, 58, 40) (32, 62, 56)(44, 47, 59)(48, 63, 60)
    (2, 5)(3, 9)(4, 13)(7, 10)(8, 14)(12, 15)(18, 21)(19 , 25)(20, 29)
       (23, 26)(24, 30)(28, 31)(34, 37)(35 , 41)(36, 45)(39, 42)(40, 46)
       (44, 47)(50, 53)(51 , 57)(52, 61)(55, 58)(56, 62)(60, 63)
    (1, 2, 3, 4)(5, 6, 7, 8)(9, 10, 11, 12)(13, 14, 15, 16)(17, 18, 19, 20)
       (21, 22, 23, 24)(25, 26, 27, 28)(29, 30, 31, 32)(33, 34, 35, 36)
       (37, 38, 39, 40)(41, 42, 43, 44)(45, 46, 47, 48)(49, 50, 51, 52)
       (53, 54, 55, 56)(57, 58, 59, 60)(61, 62, 63, 64)
    (1, 2)(5, 6)(9, 10)(13, 14)(17, 18)(21, 22)(25, 26)( 29, 30)(33, 34)
       (37, 38)(41, 42)(45, 46)(49, 50)( 53, 54)(57, 58)(61, 62)
> W := WreathProduct(G, H);
> W;
Permutation group W acting on a set of cardinality 12
Order = 82944 = 2^10 * 3^4
    (1, 5, 9)(2, 6, 10)(3, 7, 11)(4, 8, 12)
    (1, 5)(2, 6)(3, 7)(4, 8)
    (1, 2, 3, 4)
    (1, 2)

```
