next | previous | forward | backward | up | index | toc

# chainComplex(CellComplex) -- compute the cellular chain complex for a cell complex

## Synopsis

• Function: chainComplex
• Usage:
chainComplex C
• Inputs:
• C, , the cell complex for which to compute the chain complex
• Optional inputs:
• Reduced => , default value true, that controls whether the augmented chain complexes is used
• Prune => , default value true, that controls whether the modules in the chain complex are pruned
• Outputs:
• , the dimension of the complex

## Description

This constructs the cellular chain complex for a cell complex, taking into account the labels on the cells. The resulting cell complex will be a complex of modules over the ring associated to the cell complex. By default, the option "Reduced" is set to true, so the resulting ChainComplex has a rank 1 free module in homological degree -1.

 i1 : R = QQ[x] o1 = R o1 : PolynomialRing i2 : a = newSimplexCell({},x); i3 : b1 = newCell {a,a}; i4 : b2 = newCell {a,a}; i5 : C = cellComplex(R,{b1,b2}); i6 : chainComplex C 1 1 2 o6 = R <-- R <-- R -1 0 1 o6 : ChainComplex i7 : chainComplex(C,Reduced=>false) 1 2 o7 = R <-- R 0 1 o7 : ChainComplex

For details see Combinatorial Commutative Algebra Section 4.1. If we restrict to the case of monomial labels, then, subject to some acyclicity conditions, the resulting complex will be (up to a shift by 1 in homological degree) a resolution of $S/I$ where $I$ is the ideal generated by the labels of the vertices. With the "Reduced" option set to false, the resulting complex will be a resolution of the ideal $I$ as a module.

 i8 : R = QQ[x,y,z]; i9 : I = ideal(x,y,z); o9 : Ideal of R i10 : vx = newSimplexCell({},x); i11 : vy = newSimplexCell({},y); i12 : vz = newSimplexCell({},z); i13 : exy = newSimplexCell({vx,vy}); i14 : exz = newSimplexCell({vx,vz}); i15 : eyz = newSimplexCell({vy,vz}); i16 : f = newSimplexCell({exy,exz,eyz}); i17 : C = cellComplex(R,{f}); i18 : betti chainComplex(C)[-1] 0 1 2 3 o18 = total: 1 3 3 1 0: 1 3 3 1 o18 : BettiTally i19 : assert(betti chainComplex(C)[-1] == betti res I);

The option "Prune," also defaulted to true, controls whether the modules in the complex are pruned before being returned. With the "Prune" option set to the default of true, the resulting complex is visually nicer. However, unless the labeling ring is fine graded, some of the structure will be lost.

 i20 : R = QQ[x,y] o20 = R o20 : PolynomialRing i21 : a = newSimplexCell({},x); i22 : b = newSimplexCell({},y); i23 : e = newCell {a,b}; i24 : C = cellComplex(R,{e}); i25 : chainComplex C 1 2 1 o25 = R <-- R <-- R -1 0 1 o25 : ChainComplex i26 : chainComplex(C,Prune=>false) 1 o26 = R <-- image | x 0 | <-- image | xy | | 0 y | -1 1 0 o26 : ChainComplex