File: Mathlib/Algebra/Homology/TotalComplexShift.lean

full_name: HomologicalComplex₂.shiftFunctor₁
code: /-- The shift on bicomplexes obtained by shifting the first indices (and changing the
sign of differentials). -/
abbrev shiftFunctor₁ (x : ℤ) :
    HomologicalComplex₂ C (up ℤ) (up ℤ) ⥤ HomologicalComplex₂ C (up ℤ) (up ℤ) 
goal: HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ) ⥤
  HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.shiftFunctor₂
code: /-- The shift on bicomplexes obtained by shifting the second indices (and changing the
sign of differentials). -/
abbrev shiftFunctor₂ (y : ℤ) :
    HomologicalComplex₂ C (up ℤ) (up ℤ) ⥤ HomologicalComplex₂ C (up ℤ) (up ℤ) 
goal: HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ) ⥤
  HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.shiftFunctor₁XXIso
code: /-- The isomorphism `(((shiftFunctor₁ C x).obj K).X a).X b ≅ (K.X a').X b` when `a' = a + x`. -/
def shiftFunctor₁XXIso (a x a' : ℤ) (h : a' = a + x) (b : ℤ) :
    (((shiftFunctor₁ C x).obj K).X a).X b ≅ (K.X a').X b 
goal: (((HomologicalComplex₂.shiftFunctor₁ C x).obj K).X a).X b ≅ (K.X a').X b

full_name: HomologicalComplex₂.shiftFunctor₂XXIso
code: /-- The isomorphism `(((shiftFunctor₂ C y).obj K).X a).X b ≅ (K.X a).X b'` when `b' = b + y`. -/
def shiftFunctor₂XXIso (a b y b' : ℤ) (h : b' = b + y) :
    (((shiftFunctor₂ C y).obj K).X a).X b ≅ (K.X a).X b' 
goal: (((HomologicalComplex₂.shiftFunctor₂ C y).obj K).X a).X b ≅ (K.X a).X b'

full_name: HomologicalComplex₂.shiftFunctor₁XXIso_refl
code: @[simp]
lemma shiftFunctor₁XXIso_refl (a b x : ℤ) :
    K.shiftFunctor₁XXIso a x (a + x) rfl b = Iso.refl _ 
goal: K.shiftFunctor₁XXIso a x (a + x) ⋯ b =
  CategoryTheory.Iso.refl ((((HomologicalComplex₂.shiftFunctor₁ C x).obj K).X a).X b)

full_name: HomologicalComplex₂.shiftFunctor₂XXIso_refl
code: @[simp]
lemma shiftFunctor₂XXIso_refl (a b y : ℤ) :
    K.shiftFunctor₂XXIso a b y (b + y) rfl = Iso.refl _ 
goal: K.shiftFunctor₂XXIso a b y (b + y) ⋯ =
  CategoryTheory.Iso.refl ((((HomologicalComplex₂.shiftFunctor₂ C y).obj K).X a).X b)

full_name: HomologicalComplex₂.instHasTotalIntObjUpShiftFunctor₁
code: instance : ((shiftFunctor₁ C x).obj K).HasTotal (up ℤ) 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).HasTotal (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.instHasTotalIntObjUpShiftFunctor₂
code: instance : ((shiftFunctor₂ C y).obj K).HasTotal (up ℤ) 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).HasTotal (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.instHasTotalIntObjUpCompShiftFunctor₂ShiftFunctor₁
code: instance : ((shiftFunctor₂ C y ⋙ shiftFunctor₁ C x).obj K).HasTotal (up ℤ) 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y ⋙ HomologicalComplex₂.shiftFunctor₁ C x).obj K).HasTotal (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.instHasTotalIntObjUpCompShiftFunctor₁ShiftFunctor₂
code: instance : ((shiftFunctor₁ C x ⋙ shiftFunctor₂ C y).obj K).HasTotal (up ℤ) 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x ⋙ HomologicalComplex₂.shiftFunctor₂ C y).obj K).HasTotal (ComplexShape.up ℤ)

full_name: HomologicalComplex₂.totalShift₁XIso
code: /-- Auxiliary definition for `totalShift₁Iso`. -/
noncomputable def totalShift₁XIso (n n' : ℤ) (h : n + x = n') :
    (((shiftFunctor₁ C x).obj K).total (up ℤ)).X n ≅ (K.total (up ℤ)).X n' 
goal: (((HomologicalComplex₂.shiftFunctor₁ C x).obj K).total (ComplexShape.up ℤ)).X n ≅ (K.total (ComplexShape.up ℤ)).X n'

full_name: HomologicalComplex₂.D₁_totalShift₁XIso_hom
code: @[reassoc]
lemma D₁_totalShift₁XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + x = n₀') (h₁ : n₁ + x = n₁') :
    ((shiftFunctor₁ C x).obj K).D₁ (up ℤ) n₀ n₁ ≫ (K.totalShift₁XIso x n₁ n₁' h₁).hom =
      x.negOnePow • ((K.totalShift₁XIso x n₀ n₀' h₀).hom ≫ K.D₁ (up ℤ) n₀' n₁') 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).D₁ (ComplexShape.up ℤ) n₀ n₁ ≫ (K.totalShift₁XIso x n₁ n₁' h₁).hom =
  x.negOnePow • (K.totalShift₁XIso x n₀ n₀' h₀).hom ≫ K.D₁ (ComplexShape.up ℤ) n₀' n₁'

full_name: HomologicalComplex₂.D₂_totalShift₁XIso_hom
code: @[reassoc]
lemma D₂_totalShift₁XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + x = n₀') (h₁ : n₁ + x = n₁') :
    ((shiftFunctor₁ C x).obj K).D₂ (up ℤ) n₀ n₁ ≫ (K.totalShift₁XIso x n₁ n₁' h₁).hom =
      x.negOnePow • ((K.totalShift₁XIso x n₀ n₀' h₀).hom ≫ K.D₂ (up ℤ) n₀' n₁') 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).D₂ (ComplexShape.up ℤ) n₀ n₁ ≫ (K.totalShift₁XIso x n₁ n₁' h₁).hom =
  x.negOnePow • (K.totalShift₁XIso x n₀ n₀' h₀).hom ≫ K.D₂ (ComplexShape.up ℤ) n₀' n₁'

full_name: HomologicalComplex₂.totalShift₁Iso
code: /-- The isomorphism `((shiftFunctor₁ C x).obj K).total (up ℤ) ≅ (K.total (up ℤ))⟦x⟧`
expressing the compatibility of the total complex with the shift on the first indices.
This isomorphism does not involve signs. -/
noncomputable def totalShift₁Iso :
    ((shiftFunctor₁ C x).obj K).total (up ℤ) ≅ (K.total (up ℤ))⟦x⟧ 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).total (ComplexShape.up ℤ) ≅
  (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) x).obj (K.total (ComplexShape.up ℤ))

full_name: HomologicalComplex₂.ι_totalShift₁Iso_hom_f
code: @[reassoc]
lemma ι_totalShift₁Iso_hom_f (a b n : ℤ) (h : a + b = n) (a' : ℤ) (ha' : a' = a + x)
    (n' : ℤ) (hn' : n' = n + x) :
    ((shiftFunctor₁ C x).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₁Iso x).hom.f n =
      (K.shiftFunctor₁XXIso a x a' ha' b).hom ≫ K.ιTotal (up ℤ) a' b n' (by dsimp; omega) ≫
        (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) x n n' hn').inv 
goal: ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).ιTotal (ComplexShape.up ℤ) a b n h ≫ (K.totalShift₁Iso x).hom.f n =
  (K.shiftFunctor₁XXIso a x a' ha' b).hom ≫
    K.ιTotal (ComplexShape.up ℤ) a' b n' ⋯ ≫
      (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) x n n' hn').inv

full_name: HomologicalComplex₂.ι_totalShift₁Iso_inv_f
code: @[reassoc]
lemma ι_totalShift₁Iso_inv_f (a b n : ℤ) (h : a + b = n) (a' n' : ℤ)
    (ha' : a' + b = n') (hn' : n' = n + x) :
    K.ιTotal (up ℤ) a' b n' ha' ≫
      (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) x n n' hn').inv ≫
        (K.totalShift₁Iso x).inv.f n =
      (K.shiftFunctor₁XXIso a x a' (by omega) b).inv ≫
        ((shiftFunctor₁ C x).obj K).ιTotal (up ℤ) a b n h 
goal: K.ιTotal (ComplexShape.up ℤ) a' b n' ha' ≫
    (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) x n n' hn').inv ≫ (K.totalShift₁Iso x).inv.f n =
  (K.shiftFunctor₁XXIso a x a' ⋯ b).inv ≫
    ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).ιTotal (ComplexShape.up ℤ) a b n h

full_name: HomologicalComplex₂.totalShift₁Iso_hom_naturality
code: @[reassoc]
lemma totalShift₁Iso_hom_naturality [L.HasTotal (up ℤ)] :
    total.map ((shiftFunctor₁ C x).map f) (up ℤ) ≫ (L.totalShift₁Iso x).hom =
      (K.totalShift₁Iso x).hom ≫ (total.map f (up ℤ))⟦x⟧' 
goal: HomologicalComplex₂.total.map ((HomologicalComplex₂.shiftFunctor₁ C x).map f) (ComplexShape.up ℤ) ≫
    (L.totalShift₁Iso x).hom =
  (K.totalShift₁Iso x).hom ≫
    (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) x).map
      (HomologicalComplex₂.total.map f (ComplexShape.up ℤ))

full_name: HomologicalComplex₂.totalShift₂XIso
code: /-- Auxiliary definition for `totalShift₂Iso`. -/
noncomputable def totalShift₂XIso (n n' : ℤ) (h : n + y = n') :
    (((shiftFunctor₂ C y).obj K).total (up ℤ)).X n ≅ (K.total (up ℤ)).X n' 
goal: (((HomologicalComplex₂.shiftFunctor₂ C y).obj K).total (ComplexShape.up ℤ)).X n ≅ (K.total (ComplexShape.up ℤ)).X n'

full_name: HomologicalComplex₂.D₁_totalShift₂XIso_hom
code: @[reassoc]
lemma D₁_totalShift₂XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + y = n₀') (h₁ : n₁ + y = n₁') :
    ((shiftFunctor₂ C y).obj K).D₁ (up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
      y.negOnePow • ((K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₁ (up ℤ) n₀' n₁') 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).D₁ (ComplexShape.up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
  y.negOnePow • (K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₁ (ComplexShape.up ℤ) n₀' n₁'

full_name: HomologicalComplex₂.D₂_totalShift₂XIso_hom
code: @[reassoc]
lemma D₂_totalShift₂XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + y = n₀') (h₁ : n₁ + y = n₁') :
    ((shiftFunctor₂ C y).obj K).D₂ (up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
      y.negOnePow • ((K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₂ (up ℤ) n₀' n₁') 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).D₂ (ComplexShape.up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
  y.negOnePow • (K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₂ (ComplexShape.up ℤ) n₀' n₁'

full_name: HomologicalComplex₂.totalShift₂Iso
code: /-- The isomorphism `((shiftFunctor₂ C y).obj K).total (up ℤ) ≅ (K.total (up ℤ))⟦y⟧`
expressing the compatibility of the total complex with the shift on the second indices.
This isomorphism involves signs: on the summand in degree `(p, q)` of `K`, it is given by the
multiplication by `(p * y).negOnePow`. -/
noncomputable def totalShift₂Iso :
    ((shiftFunctor₂ C y).obj K).total (up ℤ) ≅ (K.total (up ℤ))⟦y⟧ 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).total (ComplexShape.up ℤ) ≅
  (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) y).obj (K.total (ComplexShape.up ℤ))

full_name: HomologicalComplex₂.ι_totalShift₂Iso_hom_f
code: @[reassoc]
lemma ι_totalShift₂Iso_hom_f (a b n : ℤ) (h : a + b = n) (b' : ℤ) (hb' : b' = b + y)
    (n' : ℤ) (hn' : n' = n + y) :
    ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
      (a * y).negOnePow • (K.shiftFunctor₂XXIso a b y b' hb').hom ≫
        K.ιTotal (up ℤ) a b' n' (by dsimp; omega) ≫
          (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n n' hn').inv 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).ιTotal (ComplexShape.up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
  (a * y).negOnePow •
    (K.shiftFunctor₂XXIso a b y b' hb').hom ≫
      K.ιTotal (ComplexShape.up ℤ) a b' n' ⋯ ≫
        (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) y n n' hn').inv

full_name: HomologicalComplex₂.ι_totalShift₂Iso_inv_f
code: @[reassoc]
lemma ι_totalShift₂Iso_inv_f (a b n : ℤ) (h : a + b = n) (b' n' : ℤ)
    (hb' : a + b' = n') (hn' : n' = n + y) :
    K.ιTotal (up ℤ) a b' n' hb' ≫
      (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n n' hn').inv ≫
        (K.totalShift₂Iso y).inv.f n =
      (a * y).negOnePow • (K.shiftFunctor₂XXIso a b y b' (by omega)).inv ≫
        ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h 
goal: K.ιTotal (ComplexShape.up ℤ) a b' n' hb' ≫
    (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) y n n' hn').inv ≫ (K.totalShift₂Iso y).inv.f n =
  (a * y).negOnePow •
    (K.shiftFunctor₂XXIso a b y b' ⋯).inv ≫
      ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).ιTotal (ComplexShape.up ℤ) a b n h

full_name: HomologicalComplex₂.totalShift₂Iso_hom_naturality
code: @[reassoc]
lemma totalShift₂Iso_hom_naturality [L.HasTotal (up ℤ)] :
    total.map ((shiftFunctor₂ C y).map f) (up ℤ) ≫ (L.totalShift₂Iso y).hom =
      (K.totalShift₂Iso y).hom ≫ (total.map f (up ℤ))⟦y⟧' 
goal: HomologicalComplex₂.total.map ((HomologicalComplex₂.shiftFunctor₂ C y).map f) (ComplexShape.up ℤ) ≫
    (L.totalShift₂Iso y).hom =
  (K.totalShift₂Iso y).hom ≫
    (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) y).map
      (HomologicalComplex₂.total.map f (ComplexShape.up ℤ))

full_name: HomologicalComplex₂.shiftFunctor₁₂CommIso
code: /-- The shift functors `shiftFunctor₁ C x` and `shiftFunctor₂ C y` on bicomplexes
with respect to both variables commute. -/
def shiftFunctor₁₂CommIso (x y : ℤ) :
    shiftFunctor₂ C y ⋙ shiftFunctor₁ C x ≅ shiftFunctor₁ C x ⋙ shiftFunctor₂ C y 
goal: HomologicalComplex₂.shiftFunctor₂ C y ⋙ HomologicalComplex₂.shiftFunctor₁ C x ≅
  HomologicalComplex₂.shiftFunctor₁ C x ⋙ HomologicalComplex₂.shiftFunctor₂ C y

full_name: HomologicalComplex₂.totalShift₁Iso_trans_totalShift₂Iso
code: /-- The compatibility isomorphisms of the total complex with the shifts
in both variables "commute" only up to a sign `(x * y).negOnePow`. -/
lemma totalShift₁Iso_trans_totalShift₂Iso :
    ((shiftFunctor₂ C y).obj K).totalShift₁Iso x ≪≫
      (shiftFunctor (CochainComplex C ℤ) x).mapIso (K.totalShift₂Iso y) =
    (x * y).negOnePow • (total.mapIso ((shiftFunctor₁₂CommIso C x y).app K) (up ℤ)) ≪≫
      ((shiftFunctor₁ C x).obj K).totalShift₂Iso y ≪≫
      (shiftFunctor _ y).mapIso (K.totalShift₁Iso x) ≪≫
      (shiftFunctorComm (CochainComplex C ℤ) x y).app _ 
goal: ((HomologicalComplex₂.shiftFunctor₂ C y).obj K).totalShift₁Iso x ≪≫
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) x).mapIso (K.totalShift₂Iso y) =
  (x * y).negOnePow •
    HomologicalComplex₂.total.mapIso ((HomologicalComplex₂.shiftFunctor₁₂CommIso C x y).app K) (ComplexShape.up ℤ) ≪≫
      ((HomologicalComplex₂.shiftFunctor₁ C x).obj K).totalShift₂Iso y ≪≫
        (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) y).mapIso (K.totalShift₁Iso x) ≪≫
          (CategoryTheory.shiftFunctorComm (CochainComplex C ℤ) x y).app (K.total (ComplexShape.up ℤ))

full_name: HomologicalComplex₂.totalShift₁Iso_hom_totalShift₂Iso_hom
code: /-- The compatibility isomorphisms of the total complex with the shifts
in both variables "commute" only up to a sign `(x * y).negOnePow`. -/
@[reassoc]
lemma totalShift₁Iso_hom_totalShift₂Iso_hom :
    (((shiftFunctor₂ C y).obj K).totalShift₁Iso x).hom ≫ (K.totalShift₂Iso y).hom⟦x⟧' =
      (x * y).negOnePow • (total.map ((shiftFunctor₁₂CommIso C x y).hom.app K) (up ℤ) ≫
          (((shiftFunctor₁ C x).obj K).totalShift₂Iso y).hom ≫
          (K.totalShift₁Iso x).hom⟦y⟧' ≫
          (shiftFunctorComm (CochainComplex C ℤ) x y).hom.app _) 
goal: (((HomologicalComplex₂.shiftFunctor₂ C y).obj K).totalShift₁Iso x).hom ≫
    (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) x).map (K.totalShift₂Iso y).hom =
  (x * y).negOnePow •
    HomologicalComplex₂.total.map ((HomologicalComplex₂.shiftFunctor₁₂CommIso C x y).hom.app K) (ComplexShape.up ℤ) ≫
      (((HomologicalComplex₂.shiftFunctor₁ C x).obj K).totalShift₂Iso y).hom ≫
        (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) y).map (K.totalShift₁Iso x).hom ≫
          (CategoryTheory.shiftFunctorComm (CochainComplex C ℤ) x y).hom.app (K.total (ComplexShape.up ℤ))