Synopsis:
C = new ChainComplex -- make a new chain complex.
The new chain complex is initialized with a differential of degree -1 accessible as C.dd and of type ChainComplexMap. You can take the new chain complex and fill in the ring, the modules, and the differentials.
i1 : C = new ChainComplex; |
i2 : C.ring = ZZ; |
i3 : C#2 = ZZ^1; |
i4 : C#3 = ZZ^2; |
i5 : C.dd#3 = matrix {{3,-11}}; |
i6 : C |
i7 : C.dd |
Code:
-- ../../../Macaulay2/m2/chaincomplexes.m2:10-15 new ChainComplex := ChainComplex => (cl) -> ( C := newClass(ChainComplex,new MutableHashTable); -- sigh b := C.dd = new ChainComplexMap; b.degree = -1; b.source = b.target = C; C)