The Hom Module and Ext

Hom(M, N) : ModMPol, ModMPol -> ModMPol, Map
Given R -modules M and N, return H=HomR(M, N) as an abstract reduced module and a transfer map f: H -> S, where S is the set of all homomorphisms (of type ModMPolHom) from M to N.

Thus H is a module representing the set of all homomorphisms from M to N, while f maps an element h∈H to an actual homomorphism from M to N (and the inverse image of an element of S under f gives a corresponding element of H).

If M and N are graded, then H is graded also, and the degree df of an element f∈H is the degree of the corresponding homomorphism (so an element in M of degree d will be mapped by f to zero or an element of degree df + d in N).

Hom(C, N) : ModCpx, ModMPol -> ModMPol
Given a complex C of R-modules and an R-module N, return HomR(C, N). This is a new complex whose i-th term is HomR(Ci, N) (where Ci is the i-th term of C); the boundary maps are also derived from those of C in the natural way via the functor HomR( - , N) (see [Eis95, p.63]). Note that the direction of arrows in this complex is opposite to that of C.
Ext(i, M, N) : RngIntElt, ModMPol, ModMPol -> ModMPol
Given an integer i≥0 and R-modules M and N, return Exti(M, N). This is the homology at the i-th term of the complex HomR(C, N) where C is a free resolution of M.

Example PMod_Hom (H116E15)

We construct a Hom module and explicit homomorphisms derived from it.
> R<x,y,z> := PolynomialRing(RationalField(), 3);
> M := quo<GradedModule(R, 3) |
>     [x*y, x*z, y*z], [y, x, y],
>     [0, x^3 - x^2*z, x^2*y - x*y*z], [y*z, x^2, x*y]>;
> N := quo<GradedModule(R, 2) |
>     [x^2, y^2], [x^2, y*z], [x^2*z, x*y^2]>;
> M;
Graded Module R^3/<relations>
Relations:
[          x*y,           x*z,           y*z],
[            y,             x,             y],
[            0,   x^3 - x^2*z, x^2*y - x*y*z],
[          y*z,           x^2,           x*y]
> N;
Graded Module R^2/<relations>
Relations:
[  x^2,   y^2],
[  x^2,   y*z],
[x^2*z, x*y^2]
> H, f := Hom(M, N);
> H;
Graded Module R^7/<relations> with grading [1, 2, 1, 1, 1, 1, 1]
Relations:
[x, 0, 0, -z, 0, x, 0],
[y, 0, x, 0, y, 0, 0],
[y, 0, x, 0, 0, y, 0],
[0, 0, 0, 0, 0, 0, y],
[-y, 0, -x, 0, -z, 0, z],
[x, 0, 0, -y, x, 0, 0],
[x*y, y, 0, 0, 0, 0, x*y],
[-x*y + x*z, -y + z, 0, 0, 0, 0, x*z - z^2],
[x*z, x, 0, 0, 0, 0, 0],
[0, y, 0, y^2, -z^2, 0, z^2],
[0, y - z, 0, 0, 0, 0, z^2]
> h := f(H.1);
> h;
Module homomorphism (3 by 2) of degree 1
Presentation matrix:
[0 z]
[x 0]
[0 0]
> $1 @@ f;
[1, 0, 0, 0, 0, 0, 0]
> Degree(M.1);
0
> h(M.1);
[0, z]
> Degree(h(M.1));
1
> f(Basis(H));
[
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [0 z]
    [x 0]
    [0 0],
    Module homomorphism (3 by 2) of degree 2
    Presentation matrix:
    [   0 -z^2]
    [   0  y*z]
    [   0    0],
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [ 0  0]
    [-y  0]
    [ x  0],
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [ 0  0]
    [ 0 -y]
    [ 0  x],
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [ 0 -z]
    [ 0  0]
    [ 0  y],
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [ 0 -z]
    [ 0  0]
    [ 0  z],
    Module homomorphism (3 by 2) of degree 1
    Presentation matrix:
    [    0 y - z]
    [    0     0]
    [    0     0]
]
V2.28, 13 July 2023