l3lab/ntp-mathlib huggingface dataset:
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
i : ℕ
hi✝ : Nat.succ i < n + 1 + 1
hi : i + 1 < n + 1 + 1
⊢ i < n + 1

Next tactic:
linarith
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
⊢ F = G

Next tactic:
exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    cases' i with i
    · erw [homMkSucc_app_zero]
    · erw [homMkSucc_app_succ]
      dsimp [app']
      erw [eqToHom_app])
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
⊢ map' F 0 1 ≫ app' (eqToIso h).hom 0 = (eqToIso h₀).hom ≫ map' G 0 1

Next tactic:
rw [w]
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
⊢ (eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)) ≫ app' (eqToIso h).hom 0 =
    (eqToIso h₀).hom ≫ map' G 0 1

Next tactic:
dsimp [app']
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
⊢ (eqToHom h₀ ≫
        G.map (homOfLE (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })) ≫
          eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)) ≫
      (eqToHom h).app 0 =
    eqToHom h₀ ≫
      G.map (homOfLE (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) }))

Next tactic:
erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id]
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
⊢ ∀ (X : Fin (n + 1 + 1)),
    (isoMkSucc (eqToIso h₀) (eqToIso h)
              (_ : map' F 0 1 ≫ app' (eqToIso h).hom 0 = (eqToIso h₀).hom ≫ map' G 0 1)).hom.app
        X =
      eqToHom (_ : F.obj X = G.obj X)

Next tactic:
rintro ⟨i, hi⟩
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    

Proof state:
case mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
i : ℕ
hi : i < n + 1 + 1
⊢ (isoMkSucc (eqToIso h₀) (eqToIso h) (_ : map' F 0 1 ≫ app' (eqToIso h).hom 0 = (eqToIso h₀).hom ≫ map' G 0 1)).hom.app
      { val := i, isLt := hi } =
    eqToHom (_ : F.obj { val := i, isLt := hi } = G.obj { val := i, isLt := hi })

Next tactic:
dsimp
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    

Proof state:
case mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
i : ℕ
hi : i < n + 1 + 1
⊢ (homMkSucc (eqToHom h₀) (eqToHom h)
          (_ :
            F.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })) ≫
                (eqToHom h).app 0 =
              eqToHom h₀ ≫
                G.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })))).app
      { val := i, isLt := hi } =
    eqToHom (_ : F.obj { val := i, isLt := hi } = G.obj { val := i, isLt := hi })

Next tactic:
cases' i with i
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    cases' i with i
    · 

Proof state:
case mk.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
hi : Nat.zero < n + 1 + 1
⊢ (homMkSucc (eqToHom h₀) (eqToHom h)
          (_ :
            F.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })) ≫
                (eqToHom h).app 0 =
              eqToHom h₀ ≫
                G.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })))).app
      { val := Nat.zero, isLt := hi } =
    eqToHom (_ : F.obj { val := Nat.zero, isLt := hi } = G.obj { val := Nat.zero, isLt := hi })

Next tactic:
erw [homMkSucc_app_zero]
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    cases' i with i
    · erw [homMkSucc_app_zero]
    · 

Proof state:
case mk.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
i : ℕ
hi : Nat.succ i < n + 1 + 1
⊢ (homMkSucc (eqToHom h₀) (eqToHom h)
          (_ :
            F.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })) ≫
                (eqToHom h).app 0 =
              eqToHom h₀ ≫
                G.map
                  (homOfLE
                    (_ : { val := 0, isLt := (_ : 0 < n + 1 + 1) } ≤ { val := 1, isLt := (_ : 1 < n + 1 + 1) })))).app
      { val := Nat.succ i, isLt := hi } =
    eqToHom (_ : F.obj { val := Nat.succ i, isLt := hi } = G.obj { val := Nat.succ i, isLt := hi })

Next tactic:
erw [homMkSucc_app_succ]
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    cases' i with i
    · erw [homMkSucc_app_zero]
    · erw [homMkSucc_app_succ]
      

Proof state:
case mk.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
i : ℕ
hi : Nat.succ i < n + 1 + 1
⊢ app' (eqToHom h) i = eqToHom (_ : F.obj { val := Nat.succ i, isLt := hi } = G.obj { val := Nat.succ i, isLt := hi })

Next tactic:
dsimp [app']
lemma ext_succ {F G : ComposableArrows C (n + 1)} (h₀ : F.obj' 0 = G.obj' 0)
    (h : F.δ₀ = G.δ₀) (w : F.map' 0 1 = eqToHom h₀ ≫ G.map' 0 1 ≫
      eqToHom (Functor.congr_obj h.symm 0)): F = G := by
  have : ∀ i, F.obj i = G.obj i := by
    intro ⟨i, hi⟩
    cases' i with i
    · exact h₀
    · rw [Nat.succ_eq_add_one] at hi
      exact Functor.congr_obj h ⟨i, by linarith⟩
  exact Functor.ext_of_iso (isoMkSucc (eqToIso h₀) (eqToIso h) (by
      rw [w]
      dsimp [app']
      erw [eqToHom_app, assoc, assoc, eqToHom_trans, eqToHom_refl, comp_id])) this (by
    rintro ⟨i, hi⟩
    dsimp
    cases' i with i
    · erw [homMkSucc_app_zero]
    · erw [homMkSucc_app_succ]
      dsimp [app']
      

Proof state:
case mk.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G✝ : ComposableArrows C n
F G : ComposableArrows C (n + 1)
h₀ : obj' F 0 = obj' G 0
h : δ₀ F = δ₀ G
w : map' F 0 1 = eqToHom h₀ ≫ map' G 0 1 ≫ eqToHom (_ : (δ₀ G).obj 0 = (δ₀ F).obj 0)
this : ∀ (i : Fin (n + 1 + 1)), F.obj i = G.obj i
i : ℕ
hi : Nat.succ i < n + 1 + 1
⊢ (eqToHom h).app { val := i, isLt := (_ : i < n + 1) } =
    eqToHom (_ : F.obj { val := Nat.succ i, isLt := hi } = G.obj { val := Nat.succ i, isLt := hi })

Next tactic:
erw [eqToHom_app]
lemma precomp_surjective (F : ComposableArrows C (n + 1)) :
    ∃ (F₀ : ComposableArrows C n) (X₀ : C) (f₀ : X₀ ⟶ F₀.left), F = F₀.precomp f₀ :=
  ⟨F.δ₀, _, F.map' 0 1, ext_succ rfl (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G : ComposableArrows C n
F : ComposableArrows C (n + 1)
⊢ δ₀ F = δ₀ (precomp (δ₀ F) (map' F 0 1))

Next tactic:
simp
lemma precomp_surjective (F : ComposableArrows C (n + 1)) :
    ∃ (F₀ : ComposableArrows C n) (X₀ : C) (f₀ : X₀ ⟶ F₀.left), F = F₀.precomp f₀ :=
  ⟨F.δ₀, _, F.map' 0 1, ext_succ rfl (by simp) (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F✝ G : ComposableArrows C n
F : ComposableArrows C (n + 1)
⊢ map' F 0 1 =
    eqToHom (_ : obj' F 0 = obj' F 0) ≫
      map' (precomp (δ₀ F) (map' F 0 1)) 0 1 ≫ eqToHom (_ : (δ₀ (precomp (δ₀ F) (map' F 0 1))).obj 0 = (δ₀ F).obj 0)

Next tactic:
simp
@[simp]
lemma homMk₂_app_two : (homMk₂ app₀ app₁ app₂ w₀ w₁).app ⟨2, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.838401, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 2
app₀ : obj' f 0 ⟶ obj' g 0
app₁ : obj' f 1 ⟶ obj' g 1
app₂ : obj' f 2 ⟶ obj' g 2
w₀ : map' f 0 1 ≫ app₁ = app₀ ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂ = app₁ ≫ map' g 1 2
⊢ 2 < 2 + 1

Next tactic:
linarith
/-- Constructor for isomorphisms in `ComposableArrows C 2`. -/
@[simps]
def isoMk₂ {f g : ComposableArrows C 2}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2) : f ≅ g where
  hom := homMk₂ app₀.hom app₁.hom app₂.hom w₀ w₁
  inv := homMk₂ app₀.inv app₁.inv app₂.inv
    (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.867246, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 2
app₀ : obj' f 0 ≅ obj' g 0
app₁ : obj' f 1 ≅ obj' g 1
app₂ : obj' f 2 ≅ obj' g 2
w₀ : map' f 0 1 ≫ app₁.hom = app₀.hom ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂.hom = app₁.hom ≫ map' g 1 2
⊢ map' g 0 1 ≫ app₁.inv = app₀.inv ≫ map' f 0 1

Next tactic:
rw [← cancel_epi app₀.hom, ← reassoc_of% w₀, app₁.hom_inv_id,
      comp_id, app₀.hom_inv_id_assoc]
/-- Constructor for isomorphisms in `ComposableArrows C 2`. -/
@[simps]
def isoMk₂ {f g : ComposableArrows C 2}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2) : f ≅ g where
  hom := homMk₂ app₀.hom app₁.hom app₂.hom w₀ w₁
  inv := homMk₂ app₀.inv app₁.inv app₂.inv
    (by rw [← cancel_epi app₀.hom, ← reassoc_of% w₀, app₁.hom_inv_id,
      comp_id, app₀.hom_inv_id_assoc])
    (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.867246, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 2
app₀ : obj' f 0 ≅ obj' g 0
app₁ : obj' f 1 ≅ obj' g 1
app₂ : obj' f 2 ≅ obj' g 2
w₀ : map' f 0 1 ≫ app₁.hom = app₀.hom ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂.hom = app₁.hom ≫ map' g 1 2
⊢ map' g 1 2 ≫ app₂.inv = app₁.inv ≫ map' f 1 2

Next tactic:
rw [← cancel_epi app₁.hom, ← reassoc_of% w₁, app₂.hom_inv_id,
      comp_id, app₁.hom_inv_id_assoc]
lemma mk₂_surjective (X : ComposableArrows C 2) :
    ∃ (X₀ X₁ X₂ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂), X = mk₂ f₀ f₁:=
  ⟨_, _, _, X.map' 0 1, X.map' 1 2, ext₂ rfl rfl rfl (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 2
⊢ map' X 0 1 =
    eqToHom (_ : obj' X 0 = obj' X 0) ≫
      map' (mk₂ (map' X 0 1) (map' X 1 2)) 0 1 ≫ eqToHom (_ : obj' (mk₂ (map' X 0 1) (map' X 1 2)) 1 = obj' X 1)

Next tactic:
simp
lemma mk₂_surjective (X : ComposableArrows C 2) :
    ∃ (X₀ X₁ X₂ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂), X = mk₂ f₀ f₁:=
  ⟨_, _, _, X.map' 0 1, X.map' 1 2, ext₂ rfl rfl rfl (by simp) (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 2
⊢ map' X 1 2 =
    eqToHom (_ : obj' X 1 = obj' X 1) ≫
      map' (mk₂ (map' X 0 1) (map' X 1 2)) 1 2 ≫ eqToHom (_ : obj' (mk₂ (map' X 0 1) (map' X 1 2)) 2 = obj' X 2)

Next tactic:
simp
@[simp]
lemma homMk₃_app_two : (homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app ⟨2, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.1051614, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 3
app₀ : obj' f 0 ⟶ obj' g 0
app₁ : obj' f 1 ⟶ obj' g 1
app₂ : obj' f 2 ⟶ obj' g 2
app₃ : obj' f 3 ⟶ obj' g 3
w₀ : map' f 0 1 ≫ app₁ = app₀ ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂ = app₁ ≫ map' g 1 2
w₂ : map' f 2 3 ≫ app₃ = app₂ ≫ map' g 2 3
⊢ 2 < 3 + 1

Next tactic:
linarith
@[simp]
lemma homMk₃_app_three : (homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app ⟨3, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.1080892, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 3
app₀ : obj' f 0 ⟶ obj' g 0
app₁ : obj' f 1 ⟶ obj' g 1
app₂ : obj' f 2 ⟶ obj' g 2
app₃ : obj' f 3 ⟶ obj' g 3
w₀ : map' f 0 1 ≫ app₁ = app₀ ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂ = app₁ ≫ map' g 1 2
w₂ : map' f 2 3 ≫ app₃ = app₂ ≫ map' g 2 3
⊢ 3 < 3 + 1

Next tactic:
linarith
/-- Constructor for isomorphisms in `ComposableArrows C 3`. -/
@[simps]
def isoMk₃ {f g : ComposableArrows C 3}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3) : f ≅ g where
  hom := homMk₃ app₀.hom app₁.hom app₂.hom app₃.hom w₀ w₁ w₂
  inv := homMk₃ app₀.inv app₁.inv app₂.inv app₃.inv
    (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.1122296, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 3
app₀ : obj' f 0 ≅ obj' g 0
app₁ : obj' f 1 ≅ obj' g 1
app₂ : obj' f 2 ≅ obj' g 2
app₃ : obj' f 3 ≅ obj' g 3
w₀ : map' f 0 1 ≫ app₁.hom = app₀.hom ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂.hom = app₁.hom ≫ map' g 1 2
w₂ : map' f 2 3 ≫ app₃.hom = app₂.hom ≫ map' g 2 3
⊢ map' g 0 1 ≫ app₁.inv = app₀.inv ≫ map' f 0 1

Next tactic:
rw [← cancel_epi app₀.hom, ← reassoc_of% w₀, app₁.hom_inv_id,
      comp_id, app₀.hom_inv_id_assoc]
/-- Constructor for isomorphisms in `ComposableArrows C 3`. -/
@[simps]
def isoMk₃ {f g : ComposableArrows C 3}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3) : f ≅ g where
  hom := homMk₃ app₀.hom app₁.hom app₂.hom app₃.hom w₀ w₁ w₂
  inv := homMk₃ app₀.inv app₁.inv app₂.inv app₃.inv
    (by rw [← cancel_epi app₀.hom, ← reassoc_of% w₀, app₁.hom_inv_id,
      comp_id, app₀.hom_inv_id_assoc])
    (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.1122296, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 3
app₀ : obj' f 0 ≅ obj' g 0
app₁ : obj' f 1 ≅ obj' g 1
app₂ : obj' f 2 ≅ obj' g 2
app₃ : obj' f 3 ≅ obj' g 3
w₀ : map' f 0 1 ≫ app₁.hom = app₀.hom ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂.hom = app₁.hom ≫ map' g 1 2
w₂ : map' f 2 3 ≫ app₃.hom = app₂.hom ≫ map' g 2 3
⊢ map' g 1 2 ≫ app₂.inv = app₁.inv ≫ map' f 1 2

Next tactic:
rw [← cancel_epi app₁.hom, ← reassoc_of% w₁, app₂.hom_inv_id,
      comp_id, app₁.hom_inv_id_assoc]
/-- Constructor for isomorphisms in `ComposableArrows C 3`. -/
@[simps]
def isoMk₃ {f g : ComposableArrows C 3}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3) : f ≅ g where
  hom := homMk₃ app₀.hom app₁.hom app₂.hom app₃.hom w₀ w₁ w₂
  inv := homMk₃ app₀.inv app₁.inv app₂.inv app₃.inv
    (by rw [← cancel_epi app₀.hom, ← reassoc_of% w₀, app₁.hom_inv_id,
      comp_id, app₀.hom_inv_id_assoc])
    (by rw [← cancel_epi app₁.hom, ← reassoc_of% w₁, app₂.hom_inv_id,
      comp_id, app₁.hom_inv_id_assoc])
    (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.1122296, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 3
app₀ : obj' f 0 ≅ obj' g 0
app₁ : obj' f 1 ≅ obj' g 1
app₂ : obj' f 2 ≅ obj' g 2
app₃ : obj' f 3 ≅ obj' g 3
w₀ : map' f 0 1 ≫ app₁.hom = app₀.hom ≫ map' g 0 1
w₁ : map' f 1 2 ≫ app₂.hom = app₁.hom ≫ map' g 1 2
w₂ : map' f 2 3 ≫ app₃.hom = app₂.hom ≫ map' g 2 3
⊢ map' g 2 3 ≫ app₃.inv = app₂.inv ≫ map' f 2 3

Next tactic:
rw [← cancel_epi app₂.hom, ← reassoc_of% w₂, app₃.hom_inv_id,
      comp_id, app₂.hom_inv_id_assoc]
lemma mk₃_surjective (X : ComposableArrows C 3) :
    ∃ (X₀ X₁ X₂ X₃ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂) (f₂ : X₂ ⟶ X₃), X = mk₃ f₀ f₁ f₂ :=
  ⟨_, _, _, _, X.map' 0 1, X.map' 1 2, X.map' 2 3,
    ext₃ rfl rfl rfl rfl (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 3
⊢ map' X 0 1 =
    eqToHom (_ : obj' X 0 = obj' X 0) ≫
      map' (mk₃ (map' X 0 1) (map' X 1 2) (map' X 2 3)) 0 1 ≫
        eqToHom (_ : obj' (mk₃ (map' X 0 1) (map' X 1 2) (map' X 2 3)) 1 = obj' X 1)

Next tactic:
simp
lemma mk₃_surjective (X : ComposableArrows C 3) :
    ∃ (X₀ X₁ X₂ X₃ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂) (f₂ : X₂ ⟶ X₃), X = mk₃ f₀ f₁ f₂ :=
  ⟨_, _, _, _, X.map' 0 1, X.map' 1 2, X.map' 2 3,
    ext₃ rfl rfl rfl rfl (by simp) (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 3
⊢ map' X 1 2 =
    eqToHom (_ : obj' X 1 = obj' X 1) ≫
      map' (mk₃ (map' X 0 1) (map' X 1 2) (map' X 2 3)) 1 2 ≫
        eqToHom (_ : obj' (mk₃ (map' X 0 1) (map' X 1 2) (map' X 2 3)) 2 = obj' X 2)

Next tactic:
simp