-- Mathlib/Algebra/Homology/DerivedCategory/Ext/ExactSequences.lean
/-- Alternative formulation of `covariant_sequence_exact₂` -/
lemma covariant_sequence_exact₂' (n : ℕ) :
    (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X (add_zero n)))
      (AddCommGrp.ofHom ((mk₀ S.g).postcomp X (add_zero n))) (by
        ext x
        dsimp
        simp only [comp_assoc_of_third_deg_zero, mk₀_comp_mk₀, ShortComplex.zero, mk₀_zero,
          comp_zero])).Exact

Proof state:
case comm₂₃.h
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  Function.Exact
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).f)
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).g)
x : Ext X S.X₂ n
⊢ ((ConcreteCategory.hom
            (ShortComplex.mk
                (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
                (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂)
                ⋯).g).comp
        ↑homAddEquiv)
      x =
    ((↑homAddEquiv).comp
        (ConcreteCategory.hom
          (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯))
              ⋯).g))
      x

Tactic:
apply hom_comp_singleFunctor_map_shift (C := C)

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯)) ⋯).Exact

Tactic:
letI := HasDerivedCategory.standard C

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this : HasDerivedCategory C := HasDerivedCategory.standard C
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯)) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this : HasDerivedCategory C := HasDerivedCategory.standard C
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯)) ⋯).Exact

Tactic:
have := (preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).homologySequence_exact₂ _
  (hS.singleTriangle_distinguished) n

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  (ShortComplex.mk (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
      (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).Exact
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯)) ⋯).Exact

Proof state:
case comm₂₃
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  Function.Exact
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).f)
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).g)
⊢ (ConcreteCategory.hom
          (ShortComplex.mk
              (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
              (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂)
              ⋯).g).comp
      ↑homAddEquiv =
    (↑homAddEquiv).comp
      (ConcreteCategory.hom
        (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯)) ⋯).g)

Tactic:
ext x

Result:
case comm₂₃.h
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
X : C
S : ShortComplex C
hS : S.ShortExact
n : ℕ
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  Function.Exact
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).f)
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
            (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂) ⋯).g)
x : Ext X S.X₂ n
⊢ ((ConcreteCategory.hom
            (ShortComplex.mk
                (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₁)
                (((preadditiveCoyoneda.obj (op ((singleFunctor C 0).obj X))).shift ↑n).map hS.singleTriangle.mor₂)
                ⋯).g).comp
        ↑homAddEquiv)
      x =
    ((↑homAddEquiv).comp
        (ConcreteCategory.hom
          (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).postcomp X ⋯)) (AddCommGrp.ofHom ((mk₀ S.g).postcomp X ⋯))
              ⋯).g))
      x