Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Mayer–Vietoris sequence for singular homology

Proved
Hatcher.Singular.mayerVietoris

by Idealson · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-topologyhatchersingular-homology

Let RRR be a ring, XXX a topological space and A,B⊆XA,B\subseteq XA,B⊆X subsets whose interiors cover XXX. Write i:A∩B↪Ai:A\cap B\hookrightarrow Ai:A∩B↪A, j:A∩B↪Bj:A\cap B\hookrightarrow Bj:A∩B↪B, k:A↪Xk:A\hookrightarrow Xk:A↪X, l:B↪Xl:B\hookrightarrow Xl:B↪X for the inclusions, and Hn(⋅)=Hn(⋅ ;R)H_n(\cdot)=H_n(\cdot\,;R)Hn​(⋅)=Hn​(⋅;R) for singular homology with coefficients in RRR.

Then there are homomorphisms δn:Hn+1(X)→Hn(A∩B)\delta_n:H_{n+1}(X)\to H_n(A\cap B)δn​:Hn+1​(X)→Hn​(A∩B) such that the long sequence

⋯→Hn+1(X)→ δn Hn(A∩B)→ (i∗, −j∗) Hn(A)⊕Hn(B)→ k∗+l∗ Hn(X)→ δn−1 Hn−1(A∩B)→⋯\cdots\to H_{n+1}(X)\xrightarrow{\ \delta_n\ }H_n(A\cap B)\xrightarrow{\ (i_*,\,-j_*)\ }H_n(A)\oplus H_n(B)\xrightarrow{\ k_*+l_*\ }H_n(X)\xrightarrow{\ \delta_{n-1}\ }H_{n-1}(A\cap B)\to\cdots⋯→Hn+1​(X) δn​ ​Hn​(A∩B) (i∗​,−j∗​) ​Hn​(A)⊕Hn​(B) k∗​+l∗​ ​Hn​(X) δn−1​ ​Hn−1​(A∩B)→⋯

is exact, that is, for every n≥0n\ge 0n≥0:

  1. the kernel of k∗+l∗k_*+l_*k∗​+l∗​ on Hn(A)⊕Hn(B)H_n(A)\oplus H_n(B)Hn​(A)⊕Hn​(B) is the image of (i∗,−j∗)(i_*,-j_*)(i∗​,−j∗​);
  2. the kernel of δn\delta_nδn​ is the image of k∗+l∗:Hn+1(A)⊕Hn+1(B)→Hn+1(X)k_*+l_*:H_{n+1}(A)\oplus H_{n+1}(B)\to H_{n+1}(X)k∗​+l∗​:Hn+1​(A)⊕Hn+1​(B)→Hn+1​(X);
  3. the kernel of (i∗,−j∗)(i_*,-j_*)(i∗​,−j∗​) on Hn(A∩B)H_n(A\cap B)Hn​(A∩B) is the image of δn\delta_nδn​.

The Mayer–Vietoris sequence is the main tool for computing homology by cutting a space into simpler pieces; it gives, for instance, the homology of spheres and of complex projective spaces.

Formalization Note The boundary maps are only asserted to exist. Hn(A)⊕Hn(B)H_n(A)\oplus H_n(B)Hn​(A)⊕Hn​(B) is the product module, the maps are the underlying RRR-linear maps of the induced homomorphisms, and exactness is Mathlib's Function.Exact. The sequence ends with H0(X)→0H_0(X)\to 0H0​(X)→0, which is not part of the statement.

Preamble
import Mathlib
import Definitions.Def_Hatcher_SingularHomology

open CategoryTheory
Formal statement
theorem Hatcher.Singular.mayerVietoris (R : Type) [Ring R] (X : Type) [TopologicalSpace X] (A B : Set X)
    (hAB : interior A ∪ interior B = Set.univ) :
    ∃ δ : ∀ n : ℕ, H R (n + 1) X ⟶ H R n ↥(A ∩ B), ∀ n : ℕ,
      Function.Exact
        (LinearMap.prod
          (map R n (⟨Set.inclusion Set.inter_subset_left, continuous_inclusion _⟩ :
            C(↥(A ∩ B), A))).hom
          (-(map R n (⟨Set.inclusion Set.inter_subset_right, continuous_inclusion _⟩ :
            C(↥(A ∩ B), B))).hom))
        (LinearMap.coprod (map R n (incl A)).hom (map R n (incl B)).hom) ∧
      Function.Exact
        (LinearMap.coprod (map R (n + 1) (incl A)).hom (map R (n + 1) (incl B)).hom)
        (δ n).hom ∧
      Function.Exact (δ n).hom
        (LinearMap.prod
          (map R n (⟨Set.inclusion Set.inter_subset_left, continuous_inclusion _⟩ :
            C(↥(A ∩ B), A))).hom
          (-(map R n (⟨Set.inclusion Set.inter_subset_right, continuous_inclusion _⟩ :
            C(↥(A ∩ B), B))).hom)) := by sorry
Source
A. Hatcher, *Algebraic Topology*, Cambridge University Press, 2002 (online edition: https://pi.math.cornell.edu/~hatcher/AT/AT.pdf), §2.2, “Mayer–Vietoris Sequences” (pp. 149–150; the maps φ(x)=(x,−x)\varphi(x)=(x,-x)φ(x)=(x,−x) and ψ(x,y)=x+y\psi(x,y)=x+yψ(x,y)=x+y are on p. 150), with coefficients as on p. 153. Lean: original formalization for this project (Lean v4.33.1, Mathlib 0df444a), file `Bridge/Singular/MayerVietoris.lean`.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me