# Standard Subgroup Constructions

Some functions described in this section may not exist or may have restrictions for some categories of groups. Details can be found in the chapters on the individual categories.

## `H ^ g: GrpFin, GrpFinElt -> GrpFin`

## `Conjugate(H, g): GrpFin, GrpFinElt -> GrpFin`

Construct the conjugate $g^{-1}Hg$ of the group $H$ by the element $g$. The group $H$ and the element $g$ must belong to the same generic group.

## `H meet K: GrpFin, GrpFin -> GrpFin`

Given groups $H$ and $K$ which belong to the same symmetric group, construct the intersection of $H$ and $K$.

## `CommutatorSubgroup(G, H, K): GrpFin, GrpFin, GrpFin -> GrpFin`

## `CommutatorSubgroup(H, K): GrpFin, GrpFin -> GrpFin`

Given groups $H$ and $K$, both subgroups of the group $G$, construct the commutator subgroup of $H$ and $K$ in the group $G$. If $K$ is a subgroup of $H$, then the group $G$ may be omitted.

## `Centralizer(G, g): GrpFin, GrpFinElt -> GrpFin`

## `Centraliser(G, g): GrpFin, GrpFinElt -> GrpFin`

Construct the centralizer of the element $g$ in the group $G$.

## `Centralizer(G, H): GrpFin, GrpFin -> GrpFin`

## `Centraliser(G, H): GrpFin, GrpFin -> GrpFin`

Construct the centralizer of the group $H$ in the group $G$.

## `Core(G, H): GrpFin, GrpFin -> GrpFin`

Given a subgroup $H$ of the group $G$, construct the maximal normal subgroup of $G$ that is contained in the subgroup $H$.

## `H ^ G: GrpFin, GrpFin -> GrpFin`

## `NormalClosure(G, H): GrpFin, GrpFin -> GrpFin`

Given a subgroup $H$ of the group $G$, construct the normal closure of $H$ in $G$.

## `Normalizer(G, H): GrpFin, GrpFin -> GrpFin`

## `Normaliser(G, H): GrpFin, GrpFin -> GrpFin`

Given a subgroup $H$ of the group $G$, construct the normalizer of $H$ in $G$.

## `pCore(G, p): GrpFin, RngIntElt -> GrpFin`

Given a group $G$ and a prime $p$ dividing the order of $G$, construct the maximal normal $p$-subgroup of $G$.

## `SylowSubgroup(G, p): GrpFin, RngIntElt -> GrpFin`

## `Sylow(G, p): GrpFin, RngIntElt -> GrpFin`

Given a group $G$ and a prime $p$, construct a Sylow $p$-subgroup of $G$.

## Abstract Group Predicates

Some functions described in this section may not exist or may have restrictions for some categories of groups. Details can be found in the chapters on the individual categories.

### `IsAbelian(G): GrpFin -> BoolElt`

Returns `true` if the group $G$ is abelian, `false` otherwise.

### `IsCyclic(G): GrpFin -> BoolElt`

Returns `true` if the group $G$ is cyclic, `false` otherwise.

### `IsElementaryAbelian(G): GrpFin -> BoolElt`

Returns `true` if the group $G$ is elementary abelian, `false` otherwise.

### `IsCentral(G, H): GrpFin, GrpFin -> BoolElt`

Return `true` if the subgroup $H$ of the group $G$ lies in the centre of $G$, `false` otherwise.

### `IsConjugate(G, g, h): GrpFin, GrpFinElt, GrpFinElt -> BoolElt, GrpFinElt`

Given a group $G$ and elements $g$ and $h$ belonging to $G$, return the value `true` if $g$ and $h$ are conjugate in $G$. The function returns a second value if the elements are conjugate: an element $k$ which conjugates $g$ into $h$. For permutation groups it is sufficient that $G$, $g$ and $h$ have a common covering group.

### `IsConjugate(G, H, K): GrpFin, GrpFin, GrpFin -> BoolElt, GrpFinElt`

Given a group $G$ and subgroups $H$ and $K$ belonging to $G$, return the value `true` if $H$ and $K$ are conjugate in $G$. The function returns a second value if the subgroups are conjugate: an element $z$ which conjugates $H$ into $K$. For permutation groups it is sufficient that $G$, $H$ and $K$ have a common covering group.

### `IsExtraSpecial(G): GrpFin -> BoolElt`

Given a group $G$ is a $p$-group $G$, return `true` if $G$ is extra-special, `false` otherwise.

### `IsHyperelementary(G): Grp -> BoolElt, Grp, Grp`

```magma
p: RngIntElt                    Default: 0
```

Test if $G$ is a finite hyperelementary (=quasi-elementary) group, that is a semi-direct product $G=C:P$ with $C$ cyclic and $P$ a $p$-group of order coprime to $C$. If yes, returns `true`, $C$, $P$. Otherwise returns `false`. The prime number $p$ can be forced with an optional parameter $p$ ($0$ by default).

### `Example: Grp Ishyperelementary (ex-d7354f)`

```magma
> ok,C,P:=IsHyperelementary(Sym(3));   // S3=C3:C2 is hyperelementary
> ok,GroupName(C),GroupName(P);
true C3 C2
> ok,C,P:=IsHyperelementary(Sylow(Sym(6),2));    // So is any p-group
> ok,GroupName(C),GroupName(P);
true C1 C2*D4
> IsHyperelementary(Sym(4));             // S4 is not hyperelementary
false

```

### `IsMaximal(G, H): GrpFin, GrpFin -> BoolElt`

Returns `true` if the subgroup $H$ of the group $G$ is a maximal subgroup of $G$. This function is evaluated by constructing the permutation representation of $G$ on the cosets of $H$ and testing this representation for primitivity. For this reason, the use of `IsMaximal` should be avoided if the index of $H$ in $G$ exceeds a one hundred thousand.

### `IsNilpotent(G): GrpFin -> BoolElt`

Return `true` if the group $G$ is nilpotent, `false` otherwise.

### `IsNormal(G, H): GrpFin, GrpFin -> BoolElt`

Return `true` if the subgroup $H$ of the group $G$ is a normal subgroup of $G$, `false` otherwise.

### `IsPerfect(G): GrpFin -> BoolElt`

Return `true` if the group $G$ is perfect, `false` otherwise.

### `IsQGroup(G): Grp -> BoolElt`

Returns `true` if the group $G$ is a ${\mathbb{Q}}$-group (all characters are rational-valued).

### `Example: Grp Isqgroup (ex-694ffe)`

```magma
> IsQGroup(Sym(4));         // Symmetric groups S_n are Q-groups
true
> IsQGroup(Alt(4));         // and alternating groups A_n are not (for n>2)
false

```

### `IsSelfNormalizing(G, H): GrpFin, GrpFin -> BoolElt`

### `IsSelfNormalising(G, H): GrpFin, GrpFin -> BoolElt`

Return `true` if the subgroup $H$ of the group $G$ is self-normalizing in $G$, `false` otherwise.

### `IsSimple(G): GrpFin -> BoolElt`

Return `true` if the group $G$ is simple, `false` otherwise.

### `IsSoluble(G): GrpFin -> BoolElt`

### `IsSolvable(G): GrpFin -> BoolElt`

Return `true` if the group $G$ is soluble, `false` otherwise.

### `IsSpecial(G): GrpFin -> BoolElt`

Given a $p$-group $G$, return `true` if $G$ is special, `false` otherwise.

### `IsAbstractFrobeniusGroup(G): GrpFin -> BoolElt, Grp, Grp`

Is the finite group $G$ a Frobenius group as an abstract group? Equivalently, does there exist a faithful permutation representation of $G$ for which the image is a Frobenius group as a permutation group? If so, then return `true`, a Frobenius kernel, and a corresponding Frobenius complement; otherwise return `false`.

### `IsSubnormal(G, H): GrpFin, GrpFin -> BoolElt`

Return `true` if the subgroup $H$ of the group $G$ is subnormal in $G$, `false` otherwise.

### `IsTrivial(G): Grp -> BoolElt`

Return `true` if $G$ is trivial, `false` otherwise.
