-- Mathlib/CategoryTheory/Abelian/Injective/Resolution.lean
theorem exact_f_d {X Y : C} (f : X ⟶ Y) :
    (ShortComplex.mk f (d f) (by simp)).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
⊢ f ≫ cokernel.π f = 0

Tactic:
simp

Result:
no goals

Proof state:
case hS
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ IsColimit (CokernelCofork.ofπ (ShortComplex.mk f (cokernel.π f) ⋯).g ⋯)

Tactic:
apply cokernelIsCokernel

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝ : Epi α.τ₁
this : IsIso α.τ₂
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Tactic:
have : Mono α.τ₃ := by dsimp; infer_instance

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this : Epi α.τ₁
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Tactic:
have : IsIso α.τ₂ := by dsimp; infer_instance

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝ : Epi α.τ₁
this : IsIso α.τ₂
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝ : Epi α.τ₁
this : IsIso α.τ₂
⊢ Mono α.τ₃

Tactic:
infer_instance

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
⊢ Epi α.τ₁

Tactic:
infer_instance

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Tactic:
rw [← ShortComplex.exact_iff_of_epi_of_isIso_of_mono α]

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ (ShortComplex.mk f (cokernel.π f) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Tactic:
have : Epi α.τ₁ := by dsimp; infer_instance

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this : Epi α.τ₁
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Tactic:
let α : ShortComplex.mk f (cokernel.π f) (by simp) ⟶ ShortComplex.mk f (d f) (by simp) :=
  { τ₁ := 𝟙 _
    τ₂ := 𝟙 _
    τ₃ := Injective.ι _  }

Result:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
⊢ (ShortComplex.mk f (d f) ⋯).Exact

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ (ShortComplex.mk f (cokernel.π f) ⋯).Exact

Tactic:
apply ShortComplex.exact_of_g_is_cokernel

Result:
case hS
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this✝¹ : Epi α.τ₁
this✝ : IsIso α.τ₂
this : Mono α.τ₃
⊢ IsColimit (CokernelCofork.ofπ (ShortComplex.mk f (cokernel.π f) ⋯).g ⋯)

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
α : ShortComplex.mk f (cokernel.π f) ⋯ ⟶ ShortComplex.mk f (d f) ⋯ :=
  { τ₁ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₁, τ₂ := 𝟙 (ShortComplex.mk f (cokernel.π f) ⋯).X₂,
    τ₃ := ι (ShortComplex.mk f (cokernel.π f) ⋯).X₃, comm₁₂ := ⋯, comm₂₃ := ⋯ }
this : Epi α.τ₁
⊢ IsIso α.τ₂

Tactic:
infer_instance

Result:
no goals

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
X Y : C
f : X ⟶ Y
⊢ f ≫ d f = 0

Tactic:
simp

Result:
no goals