-- Mathlib/Algebra/Homology/DerivedCategory/Ext/ExactSequences.lean
/-- Alternative formulation of `contravariant_sequence_exact₁` -/
lemma contravariant_sequence_exact₁' :
    (ShortComplex.mk (AddCommGrp.ofHom (((mk₀ S.f).precomp Y (zero_add n₀))))
      (AddCommGrp.ofHom (hS.extClass.precomp Y h)) (by
        ext
        dsimp
        simp only [ShortComplex.ShortExact.extClass_comp_assoc])).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
this : HasDerivedCategory C := HasDerivedCategory.standard C
⊢ ↑n₀ + 1 = ↑n₁

Tactic:
omega

Result:
no goals

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

Tactic:
apply singleFunctor_map_comp_hom (C := C)

Result:
no goals

Proof state:
case hf.h
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
x✝ : ↑(AddCommGrp.of (Ext S.X₂ Y n₀))
⊢ hS.extClass.comp ((mk₀ S.f).comp x✝ ⋯) h = 0

Tactic:
simp only [ShortComplex.ShortExact.extClass_comp_assoc]

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
this : HasDerivedCategory C := HasDerivedCategory.standard C
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯)) (AddCommGrp.ofHom (hS.extClass.precomp Y h)) ⋯).Exact

Tactic:
have := (preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).homologySequence_exact₃ _
  (op_distinguished _ hS.singleTriangle_distinguished) n₀ n₁ (by omega)

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  (ShortComplex.mk
      (((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).shift ↑n₀).map
        ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)).mor₂)
      ((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).homologySequenceδ
        ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)) ↑n₀ ↑n₁ ⋯)
      ⋯).Exact
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯)) (AddCommGrp.ofHom (hS.extClass.precomp Y h)) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  (ShortComplex.mk
      (((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).shift ↑n₀).map
        ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)).mor₂)
      ((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).homologySequenceδ
        ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)) ↑n₀ ↑n₁ ⋯)
      ⋯).Exact
⊢ (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯)) (AddCommGrp.ofHom (hS.extClass.precomp Y h)) ⋯).Exact

Tactic:
rw [ShortComplex.ab_exact_iff_function_exact] at this ⊢

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
this✝ : HasDerivedCategory C := HasDerivedCategory.standard C
this :
  Function.Exact
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).shift ↑n₀).map
              ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)).mor₂)
            ((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).homologySequenceδ
              ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)) ↑n₀ ↑n₁ ⋯)
            ⋯).f)
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk
            (((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).shift ↑n₀).map
              ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)).mor₂)
            ((preadditiveYoneda.obj ((singleFunctor C 0).obj Y)).homologySequenceδ
              ((triangleOpEquivalence (DerivedCategory C)).functor.obj (op hS.singleTriangle)) ↑n₀ ↑n₁ ⋯)
            ⋯).g)
⊢ Function.Exact
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯)) (AddCommGrp.ofHom (hS.extClass.precomp Y h)) ⋯).f)
    ⇑(ConcreteCategory.hom
        (ShortComplex.mk (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯)) (AddCommGrp.ofHom (hS.extClass.precomp Y h)) ⋯).g)

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
⊢ AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯) ≫ AddCommGrp.ofHom (hS.extClass.precomp Y h) = 0

Tactic:
ext

Result:
case hf.h
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasExt C
S : ShortComplex C
hS : S.ShortExact
Y : C
n₀ n₁ : ℕ
h : 1 + n₀ = n₁
x✝ : ↑(AddCommGrp.of (Ext S.X₂ Y n₀))
⊢ (AddCommGrp.Hom.hom (AddCommGrp.ofHom ((mk₀ S.f).precomp Y ⋯) ≫ AddCommGrp.ofHom (hS.extClass.precomp Y h))) x✝ =
    (AddCommGrp.Hom.hom 0) x✝