l3lab/ntp-mathlib huggingface dataset:
lemma Exact.mono_g (hS : S.Exact) (hf : S.f = 0) : Mono S.g := by
  have := hS.hasHomology
  have := hS.epi_toCycles
  have : S.iCycles = 0 := by rw [← cancel_epi S.toCycles, comp_zero, toCycles_i, hf]
  apply Preadditive.mono_of_cancel_zero
  intro A x₂ hx₂
  

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.71700, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hf : S.f = 0
this✝¹ : HasHomology S
this✝ : Epi (toCycles S)
this : iCycles S = 0
A : C
x₂ : A ⟶ S.X₂
hx₂ : x₂ ≫ S.g = 0
⊢ x₂ = 0

Next tactic:
rw [← S.liftCycles_i x₂ hx₂, this, comp_zero]
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
⊢ Epi S.f

Next tactic:
have := hS.hasHomology
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this : HasHomology S
⊢ Epi S.f

Next tactic:
have := hS.mono_fromOpcycles
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  have := hS.mono_fromOpcycles
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this✝ : HasHomology S
this : Mono (fromOpcycles S)
⊢ Epi S.f

Next tactic:
have : S.pOpcycles = 0 := by rw [← cancel_mono S.fromOpcycles, zero_comp, p_fromOpcycles, hg]
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  have := hS.mono_fromOpcycles
  have : S.pOpcycles = 0 := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this✝ : HasHomology S
this : Mono (fromOpcycles S)
⊢ pOpcycles S = 0

Next tactic:
rw [← cancel_mono S.fromOpcycles, zero_comp, p_fromOpcycles, hg]
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  have := hS.mono_fromOpcycles
  have : S.pOpcycles = 0 := by rw [← cancel_mono S.fromOpcycles, zero_comp, p_fromOpcycles, hg]
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this✝¹ : HasHomology S
this✝ : Mono (fromOpcycles S)
this : pOpcycles S = 0
⊢ Epi S.f

Next tactic:
apply Preadditive.epi_of_cancel_zero
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  have := hS.mono_fromOpcycles
  have : S.pOpcycles = 0 := by rw [← cancel_mono S.fromOpcycles, zero_comp, p_fromOpcycles, hg]
  apply Preadditive.epi_of_cancel_zero
  

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this✝¹ : HasHomology S
this✝ : Mono (fromOpcycles S)
this : pOpcycles S = 0
⊢ ∀ {R : C} (g : S.X₂ ⟶ R), S.f ≫ g = 0 → g = 0

Next tactic:
intro A x₂ hx₂
lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f := by
  have := hS.hasHomology
  have := hS.mono_fromOpcycles
  have : S.pOpcycles = 0 := by rw [← cancel_mono S.fromOpcycles, zero_comp, p_fromOpcycles, hg]
  apply Preadditive.epi_of_cancel_zero
  intro A x₂ hx₂
  

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.73901, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hg : S.g = 0
this✝¹ : HasHomology S
this✝ : Mono (fromOpcycles S)
this : pOpcycles S = 0
A : C
x₂ : S.X₂ ⟶ A
hx₂ : S.f ≫ x₂ = 0
⊢ x₂ = 0

Next tactic:
rw [← S.p_descOpcycles x₂ hx₂, this, zero_comp]
lemma Exact.mono_g_iff (hS : S.Exact) : Mono S.g ↔ S.f = 0 := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.76096, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ Mono S.g ↔ S.f = 0

Next tactic:
constructor
lemma Exact.mono_g_iff (hS : S.Exact) : Mono S.g ↔ S.f = 0 := by
  constructor
  · 

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.76096, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ Mono S.g → S.f = 0

Next tactic:
intro
lemma Exact.mono_g_iff (hS : S.Exact) : Mono S.g ↔ S.f = 0 := by
  constructor
  · intro
    

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.76096, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
a✝ : Mono S.g
⊢ S.f = 0

Next tactic:
rw [← cancel_mono S.g, zero, zero_comp]
lemma Exact.mono_g_iff (hS : S.Exact) : Mono S.g ↔ S.f = 0 := by
  constructor
  · intro
    rw [← cancel_mono S.g, zero, zero_comp]
  · 

Proof state:
case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.76096, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ S.f = 0 → Mono S.g

Next tactic:
exact hS.mono_g
lemma Exact.epi_f_iff (hS : S.Exact) : Epi S.f ↔ S.g = 0 := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.77225, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ Epi S.f ↔ S.g = 0

Next tactic:
constructor
lemma Exact.epi_f_iff (hS : S.Exact) : Epi S.f ↔ S.g = 0 := by
  constructor
  · 

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.77225, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ Epi S.f → S.g = 0

Next tactic:
intro
lemma Exact.epi_f_iff (hS : S.Exact) : Epi S.f ↔ S.g = 0 := by
  constructor
  · intro
    

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.77225, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
a✝ : Epi S.f
⊢ S.g = 0

Next tactic:
rw [← cancel_epi S.f, zero, comp_zero]
lemma Exact.epi_f_iff (hS : S.Exact) : Epi S.f ↔ S.g = 0 := by
  constructor
  · intro
    rw [← cancel_epi S.f, zero, comp_zero]
  · 

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

Next tactic:
exact hS.epi_f
lemma Exact.isZero_X₂ (hS : S.Exact) (hf : S.f = 0) (hg : S.g = 0) : IsZero S.X₂ := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.78356, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hf : S.f = 0
hg : S.g = 0
⊢ IsZero S.X₂

Next tactic:
have := hS.mono_g hf
lemma Exact.isZero_X₂ (hS : S.Exact) (hf : S.f = 0) (hg : S.g = 0) : IsZero S.X₂ := by
  have := hS.mono_g hf
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.78356, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hf : S.f = 0
hg : S.g = 0
this : Mono S.g
⊢ IsZero S.X₂

Next tactic:
rw [IsZero.iff_id_eq_zero, ← cancel_mono S.g, hg, comp_zero, comp_zero]
lemma Exact.isZero_X₂_iff (hS : S.Exact) : IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0 := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.80072, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0

Next tactic:
constructor
lemma Exact.isZero_X₂_iff (hS : S.Exact) : IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0 := by
  constructor
  · 

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.80072, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ IsZero S.X₂ → S.f = 0 ∧ S.g = 0

Next tactic:
intro h
lemma Exact.isZero_X₂_iff (hS : S.Exact) : IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0 := by
  constructor
  · intro h
    

Proof state:
case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.80072, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
h : IsZero S.X₂
⊢ S.f = 0 ∧ S.g = 0

Next tactic:
exact ⟨h.eq_of_tgt _ _, h.eq_of_src _ _⟩
lemma Exact.isZero_X₂_iff (hS : S.Exact) : IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0 := by
  constructor
  · intro h
    exact ⟨h.eq_of_tgt _ _, h.eq_of_src _ _⟩
  · 

Proof state:
case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.80072, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
⊢ S.f = 0 ∧ S.g = 0 → IsZero S.X₂

Next tactic:
rintro ⟨hf, hg⟩
lemma Exact.isZero_X₂_iff (hS : S.Exact) : IsZero S.X₂ ↔ S.f = 0 ∧ S.g = 0 := by
  constructor
  · intro h
    exact ⟨h.eq_of_tgt _ _, h.eq_of_src _ _⟩
  · rintro ⟨hf, hg⟩
    

Proof state:
case mpr.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.80072, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : Exact S
hf : S.f = 0
hg : S.g = 0
⊢ IsZero S.X₂

Next tactic:
exact hS.isZero_X₂ hf hg
@[reassoc]
lemma r_f (s : S.Splitting) : s.r ≫ S.f = 𝟙 _ - S.g ≫ s.s := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.83600, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
⊢ s.r ≫ S.f = 𝟙 S.X₂ - S.g ≫ s.s

Next tactic:
rw [← s.id, add_sub_cancel]
@[reassoc]
lemma g_s (s : S.Splitting) : S.g ≫ s.s = 𝟙 _ - s.r ≫ S.f := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.84842, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
⊢ S.g ≫ s.s = 𝟙 S.X₂ - s.r ≫ S.f

Next tactic:
rw [← s.id, add_sub_cancel']
lemma mono_f (s : S.Splitting) : Mono S.f := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.87139, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
⊢ Mono S.f

Next tactic:
have := s.isSplitMono_f
lemma mono_f (s : S.Splitting) : Mono S.f := by
  have := s.isSplitMono_f
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.87139, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
this : IsSplitMono S.f
⊢ Mono S.f

Next tactic:
infer_instance
lemma epi_g (s : S.Splitting) : Epi S.g := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.88706, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
⊢ Epi S.g

Next tactic:
have := s.isSplitEpi_g
lemma epi_g (s : S.Splitting) : Epi S.g := by
  have := s.isSplitEpi_g
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.88706, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
this : IsSplitEpi S.g
⊢ Epi S.g

Next tactic:
infer_instance
@[reassoc (attr := simp)]
lemma s_r (s : S.Splitting) : s.s ≫ s.r = 0 := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.89168, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
⊢ s.s ≫ s.r = 0

Next tactic:
have := s.epi_g
@[reassoc (attr := simp)]
lemma s_r (s : S.Splitting) : s.s ≫ s.r = 0 := by
  have := s.epi_g
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.89168, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s : Splitting S
this : Epi S.g
⊢ s.s ≫ s.r = 0

Next tactic:
simp only [← cancel_epi S.g, comp_zero, g_s_assoc, sub_comp, id_comp,
    assoc, f_r, comp_id, sub_self]
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.r = s'.r
⊢ s = s'

Next tactic:
have := s.epi_g
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.r = s'.r
this : Epi S.g
⊢ s = s'

Next tactic:
have eq := s.id
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.r = s'.r
this : Epi S.g
eq : s.r ≫ S.f + S.g ≫ s.s = 𝟙 S.X₂
⊢ s = s'

Next tactic:
rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.r = s'.r
this : Epi S.g
eq : s.s = s'.s
⊢ s = s'

Next tactic:
cases s
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
  cases s
  

Proof state:
case mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s' : Splitting S
this : Epi S.g
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝ : s✝ ≫ S.g = 𝟙 S.X₃
id✝ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
h : (mk r✝ s✝).r = s'.r
eq : (mk r✝ s✝).s = s'.s
⊢ mk r✝ s✝ = s'

Next tactic:
cases s'
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
  cases s
  cases s'
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Epi S.g
r✝¹ : S.X₂ ⟶ S.X₁
s✝¹ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝¹ = 𝟙 S.X₁
s_g✝¹ : s✝¹ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝¹ ≫ S.f + S.g ≫ s✝¹ = 𝟙 S.X₂
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝ : s✝ ≫ S.g = 𝟙 S.X₃
id✝ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
h : (mk r✝¹ s✝¹).r = (mk r✝ s✝).r
eq : (mk r✝¹ s✝¹).s = (mk r✝ s✝).s
⊢ mk r✝¹ s✝¹ = mk r✝ s✝

Next tactic:
obtain rfl := eq
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
  cases s
  cases s'
  obtain rfl := eq
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Epi S.g
r✝¹ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝¹ = 𝟙 S.X₁
s_g✝¹ : s✝ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝¹ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
r✝ : S.X₂ ⟶ S.X₁
f_r✝ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝ : (mk r✝¹ s✝).s ≫ S.g = 𝟙 S.X₃
id✝ : r✝ ≫ S.f + S.g ≫ (mk r✝¹ s✝).s = 𝟙 S.X₂
h : (mk r✝¹ s✝).r = (mk r✝ (mk r✝¹ s✝).s).r
⊢ mk r✝¹ s✝ = mk r✝ (mk r✝¹ s✝).s

Next tactic:
obtain rfl := h
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s' := by
  have := s.epi_g
  have eq := s.id
  rw [← s'.id, h, add_right_inj, cancel_epi S.g] at eq
  cases s
  cases s'
  obtain rfl := eq
  obtain rfl := h
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.90649, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Epi S.g
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝¹ : s✝ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
s_g✝ : (mk r✝ s✝).s ≫ S.g = 𝟙 S.X₃
f_r✝ : S.f ≫ (mk r✝ s✝).r = 𝟙 S.X₁
id✝ : (mk r✝ s✝).r ≫ S.f + S.g ≫ (mk r✝ s✝).s = 𝟙 S.X₂
⊢ mk r✝ s✝ = mk (mk r✝ s✝).r (mk r✝ s✝).s

Next tactic:
rfl
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.s = s'.s
⊢ s = s'

Next tactic:
have := s.mono_f
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.s = s'.s
this : Mono S.f
⊢ s = s'

Next tactic:
have eq := s.id
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.s = s'.s
this : Mono S.f
eq : s.r ≫ S.f + S.g ≫ s.s = 𝟙 S.X₂
⊢ s = s'

Next tactic:
rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s s' : Splitting S
h : s.s = s'.s
this : Mono S.f
eq : s.r = s'.r
⊢ s = s'

Next tactic:
cases s
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
  cases s
  

Proof state:
case mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
s' : Splitting S
this : Mono S.f
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝ : s✝ ≫ S.g = 𝟙 S.X₃
id✝ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
h : (mk r✝ s✝).s = s'.s
eq : (mk r✝ s✝).r = s'.r
⊢ mk r✝ s✝ = s'

Next tactic:
cases s'
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
  cases s
  cases s'
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Mono S.f
r✝¹ : S.X₂ ⟶ S.X₁
s✝¹ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝¹ = 𝟙 S.X₁
s_g✝¹ : s✝¹ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝¹ ≫ S.f + S.g ≫ s✝¹ = 𝟙 S.X₂
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝ : s✝ ≫ S.g = 𝟙 S.X₃
id✝ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
h : (mk r✝¹ s✝¹).s = (mk r✝ s✝).s
eq : (mk r✝¹ s✝¹).r = (mk r✝ s✝).r
⊢ mk r✝¹ s✝¹ = mk r✝ s✝

Next tactic:
obtain rfl := eq
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
  cases s
  cases s'
  obtain rfl := eq
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Mono S.f
r✝ : S.X₂ ⟶ S.X₁
s✝¹ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝¹ : s✝¹ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝ ≫ S.f + S.g ≫ s✝¹ = 𝟙 S.X₂
s✝ : S.X₃ ⟶ S.X₂
s_g✝ : s✝ ≫ S.g = 𝟙 S.X₃
f_r✝ : S.f ≫ (mk r✝ s✝¹).r = 𝟙 S.X₁
id✝ : (mk r✝ s✝¹).r ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
h : (mk r✝ s✝¹).s = (mk (mk r✝ s✝¹).r s✝).s
⊢ mk r✝ s✝¹ = mk (mk r✝ s✝¹).r s✝

Next tactic:
obtain rfl := h
lemma ext_s (s s' : S.Splitting) (h : s.s = s'.s) : s = s' := by
  have := s.mono_f
  have eq := s.id
  rw [← s'.id, h, add_left_inj, cancel_mono S.f] at eq
  cases s
  cases s'
  obtain rfl := eq
  obtain rfl := h
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.91922, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
this : Mono S.f
r✝ : S.X₂ ⟶ S.X₁
s✝ : S.X₃ ⟶ S.X₂
f_r✝¹ : S.f ≫ r✝ = 𝟙 S.X₁
s_g✝¹ : s✝ ≫ S.g = 𝟙 S.X₃
id✝¹ : r✝ ≫ S.f + S.g ≫ s✝ = 𝟙 S.X₂
f_r✝ : S.f ≫ (mk r✝ s✝).r = 𝟙 S.X₁
s_g✝ : (mk r✝ s✝).s ≫ S.g = 𝟙 S.X₃
id✝ : (mk r✝ s✝).r ≫ S.f + S.g ≫ (mk r✝ s✝).s = 𝟙 S.X₂
⊢ mk r✝ s✝ = mk (mk r✝ s✝).r (mk r✝ s✝).s

Next tactic:
rfl
/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.93193, u_1} C
inst✝³ : Category.{?u.93197, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
⊢ LeftHomologyData S

Next tactic:
have hi := KernelFork.IsLimit.ofι S.f S.zero
    (fun x _ => x ≫ s.r)
    (fun x hx => by simp only [assoc, s.r_f, comp_sub, comp_id,
      sub_eq_self, reassoc_of% hx, zero_comp])
    (fun x _ b hb => by simp only [← hb, assoc, f_r, comp_id])
/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S := by
  have hi := KernelFork.IsLimit.ofι S.f S.zero
    (fun x _ => x ≫ s.r)
    (fun x hx => by 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.93193, u_1} C
inst✝³ : Category.{?u.93197, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
W'✝ : C
x : W'✝ ⟶ S.X₂
hx : x ≫ S.g = 0
⊢ (fun {W'} x x_1 => x ≫ s.r) x hx ≫ S.f = x

Next tactic:
simp only [assoc, s.r_f, comp_sub, comp_id,
      sub_eq_self, reassoc_of% hx, zero_comp]
/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S := by
  have hi := KernelFork.IsLimit.ofι S.f S.zero
    (fun x _ => x ≫ s.r)
    (fun x hx => by simp only [assoc, s.r_f, comp_sub, comp_id,
      sub_eq_self, reassoc_of% hx, zero_comp])
    (fun x _ b hb => by 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.93193, u_1} C
inst✝³ : Category.{?u.93197, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
W'✝ : C
x : W'✝ ⟶ S.X₂
x✝ : x ≫ S.g = 0
b : W'✝ ⟶ S.X₁
hb : b ≫ S.f = x
⊢ b = (fun {W'} x x_1 => x ≫ s.r) x x✝

Next tactic:
simp only [← hb, assoc, f_r, comp_id]
/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S := by
  have hi := KernelFork.IsLimit.ofι S.f S.zero
    (fun x _ => x ≫ s.r)
    (fun x hx => by simp only [assoc, s.r_f, comp_sub, comp_id,
      sub_eq_self, reassoc_of% hx, zero_comp])
    (fun x _ b hb => by simp only [← hb, assoc, f_r, comp_id])
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.93193, u_1} C
inst✝³ : Category.{?u.93197, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
hi : IsLimit (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))
⊢ LeftHomologyData S

Next tactic:
let f' := hi.lift (KernelFork.ofι S.f S.zero)