# Cohomology

In the following description, $G$ is a finite permutation group, $p$ is a prime number, and $K$ is the finite field of order $p$. Further, $F$ is a finitely presented group having the same number of generators as $G$, and is such that its relations are satisfied by the corresponding generators of $G$. In other words, the mapping taking the $i$-th generator of $F$ to the $i$-th generator of $G$ must be an epimorphism. Usually this mapping will be an isomorphism, although this is not mandatory. The algorithms used are those of Holt, see [[Holt, 1984](../../references.md#cite-holt-multiplier)], [[Holt, 1985](../../references.md#cite-holt-cover)] and [[Holt, 1985](../../references.md#cite-holt-cohom)].

## `pMultiplicator(G, p): GrpPerm, RngIntElt -> [ RngIntElt ]`

Given the group $G$ and a prime $p$, return the invariant factors of the $p$-part of the Schur multiplicator of $G$.

## `pCover(G, F, p): GrpPerm, GrpFP, RngIntElt -> GrpFP`

Given the group $G$ and the finitely presented group $F$ such that $G$ is an epimorphic image of $G$ in the sense described above, return a presentation for the $p$-cover of $G$, constructed as an extension of the $p$-multiplier by $F$.

## `CohomologicalDimension(G, M, i): GrpPerm, ModRng, RngIntElt -> RngIntElt`

Given the group $G$, the $K[G]$-module $M$ and an integer $i$ (equal to 1 or 2), return the dimension of the $i$-th cohomology group of $G$ acting on $M$.

## `ExtensionProcess(G, M, F): GrpPerm, ModRng, GrpFP -> Process`

Create an extension process for the group $G$ by the module $M$.

## `Extension(P, Q): Process -> GrpFP`

## `NextExtension(P): Process -> GrpFP`

Return the next extension of $G$ as defined by the process $P$.

Assume that $F$ is isomorphic to the permutation group $G$, and that we wish to determine presentations for one or more extensions of the $K$-module $M$ by $F$, where $K$ is the field of $p$ elements. We first create an extension process using `ExtensionProcess(G, M, F)`. The possible extensions of $M$ by $G$ are in one-one correspondence with the elements of the second cohomology group $H^2(G,M)$ of $G$ acting on $M$. Let $b_1, \ldots, b_l$ be a basis of $H^2(G,M)$. A general element of $H^2(G,M)$ therefore has the form $a_1b_1 + \cdots + a_lb_l$ and so can be defined by a sequence $Q$ of $l$ integers $[a_1, \ldots, a_l]$. Now, to construct the corresponding extension of $M$ by $G$ we call the function `Extension(P, Q)`. The required extension is returned as a finitely presented group. If all the extensions are required then they may be obtained successively by making $p^l$ calls to the function `NextExtension`.

## `SplitExtension(G, M, F): GrpPerm, ModRng, GrpFP -> GrpFP`

The split extension of the module $M$ by the group $G$.

## `Example: Cohomology (ex-5181ae)`

We construct a presentation for $A_6$ over its Schur multiplicator. First we find the size of the multiplicator by applying the `pMultiplicator` function to each relevant prime.

```magma
> G := Alt(6);
> &cat [pMultiplicator(G, p[1]): p in FactoredOrder(G)];
[ 2, 3, 1 ]

```

The multiplicator has order $2\times 3 = 6$. We next construct the two-fold cover of $A_6$. We use the `FPGroup` function to get a presentation for $A_6$.

```magma
> F := FPGroup(G);
> F2 := pCover(G, F, 2);

```

Now we construct a three-fold cover of the two-fold cover to get the extension we are after. First we need a permutation representation of `F2`, the two-fold covering group.

```magma
> G2 := DegreeReduction(CosetImage(F2, sub<F2|>));
> Degree(G2);
144
> #G2;
720
> F6 := pCover(G2, F2, 3);
> F6;
Finitely presented group F6 on 4 generators
Relations
  F6.4^3 = Id(F6)
  (F6.1, F6.4) = Id(F6)
  (F6.2, F6.4) = Id(F6)
  (F6.3, F6.4) = Id(F6)
  F6.3^2 = Id(F6)
  (F6.1, F6.3) = Id(F6)
  (F6.2, F6.3) = Id(F6)
  F6.1^4 * F6.3 = Id(F6)
  F6.2^3 * F6.3 = Id(F6)
  F6.1^-1 * F6.2^-1 * F6.1 * F6.2 * F6.1^-1 * F6.2^-1 *
  F6.1 * F6.2 * F6.3 * F6.4 = Id(F6)
  F6.1^-1 * F6.2 * F6.1^2 * F6.2 * F6.1^2 * F6.2 *
  F6.1^-2 * F6.2 * F6.1^-1 * F6.3 * F6.4^-1 = Id(F6)
  F6.2 * F6.1 * F6.2 * F6.1 * F6.2 * F6.1 * F6.2 *
  F6.1 * F6.2 * F6.1 * F6.3 * F6.4 = Id(F6)
> AbelianQuotientInvariants(F6);
[]

```

The group `F6` is the six-fold cover of $A_6$. We easily see from the presentation that the 3rd and 4th generators generate a central cyclic subgroup of order 6. The sequence of invariants for the maximal abelian quotient of `F6` is empty, so `F6` is perfect.

## `Example: Cohomology 2 (ex-d836b8)`

We construct an extension of $A_5$. This time the normal subgroup will be elementary abelian of order $2^5$, with the action of $A_5$ being the natural permutation action.

```magma
> G := Alt(5);
> M := PermutationModule(G, GF(2));
> CohomologicalDimension(G, M, 2);
1

```

The dimension of the 2nd cohomology group is 1 over ${\bf F}_{2}$, so there are two possible extensions. We will construct them both.

```magma
> F := FPGroup(G);
> P := ExtensionProcess(G, M, F);
> E0 := Extension(P, [0]);
> E1 := Extension(P, [1]);
> AbelianQuotientInvariants(E0);
[ 2 ]
> AbelianQuotientInvariants(E1);
[]

```

The split extension, `E0`, is not perfect, but the non-split extension, `E1`, is a perfect group.
