BRS: Cellular homology with Macaulay2

  • Thread starter Chris Hillman
  • Start date
In summary, Macaulay2 is an outstanding open source software project under active development by mathematicians. It was created primarily to do the kind of homological algebra which is useful in algebraic geometry, and the help pages (which are extensive, although some important utilities remain undocumented) will make much more sense if you have studied a textbook which takes a very similar viewpoint. Some more standard references, which you can use to check my computations, include May, A Concise Course in Algebraic Topology, University of Chicago Press, 1999, Munkres, Elements of Algebraic Topology, Benjamin/Cummings, 1984, Greenberg & Harper, Algebraic Topology: A First Course, Addison-
  • #1
Chris Hillman
Science Advisor
2,355
10
It is often useful to be able to compute homology and cohomology without too much thought. Macaulay2 is an outstanding example of a open source software project under active development by mathematicians
http://www.math.uiuc.edu/Macaulay2/
Macaulay2 was created primarily to do the kind of homological algebra which is useful in algebraic geometry, and the help pages (which are extensive, although some important utilities remain undocumented) will make much more sense if you have studied a textbook which takes a very similar viewpoint:
Eisenbud, Commutative Algebra with a Viewpoint Towards Algebraic Geometry, Springer,GTM 150
There is even a very nice textbook which uses Macaulay2:
Schenck, Computational Algebraic Geometry, Cambridge University Press, LMS student texts 58.
These are both beautiful books and I recommend them both (the second is much easier), but in this thread a more important reference will be a third lovely textbook
Hatcher, Algebraic Topology, Cambridge University Press
which is available for free download at Hatcher's academic website.

Some more standard references, which you can use to check my computations:

May, A Concise Course in Algebraic Topology, University of Chicago Press, 1999
Munkres, Elements of Algebraic Topology, Benjamin/Cummings, 1984
Greenberg & Harper, Algebraic Topology: A First Course, Addison-Wesley, 2nd ed, 1981
Hilton & Wylie, Homology Theory, Cambridge University Press, 1960

To save time and energy, I'll assume--- at least until further notice--- that the reader has installed Macaulay2 and is using it with emacs (chain complexes tend to be rather long and in emacs we can scroll horizontally, which can be very helpful in keeping output legible).

[size=+1]The Circle[/size]

Let's start with something really simple. Suppose we have a circle, which we have represented as a simplicial complex using three edges. We naturally want to think of the boundary map from one-chains to zero-chains as a matrix:
[tex]
\partial_1 =
\left[ \begin{array}{rrr|l}
e_1 & e^\prime_1 & e^{\prime \prime}_1 & \\
\hline
1 & 0 & 1 & e_0 \\
-1 & 1 & 0 & e^\prime_0 \\
0 & -1 & -1 & e^{\prime \prime}_0
\end{array} \right]
[/tex]
where I have labled the columns by the three one-cells and the rows by the three zero-cells. That is, [itex]\partial_1 e_1 = e_0 - e^\prime_0[/itex] and so on, which tells what picture I have in mind and also how the cells are labeled.

Thus, our chain complex
[tex]
0 \leftarrow C^0(X,\mathbb{Z}) \stackrel{\partial_1}{\leftarrow} C^1(X,\mathbb{Z}) \leftarrow 0
[/tex]
will be
[tex]
0 \leftarrow \mathbb{Z}^3
\stackrel{
{\small \left[ \begin{array}{rrr}
1 & 0 & 1 \\
-1 & 1 & 0 \\
0 & -1 & -1
\end{array} \right] }
}{\longleftarrow}
\mathbb{Z}^3 \leftarrow 0
[/tex]
and we wish to compute the homology. (If we use left arrows, matrix multiplication of the matrix times a column vector of coefficients will correspond to evaluating the boundary of some chain.)

Here's how we do this in Macaulay2: call emacs and hit the F12 key to invoke Macaulay2:
Code:
Macaulay2, version 1.3.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases,
               PrimaryDecomposition, ReesAlgebra, SchurRings, TangentCone

i1 : R = ZZ

o1 = ZZ

o1 : Ring

i2 : S1 = matrix{{1,0,1},{-1,1,0},{0,-1,-1}} ** R

o2 = | 1  0  1  |
     | -1 1  0  |
     | 0  -1 -1 |

              3        3
o2 : Matrix ZZ  <--- ZZ

i3 : S = chainComplex(S1)

       3       3
o3 = ZZ  <-- ZZ
              
     0       1

o3 : ChainComplex

i4 : prune HH S

           1
o4 = 0 : ZZ

           1
     1 : ZZ

o4 : GradedModule
This means that the homology sequence
[tex]
0
\leftarrow H_0(X,\mathbb{Z})
\stackrel{\partial_1}{\leftarrow} H_1(X,\mathbb{Z})
\leftarrow 0
[/tex]
is simply
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
which means (since [itex]H_0 =\mathbb{Z}[/itex]) that we have a connected space and a single generating cycle (since [itex]H_1 =\mathbb{Z}[/itex]).

To see the boundary operator, do this:
Code:
i46 : S.dd

            3                     3
o46 = 0 : ZZ  <---------------- ZZ  : 1
                 | 1  0  1  |
                 | -1 1  0  |
                 | 0  -1 -1 |

o46 : ChainComplexMap
Try omitting "prune" to see how Macualay2 reports homology in its full glory.

Did you spot the nifty trick? Macaulay2 knows all about tensor products, so it knows that when we tensor an integer matrix with a ring we get a matrix whose entries are interpreted as ring elements. Since I'm using the ring of integers, this may not seem to matter, but Macaulay2 is very strongly typed, which is actually one of the really nice things about using it--- Macaulay2 insists at every step that you know whether the thing you are computing is a ring element in a particular ring, a graded module over a particular ring, or whatnot.

Something I plan to sweep under the rug (but see Eisenbud) is that at this level of structure, there is virtually no distinction between homology and cohomology. Of course we know that in algebraic topology, the cohomology module (a graded module) acquires a ring structure (making it a graded ring) via the cup product. We are often interested in working with this ring structure; Macaulay2 does offer specialized packages which can do this for, in particular, the cohomology of complex Grassmann manifolds (the space of projective k-flats in some projective space).

I'm tacitly assuming that the reader has some prior exposure to homology, but to prevent any possible misunderstanding, let me stress than the chain groups (and the groups of cycles and of boundaries) are not topological invariants; only the sequence of homology groups is a topological invariant. In homological algebra, we consider the sequence of homology groups (these are always abelian groups, of course) as a single object, a graded module over the integers. Then we generalize from the ring of integers to any ring R, so that we have a graded module over R. It turns out to be useful to be able to compute homology modulo a prime, for example.

Simplicial chain complexes tend to be absurdly bloated, however, and we'd like to cut way down on the extraneous junk in our chain complexes by thinking of a circle as two one-cells attached to two zero-cells. So suppose we "cheat" and use an "illegal" chain complex with boundary map
[tex]
\partial_1 =
\left[ \begin{array}{rr|l}
e_1 & e^\prime_1 & \\
\hline
1 & -1 & e_0 \\
-1 & 1 & e^\prime_0
\end{array} \right]
[/tex]
Then we still get the correct homology sequence!

Suppose we are bolder and try to think of the circle as a single one-cell attached to a single zero-cell. Then the boundary map is trivial
[tex]
\partial_1 =
\left[ \begin{array}{r|l}
e_1 & \\
\hline
0 & e_0
\end{array} \right]
[/tex]
but we still get the correct homology sequence!
Code:
i10 : S1 = matrix{{0}} ** R

o10 = 0

               1        1
o10 : Matrix ZZ  <--- ZZ

i11 : S = chainComplex(S1)

        1       1
o11 = ZZ  <-- ZZ
               
      0       1

o11 : ChainComplex

i13 : prune HH S

            1
o13 = 0 : ZZ

            1
      1 : ZZ

o13 : GradedModule
But you should be wary--- it turns out that this last simplification took things a bit too far, even for the purposes of "cheating"!

[size=+1]Wedges of Circles[/size]

Now consider three one dimensional spaces which are all homotopy equivalent to a wedge of two circles
  • two circles joined by an edge
    [tex]
    \partial_1 =
    \left[ \begin{array}{rrr|l}
    e_1 & e^\prime_1 & e^{\prime\prime}_1 \\
    \hline
    1 & 0 & 0 & e_0 \\
    -1 & 0 & 0 & e^\prime_0
    \end{array} \right]
    [/tex]
  • two circles joined at a common point
    [tex]
    \partial_1 =
    \left[ \begin{array}{rr|l}
    e_1 & e^\prime_1 \\
    \hline
    0 & 0 & e_0
    \end{array} \right]
    [/tex]
  • a circle spanned by an edge
    [tex]
    \partial_1 =
    \left[ \begin{array}{rrr|l}
    e_1 & e^\prime_1 & e^{\prime\prime}_1 \\
    \hline
    1 & 1 & 1 & e_0 \\
    -1 & -1 & -1 & e^\prime_0
    \end{array} \right]
    [/tex]
We can use the indicated boundary maps. These examples are not homeomorphic to each other, but they are homotopy equivalent to each other, so they have identical homology. This shows that homology is certainly not a complete invariant for classification up to homeomorphism.
 
Last edited:
Physics news on Phys.org
  • #2
BRS: Cellular homology with Macaulay2. II. Homology of Topological Two-Manifolds

Lets compute the homology of our favorite two-manifolds by cheating.

[size=+1]The Ball B^2[/size]
Let's think of a circle as two zero-cells with two attached one-cells, and sew in a single two-cell. This is illegal as a simplicial complex, but let's do it anyway:
Code:
i14 : S1 = matrix{{1,-1},{-1,1}} ** R

o14 = | 1  -1 |
      | -1 1  |

               2        2
o14 : Matrix ZZ  <--- ZZ

i15 : B2 = matrix{{1},{1}} ** R

o15 = | 1 |
      | 1 |

               2        1
o15 : Matrix ZZ  <--- ZZ

i16 : B = chainComplex(S1,B2)

        2       2       1
o16 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o16 : ChainComplex

i17 : prune HH B

            1
o17 = 0 : ZZ

      1 : 0  

      2 : 0  

o17 : GradedModule
That is, the integer homology is trivial (the ball is contractible):
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]

[size=+1]The Sphere S^2[/size]

We represent the circle the same way, but this time we sew in two two-cells:
Code:
i14 : S1 = matrix{{1,-1},{-1,1}} ** R

o14 = | 1  -1 |
      | -1 1  |

               2        2
o14 : Matrix ZZ  <--- ZZ

i19 : S2 = matrix{{1,1},{1,1}} ** R

o19 = | 1 1 |
      | 1 1 |

               2        2
o19 : Matrix ZZ  <--- ZZ

i20 : S = chainComplex(S1,S2)

        2       2       2
o20 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o20 : ChainComplex

i21 : prune HH S

            1
o21 = 0 : ZZ

      1 : 0  

            1
      2 : ZZ

o21 : GradedModule
This shows that the integer homology is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
(compare G&H p. 84) so any curves are contractible, but [itex]H^2(X,\mathbb{Z})[/itex] is generated, as an abelian group, by a nontrivial two-cycle.

What happens if we try to use one by one boundary maps?

[size=+1]The Real Projective Plane [itex]\mathbb{R}P^2[/itex][/size]

We think of this as a zero-cell with a one-cell attached, then a two-cell attached, such that [itex]\partial_2[/itex] is the doubling map:
Code:
i22 : P1 = matrix{{0}} ** R

o22 = 0

               1        1
o22 : Matrix ZZ  <--- ZZ

i23 : P2 = matrix{{2}} **R

o23 = | 2 |

               1        1
o23 : Matrix ZZ  <--- ZZ

i24 : P = chainComplex(P1,P2)

        1       1       1
o24 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o24 : ChainComplex

i25 : prune HH P

            1
o25 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

o25 : GradedModule
This says that the integer homology is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
(compare G&H p. 121, Hatcher p. 107). But we are not limited to integer coefficients:
Code:
i31 : S = QQ

o31 = QQ

o31 : Ring

i32 : P1 = matrix{{0}} ** S

o32 = 0

               1        1
o32 : Matrix QQ  <--- QQ

i33 : P2 = matrix{{2}} ** S

o33 = | 2 |

               1        1
o33 : Matrix QQ  <--- QQ

i34 : P = chainComplex(P1,P2)

        1       1       1
o34 = QQ  <-- QQ  <-- QQ
                       
      0       1       2

o34 : ChainComplex

i35 : prune HH P

            1
o35 = 0 : QQ

      1 : 0  

      2 : 0  

o35 : GradedModule
This says that the rational homology is
[tex]
0
\leftarrow \mathbb{Q}
\stackrel{\partial_}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
This illustrates the principle that rational homology neglects torsion, so it gives less information than integer homology.

[size=+1]The Torus T^2[/size]

We think of this as a cell complex constructed by identifying opposite edges of a square (see the lovely book by Frechet and Fan, Initiation to Combinatorial Topology, which has just been reprinted by Dover, bless them):

Code:
i36 : T1 = matrix{{0,0}} **R

o36 = 0

               1        2
o36 : Matrix ZZ  <--- ZZ

i37 : T2 = matrix{{0},{0}} ** R

o37 = 0

               2        1
o37 : Matrix ZZ  <--- ZZ

i38 : T = chainComplex (T1,T2)

        1       2       1
o38 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o38 : ChainComplex

i39 : prune HH T

            1
o39 = 0 : ZZ

            2
      1 : ZZ

            1
      2 : ZZ

o39 : GradedModule
This shows that the integer homology is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
where I used additive notation whereas Macaulay2 used multiplicative notation for [itex]H_1(X)[/itex], which is often not a bad idea.

[size=+1]The Moebius Band M[/size]

This one is a bit tricky, and I'll probably have to upload a diagram, but the idea is to draw a rectangle in which the lower edge consists of a one-cell repeated twice, to account for the idea that when we go around the edge of the band once, we go around the central circle twice:
Code:
i40 : M1 = matrix{{0,1,0},{0,-1,0}} ** R

o40 = | 0 1  0 |
      | 0 -1 0 |

               2        3
o40 : Matrix ZZ  <--- ZZ

i41 : M2 = matrix{{-2},{0},{1}} ** R

o41 = | -2 |
      | 0  |
      | 1  |

               3        1
o41 : Matrix ZZ  <--- ZZ

i42 : M = chainComplex(M1,M2)

        2       3       1
o42 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o42 : ChainComplex

i43 : prune HH M

            1
o43 = 0 : ZZ

            1
      1 : ZZ

      2 : 0  

o43 : GradedModule
This shows that the integer homology is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
This result is consistent with the fact that the Moebius band deformation retracts onto the central circle (see Hatcher's textbook for deformation retracts and homotopy equivalence).

[size=+1]The Klein Bottle K[/size]

We take the square but identify one pair of edges with a twist:

Code:
i44 : K1 = matrix{{0,0}}**R

o44 = 0

               1        2
o44 : Matrix ZZ  <--- ZZ

i45 : K2 = matrix{{2},{2}} ** R

o45 = | 2 |
      | 2 |

               2        1
o45 : Matrix ZZ  <--- ZZ

i46 : K = chainComplex(K1,K2)

        1       2       1
o46 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o46 : ChainComplex

i47 : prune HH K

            1
o47 = 0 : ZZ            

      1 : cokernel | 2 |
                   | 0 |

      2 : 0             

o47 : GradedModule
This shows that the integer homology is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
(compare G&H p. 124).

If you are wondering how killing the subgroup generated by [itex](2,2)[/itex] can give [itex]\mathbb{Z} \oplus \mathbb{Z}/2[/itex],
[tex]
\left[ \begin{array}{c}
2 \\
0
\end{array} \right]
=
\left[ \begin{array}{cc}
1 & 0 \\
-1 & 1
\end{array} \right] \;
\left[ \begin{array}{c} 2 \\ 2 \end{array} \right] \;
\left[ \begin{array}{c} 1 \end{array} \right]
[/tex]
shows that the Smith normal form of [itex] {\small \left[ \begin{array}{c} 2 \\ 2 \end{array} \right]} [/itex] is [itex] {\small
\left[ \begin{array}{c}
2 \\
0
\end{array} \right] }
[/itex] which we can verify in Macaulay2 using these commands:
Code:
i56 : smithNormalForm K2

o56 = (| 2 |, | 1  0 |, | 1 |)
       | 0 |  | -1 1 |

o56 : Sequence
See section 6.5 in Johnson, Presentations of Groups, LMS student texts 15, Cambridge University Press for a discussion. His example is
Code:
i75 : J = matrix{{6,6,6,0},{2,0,2,-2},{2,6,2,4},{-2,2,-3,4},{4,6,4,2}} ** R

o75 = | 6  6 6  0  |
      | 2  0 2  -2 |
      | 2  6 2  4  |
      | -2 2 -3 4  |
      | 4  6 4  2  |

               5        4
o75 : Matrix ZZ  <--- ZZ

i76 : smithNormalForm J

o76 = (| 6 0 0 0 |, | 0 -1 0 0 2  |, | -11 1  7  -1 |)
       | 0 1 0 0 |  | 0 0  0 1 0  |  | 0   0  0  1  |
       | 0 0 2 0 |  | 0 0  0 0 1  |  | 10  -1 -6 0  |
       | 0 0 0 0 |  | 1 -1 0 0 -1 |  | 2   0  -1 -1 |
       | 0 0 0 0 |  | 0 1  1 0 -1 |
Which says: in the free abelian group [itex]F = \oplus_{j=1}^4 \mathbb{Z}[/itex], which as an abstract group is isomorphic to the product [itex]\mathbb{Z}^4[/itex] (this is only valid for finitely many factors), consider the subgroup H generated by the elements
[tex]
\begin{array}{rcl}
u_1 & = & (6,6,6,0) \\
u_2 & = & (2,2,0,-2) \\
u_3 & = & (2,6,2,4) \\
u_4 & = & (-2,2,-3,4) \\
u_5 & = & (4,6,4,2)
\end{array}
[/tex]
Then H is also generated by the much simpler generating set
[tex]
\begin{array}{rcl}
w_1 & = & (1,0,0,0) \\
w_2 & = & (0,2,0,0) \\
w_3 & = & (0,0,6,0)
\end{array}
[/tex]
from which we see that F/H is isomorphic to [itex]\mathbb{Z}/2 \oplus \mathbb{Z}/6 \oplus \mathbb{Z}[/itex]. Here, the invariant factors of F/H are 2,6.

(Computing the Smith normal form is very much like Gaussian row reduction, except that we reduce columns too, and we don't divide rows or columns.)
 
Last edited:
  • #3
BRS: Cellular homology with Macaulay2. III. Product Spaces

Now we can really go to town, because if we have chain complexes for [itex]X, Y[/itex], then their tensor product is a valid chain complex for [itex]X \times Y[/itex], and we can then compute the homology of this chain complex using homological algebra.

If you recreate S, P as the integral chain complexes for the two-sphere and real projective two-space,
then
Code:
i72 : prune HH (P ** S)

            1
o72 = 0 : ZZ            

      1 : cokernel | 2 |

            1
      2 : ZZ            

      3 : cokernel | 2 |

      4 : 0             

o72 : GradedModule
shows that the integer homology of [itex]\mathbb{R}P^2 \times S^2[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_4}{\leftarrow} 0
\leftarrow 0
[/tex]
But
Code:
i73 : prune HH (P ** P)

            1
o73 = 0 : ZZ              

      1 : cokernel | 2 0 |
                   | 0 2 |

      2 : cokernel | 2 |  

      3 : cokernel | 2 |  

      4 : 0               

o73 : GradedModule
shows that the integer homology of [itex]\mathbb{R}P^2 \times \mathbb{R}P^2[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2 \oplus \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_4}{\leftarrow} 0
\leftarrow 0
[/tex]
(compare H&W p. 214), which implies that these manifolds are not homeomorphic, or even homotopy equivalent. (Rational homology cannot distinguish [itex]\mathbb{R}P^2 \times \mathbb{R}P^2[/itex] from [itex]\mathbb{R}^4[/itex].) And
Code:
i74 : prune HH (S ** S)

            1
o74 = 0 : ZZ

      1 : 0  

            2
      2 : ZZ

      3 : 0  

            1
      4 : ZZ

o74 : GradedModule
shows that the integer homology of [itex]S^2 \times S^2[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}
\stackrel{\partial_3}{\leftarrow} 0
\stackrel{\partial_4}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
so this is nonhomeomorphic to the first two.

If you haven't seen much algebraic topology before, you may be wondering why we don't take the tensor product of the homologies of the two spaces (treated as graded modules). We could, but in general (unless we are working over a field instead of a ring), we wouldn't get the homology (as a graded module) of the product space! In general we need to add some "correction terms" (extra summands in the homology sequence) which are supplied by the Kunneth formula.
 
Last edited:
  • #4
BRS: Cellular homology with Macaulay2. IV. Higher Dim Spheres & Proj. Spaces

When cheating, we would like to write the chain complexes for projective spaces and spheres as
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{ [ 0 ]}{\leftarrow} \mathbb{Z}
\stackrel{ [ 2 ]}{\leftarrow} \mathbb{Z}
\stackrel{ [ 0 ]}{\leftarrow} \mathbb{Z}
\dots
[/tex]
(where the highest boundary map is zero or doubling according to odd or even dimensional) and
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{ [ 0 ]}{\leftarrow} \mathbb{Z}
\stackrel{ [ 1 ]}{\leftarrow} \mathbb{Z}
\stackrel{ [ 0 ]}{\leftarrow} \mathbb{Z}
\dots
[/tex]
respectively. But the second sequence won't work for n>1 (try it!). Instead
Code:
i78 : S1 = matrix{{1,-1},{-1,1}} ** R

o78 = | 1  -1 |
      | -1 1  |

               2        2
o78 : Matrix ZZ  <--- ZZ

i79 : S2 = matrix{{1,1},{1,1}} ** R

o79 = | 1 1 |
      | 1 1 |

               2        2
o79 : Matrix ZZ  <--- ZZ

i80 : S3 = S1

o80 = | 1  -1 |
      | -1 1  |

               2        2
o80 : Matrix ZZ  <--- ZZ

i81 : s = chainComplex(S1,S2)

        2       2       2
o81 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o81 : ChainComplex

i82 : S = chainComplex(S1,S2,S3)

        2       2       2       2
o82 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                               
      0       1       2       3

o82 : ChainComplex

i83 : prune HH s

            1
o83 = 0 : ZZ

      1 : 0  

            1
      2 : ZZ

o83 : GradedModule

i84 : prune HH S

            1
o84 = 0 : ZZ

      1 : 0  

      2 : 0  

            1
      3 : ZZ

o84 : GradedModule

i63 : P1 = matrix{{0}} ** R

o63 = 0

               1        1
o63 : Matrix ZZ  <--- ZZ

i64 : P2 = matrix{{2}} ** R

o64 = | 2 |

               1        1
o64 : Matrix ZZ  <--- ZZ

i65 : P3 = matrix{{0}} ** R

o65 = 0

               1        1
o65 : Matrix ZZ  <--- ZZ

i66 : P = chainComplex(P1,P2,P3)

        1       1       1       1
o66 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                               
      0       1       2       3

o66 : ChainComplex

i69 : p = chainComplex(P1,P2)

        1       1       1
o69 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o69 : ChainComplex

i90 : prune HH p

            1
o90 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

o90 : GradedModule

i91 : prune HH P

            1
o91 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

            1
      3 : ZZ            

o91 : GradedModule
so that we obtrain for the integral homology of S^3
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
(compare G&H p. 84) and for the integral homology of [itex]\mathbb{R}P^3[/itex]
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
(compare G&H p. 121, Hatcher p. 144, May p.103, H&W p. 135).

Now we can compute the homology of some product spaces:
Code:
i95 : prune HH (p ** S)

            1
o95 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

            1
      3 : ZZ            

      4 : cokernel | 2 |

      5 : 0             

o95 : GradedModule

i96 : prune HH (s ** P)

            1
o96 = 0 : ZZ            

      1 : cokernel | 2 |

            1
      2 : ZZ            

      3 : cokernel | 2 |
                   | 0 |

      4 : 0             

            1
      5 : ZZ            

o96 : GradedModule

i97 : prune HH (S ** P)

            1
o97 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

            2
      3 : ZZ            

      4 : cokernel | 2 |

      5 : 0             

            1
      6 : ZZ            

o97 : GradedModule
This shows that the integral homology of [itex]\mathbb{R}P^2 \times S^3[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\stackrel{\partial_4}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_5}{\leftarrow} 0
\leftarrow 0
[/tex]
while the integral homology of [itex]S^2 \times \mathbb{R}P^3[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\stackrel{\partial_3}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}/2
\stackrel{\partial_4}{\leftarrow} 0
\stackrel{\partial_5}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
and the integral homology of [itex]S^3 \times \mathbb{R}P^3[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}
\stackrel{\partial_4}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_5}{\leftarrow} 0
\stackrel{\partial_6}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
(compare G&H p. 257-258). The Lie group SO(4) happens to be homeomorphic to [itex]S^3 \times \mathbb{R}P^3[/itex] (see Hatcher p. 294).

The reason I call this "cheating" is not because we are using a computer; it is because this is not how one properly does cellular homology (see the cellular boundary formula in Hatcher, p. 140).
 
Last edited:
  • #5
BRS: Cellular homology with Macaulay2 V. Cohomology of Two-Manifolds

We can compute the cohomology of X using a chain complex which is "dual" to the one we used to compute the homology of X. The rule for creating the dual chain complex is simplicity itself:
  • transpose each matrix
  • reverse the order of the sequence of matrices
Thus the sequence of chain groups is
[tex]
0
\leftarrow C_0(X)
\stackrel{\partial_1}{\leftarrow} C_1(X)
\stackrel{\partial_2}{\leftarrow} C_2(X)
\leftarrow 0
[/tex]
while the sequence of cochain groups is
[tex]
0
\rightarrow C^0(X)
\stackrel{\delta^0}{\rightarrow} C^1(X)
\stackrel{\delta^1}{\rightarrow} C^2(X)
\rightarrow 0
[/tex]
Now we simply apply the machinery of homological algebra to the new chain complex!

(See Hatcher, p. 203, for the way cellular cohomology is properly done.)

[size=+1] The Ball [itex]B^2[/itex][/size]

Code:
i22 : B1 = matrix{{1,-1},{-1, 1}} ** R

o22 = | 1  -1 |
      | -1 1  |

               2        2
o22 : Matrix ZZ  <--- ZZ

i23 : B2 = matrix{{1},{1}} ** R

o23 = | 1 |
      | 1 |

               2        1
o23 : Matrix ZZ  <--- ZZ

i24 : B = chainComplex(B1,B2)

        2       2       1
o24 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o24 : ChainComplex

i25 : prune HH B

            1
o25 = 0 : ZZ

      1 : 0  

      2 : 0  

o25 : GradedModule

i29 :  Bstar = chainComplex(transpose(B2), transpose(B1))

        1       2       2
o29 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o29 : ChainComplex

i30 : prune HH Bstar

o30 = 0 : 0  

      1 : 0  

            1
      2 : ZZ

o30 : GradedModule
This shows that the integral homology is (as found above)
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
while the integral cohomology is
[tex]
0
\rightarrow \mathbb{Z}
\stackrel{\delta^0}{\rightarrow} 0
\stackrel{\delta^1}{\rightarrow} 0
\rightarrow 0
[/tex]
where I have reversed the arrows to stress the duality between homology and cohomology, and where (because of the duality) the groups reported as [itex]H_0, \, H_1, \, H_2[/itex] should now be understood as [itex]H^2, \, H^1, \, H^0[/itex], as per the machinery of homological algebra.

[size=+1] The Sphere [itex]S^2[/itex][/size]

Code:
i38 : S1 = matrix {{1,-1},{-1,1}} ** R

o38 = | 1  -1 |
      | -1 1  |

               2        2
o38 : Matrix ZZ  <--- ZZ

i39 : S2 = matrix{{1,1},{1,1}} ** R

o39 = | 1 1 |
      | 1 1 |

               2        2
o39 : Matrix ZZ  <--- ZZ

i40 : S = chainComplex(S1,S2)

        2       2       2
o40 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o40 : ChainComplex

i41 : prune HH S

            1
o41 = 0 : ZZ

      1 : 0  

            1
      2 : ZZ

o41 : GradedModule

i42 : Sstar = chainComplex( transpose(S2), transpose(S1))

        2       2       2
o42 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o42 : ChainComplex

i43 : prune HH Sstar

            1
o43 = 0 : ZZ

      1 : 0  

            1
      2 : ZZ

o43 : GradedModule
This shows that the integral homology is (as found above)
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
while the integral cohomology is
[tex]
0
\rightarrow \mathbb{Z}
\stackrel{\delta^0}{\rightarrow} 0
\stackrel{\delta^1}{\rightarrow} \mathbb{Z}
\rightarrow 0
[/tex]

[size=+1] The Real Projective Plane [itex]\mathbb{R}P^2[/itex][/size]

Code:
i8 : P1 = matrix{{0}} ** R

o8 = 0

              1        1
o8 : Matrix ZZ  <--- ZZ

i9 : P2 = matrix{{2}} ** R

o9 = | 2 |

              1        1
o9 : Matrix ZZ  <--- ZZ

i13 : prune HH P

            1
o13 = 0 : ZZ            

      1 : cokernel | 2 |

      2 : 0             

o13 : GradedModule

i18 : Pstar = chainComplex(P2,P1)

        1       1       1
o18 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o18 : ChainComplex

prune HH Pstar

o21 = 0 : cokernel | 2 |

      1 : 0             

            1
      2 : ZZ            

o21 : GradedModule
This shows that the integral homology is (as found above)
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
while the integral cohomology is
[tex]
0
\rightarrow \mathbb{Z}
\stackrel{\delta^0}{\rightarrow} 0
\stackrel{\delta^1}{\rightarrow} \mathbb{Z}/2
\rightarrow 0
[/tex]
(compare May p. 138, H&W p. 135). We can use coefficients in [itex]\mathbb{Z}/2[/itex] instead:
Code:
i49 : S = ZZ/2

o49 = S

o49 : QuotientRing

i50 : P1 = matrix{{0}} ** S

o50 = 0

              1       1
o50 : Matrix S  <--- S

i51 : P2 = matrix{{2}} ** S

o51 = 0

              1       1
o51 : Matrix S  <--- S

i54 : Pstar = chainComplex(P2,P1)

       1      1      1
o54 = S  <-- S  <-- S
                     
      0      1      2

o54 : ChainComplex

i56 : prune HH Pstar

           1
o56 = 0 : S

           1
      1 : S

           1
      2 : S

o56 : GradedModule
which shows that the [itex]\mathbb{Z}/2[/itex] cohomology is
[tex]
0
\rightarrow \mathbb{Z}/2
\stackrel{\delta^0}{\rightarrow} \mathbb{Z}/2
\stackrel{\delta^1}{\rightarrow} \mathbb{Z}/2
\rightarrow 0
[/tex]
(compare May p. 138).

[size=+1] The Klein Bottle [itex]K[/itex][/size]

Code:
i31 : K1 = matrix{{0,0}} ** R

o31 = 0

               1        2
o31 : Matrix ZZ  <--- ZZ

i32 : K2 = matrix{{2},{2}} ** R

o32 = | 2 |
      | 2 |

               2        1
o32 : Matrix ZZ  <--- ZZ

i33 : K = chainComplex(K1,K2)

        1       2       1
o33 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o33 : ChainComplex

i36 : prune HH K

            1
o36 = 0 : ZZ            

      1 : cokernel | 2 |
                   | 0 |

      2 : 0             

o36 : GradedModule

i34 : Kstar = chainComplex( transpose(K2), transpose(K1))

        1       2       1
o34 = ZZ  <-- ZZ  <-- ZZ
                       
      0       1       2

o34 : ChainComplex

i35 : prune HH Kstar

o35 = 0 : cokernel | 2 |

            1
      1 : ZZ            

            1
      2 : ZZ            

o35 : GradedModule
which shows that the integral homology is (as found above)
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
while the integral cohomology is
[tex]
0
\rightarrow \mathbb{Z}
\stackrel{\delta^0}{\rightarrow} \mathbb{Z}
\stackrel{\delta^1}{\rightarrow} \mathbb{Z}/2
\rightarrow 0
[/tex]
(compare Munkres p. 282). Try this with [itex]\mathbb{Z}/2[/itex] coefficients!

The Poincare duality theorem says that for a compact orientable topological n-manifold M, we have the following duality between the homology and cohomology groups:
[tex] H^q(M) \simeq H_{n-q}(M) [/tex]
 
Last edited:
  • #6
BRS: Cellular homology with Macaulay2. VI. Reduced Homology

As a rule, in integral homology, [itex]H_0(X) = \mathbb{Z}^r[/itex], where r is the number of path components of the topological space X.

A contractable space (homotopically equivalent to a point) and any connected n-manifold have only one component, so in these cases the homology in dimension zero is just [itex]\mathbb{Z}[/itex]. Once you've computed the homology of a large number of such spaces, the integral homology of a point (or contractible space)
[tex]
0
\leftarrow \mathbb{Z}
\leftarrow 0
\leftarrow 0
\ldots
[/tex]
begins to look a bit tailheavy. We soon grow tired of lugging around a copy of [itex]\mathbb{Z}[/itex] which isn't really carrying useful information, if we know we are dealing only with path connected spaces.

Early in the history of algebraic topology, someone invented a silly trick for tacking on a fictitious "negative one dimension" with a specially crafted map [itex]H_{-1}(X) \stackrel{\epsilon}{\leftarrow} H_0(X)[/itex] which ensures that the rank of the zeroth homology group is reduced by one, so that the "reduced homology" of a contractible space vanishes entirely, which seems a more appropriate way of expressing the idea that the topology of any contractible space is "trivial".

When we are working with reduced homology, it is customary to write
[tex]
0
\leftarrow \tilde{H}_0(X)
\stackrel{\partial_0}{\leftarrow} \tilde{H}_1(X)
\stackrel{\partial_1}{\leftarrow} \tilde{H}_2(X)
\ldots
[/tex]
even though the reduced homology groups agree with the homology groups for all positive dimensions. (Actually, few authors seem to write the sequence, but only mention the groups in various dimensions, perhaps because one feels guilty about slurring over a fictitious [itex]\tilde{H}_{-1}(X)[/itex] which always vanishes, so that a purist might tack on an extra zero at the far left of what I wrote.)

Here is a rather direct way to compute reduced homology with Macaulay2:
Code:
i273 : S0

o273 = | 1 1 |

                1        2
o273 : Matrix ZZ  <--- ZZ

i274 : chainComplex(S0,S1,S2,S3)[1]

         1       2       2       2       2
o274 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                                        
       -1      0       1       2       3

o274 : ChainComplex

i275 : prune HH oo

o275 = -1 : 0  

        0 : 0  

        1 : 0  

        2 : 0  

              1
        3 : ZZ

o275 : GradedModule
This shows that the reduced homology of S^3 is
[tex]
0
\leftarrow 0
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
In general, the trick is to define [itex]\epsilon[/itex] to be the matrix consisting of a row of ones, ensuring that it has as many entries as the number of zero-cells. Then we shift the new chain complex one dimension to the left so that the reduced chain groups are labeled by the correct dimensions, and finally we compute homology in the usual way. By dualizing the reduced chain complex we can compute reduced cohomology too.

This is a good place to mention that Macaulay2 offers a package which computes homology directly from a simplicial complex, although the way in which it works might seem a bit strange at first, because of the origins of Macaulay2 as a platform for computational algebraic geometry.
Code:
i282 : loadPackage("SimplicialComplexes")

o282 = SimplicialComplexes

o282 : Package

i283 : R = QQ[a..d]

o283 = R

o283 : PolynomialRing

i284 : S = simplicialComplex { a*b*c, a*b*d, a*c*d, b*c*d}

o284 = | bcd acd abd abc |

o284 : SimplicialComplex

i285 : chainComplex S

         1       4       6       4
o285 = QQ  <-- QQ  <-- QQ  <-- QQ
                                
       -1      0       1       2

o285 : ChainComplex

i286 : oo.dd

              1                        4
o286 = -1 : QQ  <------------------- QQ  : 0
                   | -1 -1 -1 -1 |

             4                              6
       0 : QQ  <------------------------- QQ  : 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 : QQ  <------------------- QQ  : 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 |

o286 : ChainComplexMap

i287 : prune HH chainComplex S

o287 = -1 : 0  

        0 : 0  

        1 : 0  

              1
        2 : QQ

o287 : GradedModule
What we did here was to create a simplicial complex consisting of the four faces of an ordinary tetrahedron (with vertices labled "a,b,c,d"), and then we computed its reduced rational homology
[tex]
0
\leftarrow 0
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} \mathbb{Q}
\leftarrow 0
[/tex]

You are probably wondering--- what is the polynomial ring [itex]\mathbb{Q}[a,b,c,d][/itex] doing there? (That's the ring of all polynomials with rational coefficients constructed using the four "indeterminates" a,b,c,d.) Well, the general idea (I think it is originally due to the noted algebraist Melvin Hochster) is that monomials in the ring, such as [itex]abd, \; ac[/itex], can be used to label faces, and then it is natural to think of taking a quotient ring, by killing the ideal generated by the non-faces of a simplicial complex. This ring is called the Stanley-Reisner ring, and it turns out to be quite important!

And of course I mentioned it because we can compute it using Macaulay2:
Code:
i288 : I = ideal S

o288 = I = ideal(a*b*c*d)

o288 : Ideal of R

i314 : R/I

          R
o314 = -------
       a*b*c*d

o314 : QuotientRing

As I mentioned in Post I, simplicial complexes tend to be rather cumbersome. It would be nice to cut down on the effort required to even describe a large simplicial complex by removing information which is in some sense redundant. Specifically, if we know that some triangle is in the complex, we don't really need to add that its edges and vertices are also in the complex--- that should go without saying! So we want to only list the maximal faces. It turns out that we can remove redundant information by computing the primary decomposition of the ideal of nonfaces!

The primary decomposition of an ideal J is a list of primary ideals [itex]P_1, \, P_2, \ldots P_n[/itex] such that [itex]J = P_1 \cap P_2 \ldots \cap P_n[/itex]. In algebraic geometry, the ideals of a polynomial ring stand in an order-reversing duality with "algebraic varieties" defined as the solution of the system of polynomial equations given by each ideal. These are usually not manifolds, because they can contain multiple points, self-intersections, pieces with various different dimensions, etc., but you think of them as being made of up of pieces which are "algebraic points", "algebraic curves", and "algebraic surfaces". Then the primary decomposition of an ideal corresponds to decomposing a variety into its "irreducible pieces". For example, in the polynomial ring [itex]\mathbb{C}[x,y,z][/itex],
[tex] \left< y^2 + y\, z, x^2 - x \, z, x^2 - z^2 \right> =
\left< y+z, x-z \right> \cap \left< y, x-z \right> \cap \left< y^2, yz, z^2, x^2, xz \right>
[/tex]
In the decomposition, we have two ideals each corresponding to a line, together with a primary ideal associated the prime ideal corresponding to a point (the origin). This means that the variety in [itex]\mathbb{C}^3[/itex] defined by the system of polynomial equations
[tex]
y^2 + y\, z = 0, \; x^2 - x \, z = 0, \; x^2 - z^2 = 0
[/tex]
consists of two lines (the first one is [itex]x=z, \; y=-z[/itex]) and a point endowed with certain hidden extra structure. Roughly speaking; see the wonderful book by Cox, Little, and O'Shea, Ideals, Varieties, and Algorithms, Springer, for more background on elementary algebraic geometry and the computational revolution spurred by Buchberger's discovery of a practical algorithm for computing a Groebner basis for an ideal in a polynomial ring. (Buchburger's algorithm is a far-reaching generalization of Gaussian reduction, long division, and the euclidean algorithm.)

Returning to the Stanley-Reisner ring, here is a simple example of how we can remove redundant information from our description of a simplicial complex:
Code:
i302 : {a*b, a*c, a*d, b*c, b*d, c*d, a*b*c}

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

o302 : List

i303 : S = simplicialComplex oo

o303 = | cd bd ad abc |

o303 : SimplicialComplex

i304 : prune HH chainComplex S


o304 = -1 : 0  

        0 : 0  

              2
        1 : QQ

        2 : 0  

o304 : GradedModule

i305 : I = ideal S

o305 = ideal (a*b*d, a*c*d, b*c*d)

o305 : Ideal of R

i306 : primaryDecomposition I

o306 = {ideal(d), ideal (a, b), ideal (a, c), ideal (b, c)}

o306 : List
Here we constructed a simplicial complex consisting of the six edges plus one triangle; its reduced rational homology is
[tex]
0
\leftarrow 0
\stackrel{\partial_1}{\leftarrow} \mathbb{Q}^2
\stackrel{\partial_2}{\leftarrow} 0
\leftarrow 0
[/tex]
suggesting that it is homotopy equivalent to a wedge of two circles. (It is--- draw a picture, making sure to homotopically deform the triangle into a point!) The ideal of nonfaces decomposes into primary ideals corresponding to three edges and a vertex, which are the "minimal cofaces" of our complex. Turning things around, that says that the maximal faces of our complex consist of the triangle and the three edges not contained in that triangle, so our description of the simplicial complex was redundant.

There's a lot more to say about this--- Richard Stanley is perhaps the world's best known combinatorialist, so you should expect some kind of connection with counting things. And there is. When I was an undergraduate, it was big news when Lou Billera used this machinery to finally solve a long open problem concerning the vector listing the number of faces of each dimension in a simplicial polytope. And it turns out this is the tip of a large iceberg; the book by Schenck cited in Post I gives a bit more background and some citations.

Trivia question: someone just mentioned the late Paul Cohen. What did he have in common with Melvin Hochster, Peter Lax, and Elias Stein? (They are leading figures in 20th century mathematics drawn from the areas of logic, algebra, PDEs/dynamics, and analysis, but the answer I have in mind is not "they are all mathematicians".)
 
Last edited:
  • #7
This is probably not what you had in mind, but, I believe they are all Stuyvesant alums.
 
  • #8
You got it in one! :smile:

(Stuyvesant H.S. in Manhattan, New York City. They didn't all attend at the same time, but the careers of Cohen and Stein overlapped there. I supposed I could have mentioned Eric Lander of the human genome project as another well known mathematician who is a graduate of the same school.)

"Someone mentioned": I meant that someone in the math forums had brought up Paul Cohen's most famous result. There are strange and wonderful connections between logic and topology, incidentally; you'll see people talk about concepts like "compactness" and "sheaves" in the context of logic. While I can probably say a bit about Cohen's "forcing" technique, in a later BRS thread I am eager to discuss connections between first order logic, "models" (in the sense of logic), oligomorphic permutation groups (the natural generalization of finite permutations groups from the point of view I advocate, unifying classical Galois theory and Shannon's information theory), and that most wonderful construction, the Erdos-Renyi universal random graph.

In the mean time, I need to continue this thread with wedge sums and maybe some other operations for constructing new spaces from old ones, and I need to upload some figures to illustrate how the cells fit together, at least for spheres and real projective spaces... And at this point I still haven't tried to really justify why one can "cheat" in the manner I have been demonstrating, so I hope to explain this at the hand waving level (the textbook by Hatcher contains a more formal development).
 
Last edited:
  • #9
BRS: Cellular homology with Macaulay2. VII. Wedge Sums

It is useful to have a variety of operations by which we can construct new topological spaces by combining simpler ones.

In Post III, I mentioned that [itex]C(X \times Y) = C(X) \otimes C(Y)[/itex], so that we can compute the homology of a product space by taking the tensor product of two chain complexes and then applying the usual "cycle modulo a boundary" stuff (in Macaulay2, the HH operation). We can also take direct sums of chain complexes; that does that correspond to? A bit of thought shows that we can take any two topological spaces [itex]X,Y[/itex] and consider them to be a single, non-connected space [itex]X \amalg Y[/itex] (disjoint union). Notice that if [itex]X, Y[/itex] are path connected, then [itex]H_0(X) = H_0(Y) = \mathbb{Z}[/itex] but [itex]H_0(X \amalg Y ) = \mathbb{Z}^2[/itex], since [itex]X \amalg Y[/itex] has two path components.

So we have two simple rules:
[tex]
\begin{array}{rcl}
C(X \amalg Y) & = & C(X) \oplus C(Y) \\
C(X \times Y) & = & C(X) \otimes C(Y)
\end{array}
[/tex]
where in the second rule, in particular, we must be careful to remember to apply HH only after taking the tensor product of the chain complexes.

But disjoint union isn't really a very interesting notion of "sum" in topology. Fortunately, two other operations, wedge sum and connected sum, are available and commonly used to help construct more complicated examples from simpler ones. Indeed, I mentioned the wedge of two circles in Post I. Both of these notions of sum involve a more fundamental notion, identifying (quotient operation) certain subspaces. Intuitively:
  • the wedge sum of two spaces [itex]X,Y[/itex], written [itex]X \vee Y[/itex], is obtained by taking the disjoint union, choosing a point on each piece, and identifying them,
  • the connected sum of two topological n-manifolds [itex]M, N[/itex], written [itex]M \# N[/itex], is obtained by excising a disk from each summand and identifying the spherical boundaries.
To save time and space, I'll leave open the issue of the extent to which the results depend upon the details of these operations.

Given [itex]C(X), \; C(Y)[/itex] we can find a chain complex for a wedge sum by slightly modifying [itex]C(X) \oplus C(Y)[/itex]. We'll have one less zero-cell (since we will identify two zero-cells of the disjoint union) and we'll need to modify the matrix representing the boundary map [itex]\partial_1[/itex].

Example one: compute the wedge sum of two circles [itex]S^1 \vee S^1[/itex]. (A circle is topologically homogeneous, so it shouldn't matter which pair of points we choose to identify, hence "the" wedge sum).

First, recall that if we think of a circle as made from two zero cells and two one cells, then the boundary map [itex]\partial_1[/itex] can be written
[tex]
\left[ \begin{array}{rr|l}
e_1 & {e^\prime}_1 & \\
\hline
1 & -1 & e_0 \\
-1 & 1 & {e^\prime}_0
\end{array} \right]
[/tex]
where the matrix equation
[tex]
\left[ \begin{array}{r} 1 \\ -1 \end{array} \right] =
\left[ \begin{array}{rr} 1 & -1 \\ -1 & 1 \end{array} \right] \;
\left[ \begin{array}{r} 1 \\ 0 \end{array} \right]
[/tex]
means that [itex] \partial_1 e_1 = e_0 - {e^\prime}_0[/itex], and likewise, [itex]\partial_1 {e^\prime}_1 = {e^\prime}_0 - e_0[/itex]. (I have uploaded a figure which should appear at the bottom of this post, explaining the labeling of the cells in this example.)

Now, suppose the chain complexes of the two circles are
[tex]
0 \leftarrow \mathbb{Z}^2
\stackrel{
{\small \left[ \begin{array}{rr|l}
e_1 & {e^\prime}_1 & \\
\hline
1 & -1 & e_0 \\
-1 & 1 & {e^\prime}_0
\end{array} \right] }
}{\longleftarrow} \mathbb{Z}^2
\leftarrow 0
[/tex]
and
[tex]
0 \leftarrow \mathbb{Z}^2
\stackrel{
{\small \left[ \begin{array}{rr|l}
f_1 & {f^\prime}_1 & \\
\hline
1 & -1 & f_0 \\
-1 & 1 & {f^\prime}_0
\end{array} \right] }
}{\longleftarrow} \mathbb{Z}^2
\leftarrow 0
[/tex]
then the wedge sum should have chain complex
[tex]
0 \leftarrow \mathbb{Z}^3
\stackrel{
{\small \left[ \begin{array}{rrrr|l}
e_1 & {e^\prime}_1 & f_1 & {f^\prime}_1 & \\
\hline
1 & -1 & 0 & 0 & e_0 \\
0 & 0 & 1 & -1 & f_0 \\
-1 & 1 & -1 & 1 & {e^\prime}_0 \sim {f^\prime}_0
\end{array} \right] }
}{\longleftarrow} \mathbb{Z}^4\
\leftarrow 0
[/tex]

This shows we must do in general to modify the matrix representing the boundary map [itex]\partial_1[/itex]: if we will identify zero-cells i,j, then we must
  • delete row i
  • add this to row j
We can do this using Macaulay2 by first creating a matrix which encodes those two operations, and then premultiplying the boundary map for the disjoint union, to obtain the boundary map for the wedge sum. If we need to modify a matrix with seven rows (indexed 0 to 6 in Macaulay2), deleting row 1 and adding that to row 3, we should premultiply by this matrix
Code:
i57 : map(ZZ^7,ZZ^7,{(3,1) => 1}) + id_(ZZ^7)

o57 = | 1 0 0 0 0 0 0 |
      | 0 1 0 0 0 0 0 |
      | 0 0 1 0 0 0 0 |
      | 0 1 0 1 0 0 0 |
      | 0 0 0 0 1 0 0 |
      | 0 0 0 0 0 1 0 |
      | 0 0 0 0 0 0 1 |

               7        7
o57 : Matrix ZZ  <--- ZZ
and then delete row 1 from the result.

In our example, the disjoint union [itex]S^1 \amalg S^1[/itex] has chain complex
Code:
i187 : S1 = matrix{{1,-1},{-1,1}}

o187 = | 1  -1 |
       | -1 1  |

                2        2
o187 : Matrix ZZ  <--- ZZ

i188 : chainComplex(S1++S1)

         4       4
o188 = ZZ  <-- ZZ
                
       0       1

o188 : ChainComplex

i189 : prune HH oo

             2
o189 = 0 : ZZ

             2
       1 : ZZ

o189 : GradedModule
where the last shows the homology (note that two path components are visible in dimension zero), while the chain complex of the wedge sum [itex]S^1 \vee S^1[/itex] is given by
Code:
i60 :  map(ZZ^4,ZZ^4,{(3,1) => 1}) + id_(ZZ^4)

o60 = | 1 0 0 0 |
      | 0 1 0 0 |
      | 0 0 1 0 |
      | 0 1 0 1 |

               4        4
o60 : Matrix ZZ  <--- ZZ

i62 : submatrix'(o60*(S1++S1),{1},)

o62 = | 1  -1 0  0  |
      | 0  0  1  -1 |
      | -1 1  -1 1  |

               3        4
o62 : Matrix ZZ  <--- ZZ

i153 : chainComplex (oo)

         3       4
o153 = ZZ  <-- ZZ
                
       0       1

o153 : ChainComplex

i154 : prune HH oo

             1
o154 = 0 : ZZ

             2
       1 : ZZ

o154 : GradedModule
where the last shows that the integer homology of [itex]S^1 \vee S^1[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z} \oplus \mathbb{Z}
\leftarrow 0
[/tex]
where the two loops are visible in dimension one, and the fact that the wedge sum is path connected is visible in dimension zero.

Example two: compute the integer homology of [itex]S^2 \vee S^3[/itex]
Code:
i140 : map(ZZ^4,ZZ^4,{(3,1) => 1}) + id_(ZZ^4)

o140 = | 1 0 0 0 |
       | 0 1 0 0 |
       | 0 0 1 0 |
       | 0 1 0 1 |

                4        4
o140 : Matrix ZZ  <--- ZZ


i141 : submatrix'(oo*(S1++S1),{1},)


o141 = | 1  -1 0  0  |
       | 0  0  1  -1 |
       | -1 1  -1 1  |

                3        4
o141 : Matrix ZZ  <--- ZZ

i142 : S1|| matrix {{0,0},{0,0}}

o142 = | 1  -1 |
       | -1 1  |
       | 0  0  |
       | 0  0  |

                4        2
o142 : Matrix ZZ  <--- ZZ

i143 : C = chainComplex(o141, S2++S2, o142)

         3       4       4       2
o143 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                               
       0       1       2       3

o143 : ChainComplex

i144 : C.dd

             3                        4
o144 = 0 : ZZ  <------------------- ZZ  : 1
                  | 1  -1 0  0  |
                  | 0  0  1  -1 |
                  | -1 1  -1 1  |

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

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

o144 : ChainComplexMap

i145 : prune HH C

             1
o145 = 0 : ZZ

       1 : 0  

             1
       2 : ZZ

             1
       3 : ZZ

o145 : GradedModule
showing that the integer homology of [itex]S^2 \vee S^3[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} 0
\stackrel{\partial_2}{\leftarrow} \mathbb{Z}
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
showing a single zero-cell, a single two-cell, and a single three-cell, as expected.

Example three: compute the integer homology of [itex]\mathbb{R}P^2 \vee S^3[/itex]. We can take the chain complex for the disjoint union to be
Code:
i231 : C =  chainComplex (P1++S1, P2++S2, matrix{{0,0}} || S1 )

         3       3       3       2
o231 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                                
       0       1       2       3

o231 : ChainComplex

i232 : C.dd

             3                    3
o232 = 0 : ZZ  <--------------- ZZ  : 1
                  | 0 0  0  |
                  | 0 1  -1 |
                  | 0 -1 1  |

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

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

o232 : ChainComplexMap

i233 : prune HH C

             2
o233 = 0 : ZZ            

       1 : cokernel | 2 |

       2 : 0             

             1
       3 : ZZ            

o233 : GradedModule
where the last shows the two path components (look at dimension zero). The chain complex for the wedge sum is obtained by identifying two zero-cells and modifying the first boundary map appropriately:
Code:
 i235 :  C = chainComplex( (matrix{{0},{0}})|S1, P2++S2, matrix{{0,0}} || S1 )

         2       3       3       2
o235 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ
                                
       0       1       2       3

o235 : ChainComplex

i236 : C.dd

             2                    3
o236 = 0 : ZZ  <--------------- ZZ  : 1
                  | 0 1  -1 |
                  | 0 -1 1  |

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

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

o236 : ChainComplexMap

i237 : prune HH C

             1
o237 = 0 : ZZ            

       1 : cokernel | 2 |

       2 : 0             

             1
       3 : ZZ            

o237 : GradedModule
showing that the integer homology of [itex]\mathbb{R}P^2 \vee S^3[/itex] is
[tex]
0
\leftarrow \mathbb{Z}
\stackrel{\partial_1}{\leftarrow} \mathbb{Z}/2
\stackrel{\partial_2}{\leftarrow} 0
\stackrel{\partial_3}{\leftarrow} \mathbb{Z}
\leftarrow 0
[/tex]
showing that integer homology cannot distinguish this from [itex]\mathbb{R}P^3[/itex]. Nor can homology with [itex]\mathbb{Z}/2[/itex] coefficients. Nor the abelian groups ([itex]\mathbb{Z}[/itex]-modules) of integer cohomology, nor the [itex]\mathbb{Z}/2[/itex]-modules of cohomology with [itex]\mathbb{Z}/2[/itex] coefficients. But the ring structure of the cohomology rings (with [itex]\mathbb{Z}/2[/itex] coefficients) of these two spaces does differ!

If at this point, you think that (given the homologies of the summands), you can compute the homology of a wedge sum in your head... you are probably correct! But in any case, it is easy to compute the reduced homology of wedge sums of spheres using the SimplicialComplexes package:

Example four: compute the reduced rational homology of the simplicial complex consisting of the "skins" of a triangle and a tetahedron, joined at a common point (i.e. [itex]S^1 \vee S^2[/tex]; see figure at the bottom of the post):
Code:
i1 : loadPackage("SimplicialComplexes")

o1 = SimplicialComplexes

o1 : Package

i3 : R = QQ[a..z]      

o3 = R

o3 : PolynomialRing
i12 : simplicialComplex { a*b*c, a*b*d, a*c*d, b*c*d, d*e, e*f, f*d}

o12 = | ef df de bcd acd abd abc |

o12 : SimplicialComplex

i13 :  chainComplex oo

        1       6       9       4
o13 = QQ  <-- QQ  <-- QQ  <-- QQ
                               
      -1      0       1       2

o13 : ChainComplex

i14 : prune HH oo

o14 = -1 : 0  

       0 : 0  

             1
       1 : QQ

             1
       2 : QQ

o14 : GradedModule

Example five: compute the reduced rational homology of the simplicial complex consisting of the "skins" of two tetrahedra joined by an edge (note that this space can be homotopically deformed to [itex]S^2 \vee S^2[/itex]; see figure at bottom of the post):
Code:
i15 : simplicialComplex { a*b*c, a*b*d, a*c*d, b*c*d, d*e, e*f*g, e*f*h, f*g*h, e*g*h}

o15 = | fgh egh efh efg de bcd acd abd abc |

o15 : SimplicialComplex

i16 : chainComplex oo

        1       8       13       8
o16 = QQ  <-- QQ  <-- QQ   <-- QQ
                                
      -1      0       1        2

o16 : ChainComplex

i17 : prune HH oo

o17 = -1 : 0  

       0 : 0  

       1 : 0  

             2
       2 : QQ

o17 : GradedModule
 

Attachments

  • S1vS1.png
    S1vS1.png
    2 KB · Views: 495
  • simplicial_complexes.png
    simplicial_complexes.png
    2.1 KB · Views: 482
Last edited:

1. What is "BRS: Cellular homology with Macaulay2"?

"BRS: Cellular homology with Macaulay2" is a research tool used in computational algebraic topology. It is a software package that allows for the computation of cellular homology, a mathematical concept used to describe the structure of topological spaces.

2. How does "BRS: Cellular homology with Macaulay2" work?

The software uses the computational algebra system Macaulay2 to perform calculations related to cellular homology. Users input data, such as a simplicial complex or a matrix representing a cellular map, and the software computes the corresponding cellular homology groups.

3. What are the advantages of using "BRS: Cellular homology with Macaulay2"?

One advantage is that the software allows for efficient and accurate calculations of cellular homology, which can be time-consuming and error-prone when done by hand. Additionally, the use of computational tools can provide new insights and approaches to studying cellular homology.

4. Who can benefit from using "BRS: Cellular homology with Macaulay2"?

The software can be useful for researchers and students in the fields of mathematics, computer science, and physics. It can also be valuable for anyone working in computational algebraic topology or interested in exploring the structure of topological spaces.

5. Is "BRS: Cellular homology with Macaulay2" user-friendly for beginners?

The software may require some familiarity with computational algebra and cellular homology concepts. However, there are tutorials and resources available to help beginners learn how to use the software effectively. With some practice, users can become proficient in using "BRS: Cellular homology with Macaulay2".

Similar threads

  • Linear and Abstract Algebra
Replies
19
Views
2K
  • Math Proof Training and Practice
3
Replies
93
Views
10K
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Math Proof Training and Practice
2
Replies
42
Views
6K
  • Math Proof Training and Practice
2
Replies
52
Views
9K
  • Special and General Relativity
Replies
2
Views
2K
Replies
12
Views
4K
  • Math Proof Training and Practice
3
Replies
86
Views
9K
Replies
1
Views
2K
  • Math Proof Training and Practice
2
Replies
56
Views
7K
Back
Top