Skip to content
The Lumenary
First-year graduateGraduate 150 min

Algebraic topology

Turning holes into groups — singular and cellular homology, exact sequences, cohomology rings, and what they prove about spheres, dimension and fixed points.

Formally verified · 14 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review
MotivationH

Holes, dimension and fixed points

Three questions that sound unrelated:

  1. Is the plane R2\R^2 homeomorphic to space R3\R^3? Both are infinite, connected, contractible, and have the same cardinality — and Peano's curve maps an interval onto a square. Why should dimension be a topological invariant at all?
  2. Stir a cup of coffee: does some particle end where it began? Equivalently, must every continuous map Dn→DnD^n \to D^n of a closed ball have a fixed point?
  3. A sphere and a torus are both closed surfaces. What precisely is the "hole" in the torus, and how do we prove the sphere has none?

The fundamental group answers the third question and the two-dimensional cases of the others, but it only sees loops, and higher homotopy groups are notoriously hard to compute. Homology is the tool that works in every dimension. It assigns to each space XX a sequence of abelian groups H0(X),H1(X),H2(X),…H_0(X), H_1(X), H_2(X), \dots — roughly, HnH_n counts the nn-dimensional holes — and to each continuous map a homomorphism, in a way that is unchanged by homotopy and computable by exact sequences and cell decompositions. With it, all three questions have short answers: Hn−1(Rn∖{0})≅ZH_{n-1}(\R^n \setminus \{0\}) \cong \Z detects nn; the sphere Sn−1S^{n-1} is not a retract of the ball because its homology does not vanish; the torus has H1≅Z2H_1 \cong \Z^2 and the sphere has H1=0H_1 = 0.

This lesson assumes homotopy and the fundamental group, quotient groups and point-set topology.

IntuitionH

Cycles that bound and cycles that don't

Draw a closed curve on a surface. Sometimes it is the boundary of a piece of the surface; sometimes, like a loop around the hole of an annulus, it is not. Homology makes this precise with formal sums. A chain is a formal integer combination of oriented pieces (points, curve segments, triangles, …); its boundary is the formal sum of the oriented pieces of its edge. A cycle is a chain with zero boundary; a boundary is a chain that is the boundary of something one dimension higher. The key algebraic fact is that a boundary has no boundary — the edge of a triangle is a closed loop — so every boundary is a cycle, and

Hn=n-cyclesn-boundariesH_n = \frac{\text{$n$-cycles}}{\text{$n$-boundaries}}

measures the cycles that do not bound: the holes.

z₁z₂
In the annulus, the gold loop z₂ around the hole is a cycle that is not the boundary of anything; the small loop z₁ bounds the disc it encloses. So z₁ is zero in H₁ and z₂ generates H₁ ≅ ℤ.

Two features make the idea powerful. First, homology is functorial: a map f:X→Yf : X \to Y pushes chains forward and induces homomorphisms f∗:Hn(X)→Hn(Y)f_* : H_n(X) \to H_n(Y) with (g∘f)∗=g∗∘f∗(g \circ f)_* = g_* \circ f_* and id∗=id\mathrm{id}_* = \mathrm{id}. Second, it is homotopy invariant and local-to-global computable: deforming ff does not change f∗f_*, and the homology of U∪VU \cup V is controlled by that of UU, VV and U∩VU \cap V. Functoriality turns topological impossibility into algebraic impossibility: if a retraction r:Dn→Sn−1r : D^n \to S^{n-1} existed, then r∗∘i∗=idr_* \circ i_* = \mathrm{id} on Hn−1(Sn−1)≅ZH_{n-1}(S^{n-1}) \cong \Z would factor through Hn−1(Dn)=0H_{n-1}(D^n) = 0.

DefinitionsH

Definitions

Definition— chain complex; homology

A chain complex C∙C_\bullet is a sequence of abelian groups and homomorphisms ⋯→Cn+1→∂n+1Cn→∂nCn−1→⋯\cdots \to C_{n+1} \xrightarrow{\partial_{n+1}} C_n \xrightarrow{\partial_n} C_{n-1} \to \cdots with ∂n∘∂n+1=0\partial_n \circ \partial_{n+1} = 0. Elements of Zn=ker⁡∂nZ_n = \ker \partial_n are cycles, elements of Bn=im⁡∂n+1B_n = \operatorname{im} \partial_{n+1} are boundaries, and the nn-th homology group is Hn(C)=Zn/BnH_n(C) = Z_n / B_n. A chain map f:C∙→D∙f : C_\bullet \to D_\bullet is a family fn:Cn→Dnf_n : C_n \to D_n with ∂fn=fn−1∂\partial f_n = f_{n-1} \partial; it sends cycles to cycles and boundaries to boundaries, so it induces f∗:Hn(C)→Hn(D)f_* : H_n(C) \to H_n(D).

Definition— singular chains

The standard nn-simplex is Δn={(t0,…,tn)∈Rn+1:ti≥0, ∑ti=1}\Delta^n = \{ (t_0, \dots, t_n) \in \R^{n+1} : t_i \ge 0,\ \sum t_i = 1 \}, with face maps δi:Δn−1→Δn\delta_i : \Delta^{n-1} \to \Delta^n inserting a 00 in position ii. A singular nn-simplex in a space XX is a continuous map σ:Δn→X\sigma : \Delta^n \to X. The group Cn(X)C_n(X) of singular nn-chains is the free abelian group on all singular nn-simplices, and

∂σ=∑i=0n(−1)i σ∘δi.\partial \sigma = \sum_{i=0}^{n} (-1)^i\, \sigma \circ \delta_i .

The homology of (C∙(X),∂)(C_\bullet(X), \partial) is the singular homology Hn(X)H_n(X). A continuous map ff induces the chain map f♯(σ)=f∘σf_\sharp(\sigma) = f \circ \sigma and hence f∗:Hn(X)→Hn(Y)f_* : H_n(X) \to H_n(Y). With coefficients in an abelian group GG one uses Cn(X)⊗GC_n(X) \otimes G and writes Hn(X;G)H_n(X; G).

Definition— reduced and relative homology

Reduced homology H~n(X)\tilde H_n(X) is the homology of the augmented complex ⋯→C1(X)→C0(X)→εZ→0\cdots \to C_1(X) \to C_0(X) \xrightarrow{\varepsilon} \Z \to 0, with ε(∑niσi)=∑ni\varepsilon(\sum n_i \sigma_i) = \sum n_i. For non-empty XX, H0(X)≅H~0(X)⊕ZH_0(X) \cong \tilde H_0(X) \oplus \Z and H~n=Hn\tilde H_n = H_n for n>0n > 0; a point has H~∙=0\tilde H_\bullet = 0. For A⊆XA \subseteq X the relative homology Hn(X,A)H_n(X, A) is the homology of C∙(X)/C∙(A)C_\bullet(X)/C_\bullet(A).

Definition— chain homotopy

Chain maps f,g:C∙→D∙f, g : C_\bullet \to D_\bullet are chain homotopic if there are homomorphisms hn:Cn→Dn+1h_n : C_n \to D_{n+1} with fn−gn=∂n+1hn+hn−1∂nf_n - g_n = \partial_{n+1} h_n + h_{n-1} \partial_n for all nn.

Definition— exact sequence

A sequence of homomorphisms ⋯→A→fB→gC→⋯\cdots \to A \xrightarrow{f} B \xrightarrow{g} C \to \cdots is exact at BB if im⁡f=ker⁡g\operatorname{im} f = \ker g. A short exact sequence of chain complexes 0→A∙→iB∙→jC∙→00 \to A_\bullet \xrightarrow{i} B_\bullet \xrightarrow{j} C_\bullet \to 0 is a pair of chain maps that is exact in every degree.

Definition— CW complex

A CW complex is built inductively: X0X^0 is a discrete set of points (00-cells), and XnX^n is obtained from Xn−1X^{n-1} by attaching nn-cells, i.e. forming Xn−1⊔αDαnX^{n-1} \sqcup_\alpha D^n_\alpha modulo x∼φα(x)x \sim \varphi_\alpha(x) for continuous attaching maps φα:Sn−1→Xn−1\varphi_\alpha : S^{n-1} \to X^{n-1}. Then X=⋃nXnX = \bigcup_n X^n with the weak topology (a set is open if and only if it meets each XnX^n in an open set). XnX^n is the nn-skeleton.

Definition— degree

A map f:Sn→Snf : S^n \to S^n (n≥1n \ge 1) induces multiplication by an integer on Hn(Sn)≅ZH_n(S^n) \cong \Z, its degree deg⁡f\deg f. Homotopic maps have equal degree; a reflection has degree −1-1; the antipodal map of SnS^n has degree (−1)n+1(-1)^{n+1}.

Worked examplesH

First examples

Example— A point, and path components

For a point, Cn=ZC_n = \Z for every nn (one singular simplex in each dimension), and ∂n\partial_n is 00 for nn odd and an isomorphism for nn even, n≥2n \ge 2. So H0(pt)=ZH_0(\mathrm{pt}) = \Z and Hn(pt)=0H_n(\mathrm{pt}) = 0 for n>0n > 0.

For any space, H0(X)H_0(X) is free abelian on the path components. Indeed, if XX is path connected, ε:C0(X)→Z\varepsilon : C_0(X) \to \Z is onto and its kernel consists of boundaries: a path γ\gamma from x0x_0 to xx is a singular 11-simplex with ∂γ=x−x0\partial \gamma = x - x_0, so every chain ∑nixi\sum n_i x_i with ∑ni=0\sum n_i = 0 equals ∂∑niγi\partial \sum n_i \gamma_i. The general case splits over path components.

Example— H₁ is the abelianised fundamental group

A loop γ:[0,1]→X\gamma : [0, 1] \to X is a singular 11-simplex with ∂γ=0\partial \gamma = 0, so it is a cycle. The Hurewicz theorem in degree one says that for path-connected XX the map π1(X,x0)→H1(X)\pi_1(X, x_0) \to H_1(X), [γ]↦[γ][\gamma] \mapsto [\gamma], is surjective with kernel the commutator subgroup: H1(X)≅π1(X)abH_1(X) \cong \pi_1(X)^{\mathrm{ab}} (Hatcher, Theorem 2A.1). So H1(S1)≅ZH_1(S^1) \cong \Z, H1(T2)≅Z2H_1(T^2) \cong \Z^2, and for the figure eight S1∨S1S^1 \vee S^1, whose fundamental group is free on two generators, H1≅Z2H_1 \cong \Z^2: homology forgets the order in which loops are traversed.

Example— The answers we will prove

spacenon-zero homology groupsχ\chi
sphere SnS^n, n≥1n \ge 1H0≅Hn≅ZH_0 \cong H_n \cong \Z1+(−1)n1 + (-1)^n
torus T2T^2H0≅ZH_0 \cong \Z, H1≅Z2H_1 \cong \Z^2, H2≅ZH_2 \cong \Z00
orientable surface MgM_g of genus ggH0≅ZH_0 \cong \Z, H1≅Z2gH_1 \cong \Z^{2g}, H2≅ZH_2 \cong \Z2−2g2 - 2g
projective plane RP2\R P^2H0≅ZH_0 \cong \Z, H1≅Z/2H_1 \cong \Z/211
Klein bottleH0≅ZH_0 \cong \Z, H1≅Z⊕Z/2H_1 \cong \Z \oplus \Z/200
CPn\C P^nH2k≅ZH_{2k} \cong \Z for 0≤k≤n0 \le k \le nn+1n + 1

Torsion such as the Z/2\Z/2 in H1(RP2)H_1(\R P^2) is a genuinely new phenomenon: twice the generating loop bounds (the loop that goes twice around the cross-cap), though the loop itself does not.

ProofH

The basic machine

Theorem— Lemma 1 (the boundary of a boundary is zero)

For singular chains, ∂n−1∘∂n=0\partial_{n-1} \circ \partial_n = 0.

Proof

First, the simplicial identity δi∘δj=δj+1∘δi\delta_i \circ \delta_j = \delta_{j+1} \circ \delta_i for i≤ji \le j: both sides send (t0,…,tn−2)(t_0, \dots, t_{n-2}) to the point of Δn\Delta^n obtained by inserting zeros in positions ii and j+1j + 1. Now for a singular nn-simplex σ\sigma,

∂∂σ=∑i=0n∑j=0n−1(−1)i+j σ∘δi∘δj.\partial \partial \sigma = \sum_{i=0}^{n} \sum_{j=0}^{n-1} (-1)^{i+j}\, \sigma \circ \delta_i \circ \delta_j .

Split the double sum into the terms with j≥ij \ge i and those with j<ij < i. For j≥ij \ge i rewrite σδiδj=σδj+1δi\sigma \delta_i \delta_j = \sigma \delta_{j+1} \delta_i and put (i′,j′)=(j+1,i)(i', j') = (j + 1, i); this is a bijection from {(i,j):0≤i≤j≤n−1}\{ (i, j) : 0 \le i \le j \le n - 1 \} onto {(i′,j′):0≤j′<i′≤n}\{ (i', j') : 0 \le j' < i' \le n \}, and the sign (−1)i+j=−(−1)i′+j′(-1)^{i + j} = -(-1)^{i' + j'} is reversed. So the two halves cancel term by term, and ∂∂σ=0\partial\partial\sigma = 0; by linearity ∂∂=0\partial \partial = 0 on all chains.

∎

Theorem— Lemma 2 (chain homotopic maps agree on homology)

If f,g:C∙→D∙f, g : C_\bullet \to D_\bullet are chain homotopic, then f∗=g∗:Hn(C)→Hn(D)f_* = g_* : H_n(C) \to H_n(D) for all nn.

Proof

Let z∈Cnz \in C_n be a cycle. Then f(z)−g(z)=∂h(z)+h(∂z)=∂h(z)f(z) - g(z) = \partial h(z) + h(\partial z) = \partial h(z) is a boundary, so [f(z)]=[g(z)][f(z)] = [g(z)] in Hn(D)H_n(D).

∎

Theorem— Theorem 3 (homotopy invariance)

If f≃g:X→Yf \simeq g : X \to Y are homotopic maps, then f∗=g∗:Hn(X)→Hn(Y)f_* = g_* : H_n(X) \to H_n(Y) for every nn. Consequently a homotopy equivalence induces isomorphisms on all homology groups, and a contractible space has H~∙=0\tilde H_\bullet = 0.

Proof

Proof sketch (complete details in Hatcher, Theorem 2.10). Let F:X×[0,1]→YF : X \times [0, 1] \to Y be a homotopy from ff to gg. In Δn×[0,1]\Delta^n \times [0, 1] let vi=(ei,0)v_i = (e_i, 0) and wi=(ei,1)w_i = (e_i, 1); the prism Δn×[0,1]\Delta^n \times [0, 1] is the union of the n+1n + 1 affine (n+1)(n+1)-simplices [v0,…,vi,wi,…,wn][v_0, \dots, v_i, w_i, \dots, w_n]. The prism operator P:Cn(X)→Cn+1(Y)P : C_n(X) \to C_{n+1}(Y),

P(σ)=∑i=0n(−1)i F∘(σ×id)∣[v0,…,vi,wi,…,wn],P(\sigma) = \sum_{i=0}^{n} (-1)^i\, F \circ (\sigma \times \mathrm{id}) \big|_{[v_0, \dots, v_i, w_i, \dots, w_n]} ,

satisfies ∂P+P∂=g♯−f♯\partial P + P \partial = g_\sharp - f_\sharp. Geometrically: the boundary of the prism is the top (g∘σg \circ \sigma) minus the bottom (f∘σf \circ \sigma) minus the prism over the boundary of σ\sigma; algebraically it is a cancellation of the same kind as in Lemma 1, where the interior faces cancel in pairs. So f♯f_\sharp and g♯g_\sharp are chain homotopic and Lemma 2 applies. If g∘f≃idg \circ f \simeq \mathrm{id} and f∘g≃idf \circ g \simeq \mathrm{id} then g∗f∗=idg_* f_* = \mathrm{id} and f∗g∗=idf_* g_* = \mathrm{id}, and a contractible space is homotopy equivalent to a point.

∎

Theorem— Theorem 4 (long exact sequence)

A short exact sequence 0→A∙→iB∙→jC∙→00 \to A_\bullet \xrightarrow{i} B_\bullet \xrightarrow{j} C_\bullet \to 0 of chain complexes gives a long exact sequence

⋯→Hn(A)→i∗Hn(B)→j∗Hn(C)→δHn−1(A)→i∗Hn−1(B)→⋯\cdots \to H_n(A) \xrightarrow{i_*} H_n(B) \xrightarrow{j_*} H_n(C) \xrightarrow{\delta} H_{n-1}(A) \xrightarrow{i_*} H_{n-1}(B) \to \cdots

Proof

Construction of δ\delta. Let c∈Cnc \in C_n be a cycle. Choose b∈Bnb \in B_n with j(b)=cj(b) = c. Then j(∂b)=∂c=0j(\partial b) = \partial c = 0, so ∂b=i(a)\partial b = i(a) for a unique a∈An−1a \in A_{n-1}; and i(∂a)=∂∂b=0i(\partial a) = \partial \partial b = 0 with ii injective, so aa is a cycle. Put δ[c]=[a]\delta[c] = [a]. Well defined: another lift b′=b+i(a′)b' = b + i(a') changes aa to a+∂a′a + \partial a'; replacing cc by c+∂c′c + \partial c' and lifting c′c' to b′′b'' changes bb by ∂b′′\partial b'' plus an element of i(An)i(A_n), which changes aa by a boundary. Exactness at Hn(C)H_n(C): if c=j(b)c = j(b) with ∂b=0\partial b = 0 then a=0a = 0, so δj∗=0\delta j_* = 0; conversely if δ[c]=0\delta[c] = 0, say a=∂a′a = \partial a', then b−i(a′)b - i(a') is a cycle with j(b−i(a′))=cj(b - i(a')) = c, so [c]∈im⁡j∗[c] \in \operatorname{im} j_*. Exactness at Hn(A)H_n(A) and Hn(B)H_n(B) is proved by similar diagram chases (Hatcher, Theorem 2.16).

∎

The short exact sequence 0→C∙(A)→C∙(X)→C∙(X)/C∙(A)→00 \to C_\bullet(A) \to C_\bullet(X) \to C_\bullet(X)/C_\bullet(A) \to 0 gives the long exact sequence of the pair (X,A)(X, A). The local-to-global version is the following.

Theorem— Theorem 5 (Mayer–Vietoris)

If X=U∪VX = U \cup V where the interiors of UU and VV cover XX, there is a long exact sequence

⋯→Hn(U∩V)→(ι∗,−ι∗)Hn(U)⊕Hn(V)→ ι∗+ι∗ Hn(X)→∂Hn−1(U∩V)→⋯ ,\cdots \to H_n(U \cap V) \xrightarrow{(\iota_*, -\iota_*)} H_n(U) \oplus H_n(V) \xrightarrow{\ \iota_* + \iota_*\ } H_n(X) \xrightarrow{\partial} H_{n-1}(U \cap V) \to \cdots ,

and the same holds for reduced homology when U∩V≠∅U \cap V \neq \varnothing.

Proof

Proof sketch. There is a short exact sequence 0→C∙(U∩V)→C∙(U)⊕C∙(V)→C∙{U,V}(X)→00 \to C_\bullet(U \cap V) \to C_\bullet(U) \oplus C_\bullet(V) \to C^{\{U, V\}}_\bullet(X) \to 0, where C∙{U,V}(X)C^{\{U, V\}}_\bullet(X) consists of chains that are sums of simplices lying in UU or in VV; Theorem 4 gives a long exact sequence for it. The substantial input is that the inclusion C∙{U,V}(X)↪C∙(X)C^{\{U, V\}}_\bullet(X) \hookrightarrow C_\bullet(X) induces isomorphisms on homology, proved by repeated barycentric subdivision and the Lebesgue number lemma (Hatcher, Proposition 2.21). We use it without proof.

∎

Theorem— Theorem 6 (homology of spheres)

For n≥0n \ge 0: H~n(Sn)≅Z\tilde H_n(S^n) \cong \Z and H~k(Sn)=0\tilde H_k(S^n) = 0 for k≠nk \neq n.

Proof

Induction on nn. S0S^0 is two points, so H0=Z2H_0 = \Z^2, H~0=Z\tilde H_0 = \Z, and higher groups vanish. For n≥1n \ge 1 let U=Sn∖{N}U = S^n \setminus \{N\} and V=Sn∖{S}V = S^n \setminus \{S\} (north and south poles). Both are homeomorphic to Rn\R^n by stereographic projection, so contractible, and U∩V≅Sn−1×(−1,1)≃Sn−1U \cap V \cong S^{n-1} \times (-1, 1) \simeq S^{n-1}. In the reduced Mayer–Vietoris sequence the terms H~k(U)⊕H~k(V)\tilde H_k(U) \oplus \tilde H_k(V) vanish, so

0→H~k(Sn)→ ∂ H~k−1(Sn−1)→00 \to \tilde H_k(S^n) \xrightarrow{\ \partial\ } \tilde H_{k-1}(S^{n-1}) \to 0

is exact and H~k(Sn)≅H~k−1(Sn−1)\tilde H_k(S^n) \cong \tilde H_{k-1}(S^{n-1}) for every kk. The induction hypothesis finishes the proof.

∎

Theorem— Corollary 7 (invariance of dimension)

If Rm\R^m and Rn\R^n are homeomorphic, then m=nm = n.

Proof

If one of m,nm, n is 00, the space is a point, and Rk\R^k is a point only for k=0k = 0. Let m,n≥1m, n \ge 1 and let h:Rm→Rnh : \R^m \to \R^n be a homeomorphism. It restricts to a homeomorphism Rm∖{0}≅Rn∖{h(0)}\R^m \setminus \{0\} \cong \R^n \setminus \{h(0)\}. The map x↦x/∣x∣x \mapsto x / |x| is a deformation retraction of Rm∖{0}\R^m \setminus \{0\} onto Sm−1S^{m-1}, and likewise Rn∖{h(0)}≃Sn−1\R^n \setminus \{h(0)\} \simeq S^{n-1}. By Theorem 3, H~∙(Sm−1)≅H~∙(Sn−1)\tilde H_\bullet(S^{m-1}) \cong \tilde H_\bullet(S^{n-1}), and by Theorem 6 the only non-zero group sits in degree m−1m - 1 on one side and n−1n - 1 on the other. So m=nm = n.

∎

Theorem— Corollary 8 (Brouwer fixed-point theorem)

Every continuous map f:Dn→Dnf : D^n \to D^n (n≥1n \ge 1) has a fixed point.

Proof

Suppose f(x)≠xf(x) \neq x for all xx. Let r(x)r(x) be the point where the ray from f(x)f(x) through xx meets Sn−1S^{n-1}: r(x)=x+t(x) (x−f(x))r(x) = x + t(x)\,(x - f(x)) with t(x)t(x) the larger root of the quadratic equation ∣x+t(x−f(x))∣2=1|x + t (x - f(x))|^2 = 1; this root is non-negative because ∣x∣≤1|x| \le 1, it is 00 when ∣x∣=1|x| = 1, and it depends continuously on xx by the quadratic formula. Then r:Dn→Sn−1r : D^n \to S^{n-1} is continuous and r(x)=xr(x) = x for x∈Sn−1x \in S^{n-1}, i.e. r∘i=idSn−1r \circ i = \mathrm{id}_{S^{n-1}}. Applying H~n−1\tilde H_{n-1} gives r∗∘i∗=idr_* \circ i_* = \mathrm{id} on H~n−1(Sn−1)≅Z\tilde H_{n-1}(S^{n-1}) \cong \Z, which factors through H~n−1(Dn)=0\tilde H_{n-1}(D^n) = 0 (the disc is contractible). This is impossible, so ff has a fixed point.

∎

ProofH

Cellular homology and the Euler characteristic

Singular chains are enormous; for a CW complex there is a much smaller chain complex with the same homology. Put CnCW(X)=Hn(Xn,Xn−1)C_n^{\mathrm{CW}}(X) = H_n(X^n, X^{n-1}), which is free abelian on the nn-cells, with differential the composite Hn(Xn,Xn−1)→Hn−1(Xn−1)→Hn−1(Xn−1,Xn−2)H_n(X^n, X^{n-1}) \to H_{n-1}(X^{n-1}) \to H_{n-1}(X^{n-1}, X^{n-2}) of maps from the long exact sequences of pairs.

Theorem— Theorem 9 (cellular homology)

Hn(C∙CW(X))≅Hn(X)H_n(C^{\mathrm{CW}}_\bullet(X)) \cong H_n(X). Moreover the cellular boundary formula holds: d(eαn)=∑βdαβ eβn−1d(e^n_\alpha) = \sum_\beta d_{\alpha\beta}\, e^{n-1}_\beta, where dαβd_{\alpha\beta} is the degree of the composite Sn−1→φαXn−1→Xn−1/(Xn−1∖eβn−1)≅Sn−1S^{n-1} \xrightarrow{\varphi_\alpha} X^{n-1} \to X^{n-1}/(X^{n-1} \setminus e^{n-1}_\beta) \cong S^{n-1}.

The proof uses the long exact sequences of the pairs (Xn,Xn−1)(X^n, X^{n-1}) and the computation Hk(Xn,Xn−1)=0H_k(X^n, X^{n-1}) = 0 for k≠nk \neq n (Hatcher, Theorem 2.35 and the formula on p. 140). In practice: d(e1)=(end)−(start)d(e^1) = (\text{end}) - (\text{start}), and if a 22-cell is attached along a word in the 11-cells of a complex with one 00-cell, d(e2)d(e^2) is the vector of exponent sums of the letters in that word.

Example— Spheres, complex projective spaces, surfaces

  • Sn=e0∪enS^n = e^0 \cup e^n: for n≥2n \ge 2 all differentials vanish, recovering Theorem 6.
  • CPn=e0∪e2∪⋯∪e2n\C P^n = e^0 \cup e^2 \cup \dots \cup e^{2n}: cells only in even dimensions, so all differentials vanish and H2k(CPn)≅ZH_{2k}(\C P^n) \cong \Z for 0≤k≤n0 \le k \le n, zero otherwise.
  • The torus: one 00-cell, 11-cells a,ba, b, one 22-cell attached along aba−1b−1a b a^{-1} b^{-1}. Then d2(e2)=a+b−a−b=0d_2(e^2) = a + b - a - b = 0 and d1=0d_1 = 0, so H∙(T2)=Z,Z2,ZH_\bullet(T^2) = \Z, \Z^2, \Z. The same argument for MgM_g (word ∏i=1gaibiai−1bi−1\prod_{i=1}^g a_i b_i a_i^{-1} b_i^{-1}) gives Z,Z2g,Z\Z, \Z^{2g}, \Z.
  • The Klein bottle: word aba−1ba b a^{-1} b, so d2(e2)=2bd_2(e^2) = 2b and H1=Z2/⟨2b⟩≅Z⊕Z/2H_1 = \Z^2 / \langle 2b \rangle \cong \Z \oplus \Z/2, H2=ker⁡d2=0H_2 = \ker d_2 = 0. The surface NhN_h with hh cross-caps (word a12⋯ah2a_1^2 \cdots a_h^2) has H1≅Zh−1⊕Z/2H_1 \cong \Z^{h-1} \oplus \Z/2 and H2=0H_2 = 0.

Example— Real projective space

RPn=e0∪e1∪⋯∪en\R P^n = e^0 \cup e^1 \cup \dots \cup e^n, where eke^k is attached by the double cover Sk−1→RPk−1S^{k-1} \to \R P^{k-1}. Composing with the collapse RPk−1→RPk−1/RPk−2≅Sk−1\R P^{k-1} \to \R P^{k-1}/\R P^{k-2} \cong S^{k-1}, the two sheets contribute the identity and the antipodal map, of degrees 11 and (−1)k(-1)^k. So dk=1+(−1)kd_k = 1 + (-1)^k: zero for kk odd, multiplication by 22 for kk even. Hence

Hk(RPn)≅{Zk=0, or k=n odd,Z/2k odd, 0<k<n,0otherwise.H_k(\R P^n) \cong \begin{cases} \Z & k = 0, \text{ or } k = n \text{ odd}, \\ \Z/2 & k \text{ odd},\ 0 < k < n, \\ 0 & \text{otherwise.} \end{cases}

With coefficients in Z/2\Z/2 every differential becomes zero and Hk(RPn;Z/2)≅Z/2H_k(\R P^n; \Z/2) \cong \Z/2 for 0≤k≤n0 \le k \le n: homology depends on the coefficients.

Theorem— Theorem 10 (Euler–Poincaré)

For a finite CW complex XX with cnc_n cells of dimension nn, define χ(X)=∑n(−1)ncn\chi(X) = \sum_n (-1)^n c_n. Then χ(X)=∑n(−1)nrank⁡Hn(X)\chi(X) = \sum_n (-1)^n \operatorname{rank} H_n(X). In particular χ\chi does not depend on the cell structure and is a homotopy invariant.

Proof

Tensor the cellular chain complex with Q\Q: since Q\Q is flat, Hn(C⊗Q)≅Hn(C)⊗QH_n(C \otimes \Q) \cong H_n(C) \otimes \Q, whose dimension is rank⁡Hn(X)\operatorname{rank} H_n(X). So we may work with a finite complex of finite-dimensional Q\Q-vector spaces CnC_n with cycles ZnZ_n, boundaries BnB_n and homology HnH_n. Rank–nullity for ∂n:Cn→Cn−1\partial_n : C_n \to C_{n-1} gives dim⁡Cn=dim⁡Zn+dim⁡Bn−1\dim C_n = \dim Z_n + \dim B_{n-1}, and dim⁡Hn=dim⁡Zn−dim⁡Bn\dim H_n = \dim Z_n - \dim B_n. Hence

∑n(−1)ndim⁡Cn=∑n(−1)n(dim⁡Hn+dim⁡Bn+dim⁡Bn−1)=∑n(−1)ndim⁡Hn,\sum_n (-1)^n \dim C_n = \sum_n (-1)^n \big( \dim H_n + \dim B_n + \dim B_{n-1} \big) = \sum_n (-1)^n \dim H_n ,

because the terms dim⁡Bn\dim B_n cancel in the telescoping sum.

∎

So V−E+F=2V - E + F = 2 for every cell decomposition of S2S^2 (Euler's polyhedron formula), χ(Mg)=2−2g\chi(M_g) = 2 - 2g, χ(Nh)=2−h\chi(N_h) = 2 - h, χ(RPn)=1\chi(\R P^n) = 1 or 00 as nn is even or odd, and χ(CPn)=n+1\chi(\C P^n) = n + 1.

ProofH

Cohomology and cup products

Dualising gives more structure. For a commutative ring RR, the singular cochains are Cn(X;R)=Hom⁡(Cn(X),R)C^n(X; R) = \operatorname{Hom}(C_n(X), R) with δφ=φ∘∂\delta \varphi = \varphi \circ \partial, and singular cohomology Hn(X;R)H^n(X; R) is their cohomology. It is contravariant: f:X→Yf : X \to Y induces f∗:Hn(Y;R)→Hn(X;R)f^* : H^n(Y; R) \to H^n(X; R). By the universal coefficient theorem, Hn(X;Z)≅Hom⁡(Hn(X),Z)⊕Ext⁡(Hn−1(X),Z)H^n(X; \Z) \cong \operatorname{Hom}(H_n(X), \Z) \oplus \operatorname{Ext}(H_{n-1}(X), \Z), so the cohomology groups carry no new information. The new information is a product.

Definition— cup product

For φ∈Ck(X;R)\varphi \in C^k(X; R) and ψ∈Cl(X;R)\psi \in C^l(X; R), define φ⌣ψ∈Ck+l(X;R)\varphi \smile \psi \in C^{k+l}(X; R) by evaluating on the front kk-face and the back ll-face:

(φ⌣ψ)(σ)=φ(σ∣[v0,…,vk]) ψ(σ∣[vk,…,vk+l]).(\varphi \smile \psi)(\sigma) = \varphi\big(\sigma|_{[v_0, \dots, v_k]}\big)\, \psi\big(\sigma|_{[v_k, \dots, v_{k+l}]}\big).

It satisfies δ(φ⌣ψ)=δφ⌣ψ+(−1)kφ⌣δψ\delta(\varphi \smile \psi) = \delta\varphi \smile \psi + (-1)^k \varphi \smile \delta\psi, so it descends to cohomology, making H∙(X;R)=⨁nHn(X;R)H^\bullet(X; R) = \bigoplus_n H^n(X; R) a ring with unit. This ring is graded commutative (α⌣β=(−1)klβ⌣α\alpha \smile \beta = (-1)^{kl} \beta \smile \alpha) and natural (f∗(α⌣β)=f∗α⌣f∗βf^*(\alpha \smile \beta) = f^*\alpha \smile f^*\beta).

The standard computations (Hatcher, §3.2): H∙(T2;Z)H^\bullet(T^2; \Z) is the exterior algebra on two classes α,β\alpha, \beta of degree 11, with α⌣β\alpha \smile \beta generating H2H^2; H∙(CPn;Z)≅Z[x]/(xn+1)H^\bullet(\C P^n; \Z) \cong \Z[x]/(x^{n+1}) with ∣x∣=2|x| = 2; H∙(RPn;Z/2)≅Z/2[a]/(an+1)H^\bullet(\R P^n; \Z/2) \cong \Z/2[a]/(a^{n+1}) with ∣a∣=1|a| = 1. For a wedge sum, H~∙(X∨Y)≅H~∙(X)×H~∙(Y)\tilde H^\bullet(X \vee Y) \cong \tilde H^\bullet(X) \times \tilde H^\bullet(Y) as rings: the restrictions to the two summands identify the cohomology, and products of a class from XX with a class from YY vanish.

Theorem— Theorem 11 (cup products see more than homology)

CP2\C P^2 and S2∨S4S^2 \vee S^4 have isomorphic homology and cohomology groups, but they are not homotopy equivalent.

Proof

Both have H0≅H2≅H4≅ZH^0 \cong H^2 \cong H^4 \cong \Z and all other groups zero (CP2=e0∪e2∪e4\C P^2 = e^0 \cup e^2 \cup e^4, and S2∨S4=e0∪e2∪e4S^2 \vee S^4 = e^0 \cup e^2 \cup e^4 with the 44-cell attached by a constant map). In CP2\C P^2 a generator x∈H2x \in H^2 has x⌣xx \smile x generating H4H^4 (by the ring computation above, which rests on Poincaré duality). In S2∨S4S^2 \vee S^4, let u∈H2u \in H^2 and let j:S4→S2∨S4j : S^4 \to S^2 \vee S^4 be the inclusion; j∗:H4(S2∨S4)→H4(S4)j^* : H^4(S^2 \vee S^4) \to H^4(S^4) is an isomorphism, and j∗(u⌣u)=j∗u⌣j∗u=0j^*(u \smile u) = j^* u \smile j^* u = 0 because j∗u∈H2(S4)=0j^* u \in H^2(S^4) = 0. So every square of a degree-22 class vanishes. A homotopy equivalence would induce a ring isomorphism H∙(CP2)≅H∙(S2∨S4)H^\bullet(\C P^2) \cong H^\bullet(S^2 \vee S^4), which would preserve "the square of a generator of H2H^2 generates H4H^4". Contradiction.

∎

The same argument shows that T2T^2 is not homotopy equivalent to S1∨S1∨S2S^1 \vee S^1 \vee S^2, although their homology groups agree. Geometrically, x⌣x≠0x \smile x \neq 0 in CP2\C P^2 because two projective lines meet in a point; in T2T^2, α⌣β≠0\alpha \smile \beta \neq 0 because a meridian and a longitude meet once.

ExplanationH

The Lefschetz fixed-point theorem

Brouwer's theorem is the first case of a general principle: a global algebraic count forces fixed points.

Theorem— Theorem 12 (Lefschetz, 1926; Hopf)

Let XX be a compact triangulable space (or a retract of a finite simplicial complex) and f:X→Xf : X \to X continuous. Its Lefschetz number is L(f)=∑k(−1)ktr⁡(f∗:Hk(X;Q)→Hk(X;Q))L(f) = \sum_k (-1)^k \operatorname{tr}\big(f_* : H_k(X; \Q) \to H_k(X; \Q)\big). If L(f)≠0L(f) \neq 0, then ff has a fixed point.

The proof (Hatcher, Theorem 2C.3) uses simplicial approximation: if ff had no fixed point, a fine subdivision would give a simplicial approximation moving every simplex off itself, so the traces on the chain level would be zero, and the Hopf trace formula — the trace version of Theorem 10 — shows that the alternating sum of traces on chains equals L(f)L(f).

Examples. If XX is contractible then L(f)=1L(f) = 1 for every ff: Brouwer again. For f:Sn→Snf : S^n \to S^n of degree dd, L(f)=1+(−1)ndL(f) = 1 + (-1)^n d, so every map of degree d≠(−1)n+1d \neq (-1)^{n+1} has a fixed point — and the antipodal map, of degree exactly (−1)n+1(-1)^{n+1}, has none. For idX\mathrm{id}_X we get L=χ(X)L = \chi(X). So if a closed manifold MM carries a nowhere-vanishing vector field, its flow φt\varphi_t for small t>0t > 0 is homotopic to the identity and has no fixed points (by compactness, periodic orbits have periods bounded below), and therefore χ(M)=L(φt)=0\chi(M) = L(\varphi_t) = 0. For a map of CP2\C P^2 with f∗x=mxf^* x = m x, naturality of the cup product forces f∗(x2)=m2x2f^*(x^2) = m^2 x^2, so L(f)=1+m+m2≠0L(f) = 1 + m + m^2 \neq 0: every self-map of CP2\C P^2 has a fixed point.

Formal mathematicsF

Homological algebra in Lean

The algebraic heart of the lesson is proved from first principles with a small, self-contained notion of chain complex of abelian groups. (Mathlib's general notion is ChainComplex V ℕ for an arbitrary preadditive category V; ours keeps every element visible.)

ChainCxLean 4Formally verified
/-- A chain complex of abelian groups, graded by `ℕ`: groups `C n` and boundary maps
`d n : C (n + 1) → C n` with `d ∘ d = 0`. (Mathlib's general notion is `ChainComplex V ℕ` for
any preadditive category `V`; this small version keeps every element visible.) -/
structure ChainCx where
  /-- The group of `n`-chains. -/
  C : ℕ → Type
  /-- Each `C n` is an abelian group. -/
  [grp : ∀ n, AddCommGroup (C n)]
  /-- The boundary map from `(n + 1)`-chains to `n`-chains. -/
  d : ∀ n, C (n + 1) →+ C n
  /-- The boundary of a boundary is zero. -/
  d_d : ∀ n (x : C (n + 2)), d n (d (n + 1) x) = 0
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
IsCycleLean 4Formally verified
/-- An `n`-chain is a **cycle** if its boundary vanishes. Every `0`-chain is a cycle. -/
def IsCycle (K : ChainCx) : ∀ n, K.C n → Prop
  | 0, _ => True
  | n + 1, z => K.d n z = 0
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
IsBoundaryLean 4Formally verified
/-- An `n`-chain is a **boundary** if it is `d` of some `(n + 1)`-chain. Homology is
"cycles modulo boundaries". -/
def IsBoundary (K : ChainCx) (n : ℕ) (z : K.C n) : Prop :=
  ∃ y : K.C (n + 1), K.d n y = z
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
boundary_isCycleLean 4Proved here from basic factsFormally verified
/-- Every boundary is a cycle: this is exactly `d ∘ d = 0`, and it is what makes
"cycles modulo boundaries" meaningful. -/
theorem boundary_isCycle (K : ChainCx) (n : ℕ) (z : K.C n) (hz : IsBoundary K n z) :
    IsCycle K n z := by
  obtain ⟨y, rfl⟩ := hz
  cases n with
  | zero => trivial
  | succ n => exact K.d_d n y
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

Chain maps preserve boundaries, which is what makes f∗f_* well defined on homology, and Lemma 2 is proved with a calc block that mirrors the one-line human proof: f(z)−g(z)=∂h(z)+h(∂z)=∂h(z)f(z) - g(z) = \partial h(z) + h(\partial z) = \partial h(z).

ChainMapLean 4Formally verified
/-- A **chain map** `f : K → L` is a family of homomorphisms commuting with the boundary maps.
Continuous maps of spaces induce chain maps on singular chains. -/
structure ChainMap (K L : ChainCx) where
  /-- The component in degree `n`. -/
  f : ∀ n, K.C n →+ L.C n
  /-- `d ∘ f = f ∘ d`. -/
  comm : ∀ n (x : K.C (n + 1)), L.d n (f (n + 1) x) = f n (K.d n x)
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
chainMap_boundaryLean 4Proved here from basic factsFormally verified
/-- A chain map sends boundaries to boundaries (`f (d y) = d (f y)`), so it induces a
homomorphism on homology. -/
theorem chainMap_boundary {K L : ChainCx} (φ : ChainMap K L) (n : ℕ) (z : K.C n)
    (hz : IsBoundary K n z) : IsBoundary L n (φ.f n z) := by
  obtain ⟨y, rfl⟩ := hz
  exact ⟨φ.f (n + 1) y, φ.comm n y⟩
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
ChainHomotopyLean 4Formally verified
/-- A **chain homotopy** between chain maps `f, g : K → L` is a family `h n : K.C n → L.C (n+1)`
with `f - g = d h + h d` (in degree `0`, simply `f - g = d h`). The prism operator of the lesson
is a chain homotopy between the maps induced by homotopic continuous maps. -/
structure ChainHomotopy {K L : ChainCx} (φ ψ : ChainMap K L) where
  /-- The homotopy operator, raising degree by one. -/
  h : ∀ n, K.C n →+ L.C (n + 1)
  /-- `f - g = d h` in degree `0`. -/
  zero : ∀ x : K.C 0, φ.f 0 x - ψ.f 0 x = L.d 0 (h 0 x)
  /-- `f - g = d h + h d` in degree `n + 1`. -/
  succ : ∀ n (x : K.C (n + 1)),
    φ.f (n + 1) x - ψ.f (n + 1) x = L.d (n + 1) (h (n + 1) x) + h n (K.d n x)
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
homotopic_maps_agree_on_homologyLean 4Proved here from basic factsFormally verified
/-- **Chain-homotopic maps induce the same map on homology.** If `z` is a cycle then
`f z - g z = d (h z) + h (d z) = d (h z)` is a boundary, so `f z` and `g z` have the same
homology class. This is the algebraic half of the homotopy invariance of homology. -/
theorem homotopic_maps_agree_on_homology {K L : ChainCx} {φ ψ : ChainMap K L}
    (H : ChainHomotopy φ ψ) (n : ℕ) (z : K.C n) (hz : IsCycle K n z) :
    IsBoundary L n (φ.f n z - ψ.f n z) := by
  cases n with
  | zero => exact ⟨H.h 0 z, (H.zero z).symm⟩
  | succ n =>
    refine ⟨H.h (n + 1) z, ?_⟩
    have hdz : K.d n z = 0 := hz
    calc L.d (n + 1) (H.h (n + 1) z)
        = L.d (n + 1) (H.h (n + 1) z) + H.h n (K.d n z) := by rw [hdz, map_zero, add_zero]
      _ = φ.f (n + 1) z - ψ.f (n + 1) z := (H.succ n z).symm
Axioms used: propextformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

Theorem 10 for a two-dimensional complex of vector spaces — for instance the cellular chains of a surface over Q\Q or Z/2\Z/2 — is the rank–nullity argument of the proof, with the homology groups written explicitly as quotients. It is the formal content of "V−E+F=b0−b1+b2V - E + F = b_0 - b_1 + b_2".

euler_poincareLean 4Proved here from basic factsFormally verified
/-- **The Euler–Poincaré formula** for a complex `C₂ → C₁ → C₀` of finite-dimensional vector
spaces over a field `K` (for example the cellular chains of a surface with coefficients in `ℚ`
or `ℤ/2`): the alternating sum of the dimensions of the homology groups
`H₀ = C₀ / im d₁`, `H₁ = ker d₁ / im d₂`, `H₂ = ker d₂` equals the alternating sum of the
dimensions of the chain groups — `b₀ - b₁ + b₂ = V - E + F`. The proof is rank–nullity twice. -/
theorem euler_poincare {K : Type*} [Field K] {C₀ C₁ C₂ : Type*}
    [AddCommGroup C₀] [Module K C₀] [FiniteDimensional K C₀]
    [AddCommGroup C₁] [Module K C₁] [FiniteDimensional K C₁]
    [AddCommGroup C₂] [Module K C₂] [FiniteDimensional K C₂]
    (d₁ : C₁ →ₗ[K] C₀) (d₂ : C₂ →ₗ[K] C₁) (hd : d₁ ∘ₗ d₂ = 0) :
    (finrank K (C₀ ⧸ LinearMap.range d₁) : ℤ)
      - finrank K (LinearMap.ker d₁ ⧸ (LinearMap.range d₂).comap (LinearMap.ker d₁).subtype)
      + finrank K (LinearMap.ker d₂)
      = finrank K C₀ - finrank K C₁ + finrank K C₂ := by
  -- `im d₂ ⊆ ker d₁` because `d₁ ∘ d₂ = 0`.
  have hle : LinearMap.range d₂ ≤ LinearMap.ker d₁ := by
    rintro _ ⟨y, rfl⟩
    simpa using LinearMap.congr_fun hd y
  -- dimensions of the quotients
  have h₀ := (LinearMap.range d₁).finrank_quotient_add_finrank
  have h₁ := ((LinearMap.range d₂).comap (LinearMap.ker d₁).subtype).finrank_quotient_add_finrank
  -- inside `ker d₁`, the boundaries are a copy of `im d₂`
  have hB : finrank K ((LinearMap.range d₂).comap (LinearMap.ker d₁).subtype)
      = finrank K (LinearMap.range d₂) :=
    (Submodule.comapSubtypeEquivOfLe hle).finrank_eq
  -- rank–nullity for `d₁` and `d₂`
  have r₁ := LinearMap.finrank_range_add_finrank_ker d₁
  have r₂ := LinearMap.finrank_range_add_finrank_ker d₂
  omega
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

The cellular chain complex of RP2\R P^2 is Z→2Z→0Z\Z \xrightarrow{2} \Z \xrightarrow{0} \Z. The next two declarations compute what happens to it with integer and with Z/2\Z/2 coefficients, and identify H1(RP2)=Z/2ZH_1(\R P^2) = \Z / 2\Z with Z/2\Z/2 using Mathlib:

rp2_cellularLean 4Proved here from basic factsFormally verified
/-- The cellular chain complex of `ℝP²` is `ℤ --(×2)--> ℤ --(×0)--> ℤ`. With integer
coefficients the top differential `×2` is injective, so `H₂(ℝP²; ℤ) = 0`; with coefficients in
`ℤ/2` it is the zero map, so `H₂(ℝP²; ℤ/2) ≅ ℤ/2`. Homology depends on the coefficients. -/
theorem rp2_cellular :
    (∀ x : ℤ, 2 * x = 0 → x = 0) ∧ (∀ x : ZMod 2, 2 * x = 0) := by
  refine ⟨fun x hx => by omega, ?_⟩
  decide
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
rp2_h1Lean 4Applies a library theoremFormally verified
/-- `H₁(ℝP²; ℤ) = ker(×0) / im(×2) = ℤ / 2ℤ ≅ ℤ/2`: a homology group with torsion. This applies
Mathlib's `Int.quotientZMultiplesNatEquivZMod`. -/
theorem rp2_h1 : Nonempty ((ℤ ⧸ AddSubgroup.zmultiples (2 : ℤ)) ≃+ ZMod 2) :=
  ⟨Int.quotientZMultiplesNatEquivZMod 2⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

The functoriality step of Corollary 8 holds for any functor into a category with zero morphisms, and is proved in that generality:

no_retractionLean 4Proved here from basic factsFormally verified
/-- **The no-retraction principle.** Let `F` be any functor (for instance reduced homology
`H̃ₙ₋₁`). If `i : A → X` has a retraction `r` (`r ∘ i = id`) and `F X` is a zero object, then
`F A` is a zero object too: `id = F r ∘ F i` factors through `F X = 0`. Applied to
`A = Sⁿ⁻¹ ⊂ X = Dⁿ`, where `H̃ₙ₋₁(Dⁿ) = 0` but `H̃ₙ₋₁(Sⁿ⁻¹) ≅ ℤ`, it shows that the sphere is not
a retract of the disc — the heart of the Brouwer fixed-point theorem. -/
theorem no_retraction {C D : Type*} [Category C] [Category D] [HasZeroMorphisms D]
    (F : C ⥤ D) {A X : C} (i : A ⟶ X) (r : X ⟶ A) (hri : i ≫ r = 𝟙 A)
    (hX : IsZero (F.obj X)) : IsZero (F.obj A) := by
  rw [IsZero.iff_id_eq_zero]
  calc 𝟙 (F.obj A) = F.map (i ≫ r) := by rw [hri, F.map_id]
    _ = F.map i ≫ F.map r := F.map_comp i r
    _ = 0 ≫ F.map r := by rw [hX.eq_of_tgt (F.map i) 0]
    _ = 0 := zero_comp
Axioms used: propext, Classical.choiceformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

Mathlib already contains the topological foundations. Lemma 1 holds for the alternating face map complex of any simplicial object — singular chains are the case of the singular simplicial set — and Theorem 3 is a recent addition to Mathlib (by Joël Riou and Fabian Odermatt), built on homotopy invariance for simplicial sets:

d_squaredLean 4Applies a library theoremFormally verified
/-- **`∂ ∘ ∂ = 0`.** For every simplicial object `X` in a preadditive category (for example the
singular simplicial set of a space, made into simplicial abelian groups), the alternating sum
`∂ = Σᵢ (-1)ⁱ dᵢ` of the face maps squares to zero. This applies Mathlib's
`AlgebraicTopology.AlternatingFaceMapComplex.d_squared`, whose proof cancels the double sum in
pairs using the simplicial identities, exactly as in the lesson. -/
theorem d_squared {V : Type*} [Category V] [Preadditive V] (X : SimplicialObject V) (n : ℕ) :
    _root_.AlgebraicTopology.AlternatingFaceMapComplex.objD X (n + 1) ≫
      _root_.AlgebraicTopology.AlternatingFaceMapComplex.objD X n = 0 :=
  _root_.AlgebraicTopology.AlternatingFaceMapComplex.d_squared X n
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor
homotopy_invarianceLean 4Applies a library theoremFormally verified
/-- **Homotopy invariance of singular homology.** Homotopic continuous maps `f ≃ g : X → Y`
induce the same homomorphism `Hₙ(X; R) → Hₙ(Y; R)` for every `n` and every coefficient object
`R` (e.g. `ℤ` as an abelian group). This applies Mathlib's
`TopCat.Homotopy.congr_homologyMap_singularChainComplexFunctor` (Riou–Odermatt), which builds a
chain homotopy between the induced maps of singular chain complexes. -/
theorem homotopy_invariance {V : Type*} [Category V] [Preadditive V] [HasCoproducts V]
    [CategoryWithHomology V] {X Y : TopCat} {f g : X ⟶ Y} (H : TopCat.Homotopy f g) (R : V)
    (n : ℕ) :
    HomologicalComplex.homologyMap
        (((_root_.AlgebraicTopology.singularChainComplexFunctor V).obj R).map f) n =
      HomologicalComplex.homologyMap
        (((_root_.AlgebraicTopology.singularChainComplexFunctor V).obj R).map g) n :=
  H.congr_homologyMap_singularChainComplexFunctor R n
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AlgebraicTopology.leanTry it in the Lean web editor

What is and is not formalised. Formalised independently: boundaries are cycles, chain maps induce maps on homology, Lemma 2, Theorem 10 in dimension two, the cellular computation for RP2\R P^2, and the functorial no-retraction argument. From Mathlib: Lemma 1 and Theorem 3 for singular homology. Not formalised: Mayer–Vietoris, excision and the computation H~n(Sn)≅Z\tilde H_n(S^n) \cong \Z (not yet in Mathlib for singular homology), so Corollaries 7 and 8 are not formalised end to end; cellular homology of CW complexes; cup products; and the Lefschetz theorem.

ComputationC

Computing homology by machine

Homology of a finite simplicial complex is linear algebra over Z\Z: write down the boundary matrices and put them in Smith normal form. The ranks give the Betti numbers and the diagonal entries larger than 11 give the torsion. The experiment does this for explicit triangulations of four surfaces, over Z\Z and over Z/2\Z/2, and checks Theorem 10 in each case.

Homology of the sphere, torus, Klein bottle and projective planePythonExact computationComputationally tested
"""Simplicial homology of four surfaces, computed exactly over the integers.

For a triangulated surface we build the boundary matrices d1 (edges to
vertices) and d2 (triangles to edges) with the usual signs, put them in Smith
normal form over Z, and read off H_n = Z^(b_n) + torsion. We also compute the
Betti numbers with coefficients in Z/2 and check the Euler-Poincare formula
V - E + F = b0 - b1 + b2. This is exact computation for these particular
triangulations; that the answers do not depend on the triangulation is a
theorem (homotopy invariance of homology), not something the computation shows.
"""

from itertools import combinations

def grid_surface(twist):
    """Triangulate a 3x3 grid of squares with opposite sides glued.

    twist=False gives the torus; twist=True glues top to bottom with a flip,
    giving the Klein bottle. Returns a list of triangles (sorted vertex tuples).
    """
    def label(a, b):
        if b % 3 == 0 and b != 0 and twist:
            a = -a
        return (a % 3) * 3 + (b % 3)
    triangles = []
    for i in range(3):
        for j in range(3):
            p, q = label(i, j), label(i + 1, j)
            r, s = label(i + 1, j + 1), label(i, j + 1)
            triangles += [tuple(sorted((p, q, r))), tuple(sorted((p, s, r)))]
    return triangles

SURFACES = {
    "sphere S^2": [tuple(t) for t in combinations(range(4), 3)],
    "torus T^2": grid_surface(False),
    "Klein bottle": grid_surface(True),
    "proj. plane RP^2": [
        (0, 1, 2), (0, 2, 3), (0, 3, 4), (0, 4, 5), (0, 1, 5),
        (1, 2, 4), (2, 3, 5), (1, 3, 4), (2, 4, 5), (1, 3, 5),
    ],
}

def boundary_matrices(triangles):
    """Return (vertices, edges, d1, d2) with integer matrices as lists of rows."""
    edges = sorted({e for t in triangles for e in combinations(t, 2)})
    verts = sorted({v for t in triangles for v in t})
    vi = {v: k for k, v in enumerate(verts)}
    ei = {e: k for k, e in enumerate(edges)}
    d1 = [[0] * len(edges) for _ in verts]
    for k, (a, b) in enumerate(edges):
        d1[vi[b]][k] += 1
        d1[vi[a]][k] -= 1
    d2 = [[0] * len(triangles) for _ in edges]
    for k, (a, b, c) in enumerate(triangles):
        for sign, face in ((1, (b, c)), (-1, (a, c)), (1, (a, b))):
            d2[ei[face]][k] += sign
    return verts, edges, d1, d2

def smith_diagonal(matrix):
    """Nonzero diagonal entries of the Smith normal form of an integer matrix."""
    m = [row[:] for row in matrix]
    diag = []
    while m and m[0]:
        entries = [(abs(x), i, j) for i, row in enumerate(m)
                   for j, x in enumerate(row) if x]
        if not entries:
            break
        _, i, j = min(entries)
        m[0], m[i] = m[i], m[0]
        for row in m:
            row[0], row[j] = row[j], row[0]
        done = False
        while not done:
            done = True
            p = m[0][0]
            for i in range(1, len(m)):
                q = m[i][0] // p
                m[i] = [x - q * y for x, y in zip(m[i], m[0])]
            for j in range(1, len(m[0])):
                q = m[0][j] // p
                for row in m:
                    row[j] -= q * row[0]
            rest = [(abs(x), i, j) for i, row in enumerate(m)
                    for j, x in enumerate(row)
                    if x and (i == 0 or j == 0) and (i, j) != (0, 0)]
            if rest:
                _, i, j = min(rest)
                if i:
                    m[0], m[i] = m[i], m[0]
                else:
                    for row in m:
                        row[0], row[j] = row[j], row[0]
                done = False
            elif any(x % p for row in m[1:] for x in row[1:]):
                i = next(i for i, row in enumerate(m)
                         if i and any(x % p for x in row[1:]))
                m[0] = [x + y for x, y in zip(m[0], m[i])]
                done = False
        diag.append(abs(m[0][0]))
        m = [row[1:] for row in m[1:]]
    return diag

def rank_mod2(matrix):
    """Rank of an integer matrix reduced modulo 2 (Gaussian elimination)."""
    rows = [sum(1 << j for j, x in enumerate(r) if x % 2) for r in matrix]
    rank = 0
    for bit in range(max((r.bit_length() for r in rows), default=0)):
        pivot = next((r for r in rows if r >> bit & 1), None)
        if pivot is None:
            continue
        rows = [r ^ pivot if r >> bit & 1 else r for r in rows if r != pivot]
        rank += 1
    return rank

def homology(triangles):
    """Return (betti over Z, torsion of H_1, betti over Z/2, (V, E, F))."""
    verts, edges, d1, d2 = boundary_matrices(triangles)
    s1, s2 = smith_diagonal(d1), smith_diagonal(d2)
    nv, ne, nf = len(verts), len(edges), len(triangles)
    betti = (nv - len(s1), ne - len(s1) - len(s2), nf - len(s2))
    torsion = [d for d in s2 if d > 1]
    r1, r2 = rank_mod2(d1), rank_mod2(d2)
    betti2 = (nv - r1, ne - r1 - r2, nf - r2)
    return betti, torsion, betti2, (nv, ne, nf)

def describe(betti, torsion):
    """Human-readable H_0, H_1, H_2 such as 'Z | Z+Z/2 | 0'."""
    def group(rank, tors):
        parts = (["Z^%d" % rank] if rank > 1 else ["Z"] * rank)
        parts += ["Z/%d" % t for t in tors]
        return "+".join(parts) or "0"
    return " | ".join([group(betti[0], []), group(betti[1], torsion),
                       group(betti[2], [])])

def main():
    print("Simplicial homology over Z (exact, via Smith normal form)")
    print()
    print(f"{'surface':<18}{'V,E,F':<12}{'H0 | H1 | H2':<20}"
          f"{'b mod 2':<10}chi")
    for name, tris in SURFACES.items():
        betti, torsion, betti2, (v, e, f) = homology(tris)
        chi = v - e + f
        assert chi == betti[0] - betti[1] + betti[2]
        assert chi == betti2[0] - betti2[1] + betti2[2]
        print(f"{name:<18}{f'{v},{e},{f}':<12}{describe(betti, torsion):<20}"
              f"{','.join(map(str, betti2)):<10}{chi}")
    print()
    print("In every row V - E + F equals the alternating sum of the Betti")
    print("numbers, over Z and over Z/2 alike, although the Z/2 Betti numbers")
    print("of RP^2 and the Klein bottle differ from the integral ones: torsion")
    print("Z/2 in H_1 becomes an extra Z/2 in both H_1 and H_2 mod 2.")
    print()
    print("Epistemic status: exact integer linear algebra on four explicit")
    print("triangulations. That homology is independent of the triangulation")
    print("(indeed a homotopy invariant) is a theorem discussed in the lesson,")
    print("not something this computation establishes.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The Z/2\Z/2 Betti numbers of RP2\R P^2 and the Klein bottle are larger than the integral ones — torsion Z/2\Z/2 in H1H_1 shows up twice mod 22, as the universal coefficient theorem predicts — yet the Euler characteristic is the same. The computation is exact, but only for these triangulations; that the answer does not depend on the triangulation is Theorem 3.

The second experiment tests the Lefschetz theorem on maps of the torus x↦Ax(modZ2)x \mapsto Ax \pmod{\Z^2} for integer matrices AA. Since f∗f_* is 11, AA and det⁡A\det A on H0,H1,H2H_0, H_1, H_2, the Lefschetz number is 1−tr⁡A+det⁡A=det⁡(I−A)1 - \operatorname{tr} A + \det A = \det(I - A), and the fixed points can be counted exactly.

Lefschetz numbers and fixed points of maps of the torusPythonExact computationExhaustive finite checkComputationally tested
"""The Lefschetz fixed-point theorem on the torus, checked by exact counting.

A 2x2 integer matrix A induces a map f(x) = A x (mod 1) of the torus
T^2 = R^2/Z^2. On homology it acts by 1 on H_0, by A on H_1 and by det A on
H_2, so its Lefschetz number is L(f) = 1 - tr A + det A = det(I - A). We count
the fixed points exactly with fractions: x is fixed when (A - I) x is an
integer vector, and all such x lie on the grid (1/d) Z^2 with d = |det(A - I)|.
Exact enumeration for a handful of matrices; the general theorem is proved by
other means.
"""

from fractions import Fraction

MATRICES = {
    "rotation by 90 deg": ((0, -1), (1, 0)),
    "x -> -x": ((-1, 0), (0, -1)),
    "cat map": ((2, 1), (1, 1)),
    "doubling": ((2, 0), (0, 2)),
    "A = [[3,1],[1,0]]": ((3, 1), (1, 0)),
    "shear [[1,1],[0,1]]": ((1, 1), (0, 1)),
}

def lefschetz_number(a):
    """L(f) = sum (-1)^k tr(f_* on H_k) = 1 - tr A + det A."""
    (p, q), (r, s) = a
    return 1 - (p + s) + (p * s - q * r)

def fixed_points(a):
    """Exact fixed points of x -> A x (mod 1) in [0,1)^2, or None if infinite."""
    (p, q), (r, s) = a
    m = ((p - 1, q), (r, s - 1))
    d = abs(m[0][0] * m[1][1] - m[0][1] * m[1][0])
    if d == 0:
        return None
    points = []
    for i in range(d):
        for j in range(d):
            x, y = Fraction(i, d), Fraction(j, d)
            u = m[0][0] * x + m[0][1] * y
            v = m[1][0] * x + m[1][1] * y
            if u.denominator == 1 and v.denominator == 1:
                points.append((x, y))
    return points

def show(point):
    """Format a point with fractional coordinates."""
    return "(" + ", ".join(str(c) for c in point) + ")"

def main():
    print("Maps x -> A x (mod 1) of the torus: Lefschetz number vs fixed points")
    print()
    print(f"{'map':<22}{'L = det(I-A)':<14}{'#fixed':<8}fixed points")
    for name, a in MATRICES.items():
        lef = lefschetz_number(a)
        pts = fixed_points(a)
        if pts is None:
            print(f"{name:<22}{lef:<14}{'inf':<8}a whole circle (L = 0)")
            continue
        shown = " ".join(show(p) for p in pts[:3])
        if len(pts) > 3:
            shown += " ..."
        print(f"{name:<22}{lef:<14}{len(pts):<8}{shown}")
    print()
    print("Whenever L is nonzero, the number of fixed points is |L|: every fixed")
    print("point of a linear map has index sign det(I - A). A translation by a")
    print("small vector is homotopic to the identity, has L = 0 and no fixed")
    print("points at all: L = 0 gives no information.")
    print()
    print("Epistemic status: exact rational arithmetic, exhaustive over the")
    print("grid (1/d)Z^2 that must contain every fixed point, for six matrices.")
    print("It illustrates the Lefschetz fixed-point theorem; the theorem itself")
    print("is proved with simplicial approximation and homology.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Explore

Explore: cells, gluings and the Euler characteristic

In the Surfaces and genus tab, refine a cell structure with the three moves (split an edge, cut a face, add a vertex). The numbers VV, EE, FF change, but V−E+FV - E + F never does — the elementary shadow of Theorem 10, which explains why: χ\chi is computed from homology, which does not see the cell structure at all.

Vertices, edges and faces

χ = V − E + F does not depend on how the surface is cut into cells.

Every closed surface with two sides (an inside and an outside) is, up to stretching, a sphere with some number g of handles. That number g is its genus.

genus g = 1

χ = 2 − 2g = 2 − 2·1 = 0

Each extra handle lowers χ by 2.

One way to cut it into flat faces is the solid “Picture frame (one hole)”: V = 16, E = 32, F = 16

Cut it up differently

Make the faces finer. Watch V, E and F change.

V − E + F = 16 − 32 + 16 = 0

Each move changes V, E and F, but not V − E + F.

χ is a topological invariant: it depends only on the surface, not on how you cut it into faces (as long as each face is a disc and faces meet edge to edge).

These examples and moves are evidence, not a proof. Proving that every way of cutting the same surface into faces gives the same χ takes more work — for example, showing that any two ways of cutting it have a common refinement, or using homology.

The formula χ = 2 − 2g is for closed surfaces with two sides. One-sided surfaces such as the Klein bottle (χ = 0) and the projective plane (χ = 1) need a different formula.

The next widget shows the gluing words used in the cellular computations. Walk the flatlander around the Klein bottle (aba−1ba b a^{-1} b) and the projective plane (ababa b a b) and watch it come back mirror-reversed. Count, for each word, the exponent sum of each letter: that is the cellular boundary d2(e2)d_2(e^2), and a non-zero exponent sum is exactly where the torsion in H1H_1 comes from.

Surfaces from a square

The torus word has exponent sums 0, 0; the Klein bottle 0, 2; the projective plane 2, 2.

abab

Keys: ↑ forward, ↓ back, ← and → turn, Space walks or stops. You can also drag it.

Klein bottlea b a⁻¹ b
Orientable
No
Euler characteristic
χ = 0

Gluing turns the 4 corners into V = 1, the 4 sides into E = 2 and the square into F = 1: V − E + F = 1 − 2 + 1 = 0

Same way round as at the start.

Sides crossed so far: 0

Top and bottom are glued as on the torus, but the left and right sides are glued with opposite arrows. Walk through them and you come back mirrored. A surface on which a walk can mirror you is called non-orientable. The Klein bottle cannot sit in ordinary 3D space without passing through itself.

Exercises

Exercises

1. Algebraic topology

Warm-upHuman

What is the rank of H1(M3)H_1(M_3), where M3M_3 is the closed orientable surface of genus 33?

2. Algebraic topology

CoreHuman

Which list gives H0,H1,H2,H3H_0, H_1, H_2, H_3 of RP3\R P^3 (integer coefficients)?

Choose one

3. Algebraic topology

CoreHuman

We try to compute H∙(Sn)H_\bullet(S^n) with Mayer–Vietoris using the two closed hemispheres UU and VV. Which hypothesis of Theorem 5, as stated in the lesson, fails?

Choose one

4. Algebraic topology

CoreHuman

In the proof that Rm≇Rn\R^m \not\cong \R^n for m≠nm \neq n, why do we remove a point before taking homology?

Choose one

5. Algebraic topology

StretchHuman

For which pairs do the homology groups alone prove that the two spaces are not homotopy equivalent? (Select all that apply.)

Choose all that apply

6. Algebraic topology

CoreFormal

With H : ChainHomotopy φ ψ, which Lean statement correctly formalises chain-homotopic maps induce the same map on homology at the level of elements?

Choose one

7. Algebraic topology

StretchHuman

A map f:CP2→CP2f : \C P^2 \to \C P^2 satisfies f∗(x)=3xf^*(x) = 3x on H2(CP2;Z)=ZxH^2(\C P^2; \Z) = \Z x. What is its Lefschetz number L(f)L(f)?

8. Algebraic topology

CoreComputational

Write euler_characteristic(triangles) that takes a list of triangles (3-tuples of vertex labels) forming a 22-dimensional simplicial complex and returns V−E+FV - E + F, where VV counts distinct vertices, EE distinct edges (unordered pairs of vertices of a triangle) and FF triangles.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

Common misconceptions

Misconception

"Homology determines the homotopy type." It does not. CP2\C P^2 and S2∨S4S^2 \vee S^4 have the same homology but different cohomology rings (Theorem 11). More strikingly, Poincaré's homology sphere — the quotient of SO(3)SO(3) by the icosahedral group — has the homology of S3S^3 but a fundamental group of order 120120. Even a map inducing isomorphisms on all homology groups need not be a homotopy equivalence; Whitehead's theorem requires extra hypotheses such as simple connectivity (see homotopy theory).

Misconception

"Homology groups are the same as homotopy groups." Only in the first non-trivial degree, by the Hurewicz theorem. Homology vanishes above the dimension of a CW complex, but homotopy groups do not: H3(S2)=0H_3(S^2) = 0 while π3(S2)≅Z\pi_3(S^2) \cong \Z, and the groups πn+k(Sn)\pi_{n+k}(S^n) are known only in a limited range. Homology is computable precisely because it satisfies excision and Mayer–Vietoris, which homotopy groups do not.

Misconception

"H1H_1 is the fundamental group." H1H_1 is the abelianisation of π1\pi_1. For the figure eight, π1\pi_1 is free on two generators a,ba, b and aba−1b−1≠1aba^{-1}b^{-1} \neq 1, but in H1≅Z2H_1 \cong \Z^2 the commutator is zero.

Misconception

"Torsion in homology means non-orientable." For closed surfaces, torsion in H1H_1 occurs exactly for the non-orientable ones. But the lens spaces L(p,q)L(p, q) are orientable 33-manifolds with H1≅Z/pH_1 \cong \Z/p. Orientability of a closed connected nn-manifold is detected instead by Hn(M;Z)≅ZH_n(M; \Z) \cong \Z (orientable) versus 00 (non-orientable).

Misconception

"The Euler characteristic depends on the triangulation, and homology on the cells chosen." Both are invariants of the homotopy type (Theorems 3 and 10). This is the point of the definition: a quantity computed from a combinatorial structure turns out not to depend on it.

ViewpointsH

Viewpoints

Topology— A homotopy-invariant functor, characterised by axioms

Homology is a functor Hn:hTop→AbH_n : \mathbf{hTop} \to \mathbf{Ab} from the homotopy category, with long exact sequences of pairs and excision. Eilenberg and Steenrod showed that these properties, together with the dimension axiom Hn(pt)=0H_n(\mathrm{pt}) = 0 for n≠0n \neq 0, determine homology on finite CW complexes. Their consequences include the Jordan–Brouwer separation theorem (an embedded Sn−1⊂SnS^{n-1} \subset S^n has complement with exactly two components) and Brouwer's invariance of domain (an injective continuous map Rn→Rn\R^n \to \R^n is open), both via Alexander duality. Dropping the dimension axiom gives generalised homology theories such as K-theory and bordism — see stable homotopy theory.

Geometry— Duality and intersection

For a closed oriented nn-manifold MM, Poincaré duality Hk(M;Z)≅Hn−k(M;Z)H^k(M; \Z) \cong H_{n-k}(M; \Z) turns the cup product into intersection: if submanifolds AA, BB meet transversally, the Poincaré dual of A∩BA \cap B is the cup product of their duals. This is why x2x^2 generates H4(CP2)H^4(\C P^2) (two lines meet in a point) and why the intersection form on H2H_2 of a 44-manifold is a central invariant. The Euler characteristic is also geometric: by Gauss–Bonnet, ∫MK dA=2πχ(M)\int_M K \, dA = 2\pi \chi(M) for a closed surface, a theme continued in vector bundles and characteristic classes.

Analysis— Holes detected by differential forms

On a smooth manifold, the de Rham theorem identifies Hk(M;R)H^k(M; \R) with closed kk-forms modulo exact ones. On R2∖{0}\R^2 \setminus \{0\}, the form dθ=(x dy−y dx)/(x2+y2)d\theta = (x\,dy - y\,dx)/(x^2 + y^2) is closed but not exact, since ∮S1dθ=2π≠0\oint_{S^1} d\theta = 2\pi \neq 0; it represents the generator of H1H^1. Hodge theory goes further: on a compact Riemannian manifold every class has a unique harmonic representative, so the Betti numbers are dimensions of spaces of solutions of an elliptic PDE. See differential forms and smooth manifolds.

Algebra— Homological algebra

The chain complex is the real object; homology is its first invariant. Lemmas 1 and 2 and Theorem 4 belong to homological algebra, which grew out of topology and now runs through algebra: derived functors Tor⁡\operatorname{Tor} and Ext⁡\operatorname{Ext} measure how tensor products and Hom⁡\operatorname{Hom} fail to be exact, and appear in the Künneth and universal coefficient theorems; group cohomology is the cohomology of a K(G,1)K(G, 1). Emmy Noether's insistence on groups rather than Betti numbers is what made this possible. The modern frame is the derived category, where chain complexes are considered up to quasi-isomorphism — see derived categories.

Computation— Homology of data

Because homology of a finite complex is Smith normal form, it is algorithmic, and persistent homology applies it to data: build complexes from a point cloud at every scale and record when holes are born and die, producing a barcode that is stable under perturbation of the data (Cohen-Steiner, Edelsbrunner and Harer, 2007). On a graph, the Euler–Poincaré formula reads V−E=b0−b1V - E = b_0 - b_1, so the number of independent cycles is b1=E−V+b0b_1 = E - V + b_0 — the cyclomatic number used in circuit analysis and software engineering.

Physics— Kirchhoff's laws are homology

In an electrical network, currents form a 11-chain on the circuit graph. Kirchhoff's current law (1847) says that, without external sources, the current is a cycle: ∂I=0\partial I = 0. The voltage law says that voltage drops form a coboundary: they are differences of a potential, V=δϕV = \delta \phi. The space of steady currents therefore has dimension b1=E−V+1b_1 = E - V + 1 for a connected network, and Kirchhoff's own count of independent loops is an early computation of a Betti number. Hermann Weyl later (1923) made this connection with combinatorial topology explicit.

Category theory— Why category theory was invented

Eilenberg and Mac Lane introduced categories, functors and natural transformations in 1945 precisely to say what "natural" means for maps such as Hn(X)→Hn(X,A)H_n(X) \to H_n(X, A) and the universal coefficient isomorphisms. Homology is a functor; the connecting homomorphism δ\delta is a natural transformation; Theorem 3 says HnH_n factors through the homotopy category. See categories.

History & global context

History and global context

  • Polyhedra and surfaces. Leonhard Euler stated V−E+F=2V - E + F = 2 for polyhedra in 1750 and published proofs in 1758; René Descartes' unpublished notes (c. 1630) contain an equivalent statement about angular defects. Bernhard Riemann (1851, 1857) introduced the connectivity of surfaces in his work on what are now Riemann surfaces, and Enrico Betti (1871) defined higher connectivity numbers.
  • Analysis situs. Henri Poincaré's Analysis Situs (1895) and its five complements (1899–1904) created the subject: homology with integer coefficients, torsion, the fundamental group, the duality theorem that bears his name, and in 1904 the homology sphere showing that homology does not detect S3S^3.
  • Brouwer and Lefschetz. L. E. J. Brouwer proved the fixed-point theorem and the invariance of dimension and of domain in 1910–1912, introducing the degree of a map. Solomon Lefschetz proved his fixed-point theorem in 1926; Heinz Hopf extended it in 1928–29.
  • Groups, not numbers. In the mid-1920s Emmy Noether in Göttingen urged topologists to treat homology as groups; Pavel Alexandroff and Heinz Hopf credited her influence in their 1935 Topologie. Leopold Vietoris and Walther Mayer developed the Mayer–Vietoris sequence (1929–30).
  • Cohomology. James W. Alexander and Andrey Kolmogorov independently introduced cohomology and products at the 1935 Moscow topology conference; Eduard Čech and Hassler Whitney gave the cup product its modern form (1936–38). Lev Pontryagin's duality theorems were part of the same period.
  • Foundations. Samuel Eilenberg defined singular homology in its modern form (1944); Eilenberg and Saunders Mac Lane introduced category theory (1945); Eilenberg and Norman Steenrod axiomatised homology (1945, book 1952); J. H. C. Whitehead introduced CW complexes (1949).
  • Today. Algebraic topology is a working tool from algebraic geometry to robotics and data analysis; persistent homology, introduced by Herbert Edelsbrunner, David Letscher and Afra Zomorodian (2002) and developed by Gunnar Carlsson and others, is used in fields from materials science to neuroscience.
Further reading

Further reading

  • Allen Hatcher, Algebraic Topology (2002) — the standard first course; Chapter 2 (homology) and Chapter 3 (cohomology) cover this lesson, with the proofs sketched here in full.
  • James R. Munkres, Elements of Algebraic Topology (1984) — careful simplicial and singular homology, with many computations.
  • Glen E. Bredon, Topology and Geometry (1993) — homology and cohomology together with smooth manifolds and de Rham theory.
  • Raoul Bott and Loring W. Tu, Differential Forms in Algebraic Topology (1982) — the analyst's and geometer's route via de Rham cohomology.
  • Tammo tom Dieck, Algebraic Topology (2008), and J. P. May, A Concise Course in Algebraic Topology (1999) — more categorical treatments.
  • Herbert Edelsbrunner and John Harer, Computational Topology: An Introduction (2010) — algorithms and persistent homology.
  • Jean Dieudonné, A History of Algebraic and Differential Topology, 1900–1960 (1989).

Reading path: Hatcher Chapter 2 with this lesson; then Chapter 3 or Bott–Tu; then homotopy theory and characteristic classes.