-- Mathlib/Algebra/Homology/HomotopyCategory/ShortExact.lean
lemma homologySequenceδ_triangleh (n₀ : ℤ) (n₁ : ℤ) (h : n₀ + 1 = n₁) :
    (homologyFunctor C (up ℤ) 0).homologySequenceδ (triangleh S.f) n₀ n₁ h =
      (homologyFunctorFactors C (up ℤ) n₀).hom.app _ ≫
        HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫ hS.δ n₀ n₁ h ≫
          (homologyFunctorFactors C (up ℤ) n₁).inv.app _

Proof state:
case a.w.h.op.h.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : ShortComplex (CochainComplex C ℤ)
hS : S.ShortExact
n₀ n₁ : ℤ
h : n₀ + 1 = n₁
A : C
x : A ⟶ (HomologicalComplex.homologyFunctor C (up ℤ) n₀).obj (mappingCone S.f)
A' : C
π : A' ⟶ A
w✝ : Epi π
x' : A' ⟶ (mappingCone S.f).X n₀
w : x' ≫ (mappingCone S.f).d n₀ n₁ = 0
hx' : π ≫ x = (mappingCone S.f).liftCycles x' n₁ ⋯ w ≫ (mappingCone S.f).homologyπ n₀
⊢ (yoneda.map
          ((homologyFunctorFactors C (up ℤ) n₀).inv.app (mappingCone S.f) ≫
            (homologyFunctorFactors C (up ℤ) n₀).hom.app (triangle S.f).obj₃ ≫
              (HomologicalComplex.homologyFunctor C (up ℤ) 0).shiftMap (triangle S.f).mor₃ n₀ n₁ ⋯ ≫
                (homologyFunctorFactors C (up ℤ) n₁).inv.app (triangle S.f).obj₁ ≫
                  (homologyFunctorFactors C (up ℤ) n₁).hom.app S.X₁)).app
      (Opposite.op A) x =
    (yoneda.map
          (HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫
            hS.δ n₀ n₁ h ≫ 𝟙 ((HomologicalComplex.homologyFunctor C (up ℤ) n₁).obj S.X₁))).app
      (Opposite.op A) x

Tactic:
dsimp

Result:
case a.w.h.op.h.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : ShortComplex (CochainComplex C ℤ)
hS : S.ShortExact
n₀ n₁ : ℤ
h : n₀ + 1 = n₁
A : C
x : A ⟶ (HomologicalComplex.homologyFunctor C (up ℤ) n₀).obj (mappingCone S.f)
A' : C
π : A' ⟶ A
w✝ : Epi π
x' : A' ⟶ (mappingCone S.f).X n₀
w : x' ≫ (mappingCone S.f).d n₀ n₁ = 0
hx' : π ≫ x = (mappingCone S.f).liftCycles x' n₁ ⋯ w ≫ (mappingCone S.f).homologyπ n₀
⊢ x ≫
      (homologyFunctorFactors C (up ℤ) n₀).inv.app (mappingCone S.f) ≫
        (homologyFunctorFactors C (up ℤ) n₀).hom.app (mappingCone S.f) ≫
          (HomologicalComplex.homologyFunctor C (up ℤ) 0).shiftMap (triangle S.f).mor₃ n₀ n₁ ⋯ ≫
            (homologyFunctorFactors C (up ℤ) n₁).inv.app S.X₁ ≫ (homologyFunctorFactors C (up ℤ) n₁).hom.app S.X₁ =
    x ≫ HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫ hS.δ n₀ n₁ h ≫ 𝟙 (S.X₁.homology n₁)

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : ShortComplex (CochainComplex C ℤ)
hS : S.ShortExact
n₀ n₁ : ℤ
h : n₀ + 1 = n₁
⊢ (homologyFunctor C (up ℤ) 0).homologySequenceδ
      (Triangle.mk ((quotient C (up ℤ)).map S.f) ((quotient C (up ℤ)).map (inr S.f))
        ((quotient C (up ℤ)).map (triangle S.f).mor₃ ≫ ((quotient C (up ℤ)).commShiftIso 1).hom.app S.X₁))
      n₀ n₁ h =
    (homologyFunctorFactors C (up ℤ) n₀).hom.app (mappingCone S.f) ≫
      HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫
        hS.δ n₀ n₁ h ≫ (homologyFunctorFactors C (up ℤ) n₁).inv.app S.X₁

Tactic:
rw [← cancel_mono ((homologyFunctorFactors C (up ℤ) n₁).hom.app _),
  assoc, assoc, assoc, Iso.inv_hom_id_app,
  ← cancel_epi ((homologyFunctorFactors C (up ℤ) n₀).inv.app _), Iso.inv_hom_id_app_assoc]

Result:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : ShortComplex (CochainComplex C ℤ)
hS : S.ShortExact
n₀ n₁ : ℤ
h : n₀ + 1 = n₁
⊢ (homologyFunctorFactors C (up ℤ) n₀).inv.app (mappingCone S.f) ≫
      (homologyFunctor C (up ℤ) 0).homologySequenceδ
          (Triangle.mk ((quotient C (up ℤ)).map S.f) ((quotient C (up ℤ)).map (inr S.f))
            ((quotient C (up ℤ)).map (triangle S.f).mor₃ ≫ ((quotient C (up ℤ)).commShiftIso 1).hom.app S.X₁))
          n₀ n₁ h ≫
        (homologyFunctorFactors C (up ℤ) n₁).hom.app S.X₁ =
    HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫
      hS.δ n₀ n₁ h ≫ 𝟙 ((HomologicalComplex.homologyFunctor C (up ℤ) n₁).obj S.X₁)