-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Merged by Bors] - feat(AlgebraicTopology): simplicial homology #37656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b6c81dc
feat(AlgebraicTopology/SimplicialSet): simplicial homology
joelriou f0cc13f
moved file
joelriou 12f4dbd
better docstring
joelriou b93c4b5
link to the file where the homotopy invariance of topological spaces …
joelriou d6299e2
simps attribute
joelriou 256aa6a
Merge remote-tracking branch 'origin/master' into sset-homology
joelriou 16d785c
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou bb59b75
Merge remote-tracking branch 'refs/remotes/origin/sset-homology' into…
joelriou 2c84d7b
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou 5638025
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/HomotopyInvar…
joelriou 392fc88
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou c2f4816
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou 9cdaddb
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou d1a786a
Update Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
joelriou cf9fcc8
Merge remote-tracking branch 'origin/master' into sset-homology
joelriou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
Mathlib/AlgebraicTopology/SimplicialSet/Homology/Basic.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| /- | ||
| Copyright (c) 2026 Joël Riou. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Joël Riou, Andrew Yang | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex | ||
| public import Mathlib.AlgebraicTopology.AlternatingFaceMapComplex | ||
| public import Mathlib.AlgebraicTopology.SimplicialSet.StdSimplex | ||
| public import Mathlib.CategoryTheory.Linear.Basic | ||
|
|
||
| /-! | ||
| # Simplicial homology | ||
|
|
||
| In this file, we define the homology of simplicial sets. | ||
| For any preadditive category `C` with coproducts of size `w` and any | ||
| object `R : C`, the simplicial chain complex of a simplicial | ||
| set `X` is denoted `X.chainComplex R`, and its homology | ||
| in degree `n : ℕ` is `X.homology R n`. | ||
|
|
||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| open Simplicial CategoryTheory Limits | ||
|
|
||
| universe w v u | ||
|
|
||
| namespace SSet | ||
|
|
||
| variable (C : Type u) [Category.{v} C] [HasCoproducts.{w} C] [Preadditive C] | ||
|
|
||
| /-- | ||
| The chain complex associated to a simplicial set, with coefficients in `R : C`. | ||
| It computes the simplicial homology of a simplicial sets with coefficients | ||
| in `R`. One can recover the ordinary simplicial chain complex when `C := Ab` | ||
| and `X := ℤ`. | ||
| -/ | ||
| noncomputable def chainComplexFunctor : C ⥤ SSet.{w} ⥤ ChainComplex C ℕ := | ||
| (Functor.postcompose₂.obj (AlgebraicTopology.alternatingFaceMapComplex _)).obj | ||
| (sigmaConst ⋙ SimplicialObject.whiskering _ _) | ||
|
|
||
| instance : (chainComplexFunctor C).Additive := by | ||
| dsimp [chainComplexFunctor, SimplicialObject.whiskering] | ||
| infer_instance | ||
|
|
||
| @[deprecated (since := "2026-04-05")] | ||
| alias _root_.AlgebraicTopology.SSet.singularChainComplexFunctor := | ||
| chainComplexFunctor | ||
|
|
||
| set_option backward.isDefEq.respectTransparency false in | ||
| attribute [local simp] SSet.chainComplexFunctor in | ||
| attribute [local simp←] _root_.SSet.yonedaEquiv_symm_comp in | ||
| /-- The adjunction `Hom(Cⁿ(-, X), F) ≃ Hom(X, F(Δ[n]))` for `R : C` and `F : SSet ⥤ C`. -/ | ||
| noncomputable def chainComplexFunctorAdjunction (n : ℕ) : | ||
| (Functor.postcompose₂.obj (HomologicalComplex.eval _ _ n)).obj | ||
| (SSet.chainComplexFunctor C) ⊣ (evaluation _ _).obj Δ[n] where | ||
| unit.app R := Sigma.ι (fun _ : Δ[n] _⦋n⦌ ↦ R) (SSet.stdSimplex.objEquiv (n := ⦋n⦌).symm (𝟙 ⦋n⦌)) | ||
| counit.app F := { app S := Sigma.desc fun α ↦ F.map (SSet.yonedaEquiv.symm α) } | ||
| right_triangle_components F := by dsimp; simp | ||
|
|
||
| @[deprecated (since := "2026-04-05")] | ||
| alias _root_.SSet.singularChainComplexFunctorAdjunction := | ||
| SSet.chainComplexFunctorAdjunction | ||
|
|
||
| variable {C} (X Y Z : SSet.{w}) (f : X ⟶ Y) (g : Y ⟶ Z) (R : C) | ||
|
|
||
| /-- The (simplicial) chain complex of a simplicial set `X` with | ||
| coefficients in `R : C`. Its homology is the simplicial homology | ||
| of `X`. -/ | ||
| noncomputable abbrev chainComplex : ChainComplex C ℕ := | ||
| ((SSet.chainComplexFunctor C).obj R).obj X | ||
|
|
||
| variable {X Y} in | ||
| /-- The morphism of simplicial chain complexes induces by a morphism | ||
| of simplicial sets. -/ | ||
| noncomputable abbrev chainComplexMap : X.chainComplex R ⟶ Y.chainComplex R := | ||
| ((SSet.chainComplexFunctor C).obj R).map f | ||
|
|
||
| variable {R} in | ||
| /-- The inclusion `R ⟶ (X.chainComplex R).X n` of the summand | ||
| corresponding to a `n`-simplex `x : X _⦋n⦌`. -/ | ||
| noncomputable def ιChainComplex {n : ℕ} (x : X _⦋n⦌) : R ⟶ (X.chainComplex R).X n := | ||
| Sigma.ι (fun (_ : X _⦋n⦌) ↦ R) x | ||
|
|
||
| set_option backward.isDefEq.respectTransparency false in | ||
| @[reassoc (attr := simp)] | ||
| lemma ιChainComplex_d {n : ℕ} (x : X _⦋n + 1⦌) : | ||
| X.ιChainComplex x ≫ (X.chainComplex R).d (n + 1) n = | ||
| ∑ (i : Fin (n + 2)), (-1) ^ i.val • X.ιChainComplex (X.δ i x) := by | ||
| simp [ιChainComplex, chainComplex, chainComplexFunctor, Preadditive.comp_sum] | ||
|
|
||
| @[reassoc (attr := simp)] | ||
| lemma ι_chainComplexMap_f {n : ℕ} (x : X _⦋n⦌) : | ||
| X.ιChainComplex x ≫ (chainComplexMap f R).f n = | ||
| Y.ιChainComplex (f.app _ x) := by | ||
| dsimp [chainComplexMap, chainComplexFunctor, ιChainComplex, Sigma.map', | ||
| chainComplex, chainComplexFunctor] | ||
| simp [Sigma.ι_desc] | ||
|
|
||
| /-- The colimit cofan which defines the simplicial `n`-chains | ||
| `(X.chainComplex R).X n`. -/ | ||
| noncomputable def chainComplexXCofan (n : ℕ) : Cofan (fun (_ : X _⦋n⦌) ↦ R) := | ||
| Cofan.mk _ X.ιChainComplex | ||
|
|
||
| /-- Simplicial `n`-chains `(X.chainComplex R).X n` of a simplicial set `X` | ||
| with coefficients in `R` identify to a coproduct of copies of `R` | ||
| indexed by `X _⦋n⦌`. -/ | ||
| noncomputable def isColimitChainComplexXCofan (n : ℕ) : IsColimit (X.chainComplexXCofan R n) := | ||
| coproductIsCoproduct _ | ||
|
|
||
| variable {X R} in | ||
| @[ext] | ||
| lemma chainComplex_hom_ext {n : ℕ} {T : C} {f g : (X.chainComplex R).X n ⟶ T} | ||
| (h : ∀ (x : X _⦋n⦌), X.ιChainComplex x ≫ f = X.ιChainComplex x ≫ g) : | ||
| f = g := | ||
| (X.isColimitChainComplexXCofan R n).hom_ext (fun _ ↦ h _) | ||
|
|
||
| variable [CategoryWithHomology C] | ||
|
|
||
| /-- The simplicial homology with coefficients in `R : C` in degree `n` | ||
| of a simplicial set `X`. -/ | ||
| protected noncomputable abbrev homology (n : ℕ) : C := (X.chainComplex R).homology n | ||
|
|
||
| variable {X Y} in | ||
| /-- The morphism in simplicial homology that is induced by a morphism | ||
| of simplicial sets. -/ | ||
| protected noncomputable abbrev homologyMap (n : ℕ) : X.homology R n ⟶ Y.homology R n := | ||
| HomologicalComplex.homologyMap (chainComplexMap f R) n | ||
|
|
||
| @[simp] | ||
| lemma homologyMap_id (n : ℕ) : SSet.homologyMap (𝟙 X) R n = 𝟙 _ := by | ||
| simp [SSet.homologyMap] | ||
|
|
||
| @[reassoc] | ||
| lemma homologyMap_comp (n : ℕ) : | ||
| SSet.homologyMap (f ≫ g) R n = SSet.homologyMap f R n ≫ SSet.homologyMap g R n := by | ||
| simp [SSet.homologyMap, HomologicalComplex.homologyMap_comp] | ||
|
|
||
| attribute [local simp] homologyMap_comp in | ||
| /-- The simplicial homology functor in degree `n` with coefficients in `R : C`. -/ | ||
| @[simps] | ||
| noncomputable def homologyFunctor (n : ℕ) : SSet.{w} ⥤ C where | ||
| obj X := X.homology R n | ||
| map f := SSet.homologyMap f R n | ||
|
|
||
| end SSet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.