l3lab/ntp-mathlib huggingface dataset:
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ a ⊓ sSup s ≤ ⨆ b ∈ s, a ⊓ b

Next tactic:
convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = sup (Set.toFinset s) fun i => a ⊓ id i

Next tactic:
rw [Finset.sup_eq_iSup]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      rw [Finset.sup_eq_iSup]
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = ⨆ a_1 ∈ Set.toFinset s, a ⊓ id a_1

Next tactic:
simp_rw [Set.mem_toFinset]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      rw [Finset.sup_eq_iSup]
      simp_rw [Set.mem_toFinset]
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = ⨆ a_1 ∈ s, a ⊓ id a_1

Next tactic:
rfl
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b ≤ a ⊔ sInf s

Next tactic:
convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = inf (Set.toFinset s) fun i => a ⊔ id i

Next tactic:
rw [Finset.inf_eq_iInf]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = ⨅ a_1 ∈ Set.toFinset s, a ⊔ id a_1

Next tactic:
simp_rw [Set.mem_toFinset]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
    CompleteDistribLattice α :=
  { toCompleteLattice α with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝³ : Fintype ι
inst✝² : Fintype α
inst✝¹ : DistribLattice α
inst✝ : BoundedOrder α
src✝ : CompleteLattice α := toCompleteLattice α
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = ⨅ a_1 ∈ s, a ⊔ id a_1

Next tactic:
rfl
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ a ⊓ sSup s ≤ ⨆ b ∈ s, a ⊓ b

Next tactic:
convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = sup (Set.toFinset s) fun i => a ⊓ id i

Next tactic:
rw [Finset.sup_eq_iSup]
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      rw [Finset.sup_eq_iSup]
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = ⨆ a_1 ∈ Set.toFinset s, a ⊓ id a_1

Next tactic:
simp_rw [Set.mem_toFinset]
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      rfl
    inf_sSup_le_iSup_inf := fun a s => by
      convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
      rw [Finset.sup_eq_iSup]
      simp_rw [Set.mem_toFinset]
      

Proof state:
case h.e'_4
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨆ b ∈ s, a ⊓ b = ⨆ a_1 ∈ s, a ⊓ id a_1

Next tactic:
rfl
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b ≤ a ⊔ sInf s

Next tactic:
convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = inf (Set.toFinset s) fun i => a ⊔ id i

Next tactic:
rw [Finset.inf_eq_iInf]
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = ⨅ a_1 ∈ Set.toFinset s, a ⊔ id a_1

Next tactic:
simp_rw [Set.mem_toFinset]
/-- A finite boolean algebra is complete. -/
@[reducible]
noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
  -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
  { Fintype.toCompleteLattice α,
    ‹BooleanAlgebra α› with
    iInf_sup_le_sup_sInf := fun a s => by
      convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
      rw [Finset.inf_eq_iInf]
      simp_rw [Set.mem_toFinset]
      

Proof state:
case h.e'_3
ι : Type u_1
α : Type u_2
inst✝² : Fintype ι
inst✝¹ : Fintype α
inst✝ : BooleanAlgebra α
src✝¹ : CompleteLattice α := toCompleteLattice α
src✝ : BooleanAlgebra α := inst✝
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b = ⨅ a_1 ∈ s, a ⊔ id a_1

Next tactic:
rfl
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
    [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
  

Proof state:
α : Type u_1
r : α → α → Prop
inst✝² : IsTrans α r
β : Type u_2
γ : Type u_3
inst✝¹ : Nonempty γ
f : γ → α
inst✝ : Fintype β
D : Directed r f
g : β → γ
⊢ ∃ z, ∀ (i : β), r (f (g i)) (f z)

Next tactic:
classical
    obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
    exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
    [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
  classical
    

Proof state:
α : Type u_1
r : α → α → Prop
inst✝² : IsTrans α r
β : Type u_2
γ : Type u_3
inst✝¹ : Nonempty γ
f : γ → α
inst✝ : Fintype β
D : Directed r f
g : β → γ
⊢ ∃ z, ∀ (i : β), r (f (g i)) (f z)

Next tactic:
obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
    [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
  classical
    obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
    

Proof state:
case intro
α : Type u_1
r : α → α → Prop
inst✝² : IsTrans α r
β : Type u_2
γ : Type u_3
inst✝¹ : Nonempty γ
f : γ → α
inst✝ : Fintype β
D : Directed r f
g : β → γ
z : γ
hz : ∀ i ∈ image g univ, r (f i) (f z)
⊢ ∃ z, ∀ (i : β), r (f (g i)) (f z)

Next tactic:
exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddAbove (Set.range f) := by
  

Proof state:
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≤ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
⊢ BddAbove (Set.range f)

Next tactic:
obtain ⟨M, hM⟩ := Fintype.exists_le f
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddAbove (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_le f
  

Proof state:
case intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≤ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), f i ≤ M
⊢ BddAbove (Set.range f)

Next tactic:
refine' ⟨M, fun a ha => _⟩
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddAbove (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_le f
  refine' ⟨M, fun a ha => _⟩
  

Proof state:
case intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≤ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), f i ≤ M
a : α
ha : a ∈ Set.range f
⊢ a ≤ M

Next tactic:
obtain ⟨b, rfl⟩ := ha
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddAbove (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_le f
  refine' ⟨M, fun a ha => _⟩
  obtain ⟨b, rfl⟩ := ha
  

Proof state:
case intro.intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≤ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), f i ≤ M
b : β
⊢ f b ≤ M

Next tactic:
exact hM b
theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
  

Proof state:
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≥ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
⊢ BddBelow (Set.range f)

Next tactic:
obtain ⟨M, hM⟩ := Fintype.exists_ge f
theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_ge f
  

Proof state:
case intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≥ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), M ≤ f i
⊢ BddBelow (Set.range f)

Next tactic:
refine' ⟨M, fun a ha => _⟩
theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_ge f
  refine' ⟨M, fun a ha => _⟩
  

Proof state:
case intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≥ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), M ≤ f i
a : α
ha : a ∈ Set.range f
⊢ M ≤ a

Next tactic:
obtain ⟨b, rfl⟩ := ha
theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
    [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
  obtain ⟨M, hM⟩ := Fintype.exists_ge f
  refine' ⟨M, fun a ha => _⟩
  obtain ⟨b, rfl⟩ := ha
  

Proof state:
case intro.intro
α : Type u_1
inst✝³ : Nonempty α
inst✝² : Preorder α
inst✝¹ : IsDirected α fun x x_1 => x ≥ x_1
β : Type u_2
inst✝ : Fintype β
f : β → α
M : α
hM : ∀ (i : β), M ≤ f i
b : β
⊢ M ≤ f b

Next tactic:
exact hM b
/-- If `C` has finite coproducts and filtered colimits, we can construct arbitrary coproducts by
    taking the colimit of the diagram formed by the coproducts of finite sets over the indexing
    type. -/
@[simps!]
def liftToFinsetColimitCocone [HasFiniteCoproducts C] [HasFilteredColimitsOfSize.{w, w} C]
    (F : Discrete α ⥤ C) : ColimitCocone F where
  cocone :=
    { pt := colimit (liftToFinset F)
      ι :=
        Discrete.natTrans fun j =>
          @Sigma.ι _ _ _ (fun x : ({j} : Finset (Discrete α)) => F.obj x) _ ⟨j, by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
α : Type w
inst✝¹ : HasFiniteCoproducts C
inst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C
F : Discrete α ⥤ C
j : Discrete α
⊢ j ∈ {j}

Next tactic:
simp
/-- If `C` has finite coproducts and filtered colimits, we can construct arbitrary coproducts by
    taking the colimit of the diagram formed by the coproducts of finite sets over the indexing
    type. -/
@[simps!]
def liftToFinsetColimitCocone [HasFiniteCoproducts C] [HasFilteredColimitsOfSize.{w, w} C]
    (F : Discrete α ⥤ C) : ColimitCocone F where
  cocone :=
    { pt := colimit (liftToFinset F)
      ι :=
        Discrete.natTrans fun j =>
          @Sigma.ι _ _ _ (fun x : ({j} : Finset (Discrete α)) => F.obj x) _ ⟨j, by simp⟩ ≫
            colimit.ι (liftToFinset F) {j} }
  isColimit :=
    { desc := fun s =>
        colimit.desc (liftToFinset F)
          { pt := s.pt
            ι := { app := fun t => Sigma.desc fun x => s.ι.app x } }
      uniq := fun s m h => by
        

Proof state:
C : Type u
inst✝² : Category.{v, u} C
α : Type w
inst✝¹ : HasFiniteCoproducts C
inst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C
F : Discrete α ⥤ C
s : Cocone F
m :
  { pt := colimit (liftToFinset F),
        ι :=
          Discrete.natTrans fun j =>
            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶
    s.pt
h :
  ∀ (j : Discrete α),
    { pt := colimit (liftToFinset F),
                ι :=
                  Discrete.natTrans fun j =>
                    Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫
                      colimit.ι (liftToFinset F) {j} }.ι.app
          j ≫
        m =
      s.ι.app j
⊢ m =
    (fun s => colimit.desc (liftToFinset F) { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => s.ι.app ↑x }) s

Next tactic:
apply colimit.hom_ext
/-- If `C` has finite coproducts and filtered colimits, we can construct arbitrary coproducts by
    taking the colimit of the diagram formed by the coproducts of finite sets over the indexing
    type. -/
@[simps!]
def liftToFinsetColimitCocone [HasFiniteCoproducts C] [HasFilteredColimitsOfSize.{w, w} C]
    (F : Discrete α ⥤ C) : ColimitCocone F where
  cocone :=
    { pt := colimit (liftToFinset F)
      ι :=
        Discrete.natTrans fun j =>
          @Sigma.ι _ _ _ (fun x : ({j} : Finset (Discrete α)) => F.obj x) _ ⟨j, by simp⟩ ≫
            colimit.ι (liftToFinset F) {j} }
  isColimit :=
    { desc := fun s =>
        colimit.desc (liftToFinset F)
          { pt := s.pt
            ι := { app := fun t => Sigma.desc fun x => s.ι.app x } }
      uniq := fun s m h => by
        apply colimit.hom_ext
        

Proof state:
case w
C : Type u
inst✝² : Category.{v, u} C
α : Type w
inst✝¹ : HasFiniteCoproducts C
inst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C
F : Discrete α ⥤ C
s : Cocone F
m :
  { pt := colimit (liftToFinset F),
        ι :=
          Discrete.natTrans fun j =>
            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶
    s.pt
h :
  ∀ (j : Discrete α),
    { pt := colimit (liftToFinset F),
                ι :=
                  Discrete.natTrans fun j =>
                    Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫
                      colimit.ι (liftToFinset F) {j} }.ι.app
          j ≫
        m =
      s.ι.app j
⊢ ∀ (j : Finset (Discrete α)),
    colimit.ι (liftToFinset F) j ≫ m =
      colimit.ι (liftToFinset F) j ≫
        (fun s =>
            colimit.desc (liftToFinset F) { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => s.ι.app ↑x })
          s

Next tactic:
rintro t
/-- If `C` has finite coproducts and filtered colimits, we can construct arbitrary coproducts by
    taking the colimit of the diagram formed by the coproducts of finite sets over the indexing
    type. -/
@[simps!]
def liftToFinsetColimitCocone [HasFiniteCoproducts C] [HasFilteredColimitsOfSize.{w, w} C]
    (F : Discrete α ⥤ C) : ColimitCocone F where
  cocone :=
    { pt := colimit (liftToFinset F)
      ι :=
        Discrete.natTrans fun j =>
          @Sigma.ι _ _ _ (fun x : ({j} : Finset (Discrete α)) => F.obj x) _ ⟨j, by simp⟩ ≫
            colimit.ι (liftToFinset F) {j} }
  isColimit :=
    { desc := fun s =>
        colimit.desc (liftToFinset F)
          { pt := s.pt
            ι := { app := fun t => Sigma.desc fun x => s.ι.app x } }
      uniq := fun s m h => by
        apply colimit.hom_ext
        rintro t
        

Proof state:
case w
C : Type u
inst✝² : Category.{v, u} C
α : Type w
inst✝¹ : HasFiniteCoproducts C
inst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C
F : Discrete α ⥤ C
s : Cocone F
m :
  { pt := colimit (liftToFinset F),
        ι :=
          Discrete.natTrans fun j =>
            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶
    s.pt
h :
  ∀ (j : Discrete α),
    { pt := colimit (liftToFinset F),
                ι :=
                  Discrete.natTrans fun j =>
                    Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫
                      colimit.ι (liftToFinset F) {j} }.ι.app
          j ≫
        m =
      s.ι.app j
t : Finset (Discrete α)
⊢ colimit.ι (liftToFinset F) t ≫ m =
    colimit.ι (liftToFinset F) t ≫
      (fun s => colimit.desc (liftToFinset F) { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => s.ι.app ↑x })
        s

Next tactic:
dsimp [liftToFinset]