Description
The complex of homomorphisms is a complex $D$ whose $i$th component is the direct sum of $\operatorname{Hom}(C1_j, C2_{j+i})$ over all $j$. The differential on $\operatorname{Hom}(C1_j, C2_{j+i})$ is the differential $\operatorname{Hom}(id_{C1}, dd^{C2}) + (-1)^j \operatorname{Hom}(dd^{C1}, id_{C2})$. $dd^{C1} \otimes id_{C2} + (-1)^j id_{C1} \otimes dd^{C2}$.
In particular, for this operation to be well-defined, both arguments must have the same underlying ring.
i1 : S = ZZ/101[a..c]
o1 = S
o1 : PolynomialRing
|
i2 : C = freeResolution coker vars S
1 3 3 1
o2 = S <-- S <-- S <-- S
0 1 2 3
o2 : Complex
|
i3 : D = Hom(C,C)
1 6 15 20 15 6 1
o3 = S <-- S <-- S <-- S <-- S <-- S <-- S
-3 -2 -1 0 1 2 3
o3 : Complex
|
i4 : dd^D
1 6
o4 = -3 : S <---------------------------- S : -2
{-3} | c -b a -a -b -c |
6 15
-2 : S <-------------------------------------------------- S : -1
{-2} | -b a 0 a b c 0 0 0 0 0 0 0 0 0 |
{-2} | -c 0 a 0 0 0 a b c 0 0 0 0 0 0 |
{-2} | 0 -c b 0 0 0 0 0 0 a b c 0 0 0 |
{-2} | 0 0 0 c 0 0 -b 0 0 a 0 0 -b -c 0 |
{-2} | 0 0 0 0 c 0 0 -b 0 0 a 0 a 0 -c |
{-2} | 0 0 0 0 0 c 0 0 -b 0 0 a 0 a b |
15 20
-1 : S <----------------------------------------------------------------------- S : 0
{-1} | a -a -b -c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
{-1} | b 0 0 0 -a -b -c 0 0 0 0 0 0 0 0 0 0 0 0 0 |
{-1} | c 0 0 0 0 0 0 -a -b -c 0 0 0 0 0 0 0 0 0 0 |
{-1} | 0 -b 0 0 a 0 0 0 0 0 b c 0 0 0 0 0 0 0 0 |
{-1} | 0 0 -b 0 0 a 0 0 0 0 -a 0 c 0 0 0 0 0 0 0 |
{-1} | 0 0 0 -b 0 0 a 0 0 0 0 -a -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 a 0 |
| 0 0 0 0 0 0 -c 0 0 b 0 0 0 0 c |
| 0 0 0 0 0 0 0 -c 0 0 b 0 0 0 -b |
| 0 0 0 0 0 0 0 0 -c 0 0 b 0 0 a |
| 0 0 0 0 0 0 0 0 0 0 0 0 c -b a |
15 6
1 : S <----------------------------- S : 2
{1} | b c 0 0 0 0 |
{1} | -a 0 c 0 0 0 |
{1} | 0 -a -b 0 0 0 |
{1} | a 0 0 -c 0 0 |
{1} | 0 a 0 b 0 0 |
{1} | 0 0 a -a 0 0 |
{1} | b 0 0 0 -c 0 |
{1} | 0 b 0 0 b 0 |
{1} | 0 0 b 0 -a 0 |
{1} | c 0 0 0 0 -c |
{1} | 0 c 0 0 0 b |
{1} | 0 0 c 0 0 -a |
{1} | 0 0 0 -b a 0 |
{1} | 0 0 0 -c 0 a |
{1} | 0 0 0 0 -c b |
6 1
2 : S <-------------- S : 3
{2} | c |
{2} | -b |
{2} | a |
{2} | a |
{2} | b |
{2} | c |
o4 : ComplexMap
|
i5 : assert isWellDefined D
|
The homology of this complex is $\operatorname{Hom}(C, ZZ/101)$
i6 : prune HH D == Hom(C, coker vars S)
o6 = true
|
If one of the arguments is a module or a ring, it is considered as a complex concentrated in homological degree 0.
i7 : E = Hom(C, S^2)
2 6 6 2
o7 = S <-- S <-- S <-- S
-3 -2 -1 0
o7 : Complex
|
i8 : prune HH E
o8 = cokernel {-3} | c b a 0 0 0 |
{-3} | 0 0 0 c b a |
-3
o8 : Complex
|
There is a simple relationship between Hom complexes and shifts. Specifically, shifting the first argument is the same as the negative shift of the result. But shifting the second argument is only the same as the positive shift of the result up to a sign.
i9 : Hom(C[3], C) == D[-3]
o9 = true
|
i10 : Hom(C, C[-2]) == D[-2]
o10 = true
|
i11 : Hom(C, C[-3]) != D[-3]
o11 = true
|
i12 : Hom(C, C[-3]) == complex(- dd^(D[-3]))
o12 = true
|
Because the Hom complex can be regarded as the total complex of a double complex, each term comes with pairs of indices, labelling the summands.
i13 : indices D_-1
o13 = {{0, -1}, {1, 0}, {2, 1}, {3, 2}}
o13 : List
|
i14 : components D_-1
3 9 3
o14 = {0, S , S , S }
o14 : List
|
i15 : indices D_-2
o15 = {{0, -2}, {1, -1}, {2, 0}, {3, 1}}
o15 : List
|
i16 : components D_-2
3 3
o16 = {0, 0, S , S }
o16 : List
|