Skip to content

Commit 0b676a2

Browse files
joelrioukim-em
andcommitted
feat: port AlgebraicTopology.DoldKan.GammaCompN (#3568)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 2d65666 commit 0b676a2

File tree

4 files changed

+190
-1
lines changed

4 files changed

+190
-1
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ import Mathlib.AlgebraicTopology.DoldKan.Degeneracies
304304
import Mathlib.AlgebraicTopology.DoldKan.Faces
305305
import Mathlib.AlgebraicTopology.DoldKan.FunctorGamma
306306
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
307+
import Mathlib.AlgebraicTopology.DoldKan.GammaCompN
307308
import Mathlib.AlgebraicTopology.DoldKan.Homotopies
308309
import Mathlib.AlgebraicTopology.DoldKan.NReflectsIso
309310
import Mathlib.AlgebraicTopology.DoldKan.Notations
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/-
2+
Copyright (c) 2022 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
6+
! This file was ported from Lean 3 source module algebraic_topology.dold_kan.gamma_comp_n
7+
! leanprover-community/mathlib commit 5f68029a863bdf76029fa0f7a519e6163c14152e
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.AlgebraicTopology.DoldKan.FunctorGamma
12+
import Mathlib.CategoryTheory.Idempotents.HomologicalComplex
13+
14+
/-! The counit isomorphism of the Dold-Kan equivalence
15+
16+
The purpose of this file is to construct natural isomorphisms
17+
`N₁Γ₀ : Γ₀ ⋙ N₁ ≅ toKaroubi (ChainComplex C ℕ)`
18+
and `N₂Γ₂ : Γ₂ ⋙ N₂ ≅ 𝟭 (Karoubi (ChainComplex C ℕ))`.
19+
20+
-/
21+
22+
23+
noncomputable section
24+
25+
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
26+
CategoryTheory.Idempotents Opposite SimplicialObject Simplicial
27+
28+
namespace AlgebraicTopology
29+
30+
namespace DoldKan
31+
32+
variable {C : Type _} [Category C] [Preadditive C] [HasFiniteCoproducts C]
33+
34+
/-- The isomorphism `(Γ₀.splitting K).nondegComplex ≅ K` for all `K : ChainComplex C ℕ`. -/
35+
@[simps!]
36+
def Γ₀NondegComplexIso (K : ChainComplex C ℕ) : (Γ₀.splitting K).nondegComplex ≅ K :=
37+
HomologicalComplex.Hom.isoOfComponents (fun n => Iso.refl _)
38+
(by
39+
rintro _ n (rfl : n + 1 = _)
40+
dsimp
41+
simp only [id_comp, comp_id, AlternatingFaceMapComplex.obj_d_eq, Preadditive.sum_comp,
42+
Preadditive.comp_sum]
43+
rw [Fintype.sum_eq_single (0 : Fin (n + 2))]
44+
· simp only [Fin.val_zero, pow_zero, one_zsmul]
45+
erw [Γ₀.Obj.mapMono_on_summand_id_assoc, Γ₀.Obj.Termwise.mapMono_δ₀,
46+
Splitting.ι_πSummand_eq_id, comp_id]
47+
· intro i hi
48+
dsimp
49+
simp only [Preadditive.zsmul_comp, Preadditive.comp_zsmul, assoc]
50+
erw [Γ₀.Obj.mapMono_on_summand_id_assoc, Γ₀.Obj.Termwise.mapMono_eq_zero, zero_comp,
51+
zsmul_zero]
52+
· intro h
53+
replace h := congr_arg SimplexCategory.len h
54+
change n + 1 = n at h
55+
linarith
56+
· simpa only [Isδ₀.iff] using hi)
57+
#align algebraic_topology.dold_kan.Γ₀_nondeg_complex_iso AlgebraicTopology.DoldKan.Γ₀NondegComplexIso
58+
59+
/-- The natural isomorphism `(Γ₀.splitting K).nondegComplex ≅ K` for `K : ChainComplex C ℕ`. -/
60+
def Γ₀'CompNondegComplexFunctor : Γ₀' ⋙ Split.nondegComplexFunctor ≅ 𝟭 (ChainComplex C ℕ) :=
61+
NatIso.ofComponents Γ₀NondegComplexIso (by aesop_cat)
62+
#align algebraic_topology.dold_kan.Γ₀'_comp_nondeg_complex_functor AlgebraicTopology.DoldKan.Γ₀'CompNondegComplexFunctor
63+
64+
/-- The natural isomorphism `Γ₀ ⋙ N₁ ≅ toKaroubi (ChainComplex C ℕ)`. -/
65+
def N₁Γ₀ : Γ₀ ⋙ N₁ ≅ toKaroubi (ChainComplex C ℕ) :=
66+
calc
67+
Γ₀ ⋙ N₁ ≅ Γ₀' ⋙ Split.forget C ⋙ N₁ := Functor.associator _ _ _
68+
_ ≅ Γ₀' ⋙ Split.nondegComplexFunctor ⋙ toKaroubi _ :=
69+
(isoWhiskerLeft Γ₀' Split.toKaroubiNondegComplexFunctorIsoN₁.symm)
70+
_ ≅ (Γ₀' ⋙ Split.nondegComplexFunctor) ⋙ toKaroubi _ := (Functor.associator _ _ _).symm
71+
_ ≅ 𝟭 _ ⋙ toKaroubi (ChainComplex C ℕ) := (isoWhiskerRight Γ₀'CompNondegComplexFunctor _)
72+
_ ≅ toKaroubi (ChainComplex C ℕ) := Functor.leftUnitor _
73+
set_option linter.uppercaseLean3 false in
74+
#align algebraic_topology.dold_kan.N₁Γ₀ AlgebraicTopology.DoldKan.N₁Γ₀
75+
76+
theorem N₁Γ₀_app (K : ChainComplex C ℕ) :
77+
N₁Γ₀.app K = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫
78+
(toKaroubi _).mapIso (Γ₀NondegComplexIso K) := by
79+
ext1
80+
dsimp [N₁Γ₀]
81+
erw [id_comp, comp_id, comp_id]
82+
rfl
83+
set_option linter.uppercaseLean3 false in
84+
#align algebraic_topology.dold_kan.N₁Γ₀_app AlgebraicTopology.DoldKan.N₁Γ₀_app
85+
86+
theorem N₁Γ₀_hom_app (K : ChainComplex C ℕ) :
87+
N₁Γ₀.hom.app K = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫
88+
(toKaroubi _).map (Γ₀NondegComplexIso K).hom := by
89+
change (N₁Γ₀.app K).hom = _
90+
simp only [N₁Γ₀_app]
91+
rfl
92+
set_option linter.uppercaseLean3 false in
93+
#align algebraic_topology.dold_kan.N₁Γ₀_hom_app AlgebraicTopology.DoldKan.N₁Γ₀_hom_app
94+
95+
theorem N₁Γ₀_inv_app (K : ChainComplex C ℕ) :
96+
N₁Γ₀.inv.app K = (toKaroubi _).map (Γ₀NondegComplexIso K).inv ≫
97+
(Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom := by
98+
change (N₁Γ₀.app K).inv = _
99+
simp only [N₁Γ₀_app]
100+
rfl
101+
set_option linter.uppercaseLean3 false in
102+
#align algebraic_topology.dold_kan.N₁Γ₀_inv_app AlgebraicTopology.DoldKan.N₁Γ₀_inv_app
103+
104+
@[simp]
105+
theorem N₁Γ₀_hom_app_f_f (K : ChainComplex C ℕ) (n : ℕ) :
106+
(N₁Γ₀.hom.app K).f.f n = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv.f.f n := by
107+
rw [N₁Γ₀_hom_app]
108+
apply comp_id
109+
set_option linter.uppercaseLean3 false in
110+
#align algebraic_topology.dold_kan.N₁Γ₀_hom_app_f_f AlgebraicTopology.DoldKan.N₁Γ₀_hom_app_f_f
111+
112+
@[simp]
113+
theorem N₁Γ₀_inv_app_f_f (K : ChainComplex C ℕ) (n : ℕ) :
114+
(N₁Γ₀.inv.app K).f.f n = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom.f.f n := by
115+
rw [N₁Γ₀_inv_app]
116+
apply id_comp
117+
set_option linter.uppercaseLean3 false in
118+
#align algebraic_topology.dold_kan.N₁Γ₀_inv_app_f_f AlgebraicTopology.DoldKan.N₁Γ₀_inv_app_f_f
119+
120+
-- Porting note: added to speed up elaboration
121+
attribute [irreducible] N₁Γ₀
122+
123+
theorem N₂Γ₂_toKaroubi : toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁ := by
124+
have h := Functor.congr_obj (functorExtension₂_comp_whiskeringLeft_toKaroubi
125+
(ChainComplex C ℕ) (SimplicialObject C)) Γ₀
126+
have h' := Functor.congr_obj (functorExtension₁_comp_whiskeringLeft_toKaroubi
127+
(SimplicialObject C) (ChainComplex C ℕ)) N₁
128+
dsimp [N₂, Γ₂, functorExtension₁] at h h' ⊢
129+
rw [← Functor.assoc, h, Functor.assoc, h']
130+
set_option linter.uppercaseLean3 false in
131+
#align algebraic_topology.dold_kan.N₂Γ₂_to_karoubi AlgebraicTopology.DoldKan.N₂Γ₂_toKaroubi
132+
133+
/-- Compatibility isomorphism between `toKaroubi _ ⋙ Γ₂ ⋙ N₂` and `Γ₀ ⋙ N₁` which
134+
are functors `ChainComplex C ℕ ⥤ Karoubi (ChainComplex C ℕ)`. -/
135+
@[simps!]
136+
def N₂Γ₂ToKaroubiIso : toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ ≅ Γ₀ ⋙ N₁ :=
137+
eqToIso N₂Γ₂_toKaroubi
138+
set_option linter.uppercaseLean3 false in
139+
#align algebraic_topology.dold_kan.N₂Γ₂_to_karoubi_iso AlgebraicTopology.DoldKan.N₂Γ₂ToKaroubiIso
140+
141+
-- Porting note: added to speed up elaboration
142+
attribute [irreducible] N₂Γ₂ToKaroubiIso
143+
144+
/-- The counit isomorphism of the Dold-Kan equivalence for additive categories. -/
145+
def N₂Γ₂ : Γ₂ ⋙ N₂ ≅ 𝟭 (Karoubi (ChainComplex C ℕ)) :=
146+
((whiskeringLeft _ _ _).obj (toKaroubi (ChainComplex C ℕ))).preimageIso
147+
(N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀)
148+
set_option linter.uppercaseLean3 false in
149+
#align algebraic_topology.dold_kan.N₂Γ₂ AlgebraicTopology.DoldKan.N₂Γ₂
150+
151+
@[simp]
152+
theorem N₂Γ₂_inv_app_f_f (X : Karoubi (ChainComplex C ℕ)) (n : ℕ) :
153+
(N₂Γ₂.inv.app X).f.f n =
154+
X.p.f n ≫ (Γ₀.splitting X.X).ιSummand (Splitting.IndexSet.id (op [n])) := by
155+
simp only [N₂Γ₂, Functor.preimageIso, Iso.trans,
156+
whiskeringLeft_obj_preimage_app, N₂Γ₂ToKaroubiIso_inv, assoc,
157+
Functor.id_map, NatTrans.comp_app, eqToHom_app, Karoubi.comp_f,
158+
Karoubi.eqToHom_f, Karoubi.decompId_p_f, HomologicalComplex.comp_f,
159+
N₁Γ₀_inv_app_f_f, Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f,
160+
Functor.comp_map, Functor.comp_obj, Karoubi.decompId_i_f,
161+
eqToHom_refl, comp_id, N₂_map_f_f, Γ₂_map_f_app, N₁_obj_p,
162+
PInfty_on_Γ₀_splitting_summand_eq_self_assoc, toKaroubi_obj_X,
163+
Splitting.ι_desc, Splitting.IndexSet.id_fst, SimplexCategory.len_mk, unop_op,
164+
Karoubi.HomologicalComplex.p_idem_assoc]
165+
set_option linter.uppercaseLean3 false in
166+
#align algebraic_topology.dold_kan.N₂Γ₂_inv_app_f_f AlgebraicTopology.DoldKan.N₂Γ₂_inv_app_f_f
167+
168+
-- porting note: added to ease the proof of `N₂Γ₂_compatible_with_N₁Γ₀`
169+
lemma whiskerLeft_toKaroubi_N₂Γ₂_hom :
170+
whiskerLeft (toKaroubi (ChainComplex C ℕ)) N₂Γ₂.hom = N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom := by
171+
let e : _ ≅ toKaroubi (ChainComplex C ℕ) ⋙ 𝟭 _ := N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀
172+
have h := ((whiskeringLeft _ _ (Karoubi (ChainComplex C ℕ))).obj
173+
(toKaroubi (ChainComplex C ℕ))).image_preimage e.hom
174+
dsimp only [whiskeringLeft, N₂Γ₂, Functor.preimageIso] at h ⊢
175+
exact h
176+
177+
-- Porting note: added to speed up elaboration
178+
attribute [irreducible] N₂Γ₂
179+
180+
theorem N₂Γ₂_compatible_with_N₁Γ₀ (K : ChainComplex C ℕ) :
181+
N₂Γ₂.hom.app ((toKaroubi _).obj K) = N₂Γ₂ToKaroubiIso.hom.app K ≫ N₁Γ₀.hom.app K :=
182+
congr_app whiskerLeft_toKaroubi_N₂Γ₂_hom K
183+
set_option linter.uppercaseLean3 false in
184+
#align algebraic_topology.dold_kan.N₂Γ₂_compatible_with_N₁Γ₀ AlgebraicTopology.DoldKan.N₂Γ₂_compatible_with_N₁Γ₀
185+
186+
end DoldKan
187+
188+
end AlgebraicTopology

Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Authors: Joël Riou
1111
import Mathlib.AlgebraicTopology.SplitSimplicialObject
1212
import Mathlib.AlgebraicTopology.DoldKan.Degeneracies
1313
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
14-
import Mathlib.Tactic.LibrarySearch
1514

1615
/-!
1716

Mathlib/AlgebraicTopology/SplitSimplicialObject.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ variable (Δ)
111111

112112
/-- The distinguished element in `Splitting.IndexSet Δ` which corresponds to the
113113
identity of `Δ`. -/
114+
@[simps]
114115
def id : IndexSet Δ :=
115116
⟨Δ, ⟨𝟙 _, by infer_instance⟩⟩
116117
#align simplicial_object.splitting.index_set.id SimplicialObject.Splitting.IndexSet.id

0 commit comments

Comments
 (0)