# Creation of a Cohomology Module

In order to compute the cohomology of a group with respect to a $G$-module $M$, it is first necessary to construct a data structure known as a *cohomology module*.

## `CohomologyModule(G, M): GrpPerm, ModGrp -> ModCoho`

## `CohomologyModule(G, M): GrpPC, ModGrp -> ModCoho`

## `CohomologyModule(G, M): GrpMat, ModGrp -> ModCoho`

## `CohomologyModule(G, M): GrpFP, ModGrp -> ModCoho`

Given a group $G$ and a $G$-module $M$ with acting group $G$ this function returns a cohomology module for the action of $G$. The group $G$ may be a finite permutation group, a finite matrix group, a PC-group, or any finitely presented group. For the PC-group case, however, the PC-presentation of $G$ must be conditioned. This can be achieved by first executing the statement `G := ConditionedGroup(G);`

## `CohomologyModule(G, Q, T): GrpPerm, SeqEnum, SeqEnum -> ModCoho`

## `CohomologyModule(G, Q, T): GrpPC, SeqEnum, SeqEnum -> ModCoho`

## `CohomologyModule(G, Q, T): GrpMat, SeqEnum, SeqEnum -> ModCoho`

## `CohomologyModule(G, Q, T): GrpFP, SeqEnum, SeqEnum -> ModCoho`

Let $G$ be a group which acts on a finitely-generated abelian group with invariants given by the sequence $Q$, and action described by $T$. The action $T$ is given in the form of a sequence of $d \times d$ matrices over the integers, where $d$ is the length of $T$, and `T[i]` defines the action of the $i$-th generator of $G$ on the abelian group. The function returns a cohomology module for the action of $G$. The group $G$ may be a finite permutation group, a finite matrix group, a PC-group or any finitely presented group. For the PC-group case, however, the PC-presentation of $G$ must be conditioned. This can be achieved by first executing the statement `G := ConditionedGroup(G);`

## `Example: Coho Module1 (ex-8b4abf)`

We construct the cohomology module for ${\rm PSL}(3, 2)$ acting on a module of dimension $3$ over $GF(2)$. We first need to find a module of dimension $3$.

```magma
> G := PSL(3, 2);
> Irrs := AbsolutelyIrreducibleModules(G, GF(2));
> Irrs;
[
    GModule of dimension 1 over GF(2),
    GModule of dimension 3 over GF(2),
    GModule of dimension 3 over GF(2),
    GModule of dimension 8 over GF(2)
]
> M := Irrs[2];
> CM := CohomologyModule(G, M);
> CM;
Cohomology Module

```

## `Example: Coho Module4 (ex-233494)`

We construct a cohomology module for a group $G$ acting on an elementary abelian subgroup $N$ of $G$.

```magma
> G := ASL(3,5);
> ChiefFactors(G);
    G
    |  A(2, 5)                    = L(3, 5)
    *
    |  Cyclic(5) (3 copies)
    1
> N := pCore(G,5);
> M := GModule(G,N);
> CM := CohomologyModule(G,M);

```

## `Example: Coho Module2 (ex-0c0fe6)`

Now we construct a cohomology module for a cyclic group of order $4$ acting on an abelian group with invariants $[2,4]$.

```magma
> G:=CyclicGroup(4);
> mats := [ Matrix(Integers(),2,2,[1,2,1,3]) ];
> invar := [2,4];
> CM := CohomologyModule(G,invar,mats);
> CM;
Cohomology Module

```

## `Example: Coho Module3 (ex-e9e40a)`

Now we construct a cohomology module for an infinite FP-group.

```magma
> G := Group<x,y | x^2,y^3,(x*y)^7 >;
> L := LowIndexSubgroups(G, <7,7>);
> Index(G,L[1]);
7
> Q := CosetImage(G,L[1]);
> PM := PermutationModule(Q, Integers());
> cons := Constituents(PM);
> cons;
[
    GModule of dimension 1 over Integer Ring,
    GModule of dimension 6 over Integer Ring
]
> mats := ActionGenerators(cons[2]);
> M := GModule(G,mats);
> CM := CohomologyModule(G,M);

```

## `CohomologyModule(G, A, M): GrpPerm, GrpAb, Any -> ModCoho`

For a permutation group $G$ acting on some abelian group $A$ through $M$, compute the cohomology module. $M$ has to be either a map from $G$ into the endomorphisms of $A$, or a sequence of endomorphisms of $A$, one for each of the generators of $G$.
