l3lab/ntp-mathlib huggingface dataset:
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        

Proof state:
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ : { α // Epi α }
Δ₂ : SimplexCategory
α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₂ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))
⊢ Δ₁ = Δ₂

Next tactic:
ext1
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        ext1
        

Proof state:
case a
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ : { α // Epi α }
Δ₂ : SimplexCategory
α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₂ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))
⊢ len Δ₁ = len Δ₂

Next tactic:
simpa only [Fin.mk_eq_mk] using h₁.1
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        ext1
        simpa only [Fin.mk_eq_mk] using h₁.1
      

Proof state:
case mk.mk.mk.mk
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ : { α // Epi α }
Δ₂ : SimplexCategory
α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₂ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))
h₂ : Δ₁ = Δ₂
⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₂ }, snd := α₂ }

Next tactic:
subst h₂
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        ext1
        simpa only [Fin.mk_eq_mk] using h₁.1
      subst h₂
      

Proof state:
case mk.mk.mk.mk
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₁ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))
⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₁ }, snd := α₂ }

Next tactic:
refine' ext _ _ rfl _
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        ext1
        simpa only [Fin.mk_eq_mk] using h₁.1
      subst h₂
      refine' ext _ _ rfl _
      

Proof state:
case mk.mk.mk.mk
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₁ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))
⊢ e { fst := { unop := Δ₁ }, snd := α₁ } ≫
      eqToHom (_ : { fst := { unop := Δ₁ }, snd := α₁ }.fst.unop = { fst := { unop := Δ₁ }, snd := α₂ }.fst.unop) =
    e { fst := { unop := Δ₁ }, snd := α₂ }

Next tactic:
ext : 2
instance : Fintype (IndexSet Δ) :=
  Fintype.ofInjective
    (fun A =>
      ⟨⟨A.1.unop.len, Nat.lt_succ_iff.mpr (len_le_of_epi (inferInstance : Epi A.e))⟩,
        A.e.toOrderHom⟩ :
      IndexSet Δ → Sigma fun k : Fin (Δ.unop.len + 1) => Fin (Δ.unop.len + 1) → Fin (k + 1))
    (by
      rintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁
      induction' Δ₁ using Opposite.rec with Δ₁
      induction' Δ₂ using Opposite.rec with Δ₂
      simp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁
      have h₂ : Δ₁ = Δ₂ := by
        ext1
        simpa only [Fin.mk_eq_mk] using h₁.1
      subst h₂
      refine' ext _ _ rfl _
      ext : 2
      

Proof state:
case mk.mk.mk.mk.a.h
C : Type u_1
inst✝ : Category.{?u.1629, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
Δ₁ : SimplexCategory
α₁ α₂ : { α // Epi α }
h₁ :
  len Δ₁ = len Δ₁ ∧
    HEq ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))
      ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))
⊢ ⇑(Hom.toOrderHom
        (e { fst := { unop := Δ₁ }, snd := α₁ } ≫
          eqToHom
            (_ : { fst := { unop := Δ₁ }, snd := α₁ }.fst.unop = { fst := { unop := Δ₁ }, snd := α₂ }.fst.unop))) =
    ⇑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))

Next tactic:
exact eq_of_heq h₁.2
/-- The distinguished element in `Splitting.IndexSet Δ` which corresponds to the
identity of `Δ`. -/
@[simps]
def id : IndexSet Δ :=
  ⟨Δ, ⟨𝟙 _, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.3864, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ Epi (𝟙 Δ.unop)

Next tactic:
infer_instance
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A ↔ A.fst = Δ

Next tactic:
constructor
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · 

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A → A.fst = Δ

Next tactic:
intro h
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : EqId A
⊢ A.fst = Δ

Next tactic:
dsimp at h
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : A = id Δ
⊢ A.fst = Δ

Next tactic:
rw [h]
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : A = id Δ
⊢ (id Δ).fst = Δ

Next tactic:
rfl
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · 

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ A.fst = Δ → EqId A

Next tactic:
intro h
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : A.fst = Δ
⊢ EqId A

Next tactic:
rcases A with ⟨_, ⟨f, hf⟩⟩
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ fst✝ : SimplexCategoryᵒᵖ
f : Δ.unop ⟶ fst✝.unop
hf : Epi f
h : { fst := fst✝, snd := { val := f, property := hf } }.fst = Δ
⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }

Next tactic:
simp only at h
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    simp only at h
    

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
Δ fst✝ : SimplexCategoryᵒᵖ
f : Δ.unop ⟶ fst✝.unop
hf : Epi f
h : fst✝ = Δ
⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }

Next tactic:
subst h
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    simp only at h
    subst h
    

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
fst✝ : SimplexCategoryᵒᵖ
f : fst✝.unop ⟶ fst✝.unop
hf : Epi f
⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }

Next tactic:
refine' ext _ _ rfl _
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    simp only at h
    subst h
    refine' ext _ _ rfl _
    · 

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
fst✝ : SimplexCategoryᵒᵖ
f : fst✝.unop ⟶ fst✝.unop
hf : Epi f
⊢ e { fst := fst✝, snd := { val := f, property := hf } } ≫
      eqToHom (_ : { fst := fst✝, snd := { val := f, property := hf } }.fst.unop = (id fst✝).fst.unop) =
    e (id fst✝)

Next tactic:
haveI := hf
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    simp only at h
    subst h
    refine' ext _ _ rfl _
    · haveI := hf
      

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
fst✝ : SimplexCategoryᵒᵖ
f : fst✝.unop ⟶ fst✝.unop
hf this : Epi f
⊢ e { fst := fst✝, snd := { val := f, property := hf } } ≫
      eqToHom (_ : { fst := fst✝, snd := { val := f, property := hf } }.fst.unop = (id fst✝).fst.unop) =
    e (id fst✝)

Next tactic:
simp only [eqToHom_refl, comp_id]
theorem eqId_iff_eq : A.EqId ↔ A.1 = Δ := by
  constructor
  · intro h
    dsimp at h
    rw [h]
    rfl
  · intro h
    rcases A with ⟨_, ⟨f, hf⟩⟩
    simp only at h
    subst h
    refine' ext _ _ rfl _
    · haveI := hf
      simp only [eqToHom_refl, comp_id]
      

Proof state:
case mpr.mk.mk
C : Type u_1
inst✝ : Category.{?u.4262, u_1} C
fst✝ : SimplexCategoryᵒᵖ
f : fst✝.unop ⟶ fst✝.unop
hf this : Epi f
⊢ e { fst := fst✝, snd := { val := f, property := hf } } = e (id fst✝)

Next tactic:
exact eq_id_of_epi f
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A ↔ len A.fst.unop = len Δ.unop

Next tactic:
rw [eqId_iff_eq]
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ A.fst = Δ ↔ len A.fst.unop = len Δ.unop

Next tactic:
constructor
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · 

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ A.fst = Δ → len A.fst.unop = len Δ.unop

Next tactic:
intro h
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · intro h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : A.fst = Δ
⊢ len A.fst.unop = len Δ.unop

Next tactic:
rw [h]
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · intro h
    rw [h]
  · 

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ len A.fst.unop = len Δ.unop → A.fst = Δ

Next tactic:
intro h
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · intro h
    rw [h]
  · intro h
    

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : len A.fst.unop = len Δ.unop
⊢ A.fst = Δ

Next tactic:
rw [← unop_inj_iff]
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · intro h
    rw [h]
  · intro h
    rw [← unop_inj_iff]
    

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : len A.fst.unop = len Δ.unop
⊢ A.fst.unop = Δ.unop

Next tactic:
ext
theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by
  rw [eqId_iff_eq]
  constructor
  · intro h
    rw [h]
  · intro h
    rw [← unop_inj_iff]
    ext
    

Proof state:
case mpr.a
C : Type u_1
inst✝ : Category.{?u.4671, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : len A.fst.unop = len Δ.unop
⊢ len A.fst.unop = len Δ.unop

Next tactic:
exact h
theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.4800, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A ↔ len Δ.unop ≤ len A.fst.unop

Next tactic:
rw [eqId_iff_len_eq]
theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by
  rw [eqId_iff_len_eq]
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.4800, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ len A.fst.unop = len Δ.unop ↔ len Δ.unop ≤ len A.fst.unop

Next tactic:
constructor
theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by
  rw [eqId_iff_len_eq]
  constructor
  · 

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4800, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ len A.fst.unop = len Δ.unop → len Δ.unop ≤ len A.fst.unop

Next tactic:
intro h
theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by
  rw [eqId_iff_len_eq]
  constructor
  · intro h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.4800, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : len A.fst.unop = len Δ.unop
⊢ len Δ.unop ≤ len A.fst.unop

Next tactic:
rw [h]
theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by
  rw [eqId_iff_len_eq]
  constructor
  · intro h
    rw [h]
  · 

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.4800, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ len Δ.unop ≤ len A.fst.unop → len A.fst.unop = len Δ.unop

Next tactic:
exact le_antisymm (len_le_of_epi (inferInstance : Epi A.e))
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A ↔ Mono (e A)

Next tactic:
constructor
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · 

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ EqId A → Mono (e A)

Next tactic:
intro h
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : EqId A
⊢ Mono (e A)

Next tactic:
dsimp at h
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : A = id Δ
⊢ Mono (e A)

Next tactic:
subst h
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    subst h
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
⊢ Mono (e (id Δ))

Next tactic:
dsimp only [id, e]
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    subst h
    dsimp only [id, e]
    

Proof state:
case mp
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
⊢ Mono (𝟙 Δ.unop)

Next tactic:
infer_instance
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    subst h
    dsimp only [id, e]
    infer_instance
  · 

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ Mono (e A) → EqId A

Next tactic:
intro h
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    subst h
    dsimp only [id, e]
    infer_instance
  · intro h
    

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : Mono (e A)
⊢ EqId A

Next tactic:
rw [eqId_iff_len_le]
theorem eqId_iff_mono : A.EqId ↔ Mono A.e := by
  constructor
  · intro h
    dsimp at h
    subst h
    dsimp only [id, e]
    infer_instance
  · intro h
    rw [eqId_iff_len_le]
    

Proof state:
case mpr
C : Type u_1
inst✝ : Category.{?u.5342, u_1} C
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
h : Mono (e A)
⊢ len Δ.unop ≤ len A.fst.unop

Next tactic:
exact len_le_of_mono h
@[reassoc]
theorem ιSummand_eq {Δ : SimplexCategoryᵒᵖ} (A : IndexSet Δ) :
    s.ιSummand A = s.ι A.1.unop.len ≫ X.map A.e.op := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ ιSummand s A = ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op

Next tactic:
dsimp only [ιSummand, Iso.hom]
@[reassoc]
theorem ιSummand_eq {Δ : SimplexCategoryᵒᵖ} (A : IndexSet Δ) :
    s.ιSummand A = s.ι A.1.unop.len ≫ X.map A.e.op := by
  dsimp only [ιSummand, Iso.hom]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ ιCoprod s.N A ≫ (iso s Δ).hom = ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op

Next tactic:
erw [colimit.ι_desc, Cofan.mk_ι_app]
theorem ιSummand_id (n : ℕ) : s.ιSummand (IndexSet.id (op [n])) = s.ι n := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
n : ℕ
⊢ ιSummand s (IndexSet.id (op [n])) = ι s n

Next tactic:
erw [ιSummand_eq, X.map_id, comp_id]
theorem ιSummand_id (n : ℕ) : s.ιSummand (IndexSet.id (op [n])) = s.ι n := by
  erw [ιSummand_eq, X.map_id, comp_id]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
n : ℕ
⊢ ι s (len (IndexSet.id (op [n])).fst.unop) = ι s n

Next tactic:
rfl
@[reassoc (attr := simp)]
theorem ιSummand_comp_app (f : X ⟶ Y) {Δ : SimplexCategoryᵒᵖ} (A : IndexSet Δ) :
    s.ιSummand A ≫ f.app Δ = s.φ f A.1.unop.len ≫ Y.map A.e.op := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f : X ⟶ Y
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ ιSummand s A ≫ f.app Δ = φ s f (len A.fst.unop) ≫ Y.map (IndexSet.e A).op

Next tactic:
simp only [ιSummand_eq_assoc, φ, assoc]
@[reassoc (attr := simp)]
theorem ιSummand_comp_app (f : X ⟶ Y) {Δ : SimplexCategoryᵒᵖ} (A : IndexSet Δ) :
    s.ιSummand A ≫ f.app Δ = s.φ f A.1.unop.len ≫ Y.map A.e.op := by
  simp only [ιSummand_eq_assoc, φ, assoc]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f : X ⟶ Y
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op ≫ f.app Δ =
    ι s (len A.fst.unop) ≫ f.app (op [len A.fst.unop]) ≫ Y.map (IndexSet.e A).op

Next tactic:
erw [NatTrans.naturality]
theorem hom_ext' {Z : C} {Δ : SimplexCategoryᵒᵖ} (f g : X.obj Δ ⟶ Z)
    (h : ∀ A : IndexSet Δ, s.ιSummand A ≫ f = s.ιSummand A ≫ g) : f = g := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
Z : C
Δ : SimplexCategoryᵒᵖ
f g : X.obj Δ ⟶ Z
h : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g
⊢ f = g

Next tactic:
rw [← cancel_epi (s.iso Δ).hom]
theorem hom_ext' {Z : C} {Δ : SimplexCategoryᵒᵖ} (f g : X.obj Δ ⟶ Z)
    (h : ∀ A : IndexSet Δ, s.ιSummand A ≫ f = s.ιSummand A ≫ g) : f = g := by
  rw [← cancel_epi (s.iso Δ).hom]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
Z : C
Δ : SimplexCategoryᵒᵖ
f g : X.obj Δ ⟶ Z
h : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g
⊢ (iso s Δ).hom ≫ f = (iso s Δ).hom ≫ g

Next tactic:
ext A
theorem hom_ext' {Z : C} {Δ : SimplexCategoryᵒᵖ} (f g : X.obj Δ ⟶ Z)
    (h : ∀ A : IndexSet Δ, s.ιSummand A ≫ f = s.ιSummand A ≫ g) : f = g := by
  rw [← cancel_epi (s.iso Δ).hom]
  ext A
  

Proof state:
case h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
Z : C
Δ : SimplexCategoryᵒᵖ
f g : X.obj Δ ⟶ Z
h : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g
A : IndexSet Δ
⊢ Sigma.ι (summand s.N Δ) A ≫ (iso s Δ).hom ≫ f = Sigma.ι (summand s.N Δ) A ≫ (iso s Δ).hom ≫ g

Next tactic:
simpa only [ιSummand_eq, iso_hom, map, colimit.ι_desc_assoc, Cofan.mk_ι_app] using h A
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
⊢ f = g

Next tactic:
ext Δ
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  ext Δ
  

Proof state:
case h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
Δ : SimplexCategoryᵒᵖ
⊢ f.app Δ = g.app Δ

Next tactic:
apply s.hom_ext'
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  ext Δ
  apply s.hom_ext'
  

Proof state:
case h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
Δ : SimplexCategoryᵒᵖ
⊢ ∀ (A : IndexSet Δ), ιSummand s A ≫ f.app Δ = ιSummand s A ≫ g.app Δ

Next tactic:
intro A
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  ext Δ
  apply s.hom_ext'
  intro A
  

Proof state:
case h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
Δ : SimplexCategoryᵒᵖ
A : IndexSet Δ
⊢ ιSummand s A ≫ f.app Δ = ιSummand s A ≫ g.app Δ

Next tactic:
induction' Δ using Opposite.rec with Δ
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  ext Δ
  apply s.hom_ext'
  intro A
  induction' Δ using Opposite.rec with Δ
  

Proof state:
case h.h.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
Δ : SimplexCategory
A : IndexSet { unop := Δ }
⊢ ιSummand s A ≫ f.app { unop := Δ } = ιSummand s A ≫ g.app { unop := Δ }

Next tactic:
induction' Δ using SimplexCategory.rec with n
theorem hom_ext (f g : X ⟶ Y) (h : ∀ n : ℕ, s.φ f n = s.φ g n) : f = g := by
  ext Δ
  apply s.hom_ext'
  intro A
  induction' Δ using Opposite.rec with Δ
  induction' Δ using SimplexCategory.rec with n
  

Proof state:
case h.h.mk.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasFiniteCoproducts C
X Y : SimplicialObject C
s : Splitting X
f g : X ⟶ Y
h : ∀ (n : ℕ), φ s f n = φ s g n
n : ℕ
A : IndexSet { unop := [n] }
⊢ ιSummand s A ≫ f.app { unop := [n] } = ιSummand s A ≫ g.app { unop := [n] }

Next tactic:
dsimp