Once is known, the next question in Allen Hatcher's Algebraic Topology (Cambridge University Press, 2002; pi.math.cornell.edu/~hatcher/AT/AT.pdf) is how to compute fundamental groups of spaces built from pieces. Section 1.2 answers this with van Kampen's theorem (Theorem 1.20, p. 43): if a space is covered by open sets with a common basepoint and path-connected intersections, its fundamental group is the free product of the fundamental groups of the pieces, modulo relations coming from the intersections. It is the main computational tool of Chapter 1: it gives the fundamental groups of wedges of circles, graphs, surfaces, and every CW complex from its 2-skeleton (Propositions 1.26–1.28), and it underlies the classification of covering spaces in Section 1.3.
This is the second mission in the series formalizing Hatcher's book. The first mission established the covering-space lifting properties and in the Lean namespace Hatcher; this one covers the subsection "The van Kampen Theorem" of Section 1.2 (pp. 41–47) together with its warm-up Lemma 1.15 and Proposition 1.14 from Section 1.1 (p. 35).
Let be a topological space with a basepoint . A path is a continuous map , a loop at is a path with both endpoints , and is the group of homotopy classes of loops at under concatenation. A continuous map with induces a homomorphism , .
Let be a family of subsets of , each containing , with the subspace topology; write for . The inclusions induce
which are Hatcher.inclHom, and the inclusions and induce
which are Hatcher.interHomLeft and Hatcher.interHomRight.
The free product of a family of groups is the group of reduced words in the (Hatcher, pp. 41–42); in Lean it is Mathlib's Monoid.CoprodI, here Hatcher.FreeProd. Its universal property extends the to a single homomorphism
Hatcher.vanKampenHom. Since (both are induced by ), the elements
lie in the kernel of . Let be the normal subgroup generated by all of them, Hatcher.vanKampenNormal.
If is the union of path-connected open sets each containing , each is path-connected, and each is path-connected, then
Hence induces an isomorphism .
The result itself. Van Kampen's theorem is the gluing law for . With it Hatcher computes of wedge sums (free products), of graphs (free groups), of the closed orientable surfaces (Example 1.26), and shows that attaching -cells kills exactly the attaching loops (Proposition 1.26), so that every group is a fundamental group (Corollary 1.28). The surjectivity half alone gives Proposition 1.14, that spheres of dimension at least two are simply connected, and hence that is not homeomorphic to for (Corollary 1.16).
Formalizing it. Mathlib has the fundamental groupoid and fundamental group, induced homomorphisms (FundamentalGroup.map), free products of groups (Monoid.CoprodI) with their universal property, normal closures, and quotient groups. It has no version of van Kampen's theorem for topological spaces (its CategoryTheory/Limits/VanKampen concerns colimits in categories, not fundamental groups), and no computation of for ; on the platform, however, the theorem SP4Mission.sphere_simplyConnected (already proved in this environment) states that the unit sphere of is simply connected for , which is Proposition 1.14 with shifted indexing, so that milestone can be closed by a one-line reduction. The mission supplies the statements in Hatcher's form, on Mathlib's , so that later missions (covering spaces, cell complexes) can use them directly.
Surjectivity is a compactness argument: subdivide so each piece of the loop lies in one , then use path-connectedness of the intersections to connect the subdivision points back to . The formal difficulty is bookkeeping: producing the subdivision from an open cover of (Mathlib's exists_monotone_Icc_subset_open_cover_unitInterval is the tool) and showing the reparametrised concatenation is homotopic to the original loop.
The kernel computation is the hard part. Hatcher's proof takes a homotopy between two factorizations, subdivides the square into rectangles each mapped into a single , perturbs the grid so at most three rectangles meet at a corner (this is where triple intersections enter), and then shows that moving the loop across one rectangle at a time changes the factorization only by the two elementary moves that hold in . Every step is elementary, but the induction over the grid is long, and each elementary move requires an explicit path-homotopy in a subspace. The naive idea of proving by an induction on word length does not work: the relation between two factorizations of the same loop is only visible through a homotopy in , not through the words.
Proposition 1.14 is easy given Lemma 1.15 but requires exhibiting the cover of by two complements of antipodal points, showing each is simply connected (homeomorphic to via stereographic projection, which Mathlib has as stereographic), and showing their intersection is path-connected when .
Set X with the subspace topology, and is Mathlib's FundamentalGroup ↥(A α) ⟨x₀, _⟩. Hypotheses are stated explicitly on each theorem: IsOpen, IsPathConnected, ⋃ α, A α = Set.univ, and path-connectedness of pairwise (and, where Hatcher requires it, triple) intersections.List of loops, each tagged with the index of the piece it lies in, concatenated right-to-left with the constant loop as empty product (Hatcher.loopProd). Any bracketing gives the same homotopy class.Metric.sphere (0 : EuclideanSpace ℝ (Fin (n+1))) 1, and "" is Mathlib's SimplyConnectedSpace (path-connected with trivial fundamental group), which is what Hatcher means since is path-connected.Contributions welcome: the subdivision lemma for loops in an open cover, a reusable treatment of factorizations and their elementary moves, and the two-set special case as a corollary.
Mathlib/GroupTheory/CoprodI.lean (free products of groups). https://github.com/leanprover-community/mathlib4/blob/0df444a360eaa60ab8c11dca51a86af692955474/Mathlib/GroupTheory/CoprodI.leanMathlib/AlgebraicTopology/FundamentalGroupoid/FundamentalGroup.lean (fundamental group and induced homomorphisms). https://github.com/leanprover-community/mathlib4/blob/0df444a360eaa60ab8c11dca51a86af692955474/Mathlib/AlgebraicTopology/FundamentalGroupoid/FundamentalGroup.leannamespace Hatcher
theorem vanKampen {X : Type*} [TopologicalSpace X] {ι : Type*}
(A : ι → Set X) (x₀ : X) (hx₀ : ∀ α, x₀ ∈ A α)
(hopen : ∀ α, IsOpen (A α)) (hpc : ∀ α, IsPathConnected (A α))
(hcover : (⋃ α, A α) = Set.univ) (hinter : ∀ α β, IsPathConnected (A α ∩ A β))
(htriple : ∀ α β γ, IsPathConnected (A α ∩ A β ∩ A γ)) :
Function.Surjective (vanKampenHom A x₀ hx₀) ∧
(vanKampenHom A x₀ hx₀).ker = vanKampenNormal A x₀ hx₀ := by sorry
end HatcherThroughout, is a topological space with basepoint , and is a family of subsets of , each containing , with the subspace topology. The standing hypotheses of Lemma 1.15 are: each is open and path-connected, , and each intersection is path-connected.
Theorem 1.20 (van Kampen). If is the union of path-connected open sets each containing the basepoint , each intersection is path-connected, and each intersection is path-connected, then the homomorphism
is surjective and its kernel is the normal subgroup generated by all elements , :
Consequently induces an isomorphism .
This is the gluing law for fundamental groups and the main computational tool of Hatcher's Chapter 1.
Formalization Note Hatcher's first sentence needs only pairwise path-connected intersections; that weaker statement is the separate milestone Hatcher.vanKampenHom_surjective. Here all hypotheses are assumed and both conclusions are asserted.
No open leaves. Every sub-goal is proved or awaiting decomposition.