# Group Algebras of $p$-groups

There is a special type for the basic algebras which are the modular group algebras of $p$-groups for $p$ a prime. If $G$ is a finite $p$ and $k$ is a field of characteristic $p$, then the commands `BasicAlgebra(G,k)` and `BasicAlgebra(G)` automatically create a basic algebra of type `AlgBasGrpP`. The type is optimized for the computation of cohomology rings. Included for this type are restriction and inflation maps. Most of the functions for modules and complexes are the same as for general basic algebras.

## Access Functions

### `Group(A): AlgBasGrpP -> Grp`

The group which defines the algebra $A$.

### `PCGroup(A): AlgBasGrpP -> Grp`

The internal PC group of the algebra $A$.

### `PCMap(A): AlgBasGrpP -> Map`

The map from `Group(A)` to `PCGroup(A)` for an algebra $A$.

### `AModule(M): ModGrp -> ModAlg`

Converts a `GModule` $M$ over a $p$-group to a module over the basic algebra of that group.

### `GModule(M): AlgBasGrpP -> ModGrp, ModGrp`

Returns the standard module of the algebra $A$ as a module over `Group(A)` and as a module over `PCGroup(A)`.

### `GModule(M): ModAlgBas -> ModGrp`

Converts a module $M$ for the basic algebra of a $p$-group into a module over the $p$-group.

## Projective Resolutions

### `ResolutionData(A): AlgBasGrpP -> Rec`

Returns the data needed to compute the projective resolution of an $A$-module for an algebra $A$. The data is given as a record with the fields:

**(a)**
The matrices of the `PCGenerators` of the $p$-group on the standard indecomposable projective module for the algebra (field name `PCgenMats`).

**(b)**
The matrices of the minimal generators of the p-group on the standard indecomposable projective module for the algebra (field name `MingenMats`).

**(c)**
The algebra $A$ (field name `Algebra`).

### `CompactProjectiveResolutionPGroup(M, n): ModAlgBas, RngIntElt -> Rec`

### `CompactProjectiveResolution(M, n): ModAlgBas, RngIntElt -> Rec`

Computes the projective resolution of the module $M$ out to $n$ steps. The function returns a record with the fields:

**(a)**
The list of the ranks of the projective modules in the resolution (field name `BettiNumbers`).

**(b)**
The record of the boundary maps (field name `ResolutionRecord`).

**(c)**
The module $M$ (field name `Module`).

**(d)**
The augmentation map (field name `AugmentationMap`).

**(e)**
The type of the resolution, whether projective or injective (field name `Typ`).

### `ProjectiveResolutionPGroup(PR): Rec -> ModCpx`

The projective resolution as a complex of modules over the basic algebra of the group algebra, computed from the compact projective resolution $PR$.

### `ProjectiveResolution(M, n): ModAlgBas, RngIntElt -> ModCpx, ModMatFldElt`

The projective resolution of the module $M$ computed as a complex out to $n$ steps. The function also returns the augmentation map.

### `ProjectiveResolution(PR): Rec -> ModCpx, ModMatFldElt`

The projective resolution computed from a compact projective resolution $PR$ as a complex. The function also returns the augmentation map.

## Cohomology Generators

### `AllCompactChainMaps(PR): Rec -> Rec`

Creates the data on the chain maps for all generators of the cohomology of the simple module $k$ in degrees within the limits of the compact projective resolution $PR$ of the simple module. The function returns a record having the following information.

**(a)**
The record of the chain maps of the generators of cohomology (field name `ChainMapRecord`).

**(b)**
The sequence of sizes of the chain map record (field name `ChainSizes`).

**(c)**
The degrees of the chain maps (field name `ChainDegrees`).

**(d)**
The list of cocycles representing the generators (field name `Cocycles`).

**(e)**
The record of the products of the generators (field name `ProductRecord`).

**(f)**
The locations of the products of the generators (field name `ProductLocations`). Much of the information is for use in the computation of the cohomology ring.

### `CohomologyElementToChainMap(P, d, n): ModCpx, RngIntElt, RngIntElt -> MapChn`

Creates a chain map from the projective resolution $P$ to itself for the element number $n$ in degree $d$ of cohomology.

### `CohomologyElementToCompactChainMap(PR, d, n): Rec, RngIntElt, RngIntElt -> ModMatFldElt`

Creates a chain map in compact form from the compact projective resolution $PR$ to itself for the element number $n$ in degree $d$ of cohomology.

## Cohomology Rings

### `CohomologyRing(k, n): ModAlgBas, RngIntElt -> Rec`

### `CohomologyRing(PR, AC): Rec, Rec -> Rec`

The cohomology ring of the unique simple module $k$ for the basic algebra of the group algebra of a $p$-group. The input can be given either as the module $k$ and the number of steps $n$ or as the compact projective resolution $PR$ of $k$ together with $AC$, the calculation of the chain map generators of the cohomology. In the former case the compact resolution and the chain map of the generators are computed in the process. The ring is returned as a record having the following fields:

**(a)**
The polynomial ring or free graded-commutative $k$-algebra $R$ generated by the cohomology generators (field name `PolRing`).

**(b)**
The ideal of relations in $R$ satisfied by the cohomology generators (field name `RelationsIdeal`).

**(c)**
The list of relations that have been computed (field name `ComputedRelations`).

**(d)**
The chain maps giving the tops of the monomial in the cohomology generators (field name `MonomialData`).

**(e)**
The number of computed steps in the resolution (field name `NumberOfSteps`).

### `MinimalRelations(R): Rec -> SeqEnum`

A minimal set of relations generating the relations ideal of a cohomology ring $R$.

## Restrictions and Inflations

### `RestrictionData(A, B): AlgBasGrpP, AlgBasGrpP -> ModMatFldElt, ModMatFldElt, SeqEnum`

Assuming that $A$ is the basic algebra of a $p$-group $G$ and that $B$ is the basic algebra of a subgroup of $G$, the function returns the change of basis matrix that make the standard free module for $A$ into a direct sum of standard free modules for $B$. It also returns the inverse of the matrix and a set of coset representatives of the `PCGroup(B)` in `PCGroup(A)`.

### `RestrictResolution(PR, RD): Rec, Rec -> ModCpx`

Takes the compact projective resolution $PR$ for the trivial module of $G$ and the resolution data $RD$ for the basic algebra of a subgroup $H$ and returns the restriction of the resolution to a complex of modules over the basic algebra for $H$.

### `RestrictionChainMap(P1, P2): Rec, Rec -> MapChn`

Computes the chain map from the resolution $P2$ of the simple module for the basic algebra of a subgroup $H$ of a group $G$ to the restriction to $H$ of the resolution $P1$ of the simple module for the basic algebra of $G$. The inputs $P1$ and $P2$ must be in compact form.

### `RestrictionOfGenerators({PR1, PR2, AC1,}{ AC2, REL2}): Rec, Rec, Rec, Rec, Rec -> SeqEnum`

Computes the sequence of images of the generators of the cohomology ring of $G$ restricted to a subgroup $H$. The input is the projective resolutions and cohomology generators for the basic algebra of $G$ ($PR1$ and $AC1$) and for the basic algebra of the subgroup ($PR2$ and $AC2$), as well as the cohomology relations for the subgroup, $REL2$.

### `InflationMap({PR2, PR1, AC2, AC1,}{ REL1, theta}): Rec, Rec, Rec, Rec, Rec -> SeqEnum`

Returns the images of the generators of the cohomology ring of a quotient group $Q$ in the cohomology ring of a group $G$. The input $\theta$ is the quotient map $G \rightarrow Q$. Other input is the projective resolutions and cohomology generators for the basic algebra of $G$ ($PR1$ and $AC1$) and for the quotient group $Q$ ($PR2$ and $AC2$) as well as the cohomology relations for $G$, $REL1$.

### `Example: Cohomology Ring (ex-9fb5b5)`

We create the cohomology ring of a group $G$ of order 64 and find a cyclic subgroup $Z$ of the center of $G$. We compute the restriction of the cohomology of $G$ to the cohomology of $Z$ and also the inflation of the cohomology of $G/Z$ to the cohomology ring of $G$.

```magma
> SetSeed(1);
> G := SmallGroup(64,7);
> Z := sub<G| Random(Center(G))>;
> G;
GrpPC : G of order 64 = 2^6
PC-Relations:
    G.1^2 = G.4,
    G.2^2 = G.5,
    G.3^2 = G.5,
    G.4^2 = G.6,
    G.2^G.1 = G.2 * G.3,
    G.3^G.1 = G.3 * G.5,
    G.3^G.2 = G.3 * G.5
> #Z, [G!Z.i: i in [1 .. Ngens(Z)]];
4 [ G.4 ]

```

So we see that $Z$ has order 4 and is generated by the element $G.4$. Now construct the quotient and the basic Algebras.

```magma
> Q, mu := quo<G|Z>;
> A := BasicAlgebra(G);
> B := BasicAlgebra(Q);
> C := BasicAlgebra(Z);

```

Next we want the simple modules and the cohomology rings. We compute the cohomology out to 17 steps which should be more than enough to get the generators and relations.

```magma
> k := SimpleModule(A,1);
> kk := SimpleModule(B,1);
> kkk := SimpleModule(C,1);
> time R := CohomologyRing(k,17);
Time: 2.060
> time S := CohomologyRing(kk,17);
Time: 0.140
> time T := CohomologyRing(kkk,17);
Time: 0.060

```

The structure of the cohomology rings can be read from the following outputs.

```magma
> R`RelationsIdeal,S`RelationsIdeal,T`RelationsIdeal;

First the cohomology ring for $G$.

Ideal of Graded Polynomial ring of rank 6 over GF(2)
Lexicographical Order
Variables: $.1, $.2, $.3, $.4, $.5, $.6
Variable weights: 1 1 2 2 3 4
Basis:
[
    $.1^2,
    $.1*$.2,
    $.2^3,
    $.1*$.3,
    $.2*$.5,
    $.3^2,
    $.1*$.5 + $.2^2*$.3,
    $.3*$.5,
    $.5^2
]

```

Now the cohomology ring for $Q$.

```magma
Ideal of Graded Polynomial ring of rank 4 over GF(2)
Lexicographical Order
Variables: $.1, $.2, $.3, $.4
Variable weights: 1 1 3 4
Basis:
[
    $.1*$.2,
    $.1^3,
    $.1*$.3,
    $.2^2*$.4 + $.3^2
]

```

And finally the cohomology ring for $Z$.

```magma
Ideal of Graded Polynomial ring of rank 2 over GF(2)
Lexicographical Order
Variables: $.1, $.2
Variable weights: 1 2
Basis:
[
    $.1^2
]

```

Next we require the inputs for the restriction and inflation maps.

```magma
> Pr1 := k`CompactProjectiveResolution;
> Pr2 := kk`CompactProjectiveResolution;
> Pr3 := kkk`CompactProjectiveResolution;
> Ac1 := k`AllCompactChainMaps;
> Ac2 := kk`AllCompactChainMaps;
> Ac3 := kkk`AllCompactChainMaps;

```

Now the inflation map from $Q$ to $G$ sends the generators of the cohomology of $Q$ to the given list of elements in the cohomology ring of $G$.

```magma
> inf := InflationMap(Pr2,Pr1,Ac2,Ac1,R,mu);
> inf;
[
    $.2,
    $.1,
    $.5,
    $.6
]

```

The restriction map from the cohomology ring of $G$ to the cohomology ring of $Z$ sends the generators of $R$ to the corresponding elements in the computed sequence.

```magma
> res := RestrictionOfGenerators(Pr1,Pr3,Ac1,Ac3,T);
> res;
[
    0,
    0,
    0,
    $.2,
    0,
    0
]

```

Finally, a set of minimal relations is determined for the cohomology ring $R$.

```magma
> MinimalRelations(R);
[
    $.1^2,
    $.1*$.2,
    $.2^3,
    $.1*$.3,
    $.2*$.5,
    $.3^2,
    $.1*$.5 + $.2^2*$.3,
    $.3*$.5,
    $.5^2
]

```
