# New Modules from Old

Given one or more existing modules, standard constructions are available to construct new modules.

## Direct Sums and Tensor Products

These direct sums and tensor products for $K[G]$-modules should work for any field $K$ with the exception of the GTensorProduct intrinsics which require $K$ to be a finite field.

### `DirectSum(M, N): ModRng, ModRng -> ModRng, Map, Map, Map, Map`

Given $A$-modules $M$ and $N$, construct the direct sum $D$ of $M$ and $N$ as an $A$-module. The embedding maps from $M$ into $D$ and from $N$ into $D$ respectively and the projection maps from $D$ onto $M$ and from $D$ onto $N$ respectively, are also returned.

### `DirectSum(Q): [ ModRng ] -> ModRng, [ Map ], [ Map ]`

Given a sequence $Q$ of $A$-modules, construct the direct sum $D$ of these modules. The embedding maps from each of the elements of $Q$ into $D$ and the projection maps from $D$ onto each of the elements of $Q$ are also returned.

### `TensorProduct(M, N): ModMat, ModMat -> ModMat`

Given A-modules $M$ and $N$, construct their tensor product, $M \otimes N$.

### `TensorProduct(M, N): ModGrp, ModGrp -> ModGrp`

Let $M$ and $N$ be two $K[G]$-modules, where $K$ is a field. This function constructs the tensor product, $M \otimes_K N$, with action of $G$ defined by $(m \otimes n)*g := (m*g) \otimes (n*g)$ for $m,n \in M$ and $g \in G$.

### `TensorPower(M, n): ModMat, RngIntElt -> ModMat`

Given an $A$-module $M$ and an integer $n \geq 1$, construct the $n$-th tensor power of $M$.

### `ExteriorSquare(M): ModMat -> ModMat`

Given an $A$–module $M$, construct the $A$-submodule of $M \otimes_A M$ consisting of the skew tensors.

### `SymmetricSquare(M): ModMat -> ModMat`

Given an $A$-module $M$, construct the $A$-submodule of $M \otimes_A M$ consisting of the symmetric tensors.

### `GTensorProduct(M, N): ModGrp, ModGrp -> ModGrp, Map`

Let $M$ and $N$ be two $K[G]$ modules where $K$ is a finite field. This function constructs the tensor product, $M \otimes_{KG} N$. It is equal to `FixDual(TensorProduct(M,N))`.

### `GTensorProduct(M, N, H): ModGrp, ModGrp, Grp -> ModGrp, Map`

Let $M$ and $N$ be two $K[G]$ modules where $K$ is a finite field and let $H$ be a subgroup of $G$. This function constructs the tensor product, $M \otimes_{KH} N$ as a $N_G(H)$-module. It is equal to `FixDualMod(TensorProduct(M,N), H)`.

## Induction, Restriction and Inflation for $K[G]$-Modules

### `Dual(M): ModGrp -> ModGrp`

Given a $K[G]$-module $M$, where $K$ is a field, construct the $K[G]$-module which is the $K$-dual, ${\operatorname{Hom}}_K(M, K)$, of $M$.

### `Induction(M, G): ModGrp, Grp -> ModGrp`

Given a $K[H]$-module $M$, where $K$ is a field, and a supergroup $G$ of $H$, construct the $K[G]$-module obtained by inducing $M$ up to $G$.

### `Induction(R, G): Map, Grp -> Map`

Given a representation $R$ of a subgroup of $G$, where $R$ is defined over a field $K$, construct the representation of $G$ obtained by inducing $R$ up to $G$.

### `Restriction(M, H): ModGrp, Grp -> ModGrp`

Given a $K[G]$-module $M$, where $K$ is a field, and a subgroup $H$ of $G$, form the $K[H]$-module corresponding to the restriction of $M$ to the subgroup $H$.

### `Inflation(M, h): ModGrp, Map -> ModGrp`

Given a $K[H]$-module $M$, where $K$ is a field, and a group homomorphism $h:G \to H$, return $M$ as a $K[G]$-module by inflation using $h$.

### `Example: G Modules1 (ex-6e84be)`

Starting with the permutation module $M$ over ${\bf F}_{2}$ for the Mathieu group $M_{22}$, we apply the induction and restriction functions to find new irreducible modules for $M_{22}$.

```magma
> SetSeed(1);
> G := PermutationGroup< 22 |
>         (1,2,4,8,16,9,18,13,3,6,12)(5,10,20,17,11,22,21,19,15,7,14),
>         (1,18,4,2,6)(5,21,20,10,7)(8,16,13,9,12)(11,19,22,14,17),
>         (1,18,2,4)(3,15)(5,9)(7,16,21,8)(10,12,20,13)(11,17,22,14) >;
> M := PermutationModule(G, GaloisField(2));
> M;
GModule M of dimension 22 with base ring GF(2)
> CM := Constituents(M);
> CM;
[
    GModule of dimension 1 over GF(2),
    GModule of dimension 10 over GF(2),
    GModule of dimension 10 over GF(2)
]

```

We compute the restriction $N$ of the module $M$ to the stabilizer $L34$ of a point in $M_{22}$ and then induce two constituents of $N$ back up to $G$.

```magma
> L34 := Stabilizer(G, 1);
> N := Restriction(M, L34);
> N;
GModule N of dimension 22 with base ring GF(2)
> CN := Constituents(N);
> CN;
[
    GModule of dimension 1 over GF(2),
    GModule of dimension 9 over GF(2),
    GModule of dimension 9 over GF(2)
]
> Ind1 := Induction(CN[1], G);
> Ind1;
GModule Ind1 of dimension 22 over GF(2)
> Constituents(Ind1);
[
    GModule of dimension 1 over GF(2),
    GModule of dimension 10 over GF(2),
    GModule of dimension 10 over GF(2)
]
> Ind2 := Induction(CN[2], G);
> Ind2;
GModule Ind2 of dimension 198 over GF(2)
> Constituents(Ind2);
[
    GModule of dimension 1 over GF(2),
    GModule of dimension 10 over GF(2),
    GModule of dimension 10 over GF(2),
    GModule of dimension 34 over GF(2),
    GModule of dimension 98 over GF(2)
]

```

Thus, inducing up the $1$-dimensional constituent of $N$ gives us irreducible modules for $G$ having the same dimensions as those appearing as constituents of $M$. However, inducing up a $9$-dimensional module gives us irreducible modules of new dimensions: $34$ and $98$. Hence starting out with only the permutation module for $M_{22}$ over ${\bf F}_{2}$, we have found $5$ irreducible modules for the group.

## The Fixed-point Spaces for a $K[G]$-Module

### `Fix(M): Mod -> Mod`

Given a $K[G]$-module $M$, $K$ a field, construct the largest submodule of $M$ on which $G$ acts trivially, i.e. the fixed-point space of $M$. This is equal to the cohomology group $H^0(G,M)$.

### `FixMod(M, H): ModGrp, Grp -> Mod`

Given a $K[G]$-module $M$, $K$ a field, and a subgroup $H$ of $G$, return `Fix(M_H)` as a $N_G(H)$-module, where $M_H$ is the restriction of $M$ to $H$.

### `FixDual(M): ModGrp -> Modgrp, Map`

Given a $K[G]$-module $M$, $K$ a field, construct the largest quotient module of $M$ on which $G$ acts trivially, i.e. $M/N$ with $N := \langle m*g-m \vert m \in M, g \in G \rangle$. This is equal to the homology group $H_0(G,M)$. The natural map from $M$ to $M/N$ is also returned.

### `FixDualMod(M, H): ModGrp, Grp -> Mod`

Given a $K[G]$-module $M$, $K$ a field, and a subgroup $H$ of $G$, return `FixDual(M_H)` as a $N_G(H)$-module, where $M_H$ is the restriction of $M$ to $H$. The natural map from $M$ to $M/N$ is also returned.

## Change Ring and Base Change

### `ChangeRing(M, S): ModRng, Rng -> ModRng, Map`

Given an $A$-module $M$ with base ring $R$, together with a ring $S$, such that there is a natural homomorphism from $R$ to $S$, construct the module $N$ with base ring $S$ where $N$ is obtained from $M$ by coercing the components of the vectors of $M$ into $N$. The corresponding homomorphism from $M$ to $N$ is returned as a second value.

### `ChangeRing(M, S, f): ModRng, Rng, Map -> ModRng, Map`

Given an $A$-module $M$ with base ring $R$, together with a ring $S$, and a homomorphism $f: R \rightarrow S$, construct the module $N$ with base ring $S$, where $N$ is obtained from $M$ by applying $f$ to the components of the vectors of $M$. The corresponding homomorphism from $M$ to $N$ is returned as a second value.

### `M ^ T: ModGrp, AlgMatElt -> ModGrp`

Given a $K[G]$-module $M$ of dimension $n$, where $K$ is a field, and a nonsingular $n\times n$ matrix $T$ over $K$, construct the $K[G]$-module $N$ which corresponds to taking the rows of $T$ as a basis for $M$.

## Writing a $K[G]$-Module over a Smaller Field

### Rewriting Over a Smaller Degree Finite Field

#### `IsRealisableOverSmallerField(M): ModGrp -> BoolElt, ModGrp`

Given a $K[G]$-module $M$, where $K$ is a finite field, return true if $M$ can be realised over a proper subfield $F$ of $K$. The equivalent $F[G]$-module is also returned. The Glasby-Howlett algorithm is used to determine the smallest field over which $M$ can be realised.

#### `IsRealisableOverSubfield(M, F): ModGrp, FldFin -> BoolElt, ModGrp`

Let $M$ be a $K[G]$-module, where $K$ is a finite field of characteristic $p$, and let $F$ be a finite field also of characteristic $p$. If it is possible to realise $M$ over the subfield $F$ of $K$, return true and the equivalent $F[G]$-module.

#### `WriteOverSmallerField(M, F): ModGrp, FldFin -> ModGrp, Map`

Given a module $M$ of dimension $d$ over a finite field $E$ having degree $e$ and a subfield $F$ of $E$ having degree $f$, write the action of $M$ as $d*e/f$ by $d*e/f$ matrices over $F$ and return the module and the isomorphism.

#### `AbsoluteModuleOverMinimalField(M, F): ModGrp, FldFin -> ModGrp`

Let $M$ be a $K[G]$-module, where $K$ is a finite field of characteristic $p$, and let $F$ be a finite field also of characteristic $p$. This function returns the module obtained by writing $M$ over the smallest possible field containing $F$ subject to the condition that the dimension of $M$ does not increase. The Glasby-Howlett algorithm is used to determine the smallest field over which $M$ can be realised.

#### `AbsoluteModuleOverMinimalField(M): ModGrp -> ModGrp`

```magma
verbose: Reduce                          Default: Verbose : 2
verbose: Cohomology                      Default: Verbose : 2
verbose: GrunwaldWang                    Default: Verbose : 2
```

Let $M$ be a $K[G]$-module, where $K$ is a finite field of characteristic $p$. This function returns the module obtained by writing $M$ over a field of smallest possible degree subject to the condition that the dimension of $M$ does not increase. For modules over finite fields, a field of smallest degree is always a subfield of $K$, in this case, the Glasby-Howlet algorithm is used.

#### `AbsoluteModulesOverMinimalField(Q, F): [ ModGrp ], FldFin -> [ ModGrp ]`

Let $Q$ be a sequence of $K[G]$-modules, where $K$ is a finite field of characteristic $p$, and let $F$ be a finite field also of characteristic $p$. This function returns the sequence of modules obtained by writing each module $M$ of $Q$ over the smallest possible field containing $F$ subject to the condition that the dimension of $M$ does not increase. Thus, the effect of the function is to apply the function `AbsoluteModuleOverMinimalField` to each module of $Q$. The Glasby-Howlett algorithm is used to determine the smallest field over which the modules $M$ of $Q$ can be realised.

#### `ModuleOverSmallerField(M, F): ModGrp, FldFin -> ModGrp`

Let $M$ be a $K[G]$-module of dimension $d$, where $K$ is a finite field of characteristic $p$, and let $F$ be a subfield of $K$ of index $n$. This function returns the $F[G]$-module $N$ obtained by writing the action of $M$ as $dn \times dn$ matrices over $F$.

#### `ModulesOverSmallerField(Q, F): SeqEnum, FldFin -> ModGrp`

Let $Q$ be a sequence of $K[G]$-modules, where $K$ is a finite field of characteristic $p$, and let $F$ be a subfield of $K$ of index $n$. This function returns the sequence $R$ of $F[G]$-modules obtained by applying the function `ModuleOverSmallerField` to each term of $Q$. That is, each term $N$ of $R$ is formed by writing the action of the corresponding term of $Q$ as $dn \times dn$ matrices over $F$.

#### `ModulesOverCommonField(M, N): ModGrp, ModGrp -> ModGrp, ModGrp`

Given $K[G]$-modules $M$ and $N$ defined over finite fields of characteristic $p$, change their base fields to $L$, where $L$ is the smallest field containing the base fields of $M$ and $N$.

### Rewriting Over a Smaller Degree Number Field

#### `AbsoluteModuleOverMinimalField(M): ModGrp -> ModGrp`

```magma
verbose: Reduce                          Default: Verbose : 2
verbose: Cohomology                      Default: Verbose : 2
verbose: GrunwaldWang                    Default: Verbose : 2
```

Let $M$ be a $K[G]$-module, where $K$ is a a number field. This function returns the module obtained by writing $M$ over a field $F$ of smallest possible degree subject to the condition that the dimension of $M$ does not increase. The field $F$ is found using a combination of a method due to W. Plesken and a constructive version of the Grunwald-Wang theorem.

#### `Minimize(M): ModGrp -> ModGrp`

#### `Minimize(R): Map -> Map`

```magma
All         : BoolElt                         Default: false
Char        : AlgChtrElt                      Default: false
FindSmallest: BoolElt                         Default: false
verbose     : Reduce                          Default: Verbose : 2
verbose     : Cohomology                      Default: Verbose : 2
verbose     : GrunwaldWang                    Default: Verbose : 2
```

Given an absolutely irreducible $KG$-module $M$ or an absolutely irreducible representation $R : G \rightarrow {\operatorname{GL}}(n, K)$, where $K$ is a number field, this function tries to find minimal subfields $k$ of $K$ that afford $M$ ($R$), i.e. it tries to write the module (representation) over a smaller field. In general however, there might be a number field $k$ not contained in $K$ of smaller degree that affords $M$ ($R$).

If `All` is set to `true`, then instead of returning a single module (representation) over a minimal degree subfield of $K$, a list of modules (representations) over all minimal subfields of $K$ is returned instead.

If `Char` is given, it should be set to the character of the module (representation).

If `FindSmallest` is given, the field $K$ will be extended by some auxiliary field $A$ such that $KA$ will contain a minimal degree field affording $R$. This involves a constructive version of the Grunwald-Wang theorem and can be computationally expensive if the degree of $KA$ is too large.

#### `WriteGModuleOver(M, K): ModGrp, FldAlg -> ModGrp`

#### `WriteRepresentationOver(R, K): Map, FldAlg -> Map`

```magma
Char    : AlgChtrElt                      Default: false
Subfield: BoolElt                         Default: false
verbose : Reduce                          Default: Verbose : 2
verbose : Cohomology                      Default: Verbose : 2
verbose : GrunwaldWang                    Default: Verbose : 2
```

Given an absolutely irreducible $L[G]$-module $M$ or an absolutely irreducible representation $R : G \rightarrow GL(n, L)$, where $L$ is a number field, and a number field $K$ that is a normal extension, try to write $M$ ($R$) over $K$.

If `Char` is specified, it should be set to the character of this module (representation).

If `Subfield` is set to `true`, the module (representation) will be rewritten over a minimal degree subfield of $K$.

#### `Example: Minimal Field (ex-217bd4)`

We will work with the $G$-module and character of the unique $2$-dimensional character of $Q_8$. It is well known that, while the character is defined over $Q$, the corresponding representation can only be defined over fields where $-1$ is the sum of $2$ squares.

```magma
> _<x> := PolynomialRing(Rationals());
> G := TransitiveGroup(8, 5);
> TransitiveGroupDescription(G);
Q_8(8)
> R := AbsolutelyIrreducibleModules(G, Rationals());
> R;
[
    GModule of dimension 1 over Rational Field,
    GModule of dimension 1 over Rational Field,
    GModule of dimension 1 over Rational Field,
    GModule of dimension 1 over Rational Field,
    GModule of dimension 2 over Cyclotomic Field
    of order 4 and degree 2
]
> R := R[5];
> W := WriteGModuleOver(R, CyclotomicField(5));
> W;
GModule W of dimension 2 over Cyclotomic Field
of order 5 and degree 4

```

So $Q(\zeta_5)$ is an example of a field affording the module but having no minimal degree subfield (of degree 2 here) affording $R$!.

```magma
> M := AbsoluteModuleOverMinimalField(W);
> M;
GModule M of dimension 2 over Number Field with
defining polynomial x^2 + 10 over the Rational Field

```

Note that the base field returned here is of degree $2$ but different from $Q(\zeta_4)$ that was found initially. In general there are infinitely many minimal degree splitting fields, and the specific one returned depends on the algorithm’s internal choices.

If we try to realize $R$ over a field where $-1$ cannot be written as a sums of two squares we get an error:

```magma
> WriteGModuleOver(R, QuadraticField(3));

>> WriteGModuleOver(R, QuadraticField(3));
                   ^
Runtime error in 'WriteGModuleOver': The G-module
cannot be realised over K

```

We can try to find a minimal field containing $Q(\sqrt 3)$ by computing the local Schur-indices and then obtain a splitting field:

```magma
> k := QuadraticField(3);
> si := SchurIndices(Character(R), k);
> si;
[ <1st place at infinity, 2>, <2nd place at infinity, 2> ]
> A := SplittingField(si);
> A;
FldAb, defined by (<3>, [1      2])
of structure: Z/2

```

So the splitting field is returned as an abelian extension. We can see that $A$ is of degree $2$ over $k$ and will be ramified at most at $3$ and both infinite places. In order to use it to rewrite the module, we need to convert to a number field over $Q$ first:

```magma
> A := NumberField(A);
> A;
Number Field with defining polynomial $.1^2 + 1 over k
> A := AbsoluteField(A);
> A;
Number Field A with defining polynomial x^4 - 4*x^2 +
16 over the Rational Field
> M := WriteGModuleOver(R, A);
> M;
GModule M of dimension 2 over A
> M := WriteGModuleOver(R, A : Subfield);
> M;
GModule M of dimension 2 over Number Field with
defining polynomial x^2 + 1 over the Rational Field

```
