There are several natural ways to handle chain complexes; for details, see ChainComplex. Let's illustrate by making two chain complexes.
i1 : R = QQ[x,y]; |
i2 : M = coker vars R |
i3 : N = coker matrix {{x}} |
i4 : C = res M |
i5 : D = res N |
We can form the direct sum as follows.
i6 : C ++ D |
We can shift the degree, using the traditional notation.
i7 : E = C[5] |
i8 : E_-4 == C_1 |
The same syntax can be used to make a chain complex from a single module.
i9 : R^4[1] |
We can form various tensor products with **, and compute Tor using them.
i10 : M ** D |
i11 : C ** D |
i12 : prune HH_1(C ** D) |
i13 : prune HH_1(M ** D) |
i14 : prune HH_1(C ** N) |
Of course, we can use Tor to get the same result.
i15 : prune Tor_1(M,N) |