# Homomorphisms of Modules

A homomorphism from module $M$ to module $N$ is simply a matrix that commutes with the action of the algebra on $M$ and $N$.

## Creation

### `AHom(M, N): ModAlg, ModAlg -> ModMatFld`

The space of homomorphisms from module $M$ to module $N$.

### `PHom(M, N): ModAlg, ModAlg -> ModMatFld`

The space of projective homomorphisms from module $M$ to module $N$. That is, the space of all homomorphisms that factor through a projective module.

### `ZeroMap(M, N): ModAlg, ModAlg -> ModMatFld`

The zero homomorphism from module $M$ to module $N$.

### `LiftHomomorphism(x, n): ModAlgElt, RngIntElt -> ModMatFldElt`

Given an element $x$ in a module over a basic algebra and a natural number $n$, the function returns the homomorphism from the $n^{th}$ projective module for the algebra to the module with the property that the idempotent $e$ of the projective module maps to $x*e$.

### `LiftHomomorphism(X, N): SeqEnum[ModAlgElt], SeqEnum[RngIntElt] -> ModMatFldElt`

Given a sequence $X = [x_1, \ldots, x_t]$ of elements in a module $M$ over a basic algebra and a sequence $N = [n_1, \ldots, n_s]$ of nonnegative integers, such that $n_1 + \ldots + n_s = t$, the function returns the homomorphism $P \rightarrow M$ from the projective module $P = \sum_{j=1}^s P_j^{n_i}$ to $M$ that takes the idempotent $e$ for the $i^{th}$ summand in $P$ to the element $x_i*e$ in $M$. Here $P_{j}$ denotes the $j^{th}$ projective module for the algebra.

### `Pushout(M, f1, N1, f2, N2): ModAlg, ModMatFldElt, ModAlg, ModMatFldElt, ModAlg -> ModAlg, ModMatFldElt, ModMatFldElt`

The pushout of the diagram

$$

   \begin{matrix}M & \xrightarrow{f_1} & N_1 \\
   \mathop{\downarrow}\limits^{f_2} & & \\
   N_2 & & \end{matrix}
$$

The function returns the module $L = (N_1 \oplus N_2)/\{(f_1(m),-f_2(m))\vert m \in M\}$ and the homomorphisms $g_1:N_1 \longrightarrow L$ and $g_2: N_2 \longrightarrow L$ such that $f_1g_1 = f_2g_2$.

### `Pullback(f1, M1, f2, M2, N): ModAlg, ModMatFldElt, ModAlg, ModMatFldElt, ModAlg -> ModAlg, ModMatFldElt, ModMatFldElt`

The pullback of the diagram

$$

   \begin{matrix}& & M_2 \\
    & & \mathop{\downarrow}\limits^{f_2}\\
   M_1 & \xrightarrow{f_1} & N \end{matrix}
$$

The function returns the module $L = \{(m_1,m_2) \in M_1 \oplus M_2 \vert f_1(m_1) = f_2(m_2)\}$ and the homomorphisms $g_1:L\longrightarrow M_1$ and $g_2: L \longrightarrow M_2$ such that $g_1f_1 = g_2f_2$.

## Access Functions

### `IsModuleHomomorphism(f): ModMatFldElt -> BoolElt`

Returns `true` if the map $f$ is a homomorphism of modules over the algebra.

### `Domain(f): ModMatFldElt -> ModAlg`

The domain of $f$.

### `Codomain(f): ModMatFldElt -> ModAlg`

The codomain of $f$.

### `Kernel(f): ModMatFldElt -> ModAlg, ModMatFldElt`

The kernel of $f$ and the inclusion of the kernel in `Domain(f)`.

### `Cokernel(f): ModMatFldElt -> ModAlg, ModMatFldElt`

The cokernel of $f$ and the quotient map from `Codomain(f)` onto the cokernel.

## Projective Covers and Resolutions

A projective cover of a module $M$ is a projective module $P$ and a surjective homomorphism $\phi:P \longrightarrow M$ such that $P$ is minimal with respect to the property of having such a surjective homomorphism to $M$. A projective resolution to $n$ steps of an $A$-module $M$ is a pair consisting of a complex

$$
P_n \xrightarrow{\partial_n} P_{n-1} \longrightarrow  \ldots
\longrightarrow P_1 \xrightarrow{\partial_1} P_0
$$

which is exact except at the ends, and an augmentation homomorphism $\epsilon: P_0 \rightarrow M$ that is a projective cover of $M$. In addition, the image of $\partial_1$ must equal the kernel of $\epsilon$. The resolution is minimal if each $P_i$ is a projective cover of its image in $P_{i-1}$. In this case the $i^{th}$ syzygy module is the image of $\partial_i$.

In the implementation the main function is `CompactProjectiveResolution`. This function computes a minimal projective resolution of a given module and stores the minimal amount of information that is necessary to create the boundary maps and the terms of the resolution. It runs relatively fast because it avoids the computation of the terms of the projective resolution as modules over the algebra. Instead the terms in the compact resolution are only vector spaces together with a sequence of types for the projective modules. The other information that is recorded is the sequence of images of the generators for the indecomposable projective modules. That is, for the boundary map

$$
P_n \xrightarrow{\partial_n} P_{n-1}
$$

the module $P_n \cong \oplus_{i = 1}^m Q_i$ where each $Q_i$ is an indecomposable projective module generated by an element $a_i$ corresponding to the appropriate idempotent in the basic algebra. The function records the images $\partial_n(a_i)$ as a sequence of vectors in the vector space of the module $P_{n-1}$.

### `ProjectiveCover(M): ModAlg -> ModAlg, ModMatFldElt, SeqEnum[ModMatFldElt], SeqEnum[ModMatFldElt], SeqEnum[RngIntElt]`

The projective cover of the module $M$ given as the projective module $P$, the surjective homomorphism of $P$ onto $M$, the sequences of inclusion and projection homomorphism of $P$ from and to its indecomposable direct summands and the isomorphism type of $P$ in the form of a list of the number of copies of the projective modules of the algebra of each type that make up $P$.

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

The complex giving the minimal projective resolution of the module $M$ out to $n$ steps together with the augmentation homomorphism from the projective cover of $M$ into $M$. Note that homomorphisms go from left to right so that last term of the complex (in degree 0) is the projective cover of $M$ and the cokernel of the last homomorphism in the complex is $M$. The complex is constructed from the compact projective resolution of $M$. The function creates the compact projective resolution if it has not already been computed.

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

Returns a minimal projective resolution for the module $M$ out to $n$ steps in compact form together with the augmentation map ($P_0 \rightarrow M$). The compact form of the resolution is a list of the minimal pieces of information needed to reconstruct the boundary maps in the resolution. That is the boundary map ($P_i \xrightarrow{\partial_i} P_{i-1}$) is recorded as a matrix whose entries are the images of the generators for indecomposable projective modules making up $P_i$ in the indecomposable projective modules making up $P_{i-1}$. If a compact projective resolution has been previously computed to degree $m$ and $m < n$ then the function extends that resolution by $n-m$ steps. If $m \geq n$ the function returns the previously computed compact projective resolution. The function returns a record with the fields:

**(a)**
The list of isomorphism types of the projective modules in the resolution, each given as a sequence of integers giving the number of direct summands of each indecomposable projective in the module (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`).

### `CompactProjectiveResolutionsOfSimpleModules(A, n): AlgBas, RngIntElt -> SeqEnum`

Returns a sequence of the compact projective resolutions of the simple A-modules computed to degree $n$.

### `SyzygyModule(M, n): ModAlg, RngIntElt -> ModAlg`

The $n^{th}$ syzygy module of the module $M$. The module is constructed from the compact projective resolution of $M$. The compact resolution is constructed if it does not already exist.

### `SimpleHomologyDimensions(M): ModAlg -> SeqEnum`

The sequence of sequences of dimensions of the homology groups $\hbox{Tor}_j(S_i,M)$ for simple modules $S_i$ and module $M$, to the extent that they have been computed.

### `Example: Homomorphisms (ex-8bea28)`

We consider the basic algebra of a quiver with relation. The quiver has four nodes and 5 nonidempotent generators $(a,b,c,d,e)$. The first goes from node 1 to node 2, the second from 2 to 3, the third from 3 to 4, the fourth from 3 to 2 and the last from 4 to 1. They satisfy the relations $bcfadbd = (abcf)^5ab = (bd)^2b = 0$.

```magma
> ff := GF(8);
> FA<e1,e2,e3,e4,a,b,c,d,f> := FreeAlgebra(ff,9);
> rrr := [b*c*f*a*b*d*b,a*b*c*f*a*b*c*f*a*b*c*f*a*b*c*f*a*b*c*f*a*b,
>     b*d*b*d*b];
> BA := BasicAlgebra(FA,rrr,4,[<1,2>,<2,3>,<3,4>,<3,2>,<4,1>]);
> BA;
Basic algebra of dimension 296 over GF(2^3)
Number of projective modules: 4
Number of generators: 9

```

Now we take the projective resolutions of the simple modules out to 5 steps. We print the type of the projective module at each stage.

```magma
> for i := 1 to 4 do
>     S := SimpleModule(BA,i);
>     prj := CompactProjectiveResolution(S, 5);
>     SimpleHomologyDimensions(S);
> end for;
[
    [ 0, 0, 10, 0 ],
    [ 0, 0, 5, 0 ],
    [ 0, 0, 2, 0 ],
    [ 0, 0, 1, 0 ],
    [ 0, 1, 0, 0 ],
    [ 1, 0, 0, 0 ]
]
[
    [ 0, 0, 16, 0 ],
    [ 0, 0, 8, 0 ],
    [ 0, 0, 4, 0 ],
    [ 0, 0, 2, 0 ],
    [ 0, 0, 1, 0 ],
    [ 0, 1, 0, 0 ]
]
[
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 0, 1, 0, 1 ],
    [ 0, 0, 1, 0 ]
]
[
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 0, 0, 0, 0 ],
    [ 1, 0, 0, 0 ],
    [ 0, 0, 0, 1 ]
]

```

So we see that the third and fourth simple modules have finite projective dimension. The projective resolutions of the first and second simple modules appear to have exponential rates of growth but the terms after the second term are all direct sums of copies of the third projective module.

```magma
> for i := 1 to 4 do
>     Dimension(Socle(ProjectiveModule(BA,i)));
> end for;
12
13
25
12

```

Notice that the socles of the projective modules have very large dimensions so the injective resolutions are probably going to grow at a very rapid rate.

### `Example: Homomorphisms 2 (ex-c5e505)`

We create the quotient of the group algebra of a $p$-group by the ideal generated by a central element. In particular, we choose the group algebra of an extra special 3-group and factor out the ideal generated by $(z-1)^2$ where $z$ is a central element of order 3. Then we compare the size of the projective resolution of the trivial module for the new algebra with that of the antecedent group algebra.

```magma
> G := ExtraSpecialGroup(3,1);
> F := GF(3);
> B := BasicAlgebra(G,F);
> B;
Basic algebra of dimension 27 over GF(3)
Number of projective modules: 1
Number of generators: 4
> s := NonIdempotentGenerators(B)[3];

```

Now check that `s` is in the center.

```magma
> [s*x eq x*s: x in Generators(B)];
[ true, true, true, true ]
> P := ProjectiveModule(B,1);
> Q := quo<P|P.1*s^2>;
> Q;
AModule Q of dimension 18 over GF(3)

```

We need to create the path tree for the projective module of the matrix algebra of the action on `Q`. In this case it is an easy exercise because the last 9 element of the basis of the projective module for `B` span the submodule that we are factoring out. This can actually be seen from the path tree for the projective module of `B`.

```magma
> PathTree(B,1);
[ <1, 1>, <1, 2>, <2, 2>, <1, 3>, <2, 3>, <3, 3>, <4, 3>,
<5, 3>, <6, 3>, <1, 4>, <2, 4>, <3, 4>, <4, 4>, <5, 4>,
<6, 4>, <7, 4>, <8, 4>, <9, 4>, <10, 4>, <11, 4>, <12, 4>,
<13, 4>, <14, 4>, <15, 4>, <16, 4>, <17, 4>, <18, 4> ]

```

So we get the path tree for the new module by truncation.

```magma
> PT := [PathTree(B,1)[j]: j in [1 .. 18]];
> PT;
[ <1, 1>, <1, 2>, <2, 2>, <1, 3>, <2, 3>, <3, 3>,
<4, 3>, <5, 3>, <6, 3>, <1, 4>, <2, 4>, <3, 4>,
<4, 4>, <5, 4>, <6, 4>, <7, 4>, <8, 4>, <9, 4> ]

```

Now form the new basic algebra.

```magma
> C := BasicAlgebra([<Action(Q),PT>]);
> C;
Basic algebra of dimension 18 over GF(3)
Number of projective modules: 1
Number of generators: 4
> S := SimpleModule(C,1);
> prj := CompactProjectiveResolution(S, 15);
> SimpleHomologyDimensions(S);
[ 92, 77, 70, 57, 51, 40, 35, 26, 22, 15, 12, 7, 5, 2, 1 ]

```

Now compare this with the projective resolution for the group algebra.

```magma
> T := SimpleModule(B,1);
> pj2 := CompactProjectiveResolution(T,15);
> SimpleHomologyDimensions(T);
[ 20, 18, 17, 16, 15, 14, 12, 10, 9, 8, 7, 6, 4, 2, 1 ]

```
