Skip to content

Commit 76da165

Browse files
add Octahedron₁
1 parent 2f9c494 commit 76da165

2 files changed

Lines changed: 210 additions & 7 deletions

File tree

Mathlib/CategoryTheory/Shift/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,18 @@ abbrev shiftNegShift (i : A) : X⟦-i⟧⟦i⟧ ≅ X :=
438438

439439
variable {X Y}
440440

441+
@[simp]
442+
theorem shiftFunctorCompIsoId_shift_shift_neg' (i : A) :
443+
(shiftFunctorCompIsoId C i (-i) (add_neg_cancel i)).inv.app X ≫ f⟦i⟧'⟦-i⟧' ≫
444+
(shiftFunctorCompIsoId C i (-i) (add_neg_cancel i)).hom.app Y = f :=
445+
NatIso.naturality_1 (shiftFunctorCompIsoId C i (-i) (add_neg_cancel i)) f
446+
447+
@[simp]
448+
theorem shiftFunctorCompIsoId_shift_neg_shift' (i : A) :
449+
(shiftFunctorCompIsoId C (-i) i (neg_add_cancel i)).inv.app X ≫ f⟦-i⟧'⟦i⟧' ≫
450+
(shiftFunctorCompIsoId C (-i) i (neg_add_cancel i)).hom.app Y = f :=
451+
NatIso.naturality_1 (shiftFunctorCompIsoId C (-i) i (neg_add_cancel i)) f
452+
441453
theorem shift_shift_neg' (i : A) :
442454
f⟦i⟧'⟦-i⟧' = (shiftFunctorCompIsoId C i (-i) (add_neg_cancel i)).hom.app X ≫
443455
f ≫ (shiftFunctorCompIsoId C i (-i) (add_neg_cancel i)).inv.app Y :=

Mathlib/CategoryTheory/Triangulated/Triangulated.lean

Lines changed: 198 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,39 @@ namespace Triangulated
3434

3535
variable {C}
3636

37-
/-- An octahedron is a type of datum whose existence is asserted by the octahedron axiom (TR 4). -/
37+
/-- An octahedron is a type of datum whose existence is asserted by the
38+
octahedron axiom (TR 4). The input is given by the following diagram:
39+
```
40+
u₁₃ v₂₃
41+
X₁ ────> X₃ ────> Z₂₃ Z₁₂⟦1⟧
42+
🮡🮢 ^ 🮡🮢 🮡🮢 ^
43+
u₁₂🮡🮢 u₂₃🮣🮠 🮡🮢v₁₃ 🮡🮢w₂₃ 🮣🮠v₁₂⟦1⟧'
44+
V 🮣🮠 V V 🮣🮠
45+
X₂ Z₁₃ X₂⟦1⟧
46+
🮡🮢 🮡🮢 ^
47+
v₁₂🮡🮢 🮡🮢w₁₃ 🮣🮠u₁₂⟦1⟧'
48+
V V 🮣🮠
49+
Z₁₂ ───> X₁⟦1⟧
50+
w₁₂
51+
```
52+
where `u₁₂ ≫ u₂₃ = u₁₃` and `(u₁₂,v₁₂,w₁₂), (u₁₃,v₁₃,w₁₃)` and `(u₂₃,v₂₃,w₂₃)`
53+
are distinguished triangles.. An `Octahedron` for this data consists of
54+
maps `m₁ : Z₁₂ ⟶ Z₁₃` and `m₃ : Z₁₃ ⟶ Z₂₃` such that `(m₁, m₃, w₂₃ ≫ v₁₂⟦1⟧')` is
55+
a distinguished triangle and the completed diagram commutes:
56+
```
57+
u₁₃ v₂₃
58+
X₁ ────> X₃ ────> Z₂₃ ────> Z₁₂⟦1⟧
59+
🮡🮢 ^ 🮡🮢 ^ 🮡🮢 ^
60+
u₁₂🮡🮢 u₂₃🮣🮠 🮡🮢v₁₃🮣🮠m₃🮡🮢w₂₃ 🮣🮠v₁₂⟦1⟧'
61+
V 🮣🮠 V 🮣🮠 V 🮣🮠
62+
X₂ Z₁₃ X₂⟦1⟧
63+
🮡🮢 ^ 🮡🮢 ^
64+
v₁₂🮡🮢 🮣🮠m₁ 🮡🮢w₁₃ 🮣🮠u₁₂⟦1⟧'
65+
V 🮣🮠 V 🮣🮠
66+
Z₁₂ ───> X₁⟦1⟧
67+
w₁₂
68+
```
69+
-/
3870
@[stacks 05QK]
3971
structure Octahedron
4072
{X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
@@ -159,6 +191,114 @@ def ofIso {X₁' X₂' X₃' Z₁₂' Z₂₃' Z₁₃' : C} (u₁₂' : X₁'
159191

160192
end Octahedron
161193

194+
/-- An octahedron₁ is a type of datum whose existence follows from
195+
the octahedron axiom (TR 4). It is a rotated version of an octahedron.
196+
The input is given by the following diagram:
197+
```
198+
v₁₂ u₁₃ w₂₃
199+
Z₁₂ ────> X₁ ─────> X₃ ─────> Z₂₃⟦1⟧
200+
^ 🮡🮢 ^ 🮡🮢
201+
v₁₃🮣🮠u₁₂🮡🮢 u₂₃🮣🮠 🮡🮢w₁₃
202+
🮣🮠 V 🮣🮠 V
203+
Z₁₃ X₂ Z₁₃⟦1⟧
204+
^ 🮡🮢
205+
v₂₃🮣🮠 🮡🮢w₁₂
206+
🮣🮠 V
207+
Z₂₃ Z₁₂⟦1⟧
208+
```
209+
where `u₁₂ ≫ u₂₃ = u₁₃` and `(v₁₂,u₁₂,w₁₂), (v₁₃,u₁₃,w₁₃)` and `(v₂₃,u₂₃,w₂₃)`
210+
are distinguished triangles.. An `Octahedron₁` for this data consists of
211+
maps `m₁ : Z₁₂ ⟶ Z₁₃` and `m₃ : Z₁₃ ⟶ Z₂₃` such that `(m₁, m₃, v₂₃ ≫ w₁₂)` is
212+
a distinguished triangle and the completed diagram commutes:
213+
```
214+
v₁₂ u₁₃ w₂₃
215+
Z₁₂ ────> X₁ ─────> X₃ ─────> Z₂₃⟦1⟧
216+
🮡🮢 ^ 🮡🮢 ^ 🮡🮢 ^
217+
m₁🮡🮢 v₁₃🮣🮠u₁₂🮡🮢 u₂₃🮣🮠 🮡🮢w₁₃ 🮣🮠m₃⟦1⟧'
218+
V 🮣🮠 V 🮣🮠 V 🮣🮠
219+
Z₁₃ X₂ Z₁₃⟦1⟧
220+
🮡🮢 ^ 🮡🮢 ^
221+
m₃🮡🮢 v₂₃🮣🮠 🮡🮢w₁₂ 🮣🮠m₁⟦1⟧'
222+
V 🮣🮠 V 🮣🮠
223+
Z₂₃ ────> Z₁₂⟦1⟧
224+
```
225+
-/
226+
structure Octahedron₁
227+
{X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
228+
{u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
229+
{v₁₂ : Z₁₂ ⟶ X₁} {w₁₂ : X₂ ⟶ Z₁₂⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk v₁₂ u₁₂ w₁₂ ∈ distTriang C)
230+
{v₂₃ : Z₂₃ ⟶ X₂} {w₂₃ : X₃ ⟶ Z₂₃⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk v₂₃ u₂₃ w₂₃ ∈ distTriang C)
231+
{v₁₃ : Z₁₃ ⟶ X₁} {w₁₃ : X₃ ⟶ Z₁₃⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk v₁₃ u₁₃ w₁₃ ∈ distTriang C) where
232+
/-- `m₁` is the morphism `a` of (TR 4) as presented in Stacks. -/
233+
m₁ : Z₁₂ ⟶ Z₁₃
234+
/-- `m₁` is the morphism `b` of (TR 4) as presented in Stacks. -/
235+
m₃ : Z₁₃ ⟶ Z₂₃
236+
comm₁ : m₁ ≫ v₁₃ = v₁₂
237+
comm₂ : w₁₂ ≫ m₁⟦1⟧' = u₂₃ ≫ w₁₃
238+
comm₃ : w₁₃ ≫ m₃⟦1⟧' = w₂₃
239+
comm₄ : m₃ ≫ v₂₃ = v₁₃ ≫ u₁₂
240+
mem : Triangle.mk m₁ m₃ (v₂₃ ≫ w₁₂) ∈ distTriang C
241+
242+
set_option backward.isDefEq.respectTransparency false in
243+
instance (X : C) :
244+
Nonempty (Octahedron₁ (comp_id (𝟙 X)) (inv_rot_of_distTriang _ (contractible_distinguished X))
245+
(inv_rot_of_distTriang _ (contractible_distinguished X))
246+
(inv_rot_of_distTriang _ (contractible_distinguished X))) :=
247+
⟨⟨0, 0, by simp, by simp, by simp, by simp, isomorphic_distinguished _
248+
(contractible_distinguished (0 : C)) _ <| Triangle.isoMk _ (contractibleTriangle (0 : C))
249+
(Functor.mapZeroObject _) (Functor.mapZeroObject _) (Functor.mapZeroObject _)⟩⟩
250+
251+
252+
namespace Octahedron₁
253+
254+
attribute [reassoc] comm₁ comm₂ comm₃ comm₄
255+
256+
variable {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
257+
{u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
258+
{v₁₂ : Z₁₂ ⟶ X₁} {w₁₂ : X₂ ⟶ Z₁₂⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk v₁₂ u₁₂ w₁₂ ∈ distTriang C)
259+
{v₂₃ : Z₂₃ ⟶ X₂} {w₂₃ : X₃ ⟶ Z₂₃⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk v₂₃ u₂₃ w₂₃ ∈ distTriang C)
260+
{v₁₃ : Z₁₃ ⟶ X₁} {w₁₃ : X₃ ⟶ Z₁₃⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk v₁₃ u₁₃ w₁₃ ∈ distTriang C)
261+
(h : Octahedron₁ comm h₁₂ h₂₃ h₁₃)
262+
263+
/-- The triangle `Z₁₂ ⟶ Z₁₃ ⟶ Z₂₃ ⟶ Z₁₂⟦1⟧` given by an octahedron₂. -/
264+
@[simps!]
265+
def triangle : Triangle C :=
266+
Triangle.mk h.m₁ h.m₃ (v₂₃ ≫ w₁₂)
267+
268+
/-- The first morphism of triangles given by an octahedron₂. -/
269+
@[simps]
270+
def triangleMorphism₁ : Triangle.mk v₁₂ u₁₂ w₁₂ ⟶ Triangle.mk v₁₃ u₁₃ w₁₃ where
271+
hom₁ := h.m₁
272+
hom₂ := 𝟙 X₁
273+
hom₃ := u₂₃
274+
comm₁ := by
275+
dsimp
276+
rw [comp_id, h.comm₁]
277+
comm₂ := by
278+
dsimp
279+
rw [id_comp, comm]
280+
comm₃ := by
281+
dsimp
282+
rw [h.comm₂]
283+
284+
/-- The second morphism of triangles given an octahedron₂. -/
285+
@[simps]
286+
def triangleMorphism₂ : Triangle.mk v₁₃ u₁₃ w₁₃ ⟶ Triangle.mk v₂₃ u₂₃ w₂₃ where
287+
hom₁ := h.m₃
288+
hom₂ := u₁₂
289+
hom₃ := 𝟙 X₃
290+
comm₁ := by
291+
dsimp
292+
rw [h.comm₄]
293+
comm₂ := by
294+
dsimp
295+
rw [comp_id, comm]
296+
comm₃ := by
297+
dsimp
298+
rw [id_comp, h.comm₃]
299+
300+
end Octahedron₁
301+
162302
end Triangulated
163303

164304
open Triangulated
@@ -179,15 +319,14 @@ class IsTriangulated : Prop where
179319
namespace Triangulated
180320

181321
variable {C}
182-
variable {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
322+
323+
/-- A choice of octahedron given by the octahedron axiom. -/
324+
def someOctahedron' [IsTriangulated C] {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
183325
{u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
184326
{v₁₂ : X₂ ⟶ Z₁₂} {w₁₂ : Z₁₂ ⟶ X₁⟦(1 : ℤ)⟧} {h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C}
185327
{v₂₃ : X₃ ⟶ Z₂₃} {w₂₃ : Z₂₃ ⟶ X₂⟦(1 : ℤ)⟧} {h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C}
186-
{v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} {h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C}
187-
(h : Octahedron comm h₁₂ h₂₃ h₁₃)
188-
189-
/-- A choice of octahedron given by the octahedron axiom. -/
190-
def someOctahedron' [IsTriangulated C] : Octahedron comm h₁₂ h₂₃ h₁₃ :=
328+
{v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} {h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C} :
329+
Octahedron comm h₁₂ h₂₃ h₁₃ :=
191330
(IsTriangulated.octahedron_axiom comm h₁₂ h₂₃ h₁₃).some
192331

193332
/-- A choice of octahedron given by the octahedron axiom. -/
@@ -200,6 +339,58 @@ def someOctahedron [IsTriangulated C]
200339
Octahedron comm h₁₂ h₂₃ h₁₃ :=
201340
someOctahedron' _
202341

342+
set_option backward.isDefEq.respectTransparency false in
343+
/-- A choice of octahedron₁ given by the octahedron axiom. -/
344+
def someOctahedron₁ [IsTriangulated C]
345+
{X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
346+
{u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
347+
{v₁₂ : Z₁₂ ⟶ X₁} {w₁₂ : X₂ ⟶ Z₁₂⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk v₁₂ u₁₂ w₁₂ ∈ distTriang C)
348+
{v₂₃ : Z₂₃ ⟶ X₂} {w₂₃ : X₃ ⟶ Z₂₃⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk v₂₃ u₂₃ w₂₃ ∈ distTriang C)
349+
{v₁₃ : Z₁₃ ⟶ X₁} {w₁₃ : X₃ ⟶ Z₁₃⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk v₁₃ u₁₃ w₁₃ ∈ distTriang C) :
350+
Octahedron₁ comm h₁₂ h₂₃ h₁₃ := by
351+
let o := someOctahedron comm (rot_of_distTriang _ h₁₂) (rot_of_distTriang _ h₂₃)
352+
(rot_of_distTriang _ h₁₃)
353+
let m₁ := (shiftShiftNeg Z₁₂ 1).inv ≫ o.m₁⟦-1⟧' ≫ (shiftShiftNeg Z₁₃ 1).hom
354+
let m₃ := (shiftShiftNeg Z₁₃ 1).inv ≫ o.m₃⟦-1⟧' ≫ (shiftShiftNeg Z₂₃ 1).hom
355+
have eq₁ := o.comm₁
356+
have eq₂ := o.comm₂
357+
have eq₃ := o.comm₃
358+
have eq₄ := o.comm₄
359+
dsimp only [Triangle.mk_obj₁, Triangle.mk_obj₂, Triangle.mk_mor₁, Triangle.mk_mor₃]
360+
at eq₁ eq₂ eq₃ eq₄
361+
rw [comp_neg, neg_inj] at eq₂
362+
rw [neg_comp, comp_neg, neg_inj] at eq₄
363+
refine ⟨m₁, m₃, ?_, ?_, ?_, ?_, ?_⟩
364+
· rw [← shiftFunctorCompIsoId_shift_shift_neg' v₁₃ (1 : ℤ)]
365+
unfold m₁
366+
dsimp
367+
rw [assoc, assoc, Iso.hom_inv_id_app_assoc]
368+
nth_rw 2 [← assoc]
369+
rw [← Functor.map_comp, eq₂, shiftFunctorCompIsoId_shift_shift_neg']
370+
· unfold m₁
371+
dsimp
372+
rw [Functor.map_comp, Functor.map_comp, shift_shiftFunctorCompIsoId_hom_app,
373+
shift_shiftFunctorCompIsoId_inv_app, shiftFunctorCompIsoId_shift_neg_shift', eq₁]
374+
· unfold m₃
375+
dsimp
376+
rw [Functor.map_comp, Functor.map_comp, shift_shiftFunctorCompIsoId_hom_app,
377+
shift_shiftFunctorCompIsoId_inv_app, shiftFunctorCompIsoId_shift_neg_shift', eq₃]
378+
· rw [← shiftFunctorCompIsoId_shift_shift_neg' v₂₃ (1 : ℤ)]
379+
unfold m₃
380+
dsimp
381+
rw [assoc, assoc, Iso.hom_inv_id_app_assoc]
382+
nth_rw 2 [← assoc]
383+
rw [← Functor.map_comp, ← eq₄, ← Functor.map_comp, shiftFunctorCompIsoId_shift_shift_neg']
384+
· apply isomorphic_distinguished _ ((Triangle.shift_distinguished_iff _ (-1 : ℤ)).mpr o.mem)
385+
refine Triangle.isoMk _ _ (shiftShiftNeg Z₁₂ (1 : ℤ)).symm
386+
(-(shiftShiftNeg Z₁₃ (1 : ℤ)).symm) (shiftShiftNeg Z₂₃ (1 : ℤ)).symm (comm₃ := ?_)
387+
dsimp
388+
simp only [Int.reduceNeg, assoc, Int.negOnePow_neg, Int.negOnePow_one, neg_comp,
389+
Functor.map_neg, Functor.map_comp, smul_neg, Units.neg_smul, one_smul, neg_neg]
390+
rw [shift_shift_neg', shift_shift_neg', shift_shiftFunctorCompIsoId_inv_app,
391+
shiftFunctorComm_hom_app_of_add_eq_zero _ _ (Int.add_right_neg 1)]
392+
simp
393+
203394
end Triangulated
204395

205396
variable {C}

0 commit comments

Comments
 (0)