File: Mathlib/Algebra/Homology/HomotopyCategory/ShiftSequence.lean

full_name: CochainComplex.shiftShortComplexFunctor'_inv_app_τ₁
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).inv.app X).τ₁ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctor'_inv_app_τ₃
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).inv.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctor'
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: CategoryTheory.shiftFunctor (CochainComplex C ℤ) n ⋙
    HomologicalComplex.shortComplexFunctor' C (ComplexShape.up ℤ) i j k ≅
  HomologicalComplex.shortComplexFunctor' C (ComplexShape.up ℤ) i' j' k'

full_name: CochainComplex.shiftShortComplexFunctor'_inv_app_τ₂
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).inv.app X).τ₂ =
  (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctor'_hom_app_τ₃
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).hom.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctor'_hom_app_τ₁
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).hom.app X).τ₁ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctor'_hom_app_τ₂
code: /-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k' 
goal: ((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).hom.app X).τ₂ =
  (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctorIso_hom_app_τ₃
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).hom.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctorIso_inv_app_τ₂
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).inv.app X).τ₂ = (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctorIso_hom_app_τ₁
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).hom.app X).τ₁ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctorIso
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: CochainComplex.shiftFunctor C n ⋙ HomologicalComplex.shortComplexFunctor C (ComplexShape.up ℤ) i ≅
  HomologicalComplex.shortComplexFunctor C (ComplexShape.up ℤ) i'

full_name: CochainComplex.shiftShortComplexFunctorIso_inv_app_τ₁
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).inv.app X).τ₁ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctorIso_inv_app_τ₃
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).inv.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv

full_name: CochainComplex.shiftShortComplexFunctorIso_hom_app_τ₂
code: /-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i' 
goal: ((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).hom.app X).τ₂ = (HomologicalComplex.XIsoOfEq X ⋯).hom

full_name: CochainComplex.shiftShortComplexFunctorIso_zero_add_hom_app
code: lemma shiftShortComplexFunctorIso_zero_add_hom_app (a : ℤ) (K : CochainComplex C ℤ) :
    (shiftShortComplexFunctorIso C 0 a a (zero_add a)).hom.app K =
      (shortComplexFunctor C (ComplexShape.up ℤ) a).map
        ((shiftFunctorZero (CochainComplex C ℤ) ℤ).hom.app K) 
goal: (CochainComplex.shiftShortComplexFunctorIso C 0 a a ⋯).hom.app K =
  (HomologicalComplex.shortComplexFunctor C (ComplexShape.up ℤ) a).map
    ((CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ).hom.app K)

full_name: CochainComplex.shiftShortComplexFunctorIso_add'_hom_app
code: lemma shiftShortComplexFunctorIso_add'_hom_app
    (n m mn : ℤ) (hmn : m + n = mn) (a a' a'' : ℤ) (ha' : n + a = a') (ha'' : m + a' = a'')
    (K : CochainComplex C ℤ) :
    (shiftShortComplexFunctorIso C mn a a'' (by rw [← ha'', ← ha', ← add_assoc, hmn])).hom.app K =
      (shortComplexFunctor C (ComplexShape.up ℤ) a).map
        ((CategoryTheory.shiftFunctorAdd' (CochainComplex C ℤ) m n mn hmn).hom.app K) ≫
        (shiftShortComplexFunctorIso C n a a' ha').hom.app (K⟦m⟧) ≫
        (shiftShortComplexFunctorIso C m a' a'' ha'' ).hom.app K 
goal: (CochainComplex.shiftShortComplexFunctorIso C mn a a'' ⋯).hom.app K =
  (HomologicalComplex.shortComplexFunctor C (ComplexShape.up ℤ) a).map
      ((CategoryTheory.shiftFunctorAdd' (CochainComplex C ℤ) m n mn hmn).hom.app K) ≫
    (CochainComplex.shiftShortComplexFunctorIso C n a a' ha').hom.app
        ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) m).obj K) ≫
      (CochainComplex.shiftShortComplexFunctorIso C m a' a'' ha'').hom.app K

full_name: CochainComplex.ShiftSequence.shiftIso
code: /-- The natural isomorphism `(K⟦n⟧).homology a ≅ K.homology a'`when `n + a = a`. -/
noncomputable def shiftIso (n a a' : ℤ) (ha' : n + a = a') :
    (CategoryTheory.shiftFunctor _ n) ⋙ homologyFunctor C (ComplexShape.up ℤ) a ≅
      homologyFunctor C (ComplexShape.up ℤ) a' 
goal: CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n ⋙
    HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) a ≅
  HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) a'

full_name: CochainComplex.ShiftSequence.shiftIso_hom_app
code: lemma shiftIso_hom_app (n a a' : ℤ) (ha' : n + a = a') (K : CochainComplex C ℤ) :
    (shiftIso C n a a' ha').hom.app K =
      ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').hom.app K) 
goal: (CochainComplex.ShiftSequence.shiftIso C n a a' ha').hom.app K =
  CategoryTheory.ShortComplex.homologyMap ((CochainComplex.shiftShortComplexFunctorIso C n a a' ha').hom.app K)

full_name: CochainComplex.ShiftSequence.shiftIso_inv_app
code: lemma shiftIso_inv_app (n a a' : ℤ) (ha' : n + a = a') (K : CochainComplex C ℤ) :
    (shiftIso C n a a' ha').inv.app K =
      ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K) 
goal: (CochainComplex.ShiftSequence.shiftIso C n a a' ha').inv.app K =
  CategoryTheory.ShortComplex.homologyMap ((CochainComplex.shiftShortComplexFunctorIso C n a a' ha').inv.app K)

full_name: CochainComplex.instShiftSequenceHomologicalComplexIntUpHomologyFunctorOfNat
code: noncomputable instance :
    (homologyFunctor C (ComplexShape.up ℤ) 0).ShiftSequence ℤ 
goal: (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).ShiftSequence ℤ

full_name: CochainComplex.quasiIsoAt_shift_iff
code: lemma quasiIsoAt_shift_iff {K L : CochainComplex C ℤ} (φ : K ⟶ L) (n i j : ℤ) (h : n + i = j) :
    QuasiIsoAt (φ⟦n⟧') i ↔ QuasiIsoAt φ j 
goal: QuasiIsoAt ((CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n).map φ) i ↔ QuasiIsoAt φ j

full_name: CochainComplex.quasiIso_shift_iff
code: lemma quasiIso_shift_iff {K L : CochainComplex C ℤ} (φ : K ⟶ L) (n : ℤ) :
    QuasiIso (φ⟦n⟧') ↔ QuasiIso φ 
goal: QuasiIso ((CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n).map φ) ↔ QuasiIso φ

full_name: CochainComplex.instQuasiIsoIntMapHomologicalComplexUpShiftFunctor
code: instance {K L : CochainComplex C ℤ} (φ : K ⟶ L) (n : ℤ) [QuasiIso φ] :
    QuasiIso (φ⟦n⟧') 
goal: QuasiIso ((CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n).map φ)

full_name: CochainComplex.instIsCompatibleWithShiftHomologicalComplexIntUpQuasiIso
code: instance : (HomologicalComplex.quasiIso C (ComplexShape.up ℤ)).IsCompatibleWithShift ℤ 
goal: (HomologicalComplex.quasiIso C (ComplexShape.up ℤ)).IsCompatibleWithShift ℤ

full_name: CochainComplex.homologyFunctor_shift
code: lemma homologyFunctor_shift (n : ℤ) :
    (homologyFunctor C (ComplexShape.up ℤ) 0).shift n =
      homologyFunctor C (ComplexShape.up ℤ) n 
goal: (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shift n =
  HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) n

full_name: CochainComplex.liftCycles_shift_homologyπ
code: @[reassoc]
lemma liftCycles_shift_homologyπ
    (K : CochainComplex C ℤ) {A : C} {n i : ℤ} (f : A ⟶ (K⟦n⟧).X i) (j : ℤ)
    (hj : (up ℤ).next i = j) (hf : f ≫ (K⟦n⟧).d i j = 0) (i' : ℤ) (hi' : n + i = i') (j' : ℤ)
    (hj' : (up ℤ).next i' = j') :
    (K⟦n⟧).liftCycles f j hj hf ≫ (K⟦n⟧).homologyπ i =
      K.liftCycles (f ≫ (K.shiftFunctorObjXIso n i i' (by omega)).hom) j' hj' (by
        simp only [next] at hj hj'
        obtain rfl : i' = i + n := by omega
        obtain rfl : j' = j + n := by omega
        dsimp at hf ⊢
        simp only [Linear.comp_units_smul] at hf
        apply (one_smul (M := ℤˣ) _).symm.trans _
        rw [← Int.units_mul_self n.negOnePow, mul_smul, comp_id, hf, smul_zero]) ≫
        K.homologyπ i' ≫
          ((HomologicalComplex.homologyFunctor C (up ℤ) 0).shiftIso n i i' hi').inv.app K 
goal: HomologicalComplex.liftCycles ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K) f j hj hf ≫
    HomologicalComplex.homologyπ ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K) i =
  HomologicalComplex.liftCycles K (f ≫ (K.shiftFunctorObjXIso n i i' ⋯).hom) j' hj' ⋯ ≫
    HomologicalComplex.homologyπ K i' ≫
      ((HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftIso n i i' hi').inv.app K

full_name: HomotopyCategory.instShiftSequenceIntUpHomologyFunctorOfNat
code: noncomputable instance :
    (homologyFunctor C (ComplexShape.up ℤ) 0).ShiftSequence ℤ 
goal: (HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).ShiftSequence ℤ

full_name: HomotopyCategory.homologyShiftIso_hom_app
code: lemma homologyShiftIso_hom_app (n a a' : ℤ) (ha' : n + a = a') (K : CochainComplex C ℤ) :
    ((homologyFunctor C (ComplexShape.up ℤ) 0).shiftIso n a a' ha').hom.app
      ((quotient _ _).obj K) =
    (homologyFunctor _ _ a).map (((quotient _ _).commShiftIso n).inv.app K) ≫
      (homologyFunctorFactors _ _ a).hom.app (K⟦n⟧) ≫
      ((HomologicalComplex.homologyFunctor _ _ 0).shiftIso n a a' ha').hom.app K ≫
      (homologyFunctorFactors _ _ a').inv.app K 
goal: ((HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).shiftIso n a a' ha').hom.app
    ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).obj K) =
  (HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) a).map
      (((HomotopyCategory.quotient C (ComplexShape.up ℤ)).commShiftIso n).inv.app K) ≫
    (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a).hom.app
        ((CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n).obj K) ≫
      ((HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftIso n a a' ha').hom.app K ≫
        (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a').inv.app K

full_name: HomotopyCategory.homologyFunctor_shiftMap
code: @[reassoc]
lemma homologyFunctor_shiftMap
    {K L : CochainComplex C ℤ} {n : ℤ} (f : K ⟶ L⟦n⟧) (a a' : ℤ) (h : n + a = a') :
    (homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap
      ((quotient _ _).map f ≫ ((quotient _ _).commShiftIso n).hom.app _) a a' h =
        (homologyFunctorFactors _ _ a).hom.app K ≫
          (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap f a a' h ≫
            (homologyFunctorFactors _ _ a').inv.app L 
goal: (HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap
    ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).map f ≫
      ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).commShiftIso n).hom.app L)
    a a' h =
  (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a).hom.app K ≫
    (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap f a a' h ≫
      (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a').inv.app L