l3lab/ntp-mathlib huggingface dataset:
/-- Yet another metric characterization of Cauchy sequences on integers. This one is often the
most efficient. -/
theorem cauchySeq_iff_le_tendsto_0 {s : ℕ → α} :
    CauchySeq s ↔
      ∃ b : ℕ → ℝ,
        (∀ n, 0 ≤ b n) ∧
          (∀ n m N : ℕ, N ≤ n → N ≤ m → dist (s n) (s m) ≤ b N) ∧ Tendsto b atTop (𝓝 0) :=
  ⟨fun hs => by
    /- `s` is a Cauchy sequence. The sequence `b` will be constructed by taking
      the supremum of the distances between `s n` and `s m` for `n m ≥ N`.
      First, we prove that all these distances are bounded, as otherwise the Sup
      would not make sense. -/
    let S N := (fun p : ℕ × ℕ => dist (s p.1) (s p.2)) '' { p | p.1 ≥ N ∧ p.2 ≥ N }
    have hS : ∀ N, ∃ x, ∀ y ∈ S N, y ≤ x := by
      rcases cauchySeq_bdd hs with ⟨R, -, hR⟩
      refine' fun N => ⟨R, _⟩
      rintro _ ⟨⟨m, n⟩, _, rfl⟩
      exact le_of_lt (hR m n)
    -- Prove that it bounds the distances of points in the Cauchy sequence
    have ub : ∀ m n N, N ≤ m → N ≤ n → dist (s m) (s n) ≤ sSup (S N) := fun m n N hm hn =>
      le_csSup (hS N) ⟨⟨_, _⟩, ⟨hm, hn⟩, rfl⟩
    have S0m : ∀ n, (0 : ℝ) ∈ S n := fun n => ⟨⟨n, n⟩, ⟨le_rfl, le_rfl⟩, dist_self _⟩
    have S0 := fun n => le_csSup (hS n) (S0m n)
    -- Prove that it tends to `0`, by using the Cauchy property of `s`
    refine' ⟨fun N => sSup (S N), S0, ub, Metric.tendsto_atTop.2 fun ε ε0 => _⟩
    refine' (Metric.cauchySeq_iff.1 hs (ε / 2) (half_pos ε0)).imp fun N hN n hn => _
    rw [Real.dist_0_eq_abs, abs_of_nonneg (S0 n)]
    refine' lt_of_le_of_lt (csSup_le ⟨_, S0m _⟩ _) (half_lt_self ε0)
    rintro _ ⟨⟨m', n'⟩, ⟨hm', hn'⟩, rfl⟩
    

Proof state:
case intro.mk.intro.intro
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝² : PseudoMetricSpace α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
s : ℕ → α
hs : CauchySeq s
S : ℕ → Set ℝ := fun N => (fun p => dist (s p.1) (s p.2)) '' {p | p.1 ≥ N ∧ p.2 ≥ N}
hS : ∀ (N : ℕ), ∃ x, ∀ y ∈ S N, y ≤ x
ub : ∀ (m n N : ℕ), N ≤ m → N ≤ n → dist (s m) (s n) ≤ sSup (S N)
S0m : ∀ (n : ℕ), 0 ∈ S n
S0 : ∀ (n : ℕ), 0 ≤ sSup (S n)
ε : ℝ
ε0 : ε > 0
N : ℕ
hN : ∀ m ≥ N, ∀ n ≥ N, dist (s m) (s n) < ε / 2
n : ℕ
hn : n ≥ N
m' n' : ℕ
hm' : (m', n').1 ≥ n
hn' : (m', n').2 ≥ n
⊢ (fun p => dist (s p.1) (s p.2)) (m', n') ≤ ε / 2

Next tactic:
exact le_of_lt (hN _ (le_trans hn hm') _ (le_trans hn hn'))
instance (i : ι) : ((single C c j).obj A).HasHomology i := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
i : ι
⊢ HasHomology ((single C c j).obj A) i

Next tactic:
apply ShortComplex.hasHomology_of_zeros
lemma isZero_single_obj_homology (A : C) (i : ι) (hi : i ≠ j) :
    IsZero (((single C c j).obj A).homology i) := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A✝ A : C
i : ι
hi : i ≠ j
⊢ IsZero (homology ((single C c j).obj A) i)

Next tactic:
simpa only [← exactAt_iff_isZero_homology]
    using exactAt_single_obj c j A i hi
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_inv_iCycles :
    (singleObjCyclesSelfIso _ _ _).inv ≫ ((single C c j).obj A).iCycles j =
      (singleObjXSelf c j A).inv := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjCyclesSelfIso c j A).inv ≫ iCycles ((single C c j).obj A) j = (singleObjXSelf c j A).inv

Next tactic:
simp [singleObjCyclesSelfIso]
@[reassoc (attr := simp)]
lemma homologyπ_singleObjHomologySelfIso_hom :
    ((single C c j).obj A).homologyπ j ≫ (singleObjHomologySelfIso _ _ _).hom =
      (singleObjCyclesSelfIso _ _ _).hom := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ homologyπ ((single C c j).obj A) j ≫ (singleObjHomologySelfIso c j A).hom = (singleObjCyclesSelfIso c j A).hom

Next tactic:
simp [singleObjCyclesSelfIso, singleObjHomologySelfIso]
@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_hom_singleObjHomologySelfIso_inv :
    (singleObjCyclesSelfIso c j A).hom ≫ (singleObjHomologySelfIso c j A).inv =
      ((single C c j).obj A).homologyπ j := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjCyclesSelfIso c j A).hom ≫ (singleObjHomologySelfIso c j A).inv = homologyπ ((single C c j).obj A) j

Next tactic:
simp only [← cancel_mono (singleObjHomologySelfIso _ _ _).hom, assoc,
    Iso.inv_hom_id, comp_id, homologyπ_singleObjHomologySelfIso_hom]
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_hom_singleObjOpcyclesSelfIso_hom :
    (singleObjCyclesSelfIso c j A).hom ≫ (singleObjOpcyclesSelfIso c j A).hom =
      ((single C c j).obj A).iCycles j ≫ ((single C c j).obj A).pOpcycles j := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjCyclesSelfIso c j A).hom ≫ (singleObjOpcyclesSelfIso c j A).hom =
    iCycles ((single C c j).obj A) j ≫ pOpcycles ((single C c j).obj A) j

Next tactic:
simp [singleObjCyclesSelfIso, singleObjOpcyclesSelfIso]
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_inv_homologyπ  :
    (singleObjCyclesSelfIso _ _ _).inv ≫ ((single C c j).obj A).homologyπ j =
      (singleObjHomologySelfIso _ _ _).inv := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjCyclesSelfIso c j A).inv ≫ homologyπ ((single C c j).obj A) j = (singleObjHomologySelfIso c j A).inv

Next tactic:
simp [singleObjCyclesSelfIso, singleObjHomologySelfIso]
@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_inv_homologyι :
    (singleObjHomologySelfIso _ _ _).inv ≫ ((single C c j).obj A).homologyι j =
      (singleObjOpcyclesSelfIso _ _ _).hom := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjHomologySelfIso c j A).inv ≫ homologyι ((single C c j).obj A) j = (singleObjOpcyclesSelfIso c j A).hom

Next tactic:
rw [← cancel_epi (singleObjCyclesSelfIso c j A).hom,
    singleObjHomologySelfIso_hom_singleObjHomologySelfIso_inv_assoc, homology_π_ι,
    singleObjCyclesSelfIso_hom_singleObjOpcyclesSelfIso_hom]
@[reassoc (attr := simp)]
lemma homologyι_singleObjOpcyclesSelfIso_inv :
    ((single C c j).obj A).homologyι j ≫ (singleObjOpcyclesSelfIso _ _ _).inv =
      (singleObjHomologySelfIso _ _ _).hom := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ homologyι ((single C c j).obj A) j ≫ (singleObjOpcyclesSelfIso c j A).inv = (singleObjHomologySelfIso c j A).hom

Next tactic:
rw [← cancel_epi (singleObjHomologySelfIso _ _ _).inv,
    singleObjHomologySelfIso_inv_homologyι_assoc, Iso.hom_inv_id, Iso.inv_hom_id]
@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_hom_singleObjOpcyclesSelfIso_hom :
    (singleObjHomologySelfIso _ _ _).hom ≫ (singleObjOpcyclesSelfIso _ _ _).hom =
      ((single C c j).obj A).homologyι j := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : C
⊢ (singleObjHomologySelfIso c j A).hom ≫ (singleObjOpcyclesSelfIso c j A).hom = homologyι ((single C c j).obj A) j

Next tactic:
rw [← cancel_epi (singleObjHomologySelfIso _ _ _).inv,
    Iso.inv_hom_id_assoc, singleObjHomologySelfIso_inv_homologyι]
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_hom_naturality :
    cyclesMap ((single C c j).map f) j ≫ (singleObjCyclesSelfIso c j B).hom =
      (singleObjCyclesSelfIso c j A).hom ≫ f := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ cyclesMap ((single C c j).map f) j ≫ (singleObjCyclesSelfIso c j B).hom = (singleObjCyclesSelfIso c j A).hom ≫ f

Next tactic:
rw [← cancel_mono (singleObjCyclesSelfIso c j B).inv, assoc, assoc, Iso.hom_inv_id, comp_id,
    ← cancel_mono (iCycles _ _)]
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_hom_naturality :
    cyclesMap ((single C c j).map f) j ≫ (singleObjCyclesSelfIso c j B).hom =
      (singleObjCyclesSelfIso c j A).hom ≫ f := by
  rw [← cancel_mono (singleObjCyclesSelfIso c j B).inv, assoc, assoc, Iso.hom_inv_id, comp_id,
    ← cancel_mono (iCycles _ _)]
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ cyclesMap ((single C c j).map f) j ≫ iCycles ((single C c j).obj B) j =
    ((singleObjCyclesSelfIso c j A).hom ≫ f ≫ (singleObjCyclesSelfIso c j B).inv) ≫ iCycles ((single C c j).obj B) j

Next tactic:
simp only [cyclesMap_i, singleObjCyclesSelfIso, Iso.trans_hom, iCyclesIso_hom, Iso.trans_inv,
    assoc, iCyclesIso_inv_hom_id, comp_id, single_map_f_self]
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_inv_naturality :
    (singleObjCyclesSelfIso c j A).inv ≫ cyclesMap ((single C c j).map f) j =
      f ≫ (singleObjCyclesSelfIso c j B).inv := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ (singleObjCyclesSelfIso c j A).inv ≫ cyclesMap ((single C c j).map f) j = f ≫ (singleObjCyclesSelfIso c j B).inv

Next tactic:
rw [← cancel_epi (singleObjCyclesSelfIso c j A).hom, Iso.hom_inv_id_assoc,
    ← singleObjCyclesSelfIso_hom_naturality_assoc, Iso.hom_inv_id, comp_id]
@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_hom_naturality :
    homologyMap ((single C c j).map f) j ≫ (singleObjHomologySelfIso c j B).hom =
      (singleObjHomologySelfIso c j A).hom ≫ f := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ homologyMap ((single C c j).map f) j ≫ (singleObjHomologySelfIso c j B).hom = (singleObjHomologySelfIso c j A).hom ≫ f

Next tactic:
rw [← cancel_epi (((single C c j).obj A).homologyπ j),
    homologyπ_naturality_assoc, homologyπ_singleObjHomologySelfIso_hom,
    singleObjCyclesSelfIso_hom_naturality, homologyπ_singleObjHomologySelfIso_hom_assoc]
@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_inv_naturality :
    (singleObjHomologySelfIso c j A).inv ≫ homologyMap ((single C c j).map f) j =
      f ≫ (singleObjHomologySelfIso c j B).inv := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ (singleObjHomologySelfIso c j A).inv ≫ homologyMap ((single C c j).map f) j = f ≫ (singleObjHomologySelfIso c j B).inv

Next tactic:
rw [← cancel_mono (singleObjHomologySelfIso c j B).hom, assoc, assoc,
    singleObjHomologySelfIso_hom_naturality,
    Iso.inv_hom_id_assoc, Iso.inv_hom_id, comp_id]
@[reassoc (attr := simp)]
lemma singleObjOpcyclesSelfIso_hom_naturality :
    (singleObjOpcyclesSelfIso c j A).hom ≫ opcyclesMap ((single C c j).map f) j  =
      f ≫ (singleObjOpcyclesSelfIso c j B).hom := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ (singleObjOpcyclesSelfIso c j A).hom ≫ opcyclesMap ((single C c j).map f) j = f ≫ (singleObjOpcyclesSelfIso c j B).hom

Next tactic:
rw [← cancel_epi (singleObjCyclesSelfIso c j A).hom,
    singleObjCyclesSelfIso_hom_singleObjOpcyclesSelfIso_hom_assoc, p_opcyclesMap,
    single_map_f_self, assoc, assoc, singleObjCyclesSelfIso_hom,
    singleObjOpcyclesSelfIso_hom, assoc]
@[reassoc (attr := simp)]
lemma singleObjOpcyclesSelfIso_inv_naturality :
    opcyclesMap ((single C c j).map f) j ≫ (singleObjOpcyclesSelfIso c j B).inv =
      (singleObjOpcyclesSelfIso c j A).inv ≫ f := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ opcyclesMap ((single C c j).map f) j ≫ (singleObjOpcyclesSelfIso c j B).inv = (singleObjOpcyclesSelfIso c j A).inv ≫ f

Next tactic:
rw [← cancel_mono (singleObjOpcyclesSelfIso c j B).hom, assoc, assoc, Iso.inv_hom_id,
    comp_id, ← singleObjOpcyclesSelfIso_hom_naturality, Iso.inv_hom_id_assoc]
/-- Sending objects to chain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homology'Functor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X : C
⊢ HomologicalComplex.dTo ((single₀ C).obj X) 0 = 0

Next tactic:
simp
/-- Sending objects to chain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homology'Functor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by simp) (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X : C
⊢ HomologicalComplex.dFrom ((single₀ C).obj X) 0 = 0

Next tactic:
simp
/-- Sending objects to chain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homology'Functor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by simp) (by simp) ≪≫ homology'ZeroZero)
    fun f => by
      -- Porting note: why can't `aesop_cat` do this?
      

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ (single₀ C ⋙ homology'Functor C (ComplexShape.down ℕ) 0).map f ≫
      ((fun X =>
            homology'.congr
                (_ : HomologicalComplex.dTo ((single₀ C).obj X) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X) 0 = 0)
                (_ : 0 ≫ 0 = 0) (_ : 0 = 0)
                (_ : HomologicalComplex.d ((single₀ C).obj X) 0 (ComplexShape.next (ComplexShape.down ℕ) 0) = 0) ≪≫
              homology'ZeroZero)
          Y✝).hom =
    ((fun X =>
            homology'.congr
                (_ : HomologicalComplex.dTo ((single₀ C).obj X) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X) 0 = 0)
                (_ : 0 ≫ 0 = 0) (_ : 0 = 0)
                (_ : HomologicalComplex.d ((single₀ C).obj X) 0 (ComplexShape.next (ComplexShape.down ℕ) 0) = 0) ≪≫
              homology'ZeroZero)
          X✝).hom ≫
      (𝟭 C).map f

Next tactic:
dsimp
/-- Sending objects to chain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homology'Functor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by simp) (by simp) ≪≫ homology'ZeroZero)
    fun f => by
      -- Porting note: why can't `aesop_cat` do this?
      dsimp
      

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ homology'.map
        (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0)
        (_ : HomologicalComplex.dTo ((single₀ C).obj Y✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj Y✝) 0 = 0)
        (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0) (HomologicalComplex.Hom.sqFrom ((single₀ C).map f) 0)
        (_ :
          (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0).right =
            (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0).right) ≫
      homology'.map
          (_ : HomologicalComplex.dTo ((single₀ C).obj Y✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj Y✝) 0 = 0)
          (_ : 0 ≫ 0 = 0) (CommaMorphism.mk (𝟙 (HomologicalComplex.xPrev ((single₀ C).obj Y✝) 0)) (𝟙 Y✝))
          (CommaMorphism.mk (𝟙 Y✝) (𝟙 (HomologicalComplex.xNext ((single₀ C).obj Y✝) 0)))
          (_ :
            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =
              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫
        homology'.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))
          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =
    (homology'.map
          (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0)
          (_ : 0 ≫ 0 = 0) (CommaMorphism.mk (𝟙 (HomologicalComplex.xPrev ((single₀ C).obj X✝) 0)) (𝟙 X✝))
          (CommaMorphism.mk (𝟙 X✝) (𝟙 (HomologicalComplex.xNext ((single₀ C).obj X✝) 0)))
          (_ :
            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =
              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫
        homology'.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))
          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫
      f

Next tactic:
ext
/-- Sending objects to chain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homology'Functor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by simp) (by simp) ≪≫ homology'ZeroZero)
    fun f => by
      -- Porting note: why can't `aesop_cat` do this?
      dsimp
      ext
      

Proof state:
case p
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ homology'.π (HomologicalComplex.dTo ((single₀ C).obj X✝) 0) (HomologicalComplex.dFrom ((single₀ C).obj X✝) 0)
        (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0) ≫
      homology'.map
          (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0)
          (_ : HomologicalComplex.dTo ((single₀ C).obj Y✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj Y✝) 0 = 0)
          (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0) (HomologicalComplex.Hom.sqFrom ((single₀ C).map f) 0)
          (_ :
            (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0).right =
              (HomologicalComplex.Hom.sqTo ((single₀ C).map f) 0).right) ≫
        homology'.map
            (_ : HomologicalComplex.dTo ((single₀ C).obj Y✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj Y✝) 0 = 0)
            (_ : 0 ≫ 0 = 0) (CommaMorphism.mk (𝟙 (HomologicalComplex.xPrev ((single₀ C).obj Y✝) 0)) (𝟙 Y✝))
            (CommaMorphism.mk (𝟙 Y✝) (𝟙 (HomologicalComplex.xNext ((single₀ C).obj Y✝) 0)))
            (_ :
              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =
                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫
          homology'.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))
            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =
    homology'.π (HomologicalComplex.dTo ((single₀ C).obj X✝) 0) (HomologicalComplex.dFrom ((single₀ C).obj X✝) 0)
        (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0) ≫
      (homology'.map
            (_ : HomologicalComplex.dTo ((single₀ C).obj X✝) 0 ≫ HomologicalComplex.dFrom ((single₀ C).obj X✝) 0 = 0)
            (_ : 0 ≫ 0 = 0) (CommaMorphism.mk (𝟙 (HomologicalComplex.xPrev ((single₀ C).obj X✝) 0)) (𝟙 X✝))
            (CommaMorphism.mk (𝟙 X✝) (𝟙 (HomologicalComplex.xNext ((single₀ C).obj X✝) 0)))
            (_ :
              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =
                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫
          homology'.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))
            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫
        f

Next tactic:
simp
/-- Sending objects to chain complexes supported at `0` then taking `(n+1)`-st homology
is the same as the zero functor.
-/
noncomputable def homology'FunctorSuccSingle₀ (n : ℕ) :
    single₀ C ⋙ homology'Functor C _ (n + 1) ≅ 0 :=
  NatIso.ofComponents
    (fun X =>
      homology'.congr _ _ (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
n : ℕ
X : C
⊢ HomologicalComplex.dTo ((single₀ C).obj X) (n + 1) = 0

Next tactic:
simp
/-- Sending objects to chain complexes supported at `0` then taking `(n+1)`-st homology
is the same as the zero functor.
-/
noncomputable def homology'FunctorSuccSingle₀ (n : ℕ) :
    single₀ C ⋙ homology'Functor C _ (n + 1) ≅ 0 :=
  NatIso.ofComponents
    (fun X =>
      homology'.congr _ _ (by simp) (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
n : ℕ
X : C
⊢ HomologicalComplex.dFrom ((single₀ C).obj X) (n + 1) = 0

Next tactic:
simp
/-- Sending objects to cochain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homologyFunctor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X : C
⊢ HomologicalComplex.dTo ((single₀ C).obj X) 0 = 0

Next tactic:
simp
/-- Sending objects to cochain complexes supported at `0` then taking `0`-th homology
is the same as doing nothing.
-/
noncomputable def homologyFunctor0Single₀ : single₀ C ⋙ homology'Functor C _ 0 ≅ 𝟭 C :=
  NatIso.ofComponents (fun X => homology'.congr _ _ (by simp) (by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : HasZeroMorphisms C
inst✝⁵ : HasZeroObject C
ι : Type u_1
inst✝⁴ : DecidableEq ι
c : ComplexShape ι
j : ι
inst✝³ : HasEqualizers C
inst✝² : HasCokernels C
inst✝¹ : HasImages C
inst✝ : HasImageMaps C
X : C
⊢ HomologicalComplex.dFrom ((single₀ C).obj X) 0 = 0

Next tactic:
simp