# General Group Properties

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

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

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

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

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

Returns `true` if the group $G$ is elementary abelian, `false` otherwise. The following definition is used:

A group $G$ is called elementary abelian if it is an abelian $p$-group of exponent $p$ for some prime $p$.

## `IsFinite(G): GrpGPC -> BoolElt`

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

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

Returns `true` if the group $G$ is nilpotent, `false` otherwise. This function uses an algorithm described in [[Lo, 1998](../../references.md#cite-lo-nilpotent)].

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

Returns `true` if the group $G$ is perfect, `false` otherwise. A polycyclic group $G$ is perfect, if and only if it is trivial.

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

Returns `true` if the group $G$ is simple, `false` otherwise. A polycyclic group is simple, if and only if it is cyclic of prime order.

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

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

Returns `true` if the group $G$ is solvable, `false` otherwise. Every polycyclic group is solvable.

## General Properties of Subgroups

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

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

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

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

## Properties of Subgroups Requiring a Nilpotent Covering Group

The functions described in this section require the existence of a nilpotent covering group. The are based on algorithms published in [[Lo, 1998](../../references.md#cite-lo-nilpotent)].

### `IsConjugate(G, H, K): GrpGPC, GrpGPC, GrpGPC -> BoolElt, GrpGPCElt`

Given groups $G$, $H$ and $K$ with a nilpotent common covering group, return the value `true` if there exists $c\in G$ such that $H^c = K$. If so, the function returns such a conjugating element as second value.

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

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

Returns `true` if the subgroup $H$ of the nilpotent group $G$ is self-normalising in $G$, `false` otherwise.

### `Example: Subgroup Structure (ex-905fd9)`

We define a group $G$ on 5 generators $a,\ldots,e$ of infinite order by fixing the commutators of the generators:

$$
(b,a) = e^2, \quad (d,c)=e^3
$$

All other pairs of generators commute.

```magma
> F<a,b,c,d,e> := FreeGroup(5);
> rels := [ b^a = b*e^2, b^(a^-1) = b*e^-2, d^c = d*e^3,
>           d^(c^-1) = d*e^-3 ];
> G<a,b,c,d,e> := quo< GrpGPC: F | rels >;
> IsNilpotent(G);
true

```

Since $G$ is nilpotent, we can compute intersections of subgroups of $G$.

We define the subgroups generated by $a,\ldots,e$ and their nontrivial commutator groups as subgroups of $G$.

```magma
> H1 := sub<G|a>;
> H2 := sub<G|b>;
> H3 := sub<G|c>;
> H4 := sub<G|d>;
> H5 := sub<G|e>;
>
> C12 := CommutatorSubgroup(H1, H2);
> {@ G!x : x in PCGenerators(C12) @};
{@ e^2 @}
> C12 subset H5;
true
>
> C34 := CommutatorSubgroup(H3, H4);
> {@ G!x : x in PCGenerators(C34) @};
{@ e^3 @}
> C34 subset H5;
true

```

Finally, we compute the intersection $C$ of $C12$ and $C13$.

```magma
> C := C12 meet C34;
> {@ G!x : x in PCGenerators(C) @};
{@ e^6 @}

```

This intersection $C$ is cyclic and central in $G$.

```magma
> IsCyclic(C);
true
> IsCentral(G, C);
true

```

### `Example: Subgroup Structure2 (ex-bc5c0c)`

Consider the nilpotent group $G := D_{16}\wr 2$ generated by the 5 generators $a,b,c,d,t$ with the relations

$$
a^2 = 1,\quad b^{16} = 1,\quad b^a = b^{15}
$$

$$
c^2 = 1,\quad d^{16} = 1,\quad d^c = d^{15}
$$

$$
t^2 = 1,\quad a^t = c,\quad b^t = d,\quad c^t = a,\quad d^t = b
$$

(All other pairs of generators commute.)

```magma
> F<t, a,b, c,d> := FreeGroup(5);
> G<t, a,b, c,d> := quo<GrpGPC: F | a^2, b^16, b^a=b^15,
>                                   c^2, d^16, d^c=d^15,
>                      t^2, a^t=c, b^t=d, c^t=a, d^t=b>;
> IsNilpotent(G);
true

```

Since $G$ is nilpotent, we can compute normalisers and centralisers in $G$.

We define the (dihedral) subgroup $D3$ of $G$ generated by $ac$ and $bd$ and compute its normaliser in $G$ and its centraliser in the (dihedral) subgroup $D2$ of $G$ generated by $c$ and $d$.

```magma
> D2 := sub<G|c,d>;
>
> D3<u,v> := sub<G|a*c, b*d>;
> D3;
GrpGPC : D3 of order 2^5 on 2 PC-generators
PC-Relations:
    u^2 = Id(D3),
    v^16 = Id(D3),
    v^u = v^15
>
> N3 := Normaliser(G, D3);
> PCGenerators(N3, G);
{@ t, a * c, b * d, d^8 @}
>
> C3 := Centraliser(D2, D3);
> PCGenerators(C3, G);
{@ d^8 @}

```

Finally we compute the centraliser of the element $t$ in $G$.

```magma
> Ct := Centraliser(G, t);
> PCGenerators(Ct, G);
{@ t, a * c, b * d @}

```
