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

# chainComplex(SimplicialComplex) -- create the chain complex associated to a simplicial complex.

## Synopsis

• Function: chainComplex
• Usage:
chainComplex Delta
chainComplex(Delta, Labels => L)
• Inputs:
• Delta, ,
• Optional inputs:
• Labels => a list, default value {}, L of monomials in a polynomial ring, one for each vertex of $\Delta$
• Outputs:
• C, , of free modules

## Description

Each abstract simplicial complex $\Delta$ determines a chain complex of free modules over its coefficient ring. For all integers $i$, the $i$-th module in this chain complex has a basis corresponding to the $i$-dimensional faces in the simplicial complex $\Delta$.

When the argument $\mathrm{Labels}$ has the default value, this method function constructs $\widetilde C(D;k)$, where $k$ is the coefficient ring of $\Delta$. The reduced homology of an abstract simplicial complex $\Delta$ is, by definition, the homology of this chain complex. We illustrate this method with a triangulation of the torus and Klein bottle.

 i1 : S = QQ[a..g]; i2 : torus = smallManifold(2, 7, 6, S) o2 = simplicialComplex | cfg afg beg aeg cdg bdg def bef adf bcf cde ace abd abc | o2 : SimplicialComplex i3 : C = chainComplex torus 1 7 21 14 o3 = QQ <-- QQ <-- QQ <-- QQ -1 0 1 2 o3 : ChainComplex i4 : fVector torus o4 = {1, 7, 21, 14} o4 : List i5 : prune HH C o5 = -1 : 0 0 : 0 2 1 : QQ 1 2 : QQ o5 : GradedModule i6 : assert(prune HH_1 C == QQ^2) i7 : assert(prune HH_2 C == QQ^1) i8 : prune HH torus o8 = -1 : 0 0 : 0 2 1 : QQ 1 2 : QQ o8 : GradedModule
 i9 : R = ZZ[a..h]; i10 : Δ = kleinBottleComplex R o10 = simplicialComplex | cgh agh cfh afh efg dfg aeg cdg bef adf bcf cde bde ace abd abc | o10 : SimplicialComplex i11 : C' = chainComplex Δ 1 8 24 16 o11 = ZZ <-- ZZ <-- ZZ <-- ZZ -1 0 1 2 o11 : ChainComplex i12 : C'.dd 1 8 o12 = -1 : ZZ <------------------------------- ZZ : 0 | -1 -1 -1 -1 -1 -1 -1 -1 | 8 24 0 : ZZ <------------------------------------------------------------------------------- ZZ : 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 0 0 0 1 1 0 0 | | 0 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 | | 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 | | 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 | | 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 | | 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 1 | | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 | | 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 | | 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 | o12 : ChainComplexMap i13 : fVector Δ o13 = {1, 8, 24, 16} o13 : List i14 : prune HH C' o14 = -1 : 0 0 : 0 1 : cokernel | 2 | | 0 | 2 : 0 o14 : GradedModule i15 : prune HH Δ o15 = -1 : 0 0 : 0 1 : cokernel | 2 | | 0 | 2 : 0 o15 : GradedModule i16 : assert(prune HH_1 C' == ZZ^1/ideal(2) ++ ZZ^1)

When the optional argument $\mathrm{Labels}$ is a list of monomials, corresponding to the vertices of $\Delta$, this method returns a chain complex of free modules over the ring containing monomial labels. Each face, or basis vector, is labelled by the least common multiple of the labels on its vertices. In other words, the chain complex associated to a labelled simplicial complex is the homogenization of the canonical chain complex associated to $\Delta$; see Chapter 4 in Miller-Sturmfels' Combinatorial Commutative Algebra or Section 55 in Irena Peeva's Graded Syzygies.

As the next example establishes, this approach can sometimes produce a minimal free resolution of a monomial ideal.

 i17 : S = QQ[a..d]; i18 : Γ = simplicialComplex{a*b*c, b*c*d}; i19 : C = chainComplex Γ 1 4 5 2 o19 = QQ <-- QQ <-- QQ <-- QQ -1 0 1 2 o19 : ChainComplex i20 : C.dd 1 4 o20 = -1 : QQ <------------------- QQ : 0 | -1 -1 -1 -1 | 4 5 0 : QQ <---------------------- QQ : 1 | 1 1 0 0 0 | | -1 0 1 1 0 | | 0 -1 -1 0 1 | | 0 0 0 -1 -1 | 5 2 1 : QQ <------------- QQ : 2 | -1 0 | | 1 0 | | -1 -1 | | 0 1 | | 0 -1 | o20 : ChainComplexMap i21 : R = QQ[x_0..x_3]; i22 : hC = chainComplex(Γ, Labels => {x_0*x_1, x_3, x_1*x_2, x_0*x_2}) 1 4 5 2 o22 = R <-- R <-- R <-- R 0 1 2 3 o22 : ChainComplex i23 : hC.dd 1 4 o23 = 0 : R <-------------------------------- R : 1 | x_0x_1 x_3 x_1x_2 x_0x_2 | 4 5 1 : R <-------------------------------------------- R : 2 {2} | -x_3 -x_2 0 0 0 | {1} | x_0x_1 0 -x_1x_2 -x_0x_2 0 | {2} | 0 x_0 x_3 0 -x_0 | {2} | 0 0 0 x_3 x_1 | 5 2 2 : R <--------------------- R : 3 {3} | x_2 0 | {3} | -x_3 0 | {3} | x_0 x_0 | {3} | 0 -x_1 | {3} | 0 x_3 | o23 : ChainComplexMap i24 : prune homology hC o24 = 0 : cokernel | x_3 x_1x_2 x_0x_2 x_0x_1 | 1 : 0 2 : 0 3 : 0 o24 : GradedModule

By convention, the smallest nonzero term in the homogenized chain complex appears in homological degree $0$, rather than homological degree $-1$. This shift in homological degree changes the signs in the differentials.

The homogenization of the chain complex associated to an abstract simplicial complex does not always produce a free resolution. Reordering the labels in the previous example demonstrates this.

 i25 : hC' = chainComplex(Γ, Labels => {x_3, x_0*x_1, x_1*x_2, x_0*x_2}) 1 4 5 2 o25 = R <-- R <-- R <-- R 0 1 2 3 o25 : ChainComplex i26 : hC'.dd 1 4 o26 = 0 : R <-------------------------------- R : 1 | x_3 x_0x_1 x_1x_2 x_0x_2 | 4 5 1 : R <------------------------------------------ R : 2 {1} | -x_0x_1 -x_1x_2 0 0 0 | {2} | x_3 0 -x_2 -x_2 0 | {2} | 0 x_3 x_0 0 -x_0 | {2} | 0 0 0 x_1 x_1 | 5 2 2 : R <------------------- R : 3 {3} | x_2 0 | {3} | -x_0 0 | {3} | x_3 1 | {3} | 0 -1 | {3} | 0 1 | o26 : ChainComplexMap i27 : prune HH hC' o27 = 0 : cokernel | x_3 x_1x_2 x_0x_2 x_0x_1 | 1 : cokernel {3} | x_1 | 2 : 0 3 : 0 o27 : GradedModule