# BRS: Simplicial Homology with Macaulay2

• Chris Hillman
In summary, this thread is about simplicial complexes, which are models of simple surfaces. The person is trying to provide a summary of the main points of simplicial complexes, homology, and cohomology. They say that simplicial complexes are a way of modeling simple surfaces, and that cohomology is a way of understanding relationships between simplicial complexes. The person also says that simplicial complexes, homology, and cohomology all originated from some of the most basic problems in algebraic topology.

#### Chris Hillman

This thread is similar to but more elementary than

I plan to
• explain how to use the SimplicialComplexes package in Macaulay2 to construct simplicial complexes modeling some simple surfaces and then to compute their simplicial homology (starting with integer coefficients),
• try to offer some motivation for some of key definitions used in simplicial homology
• try to offer a very broad overview of some basic conceptual issues which few algebraic topology textbooks even try to address (no doubt the authors feel this is the job of the instructor)

Lets begin with a very natural question:
puzzled beginning student of algebraic topology said:
I see that our textbook discusses a number of varieties of homology: simplicial, singular, cellular, and later discusses Czech and De Rham cohomology. I have heard that these are all mostly equivalent, at least for manifolds and spaces which are similar to manifolds, like orbifolds. So why so many varieties?
Well, in the interest of efficiency, few if any AT textbooks really bother to try to explain that AT began with all kinds of very concrete and sometimes not very rigorous arguments, and over decades leaders in the field gradually figured out how making various highly non-obvious definitions allows one to streamline and make rigorous the development.

It helps to know from the outset that AT falls into two topics (which eventually turn out to be related):
• homotopy theory, where a basic equivalence notion is homotopic paths; it turns out that problems involving homotopic equivalence of paths and loops (think of "nice" maps from the circle S^1 into some space X) is a rather different subject from homotopic equivalence of "nice" maps from higher dimensional spheres S^q into X (a much harder question!),
• homology theory, where a basic equivalence notion if homologous one-chains (sorta like paths) and more generally, homologous q-chains (q is a dimension)

And it helps to know from the outset that the origins of homology/cohomology lie with some natural approaches to some basic problems:
• Kirchhoff's brilliant theory of electrical networks turns out to be closely related to homology, and is also closely connected to some lovely topics in the combinatorics of networks (I was delighted to see in a recent post in the n-category cafe that John Baez has finally gotten around to following up on my suggestion years ago that he look for a "categorization" of Kirchhoff's theory),
• Riemann's ideas on Riemann surfaces, Cauchy's integral theorem (which is related to winding numbers), and analytic continuation in the theory of functions of one complex variable led Betti to Betti numbers which eventually turned out to be the ranks of the R-modules appearing in the homology over a ring R (if R is the ring of integers, R-modules are just abelian groups); in turns out that in the integral theorems of complex analysis one is integrating over 1-chains, which gives some insight into the difference between "homologous chains" versus "homotopic paths"; the idea of analytic continuation leads naturally to the theory of topological manifolds and local coordinate charts on same,
• the idea of simplicial approximations to manifolds was suggested by Betti for studying all of these properties
• metric properties of Riemannian manifolds
• integration on smooth manifolds (eventually led to De Rham cohomology),
• topological properties of topological manifolds (eventually led to simplicial homology/cohomology)
and was incorporated by Brouwer and Alexander into homology theory during the 1920s, using such classic notions from 19th century geometry as the barycentric subdivision of August Moebius (of Moebius band fame), but this is difficult work mostly sidestepped by recent textbooks,
• Schubert's ideas on counting things like the number of lines intersecting four given lines in $\mathbb{R}^3$, the number of lines lying on a generic cubic surface in $\mathbb{R}^3$ (questions which arise naturally in 19th century algebraic geometry) led him to his famous Schubert calculus, one of the most controversial topics in 19th century mathematics (yes, poor Schubert was called a "crank"!); attempts to put this on a rigorous footing led to the idea of intersection number and to the recognition that complex projective spaces are a more natural setting; one of the astounding early developments in cohomology was the recognition that intersection numbers can be understood in terms of computations in the cohomology ring of complex Grassmannian manifolds (in the case of the first type of problem, concerning configurations of k-flats in complex projective n-space) and certain sheaves over Grassmannians (in the second type of problem),
• around the turn of the century, Caratheodory noticed a connection between exterior calculus, homology theory, and classical thermodynamics, specifically the definition of entropy and the Second Law of Thermodynamics; here, a key lemma was the classification of exterior one-forms by Darboux, who was inspired in turn by Pfaff (cf. Pfaffians in the theory of PDEs).

(I hope to eventually explain some of the terms I didn't define above, either in this BRS thread or the Cellular Homology BRS thread. In a later post in the BRS thread cited above, "Cellular Homology with Macaulay2", I hope to say more about Schubert calculus--- note that another Macaulay2 package allows us to compute with the cohomology ring of Grassmannian manifolds. I hope to eventually discuss Caratheodory's ideas in another BRS thread on the common ground shared by electrical networks and some formally identical problems involving vibrations, etc.)

It also helps to know from the outset that one of the most important developments in AT was the recognition that all varieties of homology/cohomology share a common ground in a more fundamental subject, commutative algebra and homological algebra, which deals with sequences of R-module homomorphisms between certain R-modules (some fixed ring R), forming a "chain complex". Here, the key idea is that as soon as you have a sequence of maps which obey the key property "boundary of a boundary vanishes" $\partial^2 = 0$, the image of each map in the sequence is a submodule of the kernel of the next map, both being submodules of a chain group, so one can define the quotient modules as the homology modules. Then one can define a graded R-module which is the direct sum of all the homology modules, so that we need only refer to "the homology", instead of a sequence of homology modules.

In algebraic topology, for a given topological space X, it turns out that the homology graded module H(X), but not the chain graded module C(X), is invariant under homeomorphisms, and thus a topological invariant of X. In fact, H(X) is invariant under a much more general equivalence relation which arises in homotopy theory, called homotopic equivalence. Because this relation is weaker than homeomorphism, homology cannot be a complete topological invariant; there are spaces which are not homeomorphic but which homology cannot distinguish. (I plan to give and sketch some examples in a later post in this thread.) It turns out that the abelianization of the fundamental group of X is just the homology in dimension one, $H_1(X)$.

And very roughly, the role of the various competing theories goes something like this:
• cellular homology is by far most efficient for spaces which can be given a "cellular structure" (you can even do algebraic topology in your head, in simple cases), and then the "meaning" of the homology is most intuitive,
• the definition of the boundary maps and cup product are by far the simplest in simplicial homology; the main drawbacks are that rigorous development is hard (without following the textbook route of moving into singular homology and later proving an equivalence theorem) and that the simplicial chain complexes tend to be much larger than is needed in cellular homology,
• the most abstract but most powerful theory for developing what turn out to be key theorems (although their central role is not obvious!), especially Mayer-Vietoris theorem, is singular homology, which uses a vastly generalized notion of "singular simplex", resulting in huge chain spaces,
• the most useful theory for finite dimensional topological manifolds, including Lie groups is De Rham cohomology; the case of compact finite dimensional manifolds is especially nice; this subject provides a close connection with exterior calculus (which explains why the boundary map in simplicial homology looks so much like the definition of the exterior derivative in exterior calculus!),
• the most useful theory for sheaves (needed everywhere in algebraic geometry, and increasingly in other subjects) is Czech cohomology.

puzzled beginning student of algebraic topology said:
OK, but why do we need to use so many rings? I hear that homology/cohomology over the integers gives more information, so why use any ring other than $\mathbb{Z}$?

Well, it turns out to be much easier, in specific cases, to compute with coefficients in the finite field $R = \mathbb{Z}/p$ (where p is some prime). And in de Rham comology, we should work with real coefficients to see the connections with exterior calculus, which again make it possible to compute the de Rham cohomology of real Lie groups easily, using the Cartan-Maurer one-form. (In a later BRS thread, I hope to discuss "De Rham cohomology with Maple" and to compare results with cohomology computed using other approaches.) And by trying various $R = \mathbb{Z}/p$ we can sometimes distinguish between spaces which we could not otherwise distinguish.

Last edited:
BRS: Simplicial Homology with Macaulay2: the boundary map

Let's look at a small simplicial complex consisting entirely of
• zero dimensional simplices (points, zero-cells in cellular homology)
• one dimensional simplices (edges, special case of one-cells in cellular homology)
See the figure below (points labeled with letters), and ignore for the moment the directions on the edges.

We want to consider our complex as representing an entire equivalence class of topological spaces under homeomorphism, call it X. If you have some experience with homotopy theory, you can probably see that the edge labeled $e_1$ can be homotopically deformed by pushing it into the point b, and then the remainder can be homotopically deformed into a configuration which we recognize as the wedge sum of three circles, so in our example $X = \vee_{j=1}^3 S^1[/tex] In other words, we have here three loops sharing a single common point, and nothing else of topological significance--- or more precisely, nothing else of homological significance. One basic idea of (integer) homology is to replace paths with formal (integer coefficient) linear combinations of edges, called one-chains. Similarly we replace two-dimensional topological surfaces with formal linear combinations of two-simplices (triangles), which we call two-chains. These chains form abelian groups, the chain groups [itex]C_0(X), \; C_1(X), \; C_2(X), \ldots$.
But the really essential idea is to define an equivalence relation on q-chains by means of certain boundary maps
$$C_{q-1}(X) \stackrel{\partial_q}{\leftarrow} C_q(X) \stackrel{\partial_{q+1}}{\leftarrow} C_{q+1}(X)$$
Then we can say that two q-chains are homologous if their formal difference is a q-bound, i.e. lies in the image of the boundary map.

Of course, the key to making this work is to discover the correct definition of the boundary map. This definition turns out to be
$$\partial (p_0 \, p_1 \, \ldots p_q) = (-1)^q \; \sum_{j=0}^q (-1)^j (p_0 \, p_1 \, \ldots \hat{p_j} \, \dots p_q)$$
where the points have been placed in order and where the caret signifies "omit me". For example:
$$\partial \, (ab) = a - b, \; \; \partial \, (bcd) = -cd + bd - bc$$

So why is this the right definition? Well, we want the boundary map to make sense when applied to formal linear combinations (we want it to be a homomorphism of abelian groups), and we have for example
$$\partial (ab + bc) = a - b + b - c = a - c$$
which is just what we would expect for the boundary of the one-chain ab+bc. Even better, the path around the loop containing the points a,b,c is as a formal linear combination ab+bc-ac (note the sign!), and then
$$\partial(ab + bc - ac) = a - b + b - c - (a - c) = 0$$
In other words, the boundary map $\partial_1$ vanishes on loops. So we can take $Z_1(X) = \ker \partial_1$, the group of one-cycles, to be the group generated by the one-chains on which the boundary operator vanishes, and in our example, we expect it to be generated by three fundamental loops.

Here is how we would represent our first example of a simplical complex using the package SimplicalComplexes package in Macaulay2:
Code:
Macaulay2, version 1.3.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases,
PrimaryDecomposition, ReesAlgebra, SchurRings, TangentCone

o1 = SimplicialComplexes

o1 : Package

i2 : R = ZZ[a..z]

o2 = R

o2 : PolynomialRing

i3 : L = {a*b, b*c, c*d, b*d, b*h, d*e, e*f, f*g, e*g, e*h}

o3 = {a*b, b*c, c*d, b*d, b*h, d*e, e*f, f*g, e*g, e*h}

o3 : List

i5 : S = simplicialComplex L

o5 = | eh bh fg eg ef de cd bd bc ab |

o5 : SimplicialComplex

i6 : C = chainComplex S

1       8       10
o6 = ZZ  <-- ZZ  <-- ZZ

-1      0       1

o6 : ChainComplex

i7 : C.dd

1                                    8
o7 = -1 : ZZ  <------------------------------- ZZ  : 0
| -1 -1 -1 -1 -1 -1 -1 -1 |

8                                          10
0 : ZZ  <------------------------------------- ZZ   : 1
| 1  0  0  0  0  0  0  0  0  0  |
| -1 1  1  1  0  0  0  0  0  0  |
| 0  -1 0  0  1  0  0  0  0  0  |
| 0  0  -1 0  -1 1  0  0  0  0  |
| 0  0  0  0  0  -1 1  1  1  0  |
| 0  0  0  0  0  0  -1 0  0  1  |
| 0  0  0  0  0  0  0  -1 0  -1 |
| 0  0  0  -1 0  0  0  0  -1 0  |

o7 : ChainComplexMap
Here, we entered a list of the edges, represented as square-free binomials in a polynomial ring whose indeterminates represent points. Note that our edges are directed, but the direction is conventionally chosen to obey a total ordering on the indeterminates. (Here, the total ordering is of course alphabetic order.)

Compare the figure below with the boundary map produced by Macaulay2
$$\mathbb{Z}^8 \stackrel{\partial_1}{\leftarrow} \mathbb{Z}^{10}$$
which is
$$\partial_1 = \left[ \begin{array}{rrrr rrr rrr|l} e_1 & e_2 & e_3 & e_4 & e_5 & e_6 & e_7 & e_8 & e_9 & e_{10} & \\ \hline 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & a \\ -1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & b\\ 0 & -1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & c \\ 0 & 0 & -1 & 0 & -1 & 1 & 0 & 0 & 0 & 0 & d \\ 0 & 0 & 0 & 0 & 0 & -1 & 1 & 1 & 0 & 1 & e \\ 0 & 0 & 0 & 0 & 0 & 0 & -1 & 0 & 1 & 0 & f \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -1 & -1 & g \\ 0 & 0 & 0 & -1 & 0 & 0 & 0 & -1 & 0 & 0 & h \end{array} \right]$$
(Ignore the boundary map $\partial_0$, which uses a silly trick to compute the reduced homology rather than the homology proper.) Note well that we have ten edges (one-simplices) and eight points (zero-simplices) in our chain complex; as our remark about homotopical deformation suggests, these are certainly not topological invariants! But using linear algebra you can show that $\ker \partial_1= Z_1(X)$ is generated by three fundamental cycles, so $Z_1(X) = \mathbb{Z}^3$. Because our simplicial complex consists only of at most one dimensional simplices, this is actually a topological invariant. Indeed, the command
Code:
i13 : prune HH C

o13 = -1 : 0

0 : 0

3
1 : ZZ

o13 : GradedModule
also shows that there are three fundamental one-cycles; in our simple example, the reduced homology
$$0 \stackrel{\epsilon}{\leftarrow} \tilde{H}_0(X) \stackrel{\partial_1}{\leftarrow} H_1(X) \leftarrow 0$$
is
$$0 \stackrel{\epsilon}{\leftarrow} 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z}^3 \leftarrow 0$$

But we are not quite there yet; in general, simply by considering the groups of cycles, we don't yet have a topological invariant. It turns out that the final step is to define the aforementioned equivalence relation on cycles: two q-cycles are cohomologous if their difference is the boundary of a (q+1)-chain. To understand how this works for 1-cycles, we need to introduce some 2-chains and to look at their boundaries.

So let's add a two-simplex to our first example:
Code:
i8 : L1 = L | {b*c*d}

o8 = {a*b, b*c, c*d, b*d, b*h, d*e, e*f, f*g, e*g, e*h, b*c*d}

o8 : List

i9 : S1 = simplicialComplex L1

o9 = | eh bh fg eg ef de bcd ab |

o9 : SimplicialComplex

i10 : C1 = chainComplex S1

1       8       10       1
o10 = ZZ  <-- ZZ  <-- ZZ   <-- ZZ

-1      0       1        2

o10 : ChainComplex

i11 : C1.dd

1                                    8
o11 = -1 : ZZ  <------------------------------- ZZ  : 0
| -1 -1 -1 -1 -1 -1 -1 -1 |

8                                          10
0 : ZZ  <------------------------------------- ZZ   : 1
| 1  0  0  0  0  0  0  0  0  0  |
| -1 1  1  1  0  0  0  0  0  0  |
| 0  -1 0  0  1  0  0  0  0  0  |
| 0  0  -1 0  -1 1  0  0  0  0  |
| 0  0  0  0  0  -1 1  1  1  0  |
| 0  0  0  0  0  0  -1 0  0  1  |
| 0  0  0  0  0  0  0  -1 0  -1 |
| 0  0  0  -1 0  0  0  0  -1 0  |

10               1
1 : ZZ   <---------- ZZ  : 2
| 0  |
| -1 |
| 1  |
| 0  |
| -1 |
| 0  |
| 0  |
| 0  |
| 0  |
| 0  |

o11 : ChainComplexMap

i12 : prune HH C1

o12 = -1 : 0

0 : 0

2
1 : ZZ

2 : 0

o12 : GradedModule
where the last command shows that the homology of our second example of a simplical complex is
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z}^2 \stackrel{\partial_2}{\leftarrow} 0 \leftarrow 0$$
This means that by adding triangles (just one, in this case) so that one of our loops becomes the boundary of a topological disk, we can shrink that loop to a point, so we have eliminated one of the cycles, without adding two-dimensional structure of any topological significance.

So what would be "topologically significant" two-dimensional structure? To find out, let's consider a third simplicial complex, formed by four triangles making the "skin" of a tetrahedron:
Code:
i14 : L3 = { a*b*c, a*b*d, a*c*d, b*c*d}

o14 = {a*b*c, a*b*d, a*c*d, b*c*d}

o14 : List

i15 : S3 = simplicialComplex L3

o15 = | bcd acd abd abc |

o15 : SimplicialComplex

i16 : C3 = chainComplex S3

1       4       6       4
o16 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ

-1      0       1       2

o16 : ChainComplex

i18 : C3.dd

1                        4
o18 = -1 : ZZ  <------------------- ZZ  : 0
| -1 -1 -1 -1 |

4                              6
0 : ZZ  <------------------------- ZZ  : 1
| 1  1  1  0  0  0  |
| -1 0  0  1  1  0  |
| 0  -1 0  -1 0  1  |
| 0  0  -1 0  -1 -1 |

6                        4
1 : ZZ  <------------------- ZZ  : 2
| -1 -1 0  0  |
| 1  0  -1 0  |
| 0  1  1  0  |
| -1 0  0  -1 |
| 0  -1 0  1  |
| 0  0  -1 -1 |

o18 : ChainComplexMap

i17 : prune HH C3

o17 = -1 : 0

0 : 0

1 : 0

1
2 : ZZ

o17 : GradedModule
Here, the boundary maps can be labeled
$$\begin{array}{rcl} \partial_1 & = & \left[ \begin{array}{rrr rrr|l} ab & ac & ad & bc & bd & cd & \\ \hline 1 & 1 & 1 & 0 & 0 & 0 & a \\ -1 & 0 & 0 & 1 & 1 & 0 & b\\ 0 & -1 & 0 & -1 & 0 & 1 & c \\ 0 & 0 & -1 & 0 & -1 & -1 & d \end{array} \right], \\ &&\\ \partial_2 & = & \left[ \begin{array}{rrrr|l} abc & abd & acd & bcd & \\ \hline -1 & -1 & 0 & 0 & ab \\ 1 & 0 & -1 & 0 & ac \\ 0 & 1 & 1 & 0 & ad \\ -1 & 0 & 0 & -1 & bc \\ 0 & -1 & 0 & 1 & bd \\ 0 & 0 & -1 & -1 & cd \end{array} \right]$$
So for example (see the figure below)
$$\partial \, abc = -ab + ac - bc, \; \; \partial \, bcd = -bc + bd -cd$$
so that $\partial \, \partial \, abcd = 0$ (add the boundaries of the four triangles). Notice that the orientations of the four faces cancels along common edges.

Now we can define $B_1(X) = \operatorname{im} \partial_2$ to be the group of one-bounds. We have two nested subgroups of an abelian group
$$B_1(X) < Z_1(X) < C_1(X)$$
so we can form the quotient group
$$H_1(X) = Z_1(X)/B_1(X)$$
and similarly for other dimensions. The resulting homology groups (or R-modules, if we are using a ring other than the ring of integers) are shown, in algebraic topology textbooks, to be topological invariants. And the elements of the q-th homology groups are precisely the equivalence classes of q-cycles modulo boundaries.

In our example, $H_2(X) = \mathbb{Z}$, showing we have a nontrivial 2-cycle (not homologous to any 2-bound). If we add $abcd$ to our simplicial complex (if we "fill in the interior of the tetrahedron"), this 2-cycle is now the boundary of the interior, so now $H_2(X) = 0$. So "homologically significant structure" arises whenever we have nontrivial q-cycles, and by "filling in the interiors" we can systematically destroy such structure.

The crucial property of the boundary maps which ensures that the q-bounds always form a subgroup of the q-cycles is "the boundary of a boundary vanishes", and you can check using matrix multiplication that in our "skin of the tetrahedron" example $\partial_1 \; \partial_2 = 0$ (composing from right to left, or multiplying matrices from left to right). It is not very hard to prove that this general property we need is true: $\partial_q \, \partial_{q+1} = 0[/tex]. Figures: • Example One of a simplicial complex (two of the edges are not drawn straight). • Boundaries of a triangle (one-simplex) and a two-simplex #### Attachments Last edited: BRS: Simplicial Homology with Macaulay2: More Examples Example Four: let's represent a two dimensional disk by three triangles (think of the faces of a tetrahedron, with one face removed), and just for the heck of it, let's use rational coefficients instead of integer coefficients: Code: i1 : R = QQ[a..d] o1 = R o1 : PolynomialRing i2 : loadPackage("SimplicialComplexes") o2 = SimplicialComplexes o2 : Package i3 : Disk = simplicialComplex { a*b*d, d*b*c,a*d*c} o3 = | bcd acd abd | o3 : SimplicialComplex i4 : prune HH chainComplex Disk o4 = -1 : 0 0 : 0 1 : 0 2 : 0 o4 : GradedModule So the reduced homology vanishes completely, as it should because the disk is contractible (can be homotopically deformed to a point). Here, recall from "BRS: Cellular Homology with Macaulay2" that reduced homology is the same as homology, except that the rank of the module [itex]H_0(X)$ is reduced by one. In integer homology, $H_0(X) = \mathbb{Z}^r$ where X has r path components; in reduced homology, $\tilde{H}_0(X) = \mathbb{Z}^{r-1}$. (It is traditional to indicate reduced homology groups by tildes, although this is redundant except in dimension q=0.)

Example Five: if we add the fourth face to our complex, we obtain "the skin of a tetrahedron", and now the reduced homology indicates the presence of nontrivial two-dimensional structure (a two-cell, in the lingo of cellular homology):
Code:
o4 : GradedModule

i5 : Sphere = simplicialComplex { a*b*c, a*b*d, a*c*d, b*c*d}

o5 = | bcd acd abd abc |

o5 : SimplicialComplex

i6 :  prune HH chainComplex Sphere

o6 = -1 : 0

0 : 0

1 : 0

1
2 : QQ

o6 : GradedModule
so the reduced rational homology is the graded $mathbb{Q}$-module
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} 0 \stackrel{\partial_2}{\leftarrow} \mathbb{Q} \leftarrow 0$$

Example Six: if we add the interior of the tetrahedron, we are back to trivial reduced homology:
Code:
i7 : Ball = simplicialComplex {a*b*c, a*b*d, a*c*d, b*c*d, a*b*c*d}

o7 = | abcd |

o7 : SimplicialComplex

i8 :  prune HH chainComplex Ball

o8 = -1 : 0

0 : 0

1 : 0

2 : 0

3 : 0

o8 : GradedModule

Example Seven: let's go back to integer homology and consider a simplicial complex consisting of the four faces of a tetrahedron plus a triangle sharing one vertex of the tetrahedron:
Code:
i9 : R = ZZ[a..z]

o9 = R

o9 : PolynomialRing

i10 : simplicialComplex { a*b*c, a*b*d, a*c*d, b*c*d, d*e, e*f, f*d}

o10 = | ef df de bcd acd abd abc |

o10 : SimplicialComplex

i11 : C = chainComplex oo

1       6       9       4
o11 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ

-1      0       1       2

o11 : ChainComplex

i12 : C.dd

1                              6
o12 = -1 : ZZ  <------------------------- ZZ  : 0
| -1 -1 -1 -1 -1 -1 |

6                                       9
0 : ZZ  <---------------------------------- ZZ  : 1
| 1  1  1  0  0  0  0  0  0  |
| -1 0  0  1  1  0  0  0  0  |
| 0  -1 0  -1 0  1  0  0  0  |
| 0  0  -1 0  -1 -1 1  1  0  |
| 0  0  0  0  0  0  -1 0  1  |
| 0  0  0  0  0  0  0  -1 -1 |

9                        4
1 : ZZ  <------------------- ZZ  : 2
| -1 -1 0  0  |
| 1  0  -1 0  |
| 0  1  1  0  |
| -1 0  0  -1 |
| 0  -1 0  1  |
| 0  0  -1 -1 |
| 0  0  0  0  |
| 0  0  0  0  |
| 0  0  0  0  |

o12 : ChainComplexMap

i13 : prune HH C

o13 = -1 : 0

0 : 0

1
1 : ZZ

1
2 : ZZ

o13 : GradedModule
The reduced integer homology is the graded $\mathbb{Z}$-module
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z} \stackrel{\partial_2}{\leftarrow} \mathbb{Z} \leftarrow 0$$
showing the presence of a one-cell and a two-cell (in the language of cellular homology), and nothing else of homological significance.

Example Nine: a Moebius band (see the figure below)
Code:
i16 :  {a*b*c, a*c*d, c*d*f, d*e*f, a*e*f, a*b*e}

o16 = {a*b*c, a*c*d, c*d*f, d*e*f, a*e*f, a*b*e}

o16 : List

i17 : Mband = simplicialComplex oo

o17 = | def aef cdf abe acd abc |

o17 : SimplicialComplex

i18 : prune HH chainComplex Mband

o18 = -1 : 0

0 : 0

1
1 : ZZ

2 : 0

o18 : GradedModule
The reduced homology is
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z} \stackrel{\partial_2}{\leftarrow} 0 \leftarrow 0$$
The circle is a deformation retract of the Moebius band, so we should expect that this result, which agrees with the reduced homology of a circle.

Example Ten: a torus (see figure below):
Code:
i45 :  L1 = { a*b*d, b*d*w, b*c*w, c*w*x, a*c*x, a*d*x}

o45 = {a*b*d, b*d*w, b*c*w, c*w*x, a*c*x, a*d*x}

o45 : List

i46 : L2 = { d*e*w, e*w*y, w*x*y, x*y*z, d*x*z, d*e*z}

o46 = {d*e*w, e*w*y, w*x*y, x*y*z, d*x*z, d*e*z}

o46 : List

i47 : L3 = { a*e*y, a*b*y, b*y*z, b*c*z, c*e*z, a*c*e}

o47 = {a*e*y, a*b*y, b*y*z, b*c*z, c*e*z, a*c*e}

o47 : List

i48 : Torus = simplicialComplex ( L1|L2|L3 )

o48 = | xyz byz dxz dez cez bcz wxy ewy aey aby cwx adx acx dew bdw bcw ace abd |

o48 : SimplicialComplex

i49 :  prune HH chainComplex Torus

o49 = -1 : 0

0 : 0

2
1 : ZZ

1
2 : ZZ

o49 : GradedModule
The reduced homology of $T^2$ is
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z}^2 \stackrel{\partial_2}{\leftarrow} \mathbb{Z} \leftarrow 0$$
showing the presence of a two-cell and two one-cells.

Example Eleven: Klein bottle (see figure below):
Code:
i50 : L1 = {a*b*d, b*d*w, b*c*w, c*w*x, a*c*x, a*e*x}

o50 = {a*b*d, b*d*w, b*c*w, c*w*x, a*c*x, a*e*x}

o50 : List

i51 : L2 = {d*e*w, e*w*y, x*y*w, x*y*z, e*x*z, d*e*z}

o51 = {d*e*w, e*w*y, w*x*y, x*y*z, e*x*z, d*e*z}

o51 : List

i52 : L3 = { a*e*y, a*b*y, b*y*z, b*c*z, c*d*z, a*c*d}

o52 = {a*e*y, a*b*y, b*y*z, b*c*z, c*d*z, a*c*d}

o52 : List

i55 : KleinBottle = simplicialComplex (L1|L2|L3)

o55 = | xyz byz exz dez cdz bcz wxy ewy aey aby cwx aex acx dew bdw bcw acd abd |

o55 : SimplicialComplex

i56 : prune HH chainComplex KleinBottle

o56 = -1 : 0

0 : 0

1 : cokernel | 2 |
| 0 |

2 : 0

o56 : GradedModule
So the reduced integer homology of a Klein bottle is
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}/2 \stackrel{\partial_2}{\leftarrow} 0 \leftarrow 0$$
showing two one-cycles, one of which has a contractible "square", and no other structure of any homological significance.

Contractible square: one of the two one-cycles here has the property that if you follow it twice, the resulting loop is contractible to a point.

Example Twelve: the real projective plane (see figure below):
Code:
i57 : {a*e*f, a*d*f, a*b*e, a*b*c, a*c*d, e*b*d, c*d*e, b*d*f, b*c*f, c*e*f}

o57 = {a*e*f, a*d*f, a*b*e, a*b*c, a*c*d, b*d*e, c*d*e, b*d*f, b*c*f, c*e*f}

o57 : List

i58 : RP2 = simplicialComplex oo

o58 = | cef aef bdf adf bcf cde bde abe acd abc |

o58 : SimplicialComplex

i59 : prune HH chainComplex RP2

o59 = -1 : 0

0 : 0

1 : cokernel | 2 |

2 : 0

o59 : GradedModule
So the reduced integer homology of $\mathbb{R}P^2$ is:
$$0 \leftarrow 0 \stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2 \stackrel{\partial_2}{\leftarrow} 0 \leftarrow 0$$

You can experiment with different triangulations of these surfaces; of course, you should get the same results irrespective of which triangulation you choose!

Figures: left to right:
• simplicial complex representing the torus $T^2$
• simplicial complex representing the Klein bottle
• simplicial complex representing the real projective plane $\mathbb{R}P^2$

Last edited: