# Metacyclic $p$-groups

Magma contains functions for constructing all metacyclic groups of order $p^n$. It can also decide if a given $p$-group is metacyclic, construct invariants which distinguish this metacyclic group from all others of this order, and construct a standard presentation for the group.

This section describes the functions for accessing these algorithms. The functions were developed by Mike Newman, Eamonn O’Brien, and Michael Vaughan-Lee.

## `MetacyclicPGroups(p, n: parameters): RngIntElt, RngIntElt -> SeqEnum`

```magma
PCGroups: BoolElt                    Default: true
```

Return a list of the metacyclic groups of order $p^m$, where $p$ is a prime and $n$ is a positive integer.

If `true`, the groups returned are in category GrpPC, otherwise they are in category GrpFP – this will be faster if the groups have large class.

## `IsMetacyclicPGroup(P): Grp -> BoolElt`

The group $P$ is a $p$-group, either pc- or matrix or permutation group; if $P$ is metacyclic, then return `true`, else `false`.

## `InvariantsMetacyclicPGroup(P): Grp -> Tup`

The group $P$ is a metacyclic $p$-group, either pc- or matrix or permutation group; return tuple of invariants which uniquely identify metacyclic $p$-group $P$. This tuple which contains at least four terms, $\langle r, s, t, n \rangle$ has the following meaning: $P$ has order $p^{n + s}$; its derived quotient is $C_{p^r} \times C_{p^s}$; its derived group is cyclic of order $p^{n - r}$; it has exponent $p^{n +s - t}$.

If $p = 2$, then additional invariants are needed to distinguish among the groups. We record the abelian invariants of the centre of $P$. If $s = 1$ and the centre of $P$ has order $2$, then the 2-group is maximal class and we record whether it is dihedral, quaternion or semidihedral. If $s > 1$ then the group has two cyclic central normal subgroups of order $2^{s - 1}$ whose central quotients are both semidihedral, or dihedral and quaternion. The invariant tuple has length at most 6.

## `StandardMetacyclicPGroup(P): Grp -> GrpPC`

The group $P$ is a metacyclic $p$-group, either pc- or matrix or permutation group; return metacyclic $p$-group having a canonical pc-presentation which is isomorphic to $P$. If two metacyclic $p$-groups have the same canonical presentation, then they are isomorphic.

## `NumberOfMetacyclicPGroups(p, n): RngIntElt, RngIntElt -> SeqEnum`

Return number of metacyclic groups of order $p^n$.

## `HasAllPQuotientsMetacyclic(G): GrpFP -> BoolElt, SeqEnum`

## `HasAllPQuotientsMetacyclic(G, p): GrpFP -> BoolElt`

Return `true` if for all primes $p$ all $p$-quotients of the finitely-presented group $G$ are metacyclic; otherwise return `false` and a description of the set of primes for which $G$ has non-metacyclic $p$-quotient.

If a prime $p$ is supplied as a second argument, then the function returns `true` if all $p$-quotients of $G$ are metacyclic; otherwise it returns `false`.

## `Example: meta (ex-0140ea)`

```magma
> X := MetacyclicPGroups (3, 6);
> #X;
11
> X[4];
GrpPC of order 729 = 3^6
PC-Relations:
    $.1^3 = $.3,
    $.2^3 = $.4,
    $.3^3 = $.6,
    $.4^3 = $.5,
    $.5^3 = $.6,
    $.2^$.1 = $.2 * $.6^2
> H := SmallGroup (729, 59);
> IsMetacyclicPGroup (H);
true
> I := InvariantsMetacyclicPGroup(H);
> I;
<2, 2, 2, 4, [], , >
> S := StandardMetacyclicPGroup (H);
GrpPC : S of order 729 = 3^6
PC-Relations:
    S.1^3 = S.3,
    S.2^3 = S.4,
    S.3^3 = S.6,
    S.4^3 = S.5,
    S.5^3 = S.6,
    S.2^S.1 = S.2 * S.6^2
> /* find this group in list */
> [IsIdenticalPresentation (S, X[i]): i in [1..#X]];
[ false, false, false, true, false, false, false, false, false, false, false ]
> /* so this group is #4 in list */
> NumberOfMetacyclicPGroups (19, 7);
14
> Q := FreeGroup (4);
> G := quo < Q |  Q.2^2, Q.4^3, Q.2 * Q.3 * Q.2 * Q.3^-1, Q.1^9>;
> /* are all p-quotients of G metacyclic? */
> HasAllPQuotientsMetacyclic (G);
false [ 3 ]
> /* the 3-quotient is not metacyclic */

```
