next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Complexes :: Hom(ComplexMap,ComplexMap)

Hom(ComplexMap,ComplexMap) -- the map of complexes between Hom complexes

Synopsis

Description

The maps $f : C \to D$ and $g : E \to F$ of chain complexes induces the map $h = Hom(f,g) : Hom(D,E) \to Hom(C,F)$ defined by $\phi \mapsto g \phi f$.

i1 : S = ZZ/101[a..c];
i2 : C = freeResolution coker vars S

      1      3      3      1
o2 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o2 : Complex
i3 : D = (freeResolution coker matrix{{a^2,a*b,b^3}})[-1]

      1      3      2
o3 = S  <-- S  <-- S
                    
     1      2      3

o3 : Complex
i4 : f = randomComplexMap(D,C)

                   1
o4 = 0 : 0 <----- S  : 0
              0

          1                                                3
     1 : S  <-------------------------------------------- S  : 1
               | 24a-36b-30c -29a+19b+19c -10a-29b-8c |

          3                           3
     2 : S  <----------------------- S  : 2
               {2} | -22 -24 -16 |
               {2} | -29 -38 39  |
               {3} | 0   0   0   |

          2                  1
     3 : S  <-------------- S  : 3
               {3} | 21 |
               {4} | 0  |

o4 : ComplexMap
i5 : E = (dual C)[-3]

      1      3      3      1
o5 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o5 : Complex
i6 : F = (dual D)[-3]

      2      3      1
o6 = S  <-- S  <-- S
                    
     0      1      2

o6 : Complex
i7 : g = randomComplexMap(F,E)

          2                            1
o7 = 0 : S  <------------------------ S  : 0
               {-3} | 34          |
               {-4} | 19a-47b-39c |

          3                                                     3
     1 : S  <------------------------------------------------- S  : 1
               {-2} | -18          -47        45           |
               {-2} | -13          38         -34          |
               {-3} | -43a-15b-28c 2a+16b+22c -48a-47b+47c |

          1         3
     2 : S  <----- S  : 2
               0

                   1
     3 : 0 <----- S  : 3
              0

o7 : ComplexMap
i8 : h = Hom(f,g)

           2                              2
o8 = -3 : S  <-------------------------- S  : -3
                {-6} | 7           0 |
                {-7} | -5a+23b-11c 0 |

           9                                                                                    9
     -2 : S  <-------------------------------------------------------------------------------- S  : -2
                {-5} | -41          24           0 0          0           0          0 0 0 |
                {-6} | -14a+24b+50c -46a+50b+20c 0 0          0           0          0 0 0 |
                {-5} | -8           21           0 0          0           0          0 0 0 |
                {-6} | 49a+17b+27c  -15a-32b-33c 0 0          0           0          0 0 0 |
                {-5} | -39          13           0 0          0           0          0 0 0 |
                {-6} | -a+45b+18c   34a-15b-6c   0 0          0           0          0 0 0 |
                {-5} | 0            0            0 26         23          36         0 0 0 |
                {-5} | 0            0            0 30         -10         -7         0 0 0 |
                {-6} | 0            0            0 6a-12b+18c 42a+33b-43c 2a+23b-23c 0 0 0 |

           16                                                                                                                                             16
     -1 : S   <----------------------------------------------------------------------------------------------------------------------------------------- S   : -1
                 {-4} | 8a-12b-10c                    0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-5} | -49a2+6ab-25b2+9ac-14bc-42c2  0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-4} | 24a+40b+40c                   0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-5} | -46a2+7ab+16b2-23ac-18bc-34c2 0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-4} | -37a+24b+31c                  0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-5} | 12a2+20ab+50b2+36ac-8bc+9c2   0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             -8           24           20           17          50           8            0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             -17          -28          41           -27         9            -24          0 0 0 0 0 0 0 0 0 |
                 {-5} | 0                             37a+27b+10c  -44a-49b+21c 46a+24b-24c  35a+31b+4c  43a+41b-32c  -22a+50b-50c 0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             28           17           31           -23         -32          7            0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             9            -3           8            -11         -30          -21          0 0 0 0 0 0 0 0 0 |
                 {-5} | 0                             22a-44b-35c  -48a+20b-23c 41a+17b-17c  18a-36b-47c 25a-2b-28c   6a-32b+32c   0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             -15          45           -13          5           -15          38           0 0 0 0 0 0 0 0 0 |
                 {-4} | 0                             6            -2           39           -2          -33          -13          0 0 0 0 0 0 0 0 0 |
                 {-5} | 0                             -19a+38b+44c -32a+47b-49c -40a+45b-45c 40a+21b+19c -23a+18b+50c 47a-15b+15c  0 0 0 0 0 0 0 0 0 |
                 {-3} | 0                             0            0            0            0           0            0            0 0 0 0 0 0 0 0 0 |

          14                                                                                                                                   14
     0 : S   <------------------------------------------------------------------------------------------------------------------------------- S   : 0
                {-3} | 0                              0                              0                              0 0 0 0 0 0 0 0 0 0 0 |
                {-4} | 0                              0                              0                              0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | -28a+42b+35c                   -17a-25b-4c                    -31a-4b-37c                    0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | -9a-37b-14c                    3a+46b-29c                     -8a+12b+10c                    0 0 0 0 0 0 0 0 0 0 0 |
                {-4} | -22a2-24ab+35b2+12ac+44bc+32c2 48a2+9ab+30b2-37ac+41bc+47c2   -41a2-6ab-25b2+43ac+21bc+4c2   0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | 17a-39b-39c                    50a+16b+16c                    8a+47b+47c                     0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | -27a-45b-45c                   9a+15b+15c                     -24a-40b-40c                   0 0 0 0 0 0 0 0 0 0 0 |
                {-4} | 35a2+22ab+18b2-5ac-9bc-27c2    43a2-22ab+b2+6ac+15bc+14c2     -22a2+47ab+16b2+48ac-16c2      0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | -22a+17b+43c                   -35a+50b-28c                   -46a+8b+44c                    0 0 0 0 0 0 0 0 0 0 0 |
                {-3} | 29a-27b+3c                     24a+9b-c                       37a-24b-31c                    0 0 0 0 0 0 0 0 0 0 0 |
                {-4} | 26a2-17ab+31b2+18ac+23bc+22c2  -20a2-16ab+41b2-34ac+42bc+26c2 -25a2+44ab+50b2+15ac+23bc+28c2 0 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0                              0                              0                              0 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0                              0                              0                              0 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0                              0                              0                              0 0 0 0 0 0 0 0 0 0 0 |

          6         6
     1 : S  <----- S  : 1
               0

          1         1
     2 : S  <----- S  : 2
               0

o8 : ComplexMap
i9 : assert isWellDefined h
i10 : assert(source h === Hom(D,E))
i11 : assert(target h === Hom(C,F))

We illustrate the defining property of the map $h$ on a random element $\phi$ in degree zero.

i12 : e = randomComplexMap(source h, complex(S^1))

           14                                                                                                            1
o12 = 0 : S   <-------------------------------------------------------------------------------------------------------- S  : 0
                 {-2} | 19a2-16ab+15b2+7ac-23bc+39c2                                                                |
                 {-2} | 43a2-17ab+48b2-11ac+36bc+35c2                                                               |
                 {-2} | 11a2-38ab+40b2+33ac+11bc+46c2                                                               |
                 {-3} | -28a3+a2b+22ab2-7b3-3a2c-47abc+2b2c-23ac2+29bc2-47c3                                        |
                 {-3} | 15a3-37a2b-10ab2+39b3-13a2c+30abc+27b2c-18ac2-22bc2+32c3                                    |
                 {-3} | -9a3-32a2b+24ab2-15b3-20a2c-30abc+39b2c-48ac2+33c3                                          |
                 {-3} | -49a3-33a2b+17ab2-39b3-19a2c-20abc+36b2c+44ac2+9bc2-39c3                                    |
                 {-3} | 4a3+13a2b+22ab2-8b3-26a2c-49abc+43b2c-11ac2-8bc2+36c3                                       |
                 {-3} | -3a3-22a2b+41ab2-6b3-30a2c+16abc+35b2c-28ac2-9bc2-35c3                                      |
                 {-4} | 6a4+40a3b-31a2b2-41ab3+30b4+3a3c+25a2bc-49ab2c-47b3c-2a2c2-13abc2+27b2c2+4ac3-40bc3+37c4    |
                 {-4} | -35a4-31a3b-31a2b2-48ab3-49b4-39a3c-48a2bc+30ab2c+28b3c-29a2c2-37abc2-18b2c2+47ac3+46bc3+c4 |
                 {-4} | 40a4-22a3b+7a2b2-17ab3+8b4+10a3c+30a2bc-13ab2c+8b3c+13a2c2+3abc2-29b2c2-41ac3+30bc3-46c4    |
                 {-3} | 49a3-18a2b+23ab2+18b3+42a2c-28abc-16b2c+15ac2-46bc2+12c3                                    |
                 {-4} | -18a4+27a3b+23a2b2+44ab3-21a3c-37a2bc-39ab2c-47b3c-23a2c2+20abc2-28b2c2+19ac3+47bc3-28c4    |

o12 : ComplexMap
i13 : phi = homomorphism e

           3                                              1
o13 = 1 : S  <------------------------------------------ S  : 1
                {-2} | 19a2-16ab+15b2+7ac-23bc+39c2  |
                {-2} | 43a2-17ab+48b2-11ac+36bc+35c2 |
                {-2} | 11a2-38ab+40b2+33ac+11bc+46c2 |

           3                                                                                                                                                                                                                              3
      2 : S  <-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- S  : 2
                {-1} | -28a3+a2b+22ab2-7b3-3a2c-47abc+2b2c-23ac2+29bc2-47c3     -49a3-33a2b+17ab2-39b3-19a2c-20abc+36b2c+44ac2+9bc2-39c3 6a4+40a3b-31a2b2-41ab3+30b4+3a3c+25a2bc-49ab2c-47b3c-2a2c2-13abc2+27b2c2+4ac3-40bc3+37c4    |
                {-1} | 15a3-37a2b-10ab2+39b3-13a2c+30abc+27b2c-18ac2-22bc2+32c3 4a3+13a2b+22ab2-8b3-26a2c-49abc+43b2c-11ac2-8bc2+36c3    -35a4-31a3b-31a2b2-48ab3-49b4-39a3c-48a2bc+30ab2c+28b3c-29a2c2-37abc2-18b2c2+47ac3+46bc3+c4 |
                {-1} | -9a3-32a2b+24ab2-15b3-20a2c-30abc+39b2c-48ac2+33c3       -3a3-22a2b+41ab2-6b3-30a2c+16abc+35b2c-28ac2-9bc2-35c3   40a4-22a3b+7a2b2-17ab3+8b4+10a3c+30a2bc-13ab2c+8b3c+13a2c2+3abc2-29b2c2-41ac3+30bc3-46c4    |

           1                                                                                                                                                             2
      3 : S  <--------------------------------------------------------------------------------------------------------------------------------------------------------- S  : 3
                | 49a3-18a2b+23ab2+18b3+42a2c-28abc-16b2c+15ac2-46bc2+12c3 -18a4+27a3b+23a2b2+44ab3-21a3c-37a2bc-39ab2c-47b3c-23a2c2+20abc2-28b2c2+19ac3+47bc3-28c4 |

o13 : ComplexMap
i14 : psi = homomorphism'(g * phi * f)

           14                                                                                                            1
o14 = 0 : S   <-------------------------------------------------------------------------------------------------------- S  : 0
                 {-3} | 0                                                                                           |
                 {-4} | 0                                                                                           |
                 {-3} | 12a3-22a2b-46ab2-23b3-37a2c+32abc-27b2c-5ac2+31bc2+28c3                                     |
                 {-3} | -29a3-14a2b-48ab2+12b3-46a2c-7abc+23b2c+38ac2+6bc2+10c3                                     |
                 {-4} | -17a4+50a3b+49a2b2+15ab3-45b4+4a3c+22a2bc+47ab2c+34b3c-16a2c2-16abc2+8b2c2-20ac3-34bc3+47c4 |
                 {-3} | 36a3+48a2b+26ab2+43b3-6a2c-47abc+13b2c+45ac2-41bc2-11c3                                     |
                 {-3} | 14a3+36a2b+42ab2-40b3-13a2c-43abc-16b2c-6ac2-16bc2-40c3                                     |
                 {-4} | 50a4+39a3b+a2b2+39ab3+49b4+40a3c-35a2bc-35ab2c-21b3c+22a2c2+47abc2+29b2c2+39ac3+12bc3+14c4  |
                 {-3} | -5a3+4a2b-24ab2+46b3+22a2c+22abc+33b2c-17ac2-45bc2-6c3                                      |
                 {-3} | -30a3-42a2b+16ab2-24b3+25a2c-36abc+44b2c-45ac2+35bc2-31c3                                   |
                 {-4} | -35a4+44a3b+2a2b2-33ab3-11b4+36a3c+11a2bc+7ab2c+49b3c-17a2c2+49abc2-10b2c2-16ac3+22bc3+26c4 |
                 {-2} | 0                                                                                           |
                 {-2} | 0                                                                                           |
                 {-2} | 0                                                                                           |

o14 : ComplexMap
i15 : assert(h*e == psi)

If either of the arguments is a Complex, that argument is understood to be the identity map on that complex.

i16 : assert(Hom(f, C) == Hom(f, id_C))
i17 : assert(Hom(C, f) == Hom(id_C, f))

If either of the arguments is a Module or a Ring, that argument is understood to be the identity map on the complex having a unique non-zero term in in homological degree 0. The ring must be the underlying ring of the map of complexes.

i18 : assert(Hom(f, S) == Hom(f, id_(complex S)))
i19 : assert(Hom(S, f) == Hom(id_(complex S), f))
i20 : M = S^1/(a^2, b^2, c^2)

o20 = cokernel | a2 b2 c2 |

                             1
o20 : S-module, quotient of S
i21 : assert(Hom(f, M) == Hom(f, id _ (complex M)))
i22 : assert(Hom(M, f) == Hom(id _ (complex M), f))

If either of the arguments is a Matrix, that argument is understood to be a map of complexes whose source and target have a unique non-zero entry in homological degree 0.

i23 : m = vars S;

              1       3
o23 : Matrix S  <--- S
i24 : h1 = Hom(f, m)

            1                                  6
o24 = -3 : S  <------------------------------ S  : -3
                 {-3} | 21a 21b 21c 0 0 0 |

            3                                                    9
      -2 : S  <------------------------------------------------ S  : -2
                 {-2} | -22a -22b -22c -29a -29b -29c 0 0 0 |
                 {-2} | -24a -24b -24c -38a -38b -38c 0 0 0 |
                 {-2} | -16a -16b -16c 39a  39b  39c  0 0 0 |

            3                                                                3
      -1 : S  <------------------------------------------------------------ S  : -1
                 {-1} | 24a2-36ab-30ac  24ab-36b2-30bc  24ac-36bc-30c2  |
                 {-1} | -29a2+19ab+19ac -29ab+19b2+19bc -29ac+19bc+19c2 |
                 {-1} | -10a2-29ab-8ac  -10ab-29b2-8bc  -10ac-29bc-8c2  |

o24 : ComplexMap
i25 : assert(h1 == Hom(f, map(complex target m, complex source m, i -> m)))
i26 : m = vars S;

              1       3
o26 : Matrix S  <--- S
i27 : h2 = Hom(m, f)

           3                                                              3
o27 = 1 : S  <---------------------------------------------------------- S  : 1
                {-1} | 24a2-36ab-30ac -29a2+19ab+19ac -10a2-29ab-8ac |
                {-1} | 24ab-36b2-30bc -29ab+19b2+19bc -10ab-29b2-8bc |
                {-1} | 24ac-36bc-30c2 -29ac+19bc+19c2 -10ac-29bc-8c2 |

           9                              3
      2 : S  <-------------------------- S  : 2
                {1} | -22a -24a -16a |
                {1} | -29a -38a 39a  |
                {2} | 0    0    0    |
                {1} | -22b -24b -16b |
                {1} | -29b -38b 39b  |
                {2} | 0    0    0    |
                {1} | -22c -24c -16c |
                {1} | -29c -38c 39c  |
                {2} | 0    0    0    |

           6                   1
      3 : S  <--------------- S  : 3
                {2} | 21a |
                {3} | 0   |
                {2} | 21b |
                {3} | 0   |
                {2} | 21c |
                {3} | 0   |

o27 : ComplexMap
i28 : assert(h2 == Hom(map(complex target m, complex source m, i -> m), f))

Todo: write this text after writing doc for homomorphism and homomorphism'.

i29 : e = randomComplexMap(source h, complex(S^1, Base => -1))

            16                                                                                                                                                         1
o29 = -1 : S   <----------------------------------------------------------------------------------------------------------------------------------------------------- S  : -1
                  {-3} | 6a3-9a2b+28ab2+5b3-33a2c-29abc-37b2c+26ac2-33bc2-28c3                                                                                    |
                  {-4} | 42a4+44a3b+4a2b2-20ab3-4b4+30a3c+22a2bc-13ab2c+12b3c+5a2c2-29abc2+3b2c2+15ac3+9bc3-2c4                                                   |
                  {-4} | 20a4-26a3b+16a2b2+28ab3-4b4+33a3c+10a2bc-6ab2c-14b3c+31a2c2+21abc2-33b2c2-30ac3-42bc3-44c4                                               |
                  {-4} | -5a4-16a3b-39a2b2-32ab3-45b4-35a3c-4a2bc-23ab2c+18b3c-24a2c2-18abc2-28b2c2+27ac3+42bc3-11c4                                              |
                  {-4} | 8a4+42a3b+5a2b2+28ab3-46b4+49a3c-38a2bc-33ab2c+2b3c-26a2c2+9abc2-19b2c2-7ac3+43bc3-28c4                                                  |
                  {-4} | -50a4-29a3b-49a2b2+28ab3+42b4-26a3c+34a2bc+36ab2c+37b3c+31a2c2-40abc2+34b2c2+45ac3+5bc3+16c4                                             |
                  {-4} | -31a4-49a3b+43a2b2-40ab3-29b4-a3c+48a2bc-47ab2c-44b3c+8a2c2+19abc2-42b2c2-45ac3-17bc3-23c4                                               |
                  {-5} | -4a5-2a4b-8a3b2+38a2b3-42ab4-31b5+34a4c+27a3bc+37a2b2c+24ab3c+37b4c+7a3c2-24a2bc2-24ab2c2+4b3c2+25a2c3-47abc3+5b2c3+12ac4+36bc4-16c5     |
                  {-5} | 6a5-43a4b-50a3b2+5a2b3+10ab4-3b5-27a4c-6a3bc-21a2b2c-15ab3c-28b4c+43a3c2+23a2bc2+47ab2c2-50b3c2-47a2c3+15abc3+17b2c3-11ac4-30bc4-37c5    |
                  {-5} | 10a5+10a4b-42a3b2-39a2b3-10ab4+14b5+34a4c+34a3bc-40a2b2c-37ab3c-37b4c-44a3c2-29a2bc2-36ab2c2+10b3c2+50a2c3+32abc3+33b2c3-3ac4+26bc4-18c5 |
                  {-4} | 49a4-41a3b+14a2b2-36ab3-29b4+38a3c+6a2bc-40ab2c+21b3c+50a2c2-33abc2+46b2c2-19ac3+10bc3-16c4                                              |
                  {-4} | 4a4+45a3b+20a2b2+41ab3-41b4-39a3c+25a2bc+47ab2c+46b3c+11a2c2-17abc2-35b2c2-47ac3-39bc3+33c4                                              |
                  {-4} | 13a4+32a3b-41a2b2-34ab3+44b4-26a3c-17a2bc-24b3c-17a2c2+39abc2+15b2c2-35ac3-20bc3+28c4                                                    |
                  {-5} | -37a5-41a4b+45a3b2-46a2b3+49ab4+46b5-12a4c+22a3bc+4a2b2c-20ab3c+26b4c-49a3c2+22a2bc2-45ab2c2-13b3c2+7a2c3+36abc3+29b2c3-43ac4+10bc4+3c5  |
                  {-5} | -47a5+2a4b-49a2b3+24ab4+16b5-50a4c+9a3bc+20a2b2c-38ab3c+16b4c-49a3c2-49a2bc2+41ab2c2+22b3c2-34a2c3+15abc3+17b2c3+10ac4-8bc4-41c5         |
                  {-5} | -36a5+13a4b+21a3b2+11ab4-43b5-42a4c-50a3bc+43a2b2c-29ab3c+48b4c+35a3c2+47a2bc2-18ab2c2+24b3c2-16a2c3-3abc3-23b2c3+42ac4-46bc4-36c5       |

o29 : ComplexMap
i30 : phi = homomorphism e

           1                                                                      1
o30 = 0 : S  <------------------------------------------------------------------ S  : 1
                {-3} | 6a3-9a2b+28ab2+5b3-33a2c-29abc-37b2c+26ac2-33bc2-28c3 |

           3                                                                                                                                                                                                                                                                                                                                                  3
      1 : S  <---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- S  : 2
                {-2} | 42a4+44a3b+4a2b2-20ab3-4b4+30a3c+22a2bc-13ab2c+12b3c+5a2c2-29abc2+3b2c2+15ac3+9bc3-2c4      8a4+42a3b+5a2b2+28ab3-46b4+49a3c-38a2bc-33ab2c+2b3c-26a2c2+9abc2-19b2c2-7ac3+43bc3-28c4      -4a5-2a4b-8a3b2+38a2b3-42ab4-31b5+34a4c+27a3bc+37a2b2c+24ab3c+37b4c+7a3c2-24a2bc2-24ab2c2+4b3c2+25a2c3-47abc3+5b2c3+12ac4+36bc4-16c5     |
                {-2} | 20a4-26a3b+16a2b2+28ab3-4b4+33a3c+10a2bc-6ab2c-14b3c+31a2c2+21abc2-33b2c2-30ac3-42bc3-44c4  -50a4-29a3b-49a2b2+28ab3+42b4-26a3c+34a2bc+36ab2c+37b3c+31a2c2-40abc2+34b2c2+45ac3+5bc3+16c4 6a5-43a4b-50a3b2+5a2b3+10ab4-3b5-27a4c-6a3bc-21a2b2c-15ab3c-28b4c+43a3c2+23a2bc2+47ab2c2-50b3c2-47a2c3+15abc3+17b2c3-11ac4-30bc4-37c5    |
                {-2} | -5a4-16a3b-39a2b2-32ab3-45b4-35a3c-4a2bc-23ab2c+18b3c-24a2c2-18abc2-28b2c2+27ac3+42bc3-11c4 -31a4-49a3b+43a2b2-40ab3-29b4-a3c+48a2bc-47ab2c-44b3c+8a2c2+19abc2-42b2c2-45ac3-17bc3-23c4   10a5+10a4b-42a3b2-39a2b3-10ab4+14b5+34a4c+34a3bc-40a2b2c-37ab3c-37b4c-44a3c2-29a2bc2-36ab2c2+10b3c2+50a2c3+32abc3+33b2c3-3ac4+26bc4-18c5 |

           3                                                                                                                                                                                                                                                    2
      2 : S  <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ S  : 3
                {-1} | 49a4-41a3b+14a2b2-36ab3-29b4+38a3c+6a2bc-40ab2c+21b3c+50a2c2-33abc2+46b2c2-19ac3+10bc3-16c4 -37a5-41a4b+45a3b2-46a2b3+49ab4+46b5-12a4c+22a3bc+4a2b2c-20ab3c+26b4c-49a3c2+22a2bc2-45ab2c2-13b3c2+7a2c3+36abc3+29b2c3-43ac4+10bc4+3c5 |
                {-1} | 4a4+45a3b+20a2b2+41ab3-41b4-39a3c+25a2bc+47ab2c+46b3c+11a2c2-17abc2-35b2c2-47ac3-39bc3+33c4 -47a5+2a4b-49a2b3+24ab4+16b5-50a4c+9a3bc+20a2b2c-38ab3c+16b4c-49a3c2-49a2bc2+41ab2c2+22b3c2-34a2c3+15abc3+17b2c3+10ac4-8bc4-41c5        |
                {-1} | 13a4+32a3b-41a2b2-34ab3+44b4-26a3c-17a2bc-24b3c-17a2c2+39abc2+15b2c2-35ac3-20bc3+28c4       -36a5+13a4b+21a3b2+11ab4-43b5-42a4c-50a3bc+43a2b2c-29ab3c+48b4c+35a3c2+47a2bc2-18ab2c2+24b3c2-16a2c3-3abc3-23b2c3+42ac4-46bc4-36c5      |

o30 : ComplexMap
i31 : assert(degree phi == -1)
i32 : psi = homomorphism'(g * phi * f)

            16                                                                                                                                                        1
o32 = -1 : S   <---------------------------------------------------------------------------------------------------------------------------------------------------- S  : 0
                  {-4} | 48a4-43a3b+29a2b2+7ab3+41b4-21a3c-49a2bc-26ab2c-10b3c+33a2c2+17abc2-42b2c2+21ac3-41bc3-23c4                                             |
                  {-5} | 9a5-28a4b+40a3b2+47a2b3+37ab4-24b5-46a4c+48a3bc+14a2b2c-46ab3c+47b4c-5a3c2+29a2bc2-32ab2c2+22b3c2-38a2c3-15abc3-11b2c3-31ac4-40bc4-36c5 |
                  {-4} | 43a4+24a3b+9a2b2+28ab3-2b4-47a3c+48a2bc-19ab2c+33b3c+11a2c2-3abc2+28b2c2-36ac3-16bc3-9c4                                                |
                  {-5} | 27a5-49a4b-43a3b2+24a2b3-22ab4-21b5-34a4c-10a3bc-16a2b2c-29ab3c+25b4c-35a3c2+35a2bc2-32b3c2-6a2c3-30abc3-10b2c3-38ac4+10bc4+43c5        |
                  {-4} | -20a4-28a3b-40a2b2-18ab3+19b4-7a3c+2a2bc+26ab2c-26b3c+35a2c2+37abc2-20b2c2+24ac3+22bc3+41c4                                             |
                  {-5} | -29a5+12a4b-49a3b2-32a2b3-15ab4+48b5+22a4c+34a3bc+22a2b2c-12ab3c+29b4c-14a3c2-30a2bc2-6ab2c2+4b3c2+5abc3+46b2c3+34ac4+28bc4-50c5        |
                  {-4} | -43a4-25a2b2+31ab3+21b4-17a3c+8a2bc-41ab2c+46b3c-18a2c2-6abc2-32b2c2-44ac3-bc3-9c4                                                      |
                  {-4} | 13a4+14a3b+14a2b2+13ab3+45b4+42a3c-32a2bc-29ab2c+39b3c-37a2c2+27abc2+37b2c2+33ac3+17bc3+45c4                                            |
                  {-5} | -37a5+19a4b-33a3b2+21a2b3-34ab4-25b5-19a4c+28a3bc-9a2b2c+40ab3c-18b4c-34a3c2+31a2bc2-4ab2c2+48b3c2+23a2c3-33abc3-7b2c3+12ac4+43bc4+48c5 |
                  {-4} | 35a4+14a3b+20a2b2+33ab3-44b4+14a3c-24a2bc+18ab2c+27b3c-11a2c2-9abc2+33b2c2-39ac3-24bc3+38c4                                             |
                  {-4} | 18a4-35a3b-14a2b2-20ab3-24b4-49a3c+41a2bc-13ab2c-15b3c-42a2c2+32abc2-27b2c2+12ac3-26bc3+34c4                                            |
                  {-5} | -18a5-38a4b-13a3b2+32a2b3+25ab4+13b5-7a4c+19a3bc-28a2b2c+50ab3c-3b4c+20a3c2-50a2bc2+6ab2c2-28b3c2-a2c3+abc3+9b2c3+23ac4-15bc4-13c5      |
                  {-4} | 48a4-11a3b+26a2b2-26ab3+18b4-34a3c-17a2bc-45ab2c-29b3c+28a2c2-49abc2-34b2c2-3ac3-47bc3-31c4                                             |
                  {-4} | 34a4-10a3b+24a2b2+35ab3+39b4+27a3c+3a2bc+41ab2c+48b3c-23a2c2+36abc2-31b2c2+14ac3+29bc3-21c4                                             |
                  {-5} | -13a5-3a4b-6a3b2+16a2b3-44ab4-19b5-41a4c-25a3bc-8a2b2c-31ab3c-36b4c-4a3c2+32a2bc2+6ab2c2-20b3c2-50a2c3-17abc3-28b2c3-43ac4-6bc4-39c5    |
                  {-3} | 0                                                                                                                                       |

o32 : ComplexMap
i33 : i = map(complex S^1, source e, id_(source e), Degree => 1)

           1             1
o33 = 0 : S  <--------- S  : -1
                | 1 |

o33 : ComplexMap
i34 : assert(h*e == psi*i)
i35 : assert((degree h, degree e, degree psi, degree i) === (0, 0, -1, 1))

This routine is functorial.

i36 : D' = (freeResolution coker matrix{{a^2,a*b,c^3}})[-1]

       1      3      3      1
o36 = S  <-- S  <-- S  <-- S
                            
      1      2      3      4

o36 : Complex
i37 : f' = randomComplexMap(D', D)

           1              1
o37 = 1 : S  <---------- S  : 1
                | 50 |

           3                                 3
      2 : S  <----------------------------- S  : 2
                {2} | 10 29 44a-44b-24c |
                {2} | -2 37 -33a-6b-47c |
                {3} | 0  0  -46         |

           3                               2
      3 : S  <--------------------------- S  : 3
                {3} | -27 38a+43b-33c |
                {5} | 0   0           |
                {5} | 0   0           |

o37 : ComplexMap
i38 : Hom(f' * f, g) == Hom(f, id_F) * Hom(f', g)

o38 = true
i39 : Hom(f' * f, g) == Hom(f, g) * Hom(f', id_E)

o39 = true
i40 : F' = dual (freeResolution coker matrix{{a^2,a*b,a*c,b^3}})[-3]

       1      4      4      1
o40 = S  <-- S  <-- S  <-- S
                            
      0      1      2      3

o40 : Complex
i41 : g' = randomComplexMap(F', F)

           1                                2
o41 = 0 : S  <---------------------------- S  : 0
                {-4} | 25a+15b-42c -25 |

           4                                                                                     3
      1 : S  <--------------------------------------------------------------------------------- S  : 1
                {-3} | -10a+25b+24c              -26a-17b-14c                  -3           |
                {-3} | -27a-28b-24c              18a-12b-12c                   21           |
                {-3} | -30a+43b-25c              2a-25b-46c                    38           |
                {-4} | 7a2+7ab+37b2+9ac-4bc+30c2 27a2-44ab+20b2-40ac+18bc-32c2 -48a-33b-34c |

           4                                                                         1
      2 : S  <--------------------------------------------------------------------- S  : 2
                {-2} | 39a2-6ab+18b2-18ac+37bc-17c2                             |
                {-2} | 34a2+7ab+36b2-44ac+48bc+46c2                             |
                {-2} | 38a2+27ab+12b2-5ac+39bc-41c2                             |
                {-3} | 17a3-40a2b+28ab2-33b3+35a2c+17abc-21b2c+23ac2+39bc2-43c3 |

o41 : ComplexMap
i42 : Hom(f, g' * g) == Hom(f, g') * Hom(id_D, g)

o42 = true
i43 : Hom(f, g' * g) == Hom(id_C, g') * Hom(f, g)

o43 = true

See also