Skip to content

Commit a2a2298

Browse files
committed
feat(Algebra/Homology/HomotopyCategory): definition of the distinguished triangles (#9614)
This PR defines the triangles which shall be the distinguished triangles for the (pre)triangulated structure on the homotopy category of cochain complexes in an additive category.
1 parent 12f566f commit a2a2298

File tree

2 files changed

+167
-0
lines changed

2 files changed

+167
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ import Mathlib.Algebra.Homology.HomotopyCategory
248248
import Mathlib.Algebra.Homology.HomotopyCategory.HomComplex
249249
import Mathlib.Algebra.Homology.HomotopyCategory.HomComplexShift
250250
import Mathlib.Algebra.Homology.HomotopyCategory.MappingCone
251+
import Mathlib.Algebra.Homology.HomotopyCategory.Pretriangulated
251252
import Mathlib.Algebra.Homology.HomotopyCategory.Shift
252253
import Mathlib.Algebra.Homology.HomotopyCofiber
253254
import Mathlib.Algebra.Homology.ImageToKernel
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
/-
2+
Copyright (c) 2023 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+
import Mathlib.Algebra.Homology.HomotopyCategory.MappingCone
7+
import Mathlib.Algebra.Homology.HomotopyCategory.HomComplexShift
8+
import Mathlib.CategoryTheory.Triangulated.Functor
9+
10+
/-! The pretriangulated structure on the homotopy category of complexes
11+
12+
In this file, we shall define the pretriangulated structure on the homotopy
13+
category `HomotopyCategory C (ComplexShape.up ℤ)` of an additive category `C` (TODO).
14+
The distinguished triangles are the triangles that are isomorphic to the
15+
image in the homotopy category of the standard triangle
16+
`K ⟶ L ⟶ mappingCone φ ⟶ K⟦(1 : ℤ)⟧` for some morphism of
17+
cochain complexes `φ : K ⟶ L`.
18+
19+
This result first appeared in the Liquid Tensor Experiment. In the LTE, the
20+
formalization followed the Stacks Project: in particular, the distinguished
21+
triangles were defined using degreewise-split short exact sequences of cochain
22+
complexes. Here, we follow the original definitions in [Verdiers's thesis, I.3][verdier1996]
23+
(with the better sign conventions from the introduction of
24+
[Brian Conrad's book *Grothendieck duality and base change*][conrad2000]).
25+
26+
## References
27+
* [Jean-Louis Verdier, *Des catégories dérivées des catégories abéliennes*][verdier1996]
28+
* [Brian Conrad, Grothendieck duality and base change][conrad2000]
29+
* https://stacks.math.columbia.edu/tag/014P
30+
31+
-/
32+
33+
open CategoryTheory Category Limits CochainComplex.HomComplex Pretriangulated
34+
35+
variable {C : Type*} [Category C] [Preadditive C] [HasZeroObject C] [HasBinaryBiproducts C]
36+
{K L : CochainComplex C ℤ} (φ : K ⟶ L)
37+
38+
namespace CochainComplex
39+
40+
namespace mappingCone
41+
42+
/-- The standard triangle `K ⟶ L ⟶ mappingCone φ ⟶ K⟦(1 : ℤ)⟧` in `CochainComplex C ℤ`
43+
attached to a morphism `φ : K ⟶ L`. It involves `φ`, `inr φ : L ⟶ mappingCone φ` and
44+
the morphism induced by the `1`-cocycle `-mappingCone.fst φ`. -/
45+
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂]
46+
noncomputable def triangle : Triangle (CochainComplex C ℤ) :=
47+
Triangle.mk φ (inr φ) (Cocycle.homOf ((-fst φ).rightShift 1 0 (zero_add 1)))
48+
49+
@[reassoc (attr := simp)]
50+
lemma inl_v_triangle_mor₃_f (p q : ℤ) (hpq : p + (-1) = q) :
51+
(inl φ).v p q hpq ≫ (triangle φ).mor₃.f q =
52+
-(K.shiftFunctorObjXIso 1 q p (by rw [← hpq, neg_add_cancel_right])).inv := by
53+
simp [triangle, Cochain.rightShift_v _ 1 0 (zero_add 1) q q (add_zero q) p (by linarith)]
54+
55+
@[reassoc (attr := simp)]
56+
lemma inr_f_triangle_mor₃_f (p : ℤ) : (inr φ).f p ≫ (triangle φ).mor₃.f p = 0 := by
57+
simp [triangle, Cochain.rightShift_v _ 1 0 _ p p (add_zero p) (p+1) rfl]
58+
59+
@[reassoc (attr := simp)]
60+
lemma inr_triangleδ : inr φ ≫ (triangle φ).mor₃ = 0 := by aesop_cat
61+
62+
/-- The (distinguished) triangle in the homotopy category that is associated to
63+
a morphism `φ : K ⟶ L` in the category `CochainComplex C ℤ`. -/
64+
noncomputable abbrev triangleh : Triangle (HomotopyCategory C (ComplexShape.up ℤ)) :=
65+
(HomotopyCategory.quotient _ _).mapTriangle.obj (triangle φ)
66+
67+
variable (K)
68+
69+
/-- The mapping cone of the identity is contractible. -/
70+
noncomputable def homotopyToZeroOfId : Homotopy (𝟙 (mappingCone (𝟙 K))) 0 :=
71+
descHomotopy (𝟙 K) _ _ 0 (inl _) (by simp) (by simp)
72+
73+
variable {K}
74+
75+
section mapOfHomotopy
76+
77+
variable {K₁ L₁ K₂ L₂ K₃ L₃ : CochainComplex C ℤ} {φ₁ : K₁ ⟶ L₁} {φ₂ : K₂ ⟶ L₂}
78+
{a : K₁ ⟶ K₂} {b : L₁ ⟶ L₂} (H : Homotopy (φ₁ ≫ b) (a ≫ φ₂))
79+
80+
/-- The morphism `mappingCone φ₁ ⟶ mappingCone φ₂` that is induced by a square that
81+
is commutative up to homotopy. -/
82+
noncomputable def mapOfHomotopy :
83+
mappingCone φ₁ ⟶ mappingCone φ₂ :=
84+
desc φ₁ ((Cochain.ofHom a).comp (inl φ₂) (zero_add _) +
85+
((Cochain.equivHomotopy _ _) H).1.comp (Cochain.ofHom (inr φ₂)) (add_zero _))
86+
(b ≫ inr φ₂) (by simp)
87+
88+
@[reassoc]
89+
lemma triangleMapOfHomotopy_comm₂ :
90+
inr φ₁ ≫ mapOfHomotopy H = b ≫ inr φ₂ := by
91+
simp [mapOfHomotopy]
92+
93+
@[reassoc]
94+
lemma triangleMapOfHomotopy_comm₃ :
95+
mapOfHomotopy H ≫ (triangle φ₂).mor₃ = (triangle φ₁).mor₃ ≫ a⟦1⟧' := by
96+
ext p
97+
simp [ext_from_iff _ _ _ rfl, triangle, mapOfHomotopy,
98+
Cochain.rightShift_v _ 1 0 _ p p _ (p + 1) rfl]
99+
100+
/-- The morphism `triangleh φ₁ ⟶ triangleh φ₂` that is induced by a square that
101+
is commutative up to homotopy. -/
102+
@[simps]
103+
noncomputable def trianglehMapOfHomotopy :
104+
triangleh φ₁ ⟶ triangleh φ₂ where
105+
hom₁ := (HomotopyCategory.quotient _ _).map a
106+
hom₂ := (HomotopyCategory.quotient _ _).map b
107+
hom₃ := (HomotopyCategory.quotient _ _).map (mapOfHomotopy H)
108+
comm₁ := by
109+
dsimp
110+
simp only [← Functor.map_comp]
111+
exact HomotopyCategory.eq_of_homotopy _ _ H
112+
comm₂ := by
113+
dsimp
114+
simp only [← Functor.map_comp, triangleMapOfHomotopy_comm₂]
115+
comm₃ := by
116+
dsimp
117+
rw [← Functor.map_comp_assoc, triangleMapOfHomotopy_comm₃, Functor.map_comp, assoc, assoc]
118+
erw [← NatTrans.naturality]
119+
rfl
120+
121+
end mapOfHomotopy
122+
123+
section map
124+
125+
variable {K₁ L₁ K₂ L₂ K₃ L₃ : CochainComplex C ℤ} (φ₁ : K₁ ⟶ L₁) (φ₂ : K₂ ⟶ L₂) (φ₃ : K₃ ⟶ L₃)
126+
(a : K₁ ⟶ K₂) (b : L₁ ⟶ L₂) (comm : φ₁ ≫ b = a ≫ φ₂)
127+
(a' : K₂ ⟶ K₃) (b' : L₂ ⟶ L₃) (comm' : φ₂ ≫ b' = a' ≫ φ₃)
128+
129+
/-- The morphism `mappingCone φ₁ ⟶ mappingCone φ₂` that is induced by a commutative square. -/
130+
noncomputable def map : mappingCone φ₁ ⟶ mappingCone φ₂ :=
131+
desc φ₁ ((Cochain.ofHom a).comp (inl φ₂) (zero_add _)) (b ≫ inr φ₂)
132+
(by simp [reassoc_of% comm])
133+
134+
lemma map_eq_mapOfHomotopy : map φ₁ φ₂ a b comm = mapOfHomotopy (Homotopy.ofEq comm) := by
135+
simp [map, mapOfHomotopy]
136+
137+
lemma map_id : map φ φ (𝟙 _) (𝟙 _) (by rw [id_comp, comp_id]) = 𝟙 _ := by
138+
ext n
139+
simp [ext_from_iff _ (n + 1) n rfl, map]
140+
141+
@[reassoc]
142+
lemma map_comp : map φ₁ φ₃ (a ≫ a') (b ≫ b') (by rw [reassoc_of% comm, comm', assoc]) =
143+
map φ₁ φ₂ a b comm ≫ map φ₂ φ₃ a' b' comm' := by
144+
ext n
145+
simp [ext_from_iff _ (n+1) n rfl, map]
146+
147+
/-- The morphism `triangle φ₁ ⟶ triangle φ₂` that is induced by a commutative square. -/
148+
@[simps]
149+
noncomputable def triangleMap :
150+
triangle φ₁ ⟶ triangle φ₂ where
151+
hom₁ := a
152+
hom₂ := b
153+
hom₃ := map φ₁ φ₂ a b comm
154+
comm₁ := comm
155+
comm₂ := by
156+
dsimp
157+
rw [map_eq_mapOfHomotopy, triangleMapOfHomotopy_comm₂]
158+
comm₃ := by
159+
dsimp
160+
rw [map_eq_mapOfHomotopy, triangleMapOfHomotopy_comm₃]
161+
162+
end map
163+
164+
end mappingCone
165+
166+
end CochainComplex

0 commit comments

Comments
 (0)