Singular homology and relative singular homology with coefficients in a ring
DefinitionHatcher_SingularHomologyLet be a ring, viewed as a module over itself, and let be a topological space.
This file introduces singular homology with coefficients in , in the form used throughout Chapter 2 of Hatcher's book:
- Singular chains. , the chain complex of -modules whose degree- term is the free -module on the singular -simplices , with the usual boundary .
- Singular homology. .
- Induced maps. A continuous map induces a chain map and homomorphisms .
- Relative homology. For a subset with the subspace topology and inclusion , the relative chain complex is the quotient
and is its homology. 5. Maps of pairs. A continuous with induces .
These are the basic objects of the singular homology theory of Hatcher's Chapter 2 (excision, Mayer–Vietoris, homology of spheres and of projective spaces). Taking gives ordinary singular homology, and gives rational homology and Betti numbers.
Formalization Note The chain complex and homology are Mathlib's singularChainComplexFunctor and singularHomologyFunctor (with coefficient object the -module ), applied to TopCat.of X. The relative complex is the cokernel, in the category of chain complexes of -modules, of the chain map induced by the inclusion . Hatcher allows an arbitrary abelian coefficient group ; a ring is used here so that yields -vector spaces.
import Mathlib
/-!
Hatcher, *Algebraic Topology*, Chapter 2, §2.1 (singular homology, pp. 108–110, and relative
groups, p. 115) and §2.2 (homology with coefficients, p. 153), in the book-wide namespace
`Hatcher` (sub-namespace `Hatcher.Singular`).
Singular homology with coefficients in an arbitrary ring `R`, relative singular homology of a
pair `(X, A)` with `A ⊆ X`, and the maps induced by continuous maps and maps of pairs.
Hatcher takes coefficients in an abelian group `G`; a ring `R` (viewed as a module over itself)
is used here so that `R = ℚ` gives `ℚ`-vector spaces and Betti numbers.
* `Chains R X` is Mathlib's singular chain complex `C_•(X; R)`
(`AlgebraicTopology.singularChainComplexFunctor` with coefficient object the `R`-module `R`).
* `H R n X = H_n(X; R)` is Mathlib's singular homology functor, applied to `X`.
* `RelChains R X A = C_•(X; R) / C_•(A; R)` is the cokernel of the chain map induced by the
inclusion `A ↪ X`, and `Hrel R n X A = H_n(X, A; R)` is its homology (Hatcher, §2.1, p. 115).
* `map R n f : H_n(X) ⟶ H_n(Y)` and `relMap R n f A B h : H_n(X, A) ⟶ H_n(Y, B)` are the maps
induced by `f : C(X, Y)` (with `f(A) ⊆ B` for the second).
-/
namespace Hatcher.Singular
open CategoryTheory AlgebraicTopology Limits
variable (R : Type) [Ring R]
/-- The singular chain complex `C_•(X; R)`. -/
noncomputable abbrev Chains (X : Type) [TopologicalSpace X] : ChainComplex (ModuleCat.{0} R) ℕ :=
((singularChainComplexFunctor (ModuleCat.{0} R)).obj (ModuleCat.of R R)).obj (TopCat.of X)
/-- Singular homology `H_n(X; R)`. -/
noncomputable abbrev H (n : ℕ) (X : Type) [TopologicalSpace X] : ModuleCat.{0} R :=
((singularHomologyFunctor (ModuleCat.{0} R) n).obj (ModuleCat.of R R)).obj (TopCat.of X)
variable {R}
/-- The chain map `f_# : C_•(X; R) ⟶ C_•(Y; R)` induced by a continuous map. -/
noncomputable abbrev chainsMap {X Y : Type} [TopologicalSpace X] [TopologicalSpace Y]
(f : C(X, Y)) : Chains R X ⟶ Chains R Y :=
((singularChainComplexFunctor (ModuleCat.{0} R)).obj (ModuleCat.of R R)).map (TopCat.ofHom f)
variable (R)
/-- The map `f_* : H_n(X; R) ⟶ H_n(Y; R)` induced by a continuous map. -/
noncomputable abbrev map (n : ℕ) {X Y : Type} [TopologicalSpace X] [TopologicalSpace Y]
(f : C(X, Y)) : H R n X ⟶ H R n Y :=
((singularHomologyFunctor (ModuleCat.{0} R) n).obj (ModuleCat.of R R)).map (TopCat.ofHom f)
/-- The inclusion `A ↪ X` of a subset, as a continuous map. -/
abbrev incl {X : Type} [TopologicalSpace X] (A : Set X) : C(A, X) :=
⟨Subtype.val, continuous_subtype_val⟩
/-- Relative singular chains `C_•(X, A; R) = C_•(X; R) / C_•(A; R)`. -/
noncomputable abbrev RelChains (X : Type) [TopologicalSpace X] (A : Set X) :
ChainComplex (ModuleCat.{0} R) ℕ :=
cokernel (chainsMap (R := R) (incl A))
/-- Relative singular homology `H_n(X, A; R)`. -/
noncomputable abbrev Hrel (n : ℕ) (X : Type) [TopologicalSpace X] (A : Set X) : ModuleCat.{0} R :=
(RelChains R X A).homology n
/-- The restriction `A → B` of `f : C(X, Y)` with `f(A) ⊆ B`. -/
def restrictPair {X Y : Type} [TopologicalSpace X] [TopologicalSpace Y] (f : C(X, Y))
(A : Set X) (B : Set Y) (h : Set.MapsTo f A B) : C(A, B) :=
⟨fun a ↦ ⟨f a, h a.2⟩, by fun_prop⟩
theorem incl_comp_restrictPair {X Y : Type} [TopologicalSpace X] [TopologicalSpace Y]
(f : C(X, Y)) (A : Set X) (B : Set Y) (h : Set.MapsTo f A B) :
(chainsMap (R := R) (incl A)) ≫ chainsMap f =
chainsMap (restrictPair f A B h) ≫ chainsMap (incl B) := by
rw [← Functor.map_comp, ← Functor.map_comp]
rfl
/-- The map `f_* : H_n(X, A; R) ⟶ H_n(Y, B; R)` induced by a map of pairs. -/
noncomputable def relMap (n : ℕ) {X Y : Type} [TopologicalSpace X] [TopologicalSpace Y]
(f : C(X, Y)) (A : Set X) (B : Set Y) (h : Set.MapsTo f A B) :
Hrel R n X A ⟶ Hrel R n Y B :=
HomologicalComplex.homologyMap
(cokernel.map _ _ (chainsMap (restrictPair f A B h)) (chainsMap f)
(incl_comp_restrictPair R f A B h)) n
end Hatcher.Singular