# Homomorphisms between Modules

It is possible to create a homomorphism between two modules, take the image and kernel of such and verify that these are submodules of the codomain and domain respectively. The Hom–module can also be created as a module of a Dedekind domain.

## `hom<M -> N | T>: ModDed, ModDed, Map -> Map`

## `hom<M -> N | T>: ModDed, ModDed, SeqEnum[ModTupRngElt] -> Map`

## `hom<M -> N | T>: ModDed, ModDed, MtrxSpcElt -> Map`

```magma
ModuleBasis: BoolElt                    Default: true
```

Return a homomorphism from the module $M$ into the module $N$ as specified by $T$ from which the images of the generators can be inferred. $T$ may be a map between the vector spaces of same degree as $M$ and $N$, a matrix over the field of fractions or a sequence of vectors. If `ModuleBasis` is `true` then the matrix will be taken to be a transformation between the modules and as such will be expected to have size `Dimension(M)`$*$`Dimension(N)` otherwise it will be interpreted as a transformation between the corresponding vector spaces and will be expected to have size `Degree(M)`$*$`Degree(N)`.

## `Hom(M, N): ModDed, ModDed -> ModDed, Map`

The module of homomorphisms between the module $M$ and the module $N$ and the map from the hom–module to the collection of maps from $M$ to $N$, (such that given an element of the hom–module a homomorphism from $M$ to $N$ is returned). The module is over the same Dedekind domain as $M$ and $N$.

## `IsSubmodule(M, N): ModDed, ModDed -> BoolElt, Map`

Return `true` if $M$ is a submodule of $N$ and the map embedding $M$ into $N$.

## `Morphism(M, N): ModDed, ModDed -> Map`

The map giving the morphism from the module $M$ to the module $N$. Either $M$ is a submodule of $N$, in which case the embedding of $M$ into $N$ is returned, or $N$ is a quotient module of $M$, in which case the natural epimorphism from $M$ onto $N$ is returned.

## `Example: hom (ex-f6bf14)`

This example demonstrates the use of homomorphisms between modules over Dedekind domains. Let `M` and `V` be as above referring to function fields.

```magma
> S := [V|[0,1,0], [4,4,0]];
> Mod := Module(S);
> W := KModule(FieldOfFractions(M), 4);
> S := [W|[3, 2, 1, 0]];
> N := Module(S);
> h := hom<Mod -> N | >;
>> h := hom<Mod -> N | >;
           ^
Runtime error in map< ... >: No images given
> h := hom<Mod -> N | V.1, V.2, V.3>;

>> h := hom<Mod -> N | V.1, V.2, V.3>;
           ^
Runtime error in map< ... >: An image for each generator is required
> h := hom<Mod -> N | W![3, 2, 1, 0], W![3*(M!F.1 + 1), 2*(M!F.1 + 1),
> M!F.1 + 1, 0] >;
> h(Mod!(4*V.1));
( 4 )
> h(Mod!V![0, 1, 0]);
( x^2 + 1 )
> I := Image(h);
> I;
Module over Maximal Equation Order of F over Univariate Polynomial Ring in x
over Rational Field
Ideal of M
Generator:
1
> K := Kernel(h);
> K;
Integral Module over Maximal Equation Order of F over Univariate Polynomial Ring
in x over Rational Field
Ideal of M
Generator:
1
> IsSubmodule(K, Mod);
true Mapping from: ModDed: K to ModDed: Mod
> H, m := Hom(Mod, N);
> H; m;
Module over Maximal Equation Order of F over Univariate Polynomial Ring in x over
Rational Field
 generated by: (in echelon form)
Ideal of M
Generator:
1/4 * ( 1 0 )
Ideal of M
Generator:
1 * ( 0 1 )
Mapping from: ModDed: H to Power Structure of Map given by a rule [no inverse]
> m(H![5, 20]);
Mapping from: ModDed: Mod to ModDed: N
using
[5]
[20]

```
