# Representation Theory

This section describes some functions for creating $R[G]$-modules for a polycyclic group $G$, which are unique for this category or have special properties when called for polycyclic groups. For a complete description of the functions available for creating and working with $R[G]$-modules we refer to Chapter [Modules over an Algebra and Group Representations](../../RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/index-modules-over-an-algebra-and-group-representations.md#chapmodalg).

Note that the function [`GModuleAction`](../../RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/representation.md#function-repthy-gmoduleaction) can be used to extract the matrix representation associated to an $R[G]$-module.

## `EFAModuleMaps(G): GrpGPC -> [ModGrp]`

Every polycyclic group $G$ has a normal series $G = N_1 \triangleright N_2 \triangleright \dots \triangleright N_{r+1} = 1$, such that every quotient $M_i := N_i / N_{i+1}$ is either free abelian or $p$-elementary abelian for some prime $p$. The action of $G$ by conjugation induces a ${\mathbb{Z}}[G]$-module structure on $M_i$ if $M_i$ is free abelian and an ${\bf F}_{p}[G]$-module structure if $M_i$ is $p$-elementary abelian.

This function returns a sequence $[f_1,\dots,f_r]$, where $f_i : N_i \rightarrow M_i$ is the natural epimorphism onto the additive group of an $R_i[G]$-module $M_i$ ($R_i\in\{{\bf F}_{p}, {\mathbb{Z}}\}$), constructed as above.

The functions `EFAModuleMaps` and [`EFAModules`](#function-grpgpc-efamodules) use the normal series returned by the function [`EFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-efaseries).

Note that the kernels of the epimorphisms $f_i$ can be computed and hence it is possible to form preimages of submodules of $M_i$, which are normal subgroups of $G$ contained in $N_i$ and containing $N_{i+1}$.

## `EFAModules(G): GrpGPC -> [ModGrp]`

Every polycyclic group $G$ has a normal series $G = N_1 \triangleright N_2 \triangleright \dots \triangleright N_{r+1} = 1$, such that every quotient $M_i := N_i / N_{i+1}$ is either free abelian or $p$-elementary abelian for some prime $p$. The action of $G$ by conjugation induces a ${\mathbb{Z}}[G]$-module structure on $M_i$ if $M_i$ is free abelian and an ${\bf F}_{p}[G]$-module structure if $M_i$ is $p$-elementary abelian.

This function returns a sequence $[M_1,\dots,M_r]$ of $R_i[G]$-modules (where $R_i\in\{{\bf F}_{p}, {\mathbb{Z}}\}$), constructed as above.

The functions [`EFAModuleMaps`](#function-grpgpc-efamodulemaps) and `EFAModules` use the normal series returned by the function [`EFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-efaseries).

## `GModule(G, A, p): GrpGPC, GrpGPC, RngIntElt -> ModGrp, Map`

## `GModule(G, A): GrpGPC, GrpGPC -> ModGrp, Map`

Let $A$ be a normal subgroup of the polycyclic group $G$. If $p = 0$, the function returns the ${\mathbb{Z}}[G]$-module corresponding to the conjugation action of $G$ on the maximal free abelian quotient of $A$. If $p$ is a prime, it returns the ${\bf F}_{p}[G]$-module corresponding to the conjugation action of $G$ on the maximal $p$-elementary abelian quotient of $A$. The epimorphism $\pi: A\rightarrow M$ onto the additive group of the constructed module $M$ is returned as second return value. Note that the kernel of $\pi$ can be computed and hence it is possible to form preimages of submodules of $M$, which are normal subgroups of $G$ contained in $A$.

If the maximal abelian quotient $A/A^\prime$ of $A$ is either free abelian or $p$-elementary abelian for some prime $p$, $p$ can be omitted in the function call.

Note that it is the user’s responsibility to ensure that $A$ is in fact normal in $G$.

## `GModule(G, A, B, p): GrpGPC, GrpGPC, GrpGPC, RngIntElt -> ModGrp, Map`

## `GModule(G, A, B): GrpGPC, GrpGPC, GrpGPC -> ModGrp, Map`

Let $A$ and $B < A$ be normal subgroups of the polycyclic group $G$. If $p = 0$, the function returns the ${\mathbb{Z}}[G]$-module corresponding to the conjugation action of $G$ on the maximal free abelian quotient of $A/B$. If $p$ is a prime, it returns the ${\bf F}_{p}[G]$-module corresponding to the conjugation action of $G$ on the maximal $p$-elementary abelian quotient of $A/B$. The epimorphism $\pi: A\rightarrow M$ onto the additive group of the constructed module $M$ is returned as second return value. Note that the kernel of $\pi$ can be computed and hence it is possible to form preimages of submodules of $M$, which are normal subgroups of $G$ contained in $A$ and containing $B$.

If the maximal abelian quotient of $A/B$ is either free abelian or $p$-elementary abelian for some prime $p$, $p$ can be omitted in the function call.

Note that it is the user’s responsibility to ensure that $A$ and $B$ are in fact normal in $G$.

## `GModulePrimes(G, A): GrpGPC, GrpGPC -> SetMulti`

Let $G$ be a polycyclic group and $A$ a normal subgroup of $G$. Given any prime $p$, the maximal $p$-elementary abelian quotient of $A$ can be viewed as an ${\bf F}_{p}[G]$-module $M_p$. The maximal free abelian quotient of $A$ can be viewed as a ${\bf Z}[G]$-module $M_0$. This function determines those primes $p$ for which the module $M_p$ is non-trivial (i.e. not zero-dimensional) and the dimensions of the corresponding modules $M_p$. The return value is a multiset $S$. If $0\notin S$, the maximal abelian quotient of $A$ is finite and the multiplicity of $p$ is the dimension of $M_p$. If $S$ contains 0 with multiplicity $m$, the maximal abelian quotient of $A$ contains $m$ copies of ${\mathbb{Z}}$. In this case, the rank of $M_0$ is $m$ and $M_p$ is non-trivial for every prime $p$ and its rank is the sum of $m$ and the multiplicity of $p$ in $S$.

## `GModulePrimes(G, A, B): GrpGPC, GrpGPC, GrpGPC -> SetMulti`

Let $G$ be a polycyclic group, $A$ a normal subgroup of $G$ and $B$ a normal subgroup of $G$ contained in $A$. Given any prime $p$, the maximal $p$-elementary abelian quotient of $A/B$ can be viewed as an ${\bf F}_{p}[G]$-module $M_p$. The maximal free abelian quotient of $A/B$ can be viewed as a ${\bf Z}[G]$-module $M_0$. This function determines those primes $p$ for which the module $M_p$ is non-trivial (i.e. not zero-dimensional) and the dimensions of the corresponding modules $M_p$. The return value is a multiset $S$. If $0\notin S$, the maximal abelian quotient of $A/B$ is finite and the multiplicity of $p$ is the dimension of $M_p$. If $S$ contains 0 with multiplicity $m$, the maximal abelian quotient of $A/B$ contains $m$ copies of ${\mathbb{Z}}$. In this case, the rank of $M_0$ is $m$ and $M_p$ is non-trivial for every prime $p$ and its rank is the sum of $m$ and the multiplicity of $p$ in $S$.

## `SemisimpleEFAModuleMaps(G): GrpGPC -> [ModGrp]`

Every polycyclic group $G$ has a normal series $G = N_1 \triangleright N_2 \triangleright \dots \triangleright N_{r+1} = 1$, such that every quotient $M_i := N_i / N_{i+1}$ is either free abelian and semisimple as a ${\mathbb{Q}}[G]$-module or $p$-elementary abelian and semisimple as an ${\bf F}_{p}[G]$-module for some prime $p$.

This function returns a sequence $[f_1,\dots,f_r]$, where $f_i : N_i \rightarrow M_i$ is the natural epimorphism onto the additive group of an $R_i[G]$-module $M_i$ ($R_i\in\{{\bf F}_{p}, {\mathbb{Z}}\}$), constructed as above.

The functions [`SemisimpleEFAModules`](#function-grpgpc-semisimpleefamodules) and `SemisimpleEFAModuleMaps` use the normal series returned by the function [`SemisimpleEFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-semisimpleefaseries). Moreover, this normal series is a refinement of the normal series returned by the function [`EFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-efaseries).

Note that the kernels of the epimorphisms $f_i$ can be computed and hence it is possible to form preimages of submodules of $M_i$, which are normal subgroups of $G$ contained in $N_i$ and containing $N_{i+1}$.

## `SemisimpleEFAModules(G): GrpGPC -> [ModGrp]`

Every polycyclic group $G$ has a normal series $G = N_1 \triangleright N_2 \triangleright \dots \triangleright N_{r+1} = 1$, such that every quotient $M_i := N_i / N_{i+1}$ is either free abelian and semisimple as a ${\mathbb{Q}}[G]$-module or $p$-elementary abelian and semisimple as an ${\bf F}_{p}[G]$-module for some prime $p$.

This function returns a sequence $[M_1,\dots,M_r]$ of $R_i[G]$-modules (where $R_i\in\{{\bf F}_{p}, {\mathbb{Z}}\}$), constructed as above.

The functions `SemisimpleEFAModules` and [`SemisimpleEFAModuleMaps`](#function-grpgpc-semisimpleefamodulemaps) use the normal series returned by the function [`SemisimpleEFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-semisimpleefaseries). Moreover, this normal series is a refinement of the normal series returned by the function [`EFASeries`](characteristic-subgroup-normal-structure.md#function-grpgpc-efaseries).

## `Example: Representation Theory (ex-e27464)`

Consider the group $G$ defined by the polycyclic presentation

$$
\begin{aligned}\langle a,b,c,d,e\, |\, &c^6, e^3, d^c=de, e^c=e^2, b^a=b^{-1},
                                                   b^{a^{-1}}=b^{-1}, \\
         &c^b=ce, c^{b^{-1}}=ce, d^b=d^{-1}, d^{b^{-1}}=d^{-1}, e^b=e^2,
                                                       e^{b^{-1}}=e^2 \rangle.\end{aligned}
$$

(Trivial commutator relations have been omitted.)

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

```

The subgroup $H$ of $G$ generated by $c,d,e$ is normal in $G$.

```magma
> H := sub< G | c,d,e >;
> IsNormal(G, H);
true

```

We determine the primes such that the action of $G$ on $H$ yields non-trivial modules.

```magma
> GModulePrimes(G, H);
{* 0, 2, 3 *}

```

We construct the ${\bf F}_3[G]$-module $M$ given by the action of $G$ on the maximal 3-elementary abelian quotient of $H$ and the natural epimorphism $\pi$ from $H$ onto the additive group of $M$.

```magma
> M, pi := GModule(G, H, 3);
> M;
GModule M of dimension 2 over GF(3)

```

Using the function [`Submodules`](../../RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/submodule-lattice.md#function-repthy-submodules), we obtain the submodules of $M$. Their preimages under $\pi$ are precisely the normal subgroups of $G$ which are contained in $H$ and contain ${\rm ker}(\pi)$.

```magma
> submod := Submodules(M);
> nsgs := [ m @@ pi : m in submod ];
> [ PCGenerators(s, G) : s in nsgs ];
[
    {@ c^3, d^3, e @},
    {@ c, d^3, e @},
    {@ c^3, d, e @},
    {@ c, d, e @}
]

```

## `Example: gmoduleprimes (ex-e34f40)`

Consider the group defined by the polycyclic presentation

$$
< a, b, c, d, e\ | \ a^5, b^5, c^6, d^5, e^3, b^a = bd>.
$$

```magma
> F<a,b,c,d,e> := FreeGroup(5);
> G<a,b,c,d,e> := quo< GrpGPC : F |
>                       a^5, b^5, c^6, d^5, e^3, b^a = b*d >;

```

Obviously the subgroup of $G$ generated by $b,c,d,e$ is normal in $G$.

```magma
> H := sub< G | b,c,d,e >;
> IsNormal(G, H);
true

```

We use the function [`GModulePrimes`](#function-grpgpc-gmoduleprimes) to determine the set of primes $p$ for which the action of $G$ on the maximal $p$-elementary abelian quotient of $H$ induces a nontrivial ${\bf F}_{p}[G]$-module.

```magma
> P := GModulePrimes(G, H);
> 0 in P;
false

```

0 is not contained in $P$, i.e. the maximal free abelian quotient of $H$ is trivial. Hence, there are only finitely many primes, satisfying the condition above.

We loop over the distinct elements of $P$ and for each element $p$ we construct the induced ${\bf F}_{p}[G]$-module, print its dimension and check whether it is decomposable. Note that the dimension of the module for $p$ must be equal to the multiplicity of $p$ in $P$.

```magma
> for p in MultisetToSet(P) do
>    M := GModule(G, H, p);
>    dim := Dimension(M);
>    decomp := IsDecomposable(M);
>
>    assert dim eq Multiplicity(P, p);
>
>    print "prime", p, ": module of dimension", dim;
>    if decomp then
>       print "  has a nontrivial decomposition";
>     else
>       print "  is indecomposable";
>    end if;
> end for;
prime 2 : module of dimension 1
  is indecomposable
prime 3 : module of dimension 2
  has a nontrivial decomposition
prime 5 : module of dimension 2
  is indecomposable

```

## `Example: Fitting Subgroup (ex-407bf7)`

The Fitting subgroup of a polycyclic group $G$ can be characterised as the intersection of the centralisers in $G$ of the semisimple $G$-modules defined by the action of $G$ on the factors of a semisimple EFA-series of $G$. The centraliser in $G$ of a $G$-module is just the kernel of the action map.

We illustrate this with the group $G$ defined in the example above.

```magma
> F<a,b,c,d,e> := FreeGroup(5);
> G<a,b,c,d,e> := quo< GrpGPC : F | c^6 = F!1, e^3 = F!1,
>                                   b^a = b * d,
>                                   b^(a^-1) = b * d^-1 >;

```

We first construct the $G$-modules defined by the action of $G$ on the factors of a semisimple EFA-series of $G$.

```magma
> modules := SemisimpleEFAModules(G);
> modules;
[
    GModule of dimension 2 over Integer Ring,
    GModule of dimension 1 over Integer Ring,
    GModule of dimension 1 over GF(2),
    GModule of dimension 2 over GF(3)
]

```

Now, we compute the intersection of the kernels of the module action maps, which can be obtained using the function [`GModuleAction`](../../RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/representation.md#function-repthy-gmoduleaction).

```magma
> S := G;
> for m in modules do
>    S meet:= Kernel(GModuleAction(m));
> end for;

```

Finally, we compare the result with the Fitting subgroup of $G$, returned by the Magma function [`FittingSubgroup`](characteristic-subgroup-normal-structure.md#function-grpgpc-fittingsubgroup).

```magma
> S eq FittingSubgroup(G);
true

```

## `Example: Module Maps (ex-5b5ab4)`

The functions [`EFAModuleMaps`](#function-grpgpc-efamodulemaps) and [`SemisimpleEFAModuleMaps`](#function-grpgpc-semisimpleefamodulemaps) are useful whenever it is desired to refine an EFA-series or a semisimple EFA-series by computing the subgroups corresponding to submodules of the $G$-modules given by the factors of the series. Consider again the group defined above.

```magma
> F<a,b,c,d,e> := FreeGroup(5);
> G<a,b,c,d,e> := quo< GrpGPC : F | c^6 = F!1, e^3 = F!1,
>                                   b^a = b * d,
>                                   b^(a^-1) = b * d^-1 >;

```

We extract the map $f$ from $G$ (the first group in any EFA-series of $G$) onto the module given by the first factor of an EFA-series of $G$.

```magma
> f := EFAModuleMaps(G)[1];
> f;
Mapping from: GrpGPC: G to GModule of dimension 2 over Integer
Ring

```

The module itself can be accessed as the codomain of $f$.

```magma
> M := Codomain(f);
> M;
GModule M of dimension 2 over Integer Ring

```

Spinning up random elements, we try to construct a submodule $S$ of $M$.

```magma
> repeat
>    S := sub<M|[Random(-1, 1): i in [1 .. Dimension(M)]]>;
>    until Dimension(S) gt 0 and S ne M;
> S;
GModule S of dimension 1 over Integer Ring

```

The preimage $N$ of $S$ under $f$ is a normal subgroup of $G$, which lies between the first and the second subgroup of the original EFA-series for $G$.

```magma
> N := S @@ f;
> PCGenerators(N, G);
{@ a^2 * b^4, c, d, e @}

```
