l3lab/ntp-mathlib huggingface dataset:
theorem small_fullSubcategory_filteredClosure :
    Small.{max v w} (FullSubcategory (FilteredClosure f)) := by
  refine' small_of_injective_of_exists (FilteredClosureSmall.abstractFilteredClosureRealization f)
    FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | max hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.max _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | coeq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    

Proof state:
case mk.coeq.intro.mk.intro.mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ ∃ a,
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f a =
      { obj := coeq g g', property := (_ : FilteredClosure f (coeq g g')) }.obj

Next tactic:
refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.coeq _ _ x y g g'⟩, rfl⟩
theorem small_fullSubcategory_filteredClosure :
    Small.{max v w} (FullSubcategory (FilteredClosure f)) := by
  refine' small_of_injective_of_exists (FilteredClosureSmall.abstractFilteredClosureRealization f)
    FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | max hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.max _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | coeq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.coeq _ _ x y g g'⟩, rfl⟩
    

Proof state:
case mk.coeq.intro.mk.intro.mk.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ n < Max.max n m + 1
case mk.coeq.intro.mk.intro.mk.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ m < Max.max n m + 1

Next tactic:
all_goals apply Nat.lt_succ_of_le
theorem small_fullSubcategory_filteredClosure :
    Small.{max v w} (FullSubcategory (FilteredClosure f)) := by
  refine' small_of_injective_of_exists (FilteredClosureSmall.abstractFilteredClosureRealization f)
    FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | max hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.max _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | coeq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.coeq _ _ x y g g'⟩, rfl⟩
    all_goals 

Proof state:
case mk.coeq.intro.mk.intro.mk.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ n < Max.max n m + 1

Next tactic:
apply Nat.lt_succ_of_le
theorem small_fullSubcategory_filteredClosure :
    Small.{max v w} (FullSubcategory (FilteredClosure f)) := by
  refine' small_of_injective_of_exists (FilteredClosureSmall.abstractFilteredClosureRealization f)
    FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | max hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.max _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | coeq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.coeq _ _ x y g g'⟩, rfl⟩
    all_goals 

Proof state:
case mk.coeq.intro.mk.intro.mk.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ m < Max.max n m + 1

Next tactic:
apply Nat.lt_succ_of_le
theorem small_fullSubcategory_filteredClosure :
    Small.{max v w} (FullSubcategory (FilteredClosure f)) := by
  refine' small_of_injective_of_exists (FilteredClosureSmall.abstractFilteredClosureRealization f)
    FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | max hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.max _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | coeq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, FilteredClosureSmall.InductiveStep.coeq _ _ x y g g'⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    

Proof state:
case mk.coeq.intro.mk.intro.mk.refine'_1.a
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ n ≤ Max.max n m
case mk.coeq.intro.mk.intro.mk.refine'_2.a
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f n).fst
hj₁ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsFiltered.FilteredClosureSmall.bundledAbstractFilteredClosure f m).fst
hj₂ :
  FilteredClosure f
    (CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y })
g g' :
  CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := n, snd := x } ⟶
    CategoryTheory.IsFiltered.FilteredClosureSmall.abstractFilteredClosureRealization f { fst := m, snd := y }
⊢ m ≤ Max.max n m

Next tactic:
exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
⊢ Small.{max v w, u} (FullSubcategory (CofilteredClosure f))

Next tactic:
refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
⊢ ∀ (b : FullSubcategory (CofilteredClosure f)),
    ∃ a, CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a = b.obj

Next tactic:
rintro ⟨j, h⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  

Proof state:
case mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
h : CofilteredClosure f j
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j, property := h }.obj

Next tactic:
induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
  | eq hj₁ hj₂ g g' ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.eq _ _ x y g g'⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  

Proof state:
case mk.base
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
x : α
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := f x, property := (_ : CofilteredClosure f (f x)) }.obj

Next tactic:
| base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => 

Proof state:
case mk.base
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
x : α
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := f x, property := (_ : CofilteredClosure f (f x)) }.obj

Next tactic:
exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  

Proof state:
case mk.min
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j j✝ j'✝ : C
hj₁ : CofilteredClosure f j✝
hj₂ : CofilteredClosure f j'✝
ih :
  ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j✝, property := hj₁ }.obj
ih' :
  ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j'✝, property := hj₂ }.obj
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := min j✝ j'✝, property := (_ : CofilteredClosure f (min j✝ j'✝)) }.obj

Next tactic:
| min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
    all_goals apply Nat.lt_succ_of_le
    exacts [Nat.le_max_left _ _, Nat.le_max_right _ _]
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    

Proof state:
case mk.min
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j j✝ j'✝ : C
hj₁ : CofilteredClosure f j✝
hj₂ : CofilteredClosure f j'✝
ih :
  ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j✝, property := hj₁ }.obj
ih' :
  ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j'✝, property := hj₂ }.obj
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := min j✝ j'✝, property := (_ : CofilteredClosure f (min j✝ j'✝)) }.obj

Next tactic:
rcases ih with ⟨⟨n, x⟩, rfl⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    

Proof state:
case mk.min.intro.mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j j'✝ : C
hj₂ : CofilteredClosure f j'✝
ih' :
  ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      { obj := j'✝, property := hj₂ }.obj
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      {
          obj :=
            min
              (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                { fst := n, snd := x })
              j'✝,
          property :=
            (_ :
              CofilteredClosure f
                (min
                  (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                    { fst := n, snd := x })
                  j'✝)) }.obj

Next tactic:
rcases ih' with ⟨⟨m, y⟩, rfl⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    

Proof state:
case mk.min.intro.mk.intro.mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f m).fst
hj₂ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := m, snd := y })
⊢ ∃ a,
    CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f a =
      {
          obj :=
            min
              (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                { fst := n, snd := x })
              (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                { fst := m, snd := y }),
          property :=
            (_ :
              CofilteredClosure f
                (min
                  (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                    { fst := n, snd := x })
                  (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f
                    { fst := m, snd := y }))) }.obj

Next tactic:
refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
    

Proof state:
case mk.min.intro.mk.intro.mk.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f m).fst
hj₂ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := m, snd := y })
⊢ n < max n m + 1
case mk.min.intro.mk.intro.mk.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f m).fst
hj₂ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := m, snd := y })
⊢ m < max n m + 1

Next tactic:
all_goals apply Nat.lt_succ_of_le
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
    all_goals 

Proof state:
case mk.min.intro.mk.intro.mk.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f m).fst
hj₂ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := m, snd := y })
⊢ n < max n m + 1

Next tactic:
apply Nat.lt_succ_of_le
theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f)) := by
  refine' small_of_injective_of_exists
    (CofilteredClosureSmall.abstractCofilteredClosureRealization f) FullSubcategory.ext _
  rintro ⟨j, h⟩
  induction h with
  | base x => exact ⟨⟨0, ⟨x⟩⟩, rfl⟩
  | min hj₁ hj₂ ih ih' =>
    rcases ih with ⟨⟨n, x⟩, rfl⟩
    rcases ih' with ⟨⟨m, y⟩, rfl⟩
    refine' ⟨⟨(Max.max n m).succ, CofilteredClosureSmall.InductiveStep.min _ _ x y⟩, rfl⟩
    all_goals 

Proof state:
case mk.min.intro.mk.intro.mk.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsCofilteredOrEmpty C
α : Type w
f : α → C
j : C
n : ℕ
x : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f n).fst
hj₁ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := n, snd := x })
m : ℕ
y : (CategoryTheory.IsCofiltered.CofilteredClosureSmall.bundledAbstractCofilteredClosure f m).fst
hj₂ :
  CofilteredClosure f
    (CategoryTheory.IsCofiltered.CofilteredClosureSmall.abstractCofilteredClosureRealization f { fst := m, snd := y })
⊢ m < max n m + 1

Next tactic:
apply Nat.lt_succ_of_le