l3lab/ntp-mathlib huggingface dataset:
/-- The right homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def rightHomologyData [HasZeroObject C] (s : S.Splitting) :
    RightHomologyData S := by
  have hp := CokernelCofork.IsColimit.ofπ S.g S.zero
    (fun x _ => s.s ≫ x)
    (fun x hx => by simp only [s.g_s_assoc, sub_comp, id_comp, sub_eq_self, assoc, hx, comp_zero])
    (fun x _ b hb => by simp only [← hb, s.s_g_assoc])
  let g' := hp.desc (CokernelCofork.ofπ S.g S.zero)
  have hg' : g' = 𝟙 _ := by
    apply Cofork.IsColimit.hom_ext hp
    dsimp
    erw [Cofork.IsColimit.π_desc hp]
    simp only [Cofork.π_ofπ, comp_id]
  have wι : (0 : 0 ⟶ S.X₃) ≫ g' = 0 := zero_comp
  have hι : IsLimit (KernelFork.ofι 0 wι) := KernelFork.IsLimit.ofMonoOfIsZero _
      (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.97382, u_1} C
inst✝³ : Category.{?u.97386, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
hp : IsColimit (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
g' : (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt ⟶ (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt :=
  IsColimit.desc hp (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
hg' : g' = 𝟙 (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt
wι : 0 ≫ g' = 0
⊢ Mono g'

Next tactic:
rw [hg']
/-- The right homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def rightHomologyData [HasZeroObject C] (s : S.Splitting) :
    RightHomologyData S := by
  have hp := CokernelCofork.IsColimit.ofπ S.g S.zero
    (fun x _ => s.s ≫ x)
    (fun x hx => by simp only [s.g_s_assoc, sub_comp, id_comp, sub_eq_self, assoc, hx, comp_zero])
    (fun x _ b hb => by simp only [← hb, s.s_g_assoc])
  let g' := hp.desc (CokernelCofork.ofπ S.g S.zero)
  have hg' : g' = 𝟙 _ := by
    apply Cofork.IsColimit.hom_ext hp
    dsimp
    erw [Cofork.IsColimit.π_desc hp]
    simp only [Cofork.π_ofπ, comp_id]
  have wι : (0 : 0 ⟶ S.X₃) ≫ g' = 0 := zero_comp
  have hι : IsLimit (KernelFork.ofι 0 wι) := KernelFork.IsLimit.ofMonoOfIsZero _
      (by rw [hg']; 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.97382, u_1} C
inst✝³ : Category.{?u.97386, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
hp : IsColimit (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
g' : (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt ⟶ (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt :=
  IsColimit.desc hp (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
hg' : g' = 𝟙 (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt
wι : 0 ≫ g' = 0
⊢ Mono (𝟙 (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt)

Next tactic:
dsimp
/-- The right homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def rightHomologyData [HasZeroObject C] (s : S.Splitting) :
    RightHomologyData S := by
  have hp := CokernelCofork.IsColimit.ofπ S.g S.zero
    (fun x _ => s.s ≫ x)
    (fun x hx => by simp only [s.g_s_assoc, sub_comp, id_comp, sub_eq_self, assoc, hx, comp_zero])
    (fun x _ b hb => by simp only [← hb, s.s_g_assoc])
  let g' := hp.desc (CokernelCofork.ofπ S.g S.zero)
  have hg' : g' = 𝟙 _ := by
    apply Cofork.IsColimit.hom_ext hp
    dsimp
    erw [Cofork.IsColimit.π_desc hp]
    simp only [Cofork.π_ofπ, comp_id]
  have wι : (0 : 0 ⟶ S.X₃) ≫ g' = 0 := zero_comp
  have hι : IsLimit (KernelFork.ofι 0 wι) := KernelFork.IsLimit.ofMonoOfIsZero _
      (by rw [hg']; dsimp; 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.97382, u_1} C
inst✝³ : Category.{?u.97386, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
hp : IsColimit (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
g' : (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt ⟶ (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt :=
  IsColimit.desc hp (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
hg' : g' = 𝟙 (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt
wι : 0 ≫ g' = 0
⊢ Mono (𝟙 S.X₃)

Next tactic:
infer_instance
/-- The right homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def rightHomologyData [HasZeroObject C] (s : S.Splitting) :
    RightHomologyData S := by
  have hp := CokernelCofork.IsColimit.ofπ S.g S.zero
    (fun x _ => s.s ≫ x)
    (fun x hx => by simp only [s.g_s_assoc, sub_comp, id_comp, sub_eq_self, assoc, hx, comp_zero])
    (fun x _ b hb => by simp only [← hb, s.s_g_assoc])
  let g' := hp.desc (CokernelCofork.ofπ S.g S.zero)
  have hg' : g' = 𝟙 _ := by
    apply Cofork.IsColimit.hom_ext hp
    dsimp
    erw [Cofork.IsColimit.π_desc hp]
    simp only [Cofork.π_ofπ, comp_id]
  have wι : (0 : 0 ⟶ S.X₃) ≫ g' = 0 := zero_comp
  have hι : IsLimit (KernelFork.ofι 0 wι) := KernelFork.IsLimit.ofMonoOfIsZero _
      (by rw [hg']; dsimp; infer_instance) (isZero_zero _)
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.97382, u_1} C
inst✝³ : Category.{?u.97386, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
inst✝ : HasZeroObject C
s : Splitting S
hp : IsColimit (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
g' : (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt ⟶ (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt :=
  IsColimit.desc hp (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0))
hg' : g' = 𝟙 (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)).pt
wι : 0 ≫ g' = 0
hι : IsLimit (KernelFork.ofι 0 wι)
⊢ RightHomologyData S

Next tactic:
exact
    { Q := S.X₃
      H := 0
      p := S.g
      wp := S.zero
      hp := hp
      ι := 0
      wι := wι
      hι := hι }
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ (ShortComplex.map S F).f ≫ F.map s.r = 𝟙 (ShortComplex.map S F).X₁

Next tactic:
dsimp [ShortComplex.map]
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    dsimp [ShortComplex.map]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map S.f ≫ F.map s.r = 𝟙 (F.obj S.X₁)

Next tactic:
rw [← F.map_comp, f_r, F.map_id]
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    dsimp [ShortComplex.map]
    rw [← F.map_comp, f_r, F.map_id]
  s_g := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map s.s ≫ (ShortComplex.map S F).g = 𝟙 (ShortComplex.map S F).X₃

Next tactic:
dsimp [ShortComplex.map]
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    dsimp [ShortComplex.map]
    rw [← F.map_comp, f_r, F.map_id]
  s_g := by
    dsimp [ShortComplex.map]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map s.s ≫ F.map S.g = 𝟙 (F.obj S.X₃)

Next tactic:
simp only [← F.map_comp, s_g, F.map_id]
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    dsimp [ShortComplex.map]
    rw [← F.map_comp, f_r, F.map_id]
  s_g := by
    dsimp [ShortComplex.map]
    simp only [← F.map_comp, s_g, F.map_id]
  id := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map s.r ≫ (ShortComplex.map S F).f + (ShortComplex.map S F).g ≫ F.map s.s = 𝟙 (ShortComplex.map S F).X₂

Next tactic:
dsimp [ShortComplex.map]
/-- If a short complex `S` has a splitting and `F` is an additive functor, then
`S.map F` also has a splitting. -/
@[simps]
def map (s : S.Splitting) (F : C ⥤ D) [F.Additive] : (S.map F).Splitting where
  r := F.map s.r
  s := F.map s.s
  f_r := by
    dsimp [ShortComplex.map]
    rw [← F.map_comp, f_r, F.map_id]
  s_g := by
    dsimp [ShortComplex.map]
    simp only [← F.map_comp, s_g, F.map_id]
  id := by
    dsimp [ShortComplex.map]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.104727, u_1} C
inst✝³ : Category.{?u.104731, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
s : Splitting S
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map s.r ≫ F.map S.f + F.map S.g ≫ F.map s.s = 𝟙 (F.obj S.X₂)

Next tactic:
simp only [← F.map_id, ← s.id, Functor.map_comp, Functor.map_add]
/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting where
  r := e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁
  s := e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂
  f_r := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.106579, u_1} C
inst✝² : Category.{?u.106583, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S S₁ S₂ : ShortComplex C
s : Splitting S₁
e : S₁ ≅ S₂
⊢ S₂.f ≫ e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁ = 𝟙 S₂.X₁

Next tactic:
rw [← e.inv.comm₁₂_assoc, s.f_r_assoc, ← comp_τ₁, e.inv_hom_id, id_τ₁]
/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting where
  r := e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁
  s := e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂
  f_r := by rw [← e.inv.comm₁₂_assoc, s.f_r_assoc, ← comp_τ₁, e.inv_hom_id, id_τ₁]
  s_g := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.106579, u_1} C
inst✝² : Category.{?u.106583, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S S₁ S₂ : ShortComplex C
s : Splitting S₁
e : S₁ ≅ S₂
⊢ (e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂) ≫ S₂.g = 𝟙 S₂.X₃

Next tactic:
rw [assoc, assoc, e.hom.comm₂₃, s.s_g_assoc, ← comp_τ₃, e.inv_hom_id, id_τ₃]
/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting where
  r := e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁
  s := e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂
  f_r := by rw [← e.inv.comm₁₂_assoc, s.f_r_assoc, ← comp_τ₁, e.inv_hom_id, id_τ₁]
  s_g := by rw [assoc, assoc, e.hom.comm₂₃, s.s_g_assoc, ← comp_τ₃, e.inv_hom_id, id_τ₃]
  id := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.106579, u_1} C
inst✝² : Category.{?u.106583, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S S₁ S₂ : ShortComplex C
s : Splitting S₁
e : S₁ ≅ S₂
⊢ (e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁) ≫ S₂.f + S₂.g ≫ e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂ = 𝟙 S₂.X₂

Next tactic:
have eq := e.inv.τ₂ ≫= s.id =≫ e.hom.τ₂
/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting where
  r := e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁
  s := e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂
  f_r := by rw [← e.inv.comm₁₂_assoc, s.f_r_assoc, ← comp_τ₁, e.inv_hom_id, id_τ₁]
  s_g := by rw [assoc, assoc, e.hom.comm₂₃, s.s_g_assoc, ← comp_τ₃, e.inv_hom_id, id_τ₃]
  id := by
    have eq := e.inv.τ₂ ≫= s.id =≫ e.hom.τ₂
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.106579, u_1} C
inst✝² : Category.{?u.106583, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S S₁ S₂ : ShortComplex C
s : Splitting S₁
e : S₁ ≅ S₂
eq : e.inv.τ₂ ≫ (s.r ≫ S₁.f + S₁.g ≫ s.s) ≫ e.hom.τ₂ = e.inv.τ₂ ≫ 𝟙 S₁.X₂ ≫ e.hom.τ₂
⊢ (e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁) ≫ S₂.f + S₂.g ≫ e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂ = 𝟙 S₂.X₂

Next tactic:
rw [id_comp, ← comp_τ₂, e.inv_hom_id, id_τ₂] at eq
/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting where
  r := e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁
  s := e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂
  f_r := by rw [← e.inv.comm₁₂_assoc, s.f_r_assoc, ← comp_τ₁, e.inv_hom_id, id_τ₁]
  s_g := by rw [assoc, assoc, e.hom.comm₂₃, s.s_g_assoc, ← comp_τ₃, e.inv_hom_id, id_τ₃]
  id := by
    have eq := e.inv.τ₂ ≫= s.id =≫ e.hom.τ₂
    rw [id_comp, ← comp_τ₂, e.inv_hom_id, id_τ₂] at eq
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.106579, u_1} C
inst✝² : Category.{?u.106583, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S S₁ S₂ : ShortComplex C
s : Splitting S₁
e : S₁ ≅ S₂
eq : e.inv.τ₂ ≫ (s.r ≫ S₁.f + S₁.g ≫ s.s) ≫ e.hom.τ₂ = 𝟙 S₂.X₂
⊢ (e.inv.τ₂ ≫ s.r ≫ e.hom.τ₁) ≫ S₂.f + S₂.g ≫ e.inv.τ₃ ≫ s.s ≫ e.hom.τ₂ = 𝟙 S₂.X₂

Next tactic:
rw [← eq, assoc, assoc, add_comp, assoc, assoc, comp_add,
      e.hom.comm₁₂, e.inv.comm₂₃_assoc]
/-- The obvious splitting of the short complex `X₁ ⟶ X₁ ⊞ X₂ ⟶ X₂`. -/
noncomputable def ofHasBinaryBiproduct (X₁ X₂ : C) [HasBinaryBiproduct X₁ X₂] :
    Splitting (ShortComplex.mk (biprod.inl : X₁ ⟶ _) (biprod.snd : _ ⟶ X₂) (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.124923, u_1} C
inst✝³ : Category.{?u.124927, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
X₁ X₂ : C
inst✝ : HasBinaryBiproduct X₁ X₂
⊢ biprod.inl ≫ biprod.snd = 0

Next tactic:
simp
/-- The splitting of the short complex `S.op` deduced from a splitting of `S`. -/
@[simps]
def op (h : Splitting S) : Splitting S.op where
  r := h.s.op
  s := h.r.op
  f_r := Quiver.Hom.unop_inj (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.135497, u_1} C
inst✝² : Category.{?u.135501, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
h : Splitting S
⊢ ((ShortComplex.op S).f ≫ h.s.op).unop = (𝟙 (ShortComplex.op S).X₁).unop

Next tactic:
simp
/-- The splitting of the short complex `S.op` deduced from a splitting of `S`. -/
@[simps]
def op (h : Splitting S) : Splitting S.op where
  r := h.s.op
  s := h.r.op
  f_r := Quiver.Hom.unop_inj (by simp)
  s_g := Quiver.Hom.unop_inj (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.135497, u_1} C
inst✝² : Category.{?u.135501, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
h : Splitting S
⊢ (h.r.op ≫ (ShortComplex.op S).g).unop = (𝟙 (ShortComplex.op S).X₃).unop

Next tactic:
simp
/-- The splitting of the short complex `S.op` deduced from a splitting of `S`. -/
@[simps]
def op (h : Splitting S) : Splitting S.op where
  r := h.s.op
  s := h.r.op
  f_r := Quiver.Hom.unop_inj (by simp)
  s_g := Quiver.Hom.unop_inj (by simp)
  id := Quiver.Hom.unop_inj (by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.135497, u_1} C
inst✝² : Category.{?u.135501, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
h : Splitting S
⊢ (h.s.op ≫ (ShortComplex.op S).f + (ShortComplex.op S).g ≫ h.r.op).unop = (𝟙 (ShortComplex.op S).X₂).unop

Next tactic:
simp only [op_X₂, Opposite.unop_op, op_X₁, op_f, op_X₃, op_g, unop_add, unop_comp,
      Quiver.Hom.unop_op, unop_id, ← h.id]
/-- The splitting of the short complex `S.op` deduced from a splitting of `S`. -/
@[simps]
def op (h : Splitting S) : Splitting S.op where
  r := h.s.op
  s := h.r.op
  f_r := Quiver.Hom.unop_inj (by simp)
  s_g := Quiver.Hom.unop_inj (by simp)
  id := Quiver.Hom.unop_inj (by
    simp only [op_X₂, Opposite.unop_op, op_X₁, op_f, op_X₃, op_g, unop_add, unop_comp,
      Quiver.Hom.unop_op, unop_id, ← h.id]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.135497, u_1} C
inst✝² : Category.{?u.135501, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
h : Splitting S
⊢ S.g ≫ h.s + h.r ≫ S.f = h.r ≫ S.f + S.g ≫ h.s

Next tactic:
abel
/-- The splitting of the short complex `S.unop` deduced from a splitting of `S`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : Splitting S) : Splitting S.unop where
  r := h.s.unop
  s := h.r.unop
  f_r := Quiver.Hom.op_inj (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.138828, u_1} C
inst✝² : Category.{?u.138832, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S✝ : ShortComplex C
S : ShortComplex Cᵒᵖ
h : Splitting S
⊢ ((ShortComplex.unop S).f ≫ h.s.unop).op = (𝟙 (ShortComplex.unop S).X₁).op

Next tactic:
simp
/-- The splitting of the short complex `S.unop` deduced from a splitting of `S`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : Splitting S) : Splitting S.unop where
  r := h.s.unop
  s := h.r.unop
  f_r := Quiver.Hom.op_inj (by simp)
  s_g := Quiver.Hom.op_inj (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.138828, u_1} C
inst✝² : Category.{?u.138832, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S✝ : ShortComplex C
S : ShortComplex Cᵒᵖ
h : Splitting S
⊢ (h.r.unop ≫ (ShortComplex.unop S).g).op = (𝟙 (ShortComplex.unop S).X₃).op

Next tactic:
simp
/-- The splitting of the short complex `S.unop` deduced from a splitting of `S`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : Splitting S) : Splitting S.unop where
  r := h.s.unop
  s := h.r.unop
  f_r := Quiver.Hom.op_inj (by simp)
  s_g := Quiver.Hom.op_inj (by simp)
  id := Quiver.Hom.op_inj (by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.138828, u_1} C
inst✝² : Category.{?u.138832, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S✝ : ShortComplex C
S : ShortComplex Cᵒᵖ
h : Splitting S
⊢ (h.s.unop ≫ (ShortComplex.unop S).f + (ShortComplex.unop S).g ≫ h.r.unop).op = (𝟙 (ShortComplex.unop S).X₂).op

Next tactic:
simp only [unop_X₂, Opposite.op_unop, unop_X₁, unop_f, unop_X₃, unop_g, op_add,
      op_comp, Quiver.Hom.op_unop, op_id, ← h.id]
/-- The splitting of the short complex `S.unop` deduced from a splitting of `S`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : Splitting S) : Splitting S.unop where
  r := h.s.unop
  s := h.r.unop
  f_r := Quiver.Hom.op_inj (by simp)
  s_g := Quiver.Hom.op_inj (by simp)
  id := Quiver.Hom.op_inj (by
    simp only [unop_X₂, Opposite.op_unop, unop_X₁, unop_f, unop_X₃, unop_g, op_add,
      op_comp, Quiver.Hom.op_unop, op_id, ← h.id]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.138828, u_1} C
inst✝² : Category.{?u.138832, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S✝ : ShortComplex C
S : ShortComplex Cᵒᵖ
h : Splitting S
⊢ S.g ≫ h.s + h.r ≫ S.f = h.r ≫ S.f + S.g ≫ h.s

Next tactic:
abel
/-- The isomorphism `S.X₂ ≅ S.X₁ ⊞ S.X₃` induced by a splitting of the short complex `S`. -/
@[simps]
noncomputable def isoBinaryBiproduct (h : Splitting S) [HasBinaryBiproduct S.X₁ S.X₃] :
    S.X₂ ≅ S.X₁ ⊞ S.X₃ where
  hom := biprod.lift h.r S.g
  inv := biprod.desc S.f h.s
  hom_inv_id := by 

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{?u.142057, u_1} C
inst✝³ : Category.{?u.142061, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
S : ShortComplex C
h : Splitting S
inst✝ : HasBinaryBiproduct S.X₁ S.X₃
⊢ biprod.lift h.r S.g ≫ biprod.desc S.f h.s = 𝟙 S.X₂

Next tactic:
simp [h.id]
lemma isIso_f' (h : S.LeftHomologyData) [Mono S.f] :
    IsIso h.f' := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.146348, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : LeftHomologyData S
inst✝ : Mono S.f
⊢ IsIso (LeftHomologyData.f' h)

Next tactic:
have := hS.epi_f' h
lemma isIso_f' (h : S.LeftHomologyData) [Mono S.f] :
    IsIso h.f' := by
  have := hS.epi_f' h
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.146348, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : LeftHomologyData S
inst✝ : Mono S.f
this : Epi (LeftHomologyData.f' h)
⊢ IsIso (LeftHomologyData.f' h)

Next tactic:
have := mono_of_mono_fac h.f'_i
lemma isIso_f' (h : S.LeftHomologyData) [Mono S.f] :
    IsIso h.f' := by
  have := hS.epi_f' h
  have := mono_of_mono_fac h.f'_i
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.146348, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : LeftHomologyData S
inst✝ : Mono S.f
this✝ : Epi (LeftHomologyData.f' h)
this : Mono (LeftHomologyData.f' h)
⊢ IsIso (LeftHomologyData.f' h)

Next tactic:
exact isIso_of_mono_of_epi h.f'
lemma isIso_g' (h : S.RightHomologyData) [Epi S.g] :
    IsIso h.g' := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.148145, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : RightHomologyData S
inst✝ : Epi S.g
⊢ IsIso (RightHomologyData.g' h)

Next tactic:
have := hS.mono_g' h
lemma isIso_g' (h : S.RightHomologyData) [Epi S.g] :
    IsIso h.g' := by
  have := hS.mono_g' h
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.148145, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : RightHomologyData S
inst✝ : Epi S.g
this : Mono (RightHomologyData.g' h)
⊢ IsIso (RightHomologyData.g' h)

Next tactic:
have := epi_of_epi_fac h.p_g'
lemma isIso_g' (h : S.RightHomologyData) [Epi S.g] :
    IsIso h.g' := by
  have := hS.mono_g' h
  have := epi_of_epi_fac h.p_g'
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.148145, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
h : RightHomologyData S
inst✝ : Epi S.g
this✝ : Mono (RightHomologyData.g' h)
this : Epi (RightHomologyData.g' h)
⊢ IsIso (RightHomologyData.g' h)

Next tactic:
exact isIso_of_mono_of_epi h.g'
/-- In a balanced category, if a short complex `S` is exact and `S.f` is a mono, then
`S.X₁` is the kernel of `S.g`. -/
noncomputable def fIsKernel [Mono S.f] : IsLimit (KernelFork.ofι S.f S.zero) := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{?u.149920, u_1} C
inst✝⁴ : Category.{?u.149924, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
inst✝ : Mono S.f
⊢ IsLimit (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))

Next tactic:
have := hS.hasHomology
/-- In a balanced category, if a short complex `S` is exact and `S.f` is a mono, then
`S.X₁` is the kernel of `S.g`. -/
noncomputable def fIsKernel [Mono S.f] : IsLimit (KernelFork.ofι S.f S.zero) := by
  have := hS.hasHomology
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁵ : Category.{?u.149920, u_1} C
inst✝⁴ : Category.{?u.149924, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : Exact S
inst✝ : Mono S.f
this : HasHomology S
⊢ IsLimit (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))

Next tactic:
have := hS.isIso_toCycles