# Central Extensions

We now describe functions to construct $H^2(G,U)$ for a finite soluble group $G$ and finite abelian group $U$ (a trivial $G$-module). We also present functions to construct central extensions of $U$ by $G$.

Denote by $Z^2(G,U)$ the abelian group of all cocycles from $G$ to $U$, under pointwise multiplication. The values $\psi(g,h)$ of $\psi \in Z^2(G, U)$ may be represented as a “cocyclic matrix” with entries in $U$.

If $\phi \colon G \rightarrow U$ is a set map with $\phi (1_G) = 1_U$, then there is a coboundary $\partial \phi \in Z^2(G,U)$ defined by $\partial \phi(g,h) = \phi(g) \phi (h) \phi(gh)^{-1}$. The group of all coboundaries from $G$ to $U$ is denoted $B^2(G,U)$, and we have $H^2(G,U) = Z^2(G,U)/B^2(G,U)$. Then $H^2(G,U)=I\times T$, where $I$ is the (faithful) image of Ext$(G/G', U) \leq H^2(G/G', U)$ under inflation, and $T$ is the (faithful) image of Hom$(H_2(G), U)$ under a certain transgression homomorphism. Here we provide functions which construct representatives for the elements in a generating set for each of these two factors.

For details of the theory and the algorithm used, see [[Flannery and O'Brien, 2000](../../references.md#cite-fo-centex)].

`SetVerbose ("Cocycle", 1)` will provide additional information on the calculations in the functions.

## `ExtGenerators(G, U): GrpPC, GrpPC -> [<AlgMatElt, RngIntElt>]`

Given a soluble group $G$ and an abelian group $U$ (both defined by pc-presentations) the function returns a sequence of tuples describing generators for Ext$(G/G', U)$ as cocyclic matrices; the first entry in each tuple is a representative of a generator, the second is the order of the coset of the representative in $H^2(G, U)$.

## `HomGenerators(G, U): GrpPC, GrpPC -> [<AlgMatElt, RngIntElt>]`

Given a soluble group $G$ and an abelian group $U$ (both defined by pc-presentations) the function returns a sequence of tuples describing generators for Hom$(H_2 (G), U)$ as cocyclic matrices; the first entry in each tuple is a representative of a generator, the second is the order of the coset of the representative in $H^2(G, U)$.

## `ElementSequence(G): GrpPC -> SeqEnum`

For a soluble group $G$, the function returns an indexed set of elements of $G$ listed in the order used by `ExtGenerators` and `HomGenerators`.

## `RepresentativeCocycles(G, U, Ext, Hom): GrpPC, GrpPC, [AlgMatElt], [AlgMatElt] -> [AlgMatElt]`

Let $G$ be a soluble group $G$ and $U$ be an abelian group both defined by pc-presentations. Let $Ext$ and $Hom$ be the values returned by calling `ExtGenerators` and `HomGenerators` respectively. The function `RepresentativeCocycles` returns a complete and irredundant set of representatives for the elements of $H^2(G,U)$ as cocyclic matrices.

## `CentralExtension(G, U, A): GrpPC, GrpPC, AlgMatElt -> GrpPC`

Let $G$ be a soluble group $G$ and $U$ be an abelian group, both defined by pc-presentations. Further, let $A$ be a cocyclic matrix (as determined by the function `RepresentativeCocycles`). Then, this function returns the central extension of $U$ by $G$ determined by the cocyclic matrix $A$.

## `CentralExtensions(G, U, Q): GrpPC, GrpPC, [AlgMatElt] -> [GrpPC]`

If $G$ is a soluble group $G$ and $U$ is an abelian group, both defined by pc-presentations, and $Q$ is a sequence of cocyclic matrices (as determined by the function `RepresentativeCocycles`), this function returns the corresponding sequence of central extension of $U$ by $G$ determined by the sequence of cocyclic matrices $A$. Note that the central extensions thereby constructed need not be mutually non-isomorphic.

## `CentralExtensionProcess(G, U): GrpPC, GrpPC -> Proc`

Given a soluble group $G$ and an abelian group $U$ (both defined by pc-presentations) the function creates a process $P$ for central extensions of $U$ by $G$. Note that the list of central extensions constructed by this process will contain all isomorphism types but the extensions need not be mutually non-isomorphic.

## `NextExtension(~P): Rec -> GrpPC`

Given a central extension process $P$, construct the next central extension determined by $P$.

## `IsEmpty(P): Rec -> BoolElt`

Return `true` if all central extensions determined by the process $P$ have been constructed; otherwise return `false`.

## `Example: Central Extension (ex-b4d774)`

We compute the abelian invariants of $H^2 (D_4, C_2)$.

```magma
> G := DihedralGroup(GrpPC, 4);
> U := AbelianGroup(GrpPC, [2]);
>
> Ext := ExtGenerators(G, U);
> Ext[1];
    <[Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) Id(U) Id(U) Id(U) U.1 U.1 U.1 U.1]
    [Id(U) Id(U) Id(U) Id(U) U.1 U.1 U.1 U.1]
    [Id(U) Id(U) Id(U) Id(U) U.1 U.1 U.1 U.1]
    [Id(U) Id(U) Id(U) Id(U) U.1 U.1 U.1 U.1], 2>,
>
> Hom := HomGenerators(G, U);
> Hom;
[
    <[Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) U.1 U.1 Id(U) Id(U) U.1 U.1 Id(U)]
    [Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U) Id(U)]
    [Id(U) U.1 U.1 Id(U) Id(U) U.1 U.1 Id(U)]
    [Id(U) Id(U) Id(U) U.1 Id(U) U.1 U.1 U.1]
    [Id(U) U.1 Id(U) Id(U) U.1 U.1 Id(U) U.1]
    [Id(U) Id(U) Id(U) U.1 Id(U) U.1 U.1 U.1]
    [Id(U) U.1 Id(U) Id(U) U.1 U.1 Id(U) U.1], 2>
]
>
> AbelianInvariants(Ext, Hom);
[ 2, 2, 2 ]

```

We now compute the central extension of U by G determined by a single cocyclic matrix.

```magma
> A := RepresentativeCocycles(G, U, Ext, Hom);
> E := CentralExtension(G, U, A[2]);
> E;
GrpPC : E of order 16 = 2^4
PC-Relations:
    E.1^2 = E.4,
    E.2^2 = E.3 * E.4,
    E.2^E.1 = E.2 * E.3

```

Alternatively we can build all central extensions of U by G.

```magma
> E := CentralExtensions(G, U, A);
> "Number of extensions is ", #E;
Number of extensions is  8

```

Next, we provide an example of using the central extension process. Firstly, we create the groups and initialize the process.

```magma
> G := SmallGroup(12, 5);
> U := AbelianGroup(GrpPC, [2, 3]);
> P := CentralExtensionProcess(G, U);

```

Now we run over the central extensions and count conjugacy classes.

```magma
> C := [];
> while IsEmpty(P) eq false do
>    NextExtension(~P, ~E);
>    Append(~C, #Classes (E));
> end while;
> "# conjugacy classes is ", C;
# conjugacy classes is  [ 45, 72, 45, 72, 45, 72, 45, 72, 45, 72, 45,
72, 45, 72, 45, 72, 45, 72, 45, 72, 45, 72, 45, 72 ]

```
