Skip to content

Commit 77883be

Browse files
committed
feat: the shift on the homotopy category of cochain complexes
1 parent 671af1a commit 77883be

File tree

1 file changed

+107
-7
lines changed
  • Mathlib/Algebra/Homology/HomotopyCategory

1 file changed

+107
-7
lines changed

Mathlib/Algebra/Homology/HomotopyCategory/Shift.lean

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@ Copyright (c) 2023 Joël Riou. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
6-
import Mathlib.Algebra.Homology.Additive
6+
import Mathlib.Algebra.Homology.HomotopyCategory
77
import Mathlib.Algebra.GroupPower.NegOnePow
8+
import Mathlib.CategoryTheory.Shift.Quotient
89
import Mathlib.Tactic.Linarith
910

1011
/-!
1112
# The shift on cochain complexes and on the homotopy category
1213
13-
In this file, we show `[HasShift (CochainComplex C ℤ) ℤ]` for any preadditive
14-
category `C`.
15-
16-
TODO: show `[HasShift (HomotopyCategory C (ComplexShape.up ℤ)) ℤ]`.
14+
In this file, we show that for any preadditive category `C`, the categories
15+
`CochainComplex C ℤ` and `HomotopyCategory C (ComplexShape.up ℤ)` are
16+
equipped with a shift by `ℤ`.
1717
1818
-/
1919

20-
universe v u
20+
universe v v' u u'
2121

2222
open CategoryTheory
2323

2424
variable (C : Type u) [Category.{v} C] [Preadditive C]
25+
{D : Type u'} [Category.{v'} D] [Preadditive D]
2526

2627
namespace CochainComplex
2728

@@ -110,7 +111,7 @@ lemma shiftFunctor_map_f' {K L : CochainComplex C ℤ} (φ : K ⟶ L) (n p : ℤ
110111
@[simp]
111112
lemma shiftFunctor_obj_d' (K : CochainComplex C ℤ) (n i j : ℤ) :
112113
((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K).d i j =
113-
((-1 : Units ℤ) ^ n : ℤ) • K.d _ _ := rfl
114+
n.negOnePow • K.d _ _ := rfl
114115

115116
lemma shiftFunctorAdd_inv_app_f (K : CochainComplex C ℤ) (a b n : ℤ) :
116117
((shiftFunctorAdd (CochainComplex C ℤ) a b).inv.app K).f n =
@@ -184,3 +185,102 @@ lemma shiftFunctorComm_hom_app_f (K : CochainComplex C ℤ) (a b p : ℤ) :
184185
simp only [XIsoOfEq, eqToIso.hom, eqToHom_trans]
185186

186187
end CochainComplex
188+
189+
190+
namespace CategoryTheory
191+
192+
open Category
193+
194+
namespace Functor
195+
196+
variable {C}
197+
variable (F : C ⥤ D) [F.Additive]
198+
199+
attribute [local simp] Functor.map_zsmul
200+
201+
/-- The commutation with the shift isomorphism for the functor on cochain complexes
202+
induced by an additive functor between preadditive categories. -/
203+
@[simps!]
204+
def mapCochainComplexShiftIso (n : ℤ) :
205+
shiftFunctor _ n ⋙ F.mapHomologicalComplex (ComplexShape.up ℤ) ≅
206+
F.mapHomologicalComplex (ComplexShape.up ℤ) ⋙ shiftFunctor _ n :=
207+
NatIso.ofComponents (fun K => HomologicalComplex.Hom.isoOfComponents (fun _ => Iso.refl _)
208+
(by aesop_cat)) (fun _ => by ext; dsimp; rw [id_comp, comp_id])
209+
210+
instance commShiftMapCochainComplex :
211+
(F.mapHomologicalComplex (ComplexShape.up ℤ)).CommShift ℤ where
212+
iso := F.mapCochainComplexShiftIso
213+
zero := by
214+
ext
215+
rw [CommShift.isoZero_hom_app]
216+
dsimp
217+
simp only [mapCochainComplexShiftIso_hom_app_f, CochainComplex.shiftFunctorZero_inv_app_f,
218+
CochainComplex.shiftFunctorZero_hom_app_f, HomologicalComplex.XIsoOfEq, eqToIso,
219+
eqToHom_map, eqToHom_trans, eqToHom_refl]
220+
add := fun a b => by
221+
ext
222+
rw [CommShift.isoAdd_hom_app]
223+
dsimp
224+
erw [id_comp, id_comp]
225+
simp only [CochainComplex.shiftFunctorAdd_hom_app_f,
226+
CochainComplex.shiftFunctorAdd_inv_app_f, HomologicalComplex.XIsoOfEq, eqToIso,
227+
eqToHom_map, eqToHom_trans, eqToHom_refl]
228+
229+
lemma mapHomologicalComplex_commShiftIso_eq (n : ℤ) :
230+
(F.mapHomologicalComplex (ComplexShape.up ℤ)).commShiftIso n =
231+
F.mapCochainComplexShiftIso n := rfl
232+
233+
@[simp]
234+
lemma mapHomologicalComplex_commShiftIso_hom_app_f (K : CochainComplex C ℤ) (n i : ℤ) :
235+
(((F.mapHomologicalComplex (ComplexShape.up ℤ)).commShiftIso n).hom.app K).f i = 𝟙 _ := rfl
236+
237+
@[simp]
238+
lemma mapHomologicalComplex_commShiftIso_inv_app_f (K : CochainComplex C ℤ) (n i : ℤ) :
239+
(((F.mapHomologicalComplex (ComplexShape.up ℤ)).commShiftIso n).inv.app K).f i = 𝟙 _ := rfl
240+
241+
end Functor
242+
243+
end CategoryTheory
244+
245+
namespace Homotopy
246+
247+
variable {C}
248+
249+
/-- If `h : Homotopy φ₁ φ₂` and `n : ℤ`, this is the induced homotopy
250+
between `φ₁⟦n⟧'` and `φ₂⟦n⟧'`. -/
251+
def shift {K L : CochainComplex C ℤ} {φ₁ φ₂ : K ⟶ L} (h : Homotopy φ₁ φ₂) (n : ℤ) :
252+
Homotopy (φ₁⟦n⟧') (φ₂⟦n⟧') where
253+
hom i j := n.negOnePow • h.hom _ _
254+
zero i j hij := by
255+
dsimp
256+
rw [h.zero, zsmul_zero]
257+
intro hij'
258+
dsimp at hij hij'
259+
exact hij (by linarith)
260+
comm := fun i => by
261+
rw [dNext_eq _ (show (ComplexShape.up ℤ).Rel i (i + 1) by simp),
262+
prevD_eq _ (show (ComplexShape.up ℤ).Rel (i - 1) i by simp)]
263+
dsimp
264+
simpa only [Preadditive.zsmul_comp, Preadditive.comp_zsmul, smul_smul,
265+
Int.negOnePow_mul_self, one_smul,
266+
dNext_eq _ (show (ComplexShape.up ℤ).Rel (i + n) (i + 1 + n) by dsimp; linarith),
267+
prevD_eq _ (show (ComplexShape.up ℤ).Rel (i - 1 + n) (i + n) by dsimp; linarith)]
268+
using h.comm (i + n)
269+
270+
end Homotopy
271+
272+
namespace HomotopyCategory
273+
274+
instance : (homotopic C (ComplexShape.up ℤ)).IsCompatibleWithShift ℤ :=
275+
fun n _ _ _ _ ⟨h⟩ => ⟨h.shift n⟩⟩
276+
277+
noncomputable instance hasShift :
278+
HasShift (HomotopyCategory C (ComplexShape.up ℤ)) ℤ := by
279+
dsimp only [HomotopyCategory]
280+
infer_instance
281+
282+
noncomputable instance commShiftQuotient :
283+
(HomotopyCategory.quotient C (ComplexShape.up ℤ)).CommShift ℤ :=
284+
Quotient.functor_commShift (homotopic C (ComplexShape.up ℤ)) ℤ
285+
286+
end HomotopyCategory

0 commit comments

Comments
 (0)