Theorem: CategoryTheory.ShortComplex.exact_iff_epi
File: Mathlib/Algebra/Homology/ShortComplex/Exact.lean

tactic: constructor
state_before: C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
⊢ S.Exact ↔ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
⊢ S.Exact → Epi S.f

case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
⊢ Epi S.f → S.Exact

tactic: intro h
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
⊢ S.Exact → Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
h : S.Exact
⊢ Epi S.f

tactic: have := h.hasHomology
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
h : S.Exact
⊢ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
h : S.Exact
this : S.HasHomology
⊢ Epi S.f

tactic: simp only [exact_iff_isZero_homology] at h
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
h : S.Exact
this : S.HasHomology
⊢ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this : S.HasHomology
h : IsZero S.homology
⊢ Epi S.f

tactic: haveI := S.isIso_iCycles hg
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this : S.HasHomology
h : IsZero S.homology
⊢ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝ : S.HasHomology
h : IsZero S.homology
this : IsIso S.iCycles
⊢ Epi S.f

tactic: haveI : Epi S.toCycles := epi_of_isZero_cokernel' _ S.homologyIsCokernel h
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝ : S.HasHomology
h : IsZero S.homology
this : IsIso S.iCycles
⊢ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝¹ : S.HasHomology
h : IsZero S.homology
this✝ : IsIso S.iCycles
this : Epi S.toCycles
⊢ Epi S.f

tactic: rw [← S.toCycles_i]
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝¹ : S.HasHomology
h : IsZero S.homology
this✝ : IsIso S.iCycles
this : Epi S.toCycles
⊢ Epi S.f
state_after: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝¹ : S.HasHomology
h : IsZero S.homology
this✝ : IsIso S.iCycles
this : Epi S.toCycles
⊢ Epi (S.toCycles ≫ S.iCycles)

tactic: apply epi_comp
state_before: case mp
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
this✝¹ : S.HasHomology
h : IsZero S.homology
this✝ : IsIso S.iCycles
this : Epi S.toCycles
⊢ Epi (S.toCycles ≫ S.iCycles)
state_after: no goals

tactic: intro
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
⊢ Epi S.f → S.Exact
state_after: case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
a✝ : Epi S.f
⊢ S.Exact

tactic: rw [(HomologyData.ofIsColimitCokernelCofork S hg _
  (CokernelCofork.IsColimit.ofEpiOfIsZero (CokernelCofork.ofπ (0 : S.X₂ ⟶ 0) comp_zero)
    inferInstance (isZero_zero C))).exact_iff]
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
a✝ : Epi S.f
⊢ S.Exact
state_after: case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
a✝ : Epi S.f
⊢ IsZero
    (HomologyData.ofIsColimitCokernelCofork S hg (CokernelCofork.ofπ 0 ⋯)
          (CokernelCofork.IsColimit.ofEpiOfIsZero (CokernelCofork.ofπ 0 ⋯) ⋯ ⋯)).left.H

tactic: exact isZero_zero C
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.35158, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
hg : S.g = 0
a✝ : Epi S.f
⊢ IsZero
    (HomologyData.ofIsColimitCokernelCofork S hg (CokernelCofork.ofπ 0 ⋯)
          (CokernelCofork.IsColimit.ofEpiOfIsZero (CokernelCofork.ofπ 0 ⋯) ⋯ ⋯)).left.H
state_after: no goals