l3lab/ntp-mathlib huggingface dataset:
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
⊢ Set.Infinite (range f)

Next tactic:
apply mt (union_finset_finite_of_range_finite f)
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
⊢ ¬Set.Finite (⋃ a, ↑(f a))

Next tactic:
rw [w]
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
⊢ ¬Set.Finite ⊤

Next tactic:
exact infinite_univ
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
⊢ #β ≤ #↑(range f)

Next tactic:
by_contra h
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : ¬#β ≤ #↑(range f)
⊢ False

Next tactic:
simp only [not_le] at h
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
⊢ False

Next tactic:
let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by 

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
b : β
⊢ ∃ a, b ∈ f a

Next tactic:
simpa using (w.ge : _) (Set.mem_univ b)
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
⊢ False

Next tactic:
let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by 

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
b : β
⊢ f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f

Next tactic:
simp
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
⊢ False

Next tactic:
have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
    rw [← m]
    apply fun b => (u b).choose_spec
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by 

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
a : α
⊢ f a ∈ range f

Next tactic:
simp
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
⊢ ∀ (a : α), u' ⁻¹' {{ val := f a, property := (_ : f a ∈ range f) }} ≤ ↑(f a)

Next tactic:
rintro a p m
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
a : α
p : β
m : p ∈ u' ⁻¹' {{ val := f a, property := (_ : f a ∈ range f) }}
⊢ p ∈ ↑(f a)

Next tactic:
simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says 

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
a : α
p : β
m : p ∈ u' ⁻¹' {{ val := f a, property := (_ : f a ∈ range f) }}
⊢ p ∈ ↑(f a)

Next tactic:
simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
a : α
p : β
m : f (Exists.choose (_ : ∃ a, p ∈ f a)) = f a
⊢ p ∈ ↑(f a)

Next tactic:
rw [← m]
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
    rw [← m]
    

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
a : α
p : β
m : f (Exists.choose (_ : ∃ a, p ∈ f a)) = f a
⊢ p ∈ ↑(f (Exists.choose (_ : ∃ a, p ∈ f a)))

Next tactic:
apply fun b => (u b).choose_spec
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
    rw [← m]
    apply fun b => (u b).choose_spec
  

Proof state:
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
v' : ∀ (a : α), u' ⁻¹' {{ val := f a, property := (_ : f a ∈ range f) }} ≤ ↑(f a)
⊢ False

Next tactic:
obtain ⟨⟨-, ⟨a, rfl⟩⟩, p⟩ := exists_infinite_fiber u' h k
/-- If an infinite type `β` can be expressed as a union of finite sets,
then the cardinality of the collection of those finite sets
must be at least the cardinality of `β`.
-/
theorem le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β)
    (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by
  have k : _root_.Infinite (range f) := by
    rw [infinite_coe_iff]
    apply mt (union_finset_finite_of_range_finite f)
    rw [w]
    exact infinite_univ
  by_contra h
  simp only [not_le] at h
  let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge : _) (Set.mem_univ b)
  let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩
  have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by
    rintro a p m
    simp? at m says simp only [mem_preimage, mem_singleton_iff, Subtype.mk.injEq] at m
    rw [← m]
    apply fun b => (u b).choose_spec
  obtain ⟨⟨-, ⟨a, rfl⟩⟩, p⟩ := exists_infinite_fiber u' h k
  

Proof state:
case intro.mk.intro
α✝ : Type u_1
r : α✝ → α✝ → Prop
α : Type u_2
β : Type u_3
inst✝ : Infinite β
f : α → Finset β
w : ⋃ a, ↑(f a) = ⊤
k : Infinite ↑(range f)
h : #↑(range f) < #β
u : ∀ (b : β), ∃ a, b ∈ f a :=
  fun b =>
    Eq.mp
      (Mathlib.Data.Set.Lattice._auxLemma.3.trans
        (congrArg Exists (funext fun i => Mathlib.Data.Finset.Basic._auxLemma.6)))
      (Eq.ge w (mem_univ b))
u' : β → ↑(range f) :=
  fun b =>
    { val := f (Exists.choose (_ : ∃ a, b ∈ f a)), property := (_ : f (Exists.choose (_ : ∃ a, b ∈ f a)) ∈ range f) }
v' : ∀ (a : α), u' ⁻¹' {{ val := f a, property := (_ : f a ∈ range f) }} ≤ ↑(f a)
a : α
p : Infinite ↑(u' ⁻¹' {{ val := f a, property := (_ : ∃ y, f y = f a) }})
⊢ False

Next tactic:
exact (@Infinite.of_injective _ _ p (inclusion (v' a)) (inclusion_injective _)).false
theorem lsub_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c.ord) → Ordinal.lsub.{u, v} f < c.ord :=
  lsub_lt_ord_lift (by 

Proof state:
α : Type u_1
r : α → α → Prop
ι : Type u
f : ι → Ordinal.{max u v}
c : Cardinal.{max u v}
hc : IsRegular c
hι : lift.{v, u} #ι < c
⊢ lift.{v, u} #ι < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem lsub_lt_ord_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) :
    (∀ i, f i < c.ord) → Ordinal.lsub f < c.ord :=
  lsub_lt_ord (by 

Proof state:
α : Type u_1
r : α → α → Prop
ι : Type (max u_2 u_3)
f : ι → Ordinal.{max u_2 u_3}
c : Cardinal.{max u_2 u_3}
hc : IsRegular c
hι : #ι < c
⊢ #ι < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem sup_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c.ord) → Ordinal.sup.{u, v} f < c.ord :=
  sup_lt_ord_lift (by 

Proof state:
α : Type u_1
r : α → α → Prop
ι : Type u
f : ι → Ordinal.{max u v}
c : Cardinal.{max u v}
hc : IsRegular c
hι : lift.{v, u} #ι < c
⊢ lift.{v, u} #ι < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem sup_lt_ord_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) :
    (∀ i, f i < c.ord) → Ordinal.sup f < c.ord :=
  sup_lt_ord (by 

Proof state:
α : Type u_1
r : α → α → Prop
ι : Type (max u_2 u_3)
f : ι → Ordinal.{max u_2 u_3}
c : Cardinal.{max u_2 u_3}
hc : IsRegular c
hι : #ι < c
⊢ #ι < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem blsub_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c)
    (ho : Cardinal.lift.{v, u} o.card < c) :
    (∀ i hi, f i hi < c.ord) → Ordinal.blsub.{u, v} o f < c.ord :=
  blsub_lt_ord_lift (by 

Proof state:
α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
c : Cardinal.{max u v}
hc : IsRegular c
ho : lift.{v, u} (card o) < c
⊢ lift.{v, u} (card o) < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem blsub_lt_ord_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c)
    (ho : o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.blsub o f < c.ord :=
  blsub_lt_ord (by 

Proof state:
α : Type u_1
r : α → α → Prop
o : Ordinal.{max u_2 u_3}
f : (a : Ordinal.{max u_2 u_3}) → a < o → Ordinal.{max u_2 u_3}
c : Cardinal.{max u_2 u_3}
hc : IsRegular c
ho : card o < c
⊢ card o < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem bsup_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} o.card < c) :
    (∀ i hi, f i hi < c.ord) → Ordinal.bsup.{u, v} o f < c.ord :=
  bsup_lt_ord_lift (by 

Proof state:
α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
c : Cardinal.{max u v}
hc : IsRegular c
hι : lift.{v, u} (card o) < c
⊢ lift.{v, u} (card o) < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem bsup_lt_ord_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c)
    (hι : o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.bsup o f < c.ord :=
  bsup_lt_ord (by 

Proof state:
α : Type u_1
r : α → α → Prop
o : Ordinal.{max u_2 u_3}
f : (a : Ordinal.{max u_2 u_3}) → a < o → Ordinal.{max u_2 u_3}
c : Cardinal.{max u_2 u_3}
hc : IsRegular c
hι : card o < c
⊢ card o < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]
theorem iSup_lt_lift_of_isRegular {ι} {f : ι → Cardinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c) → iSup.{max u v + 1, u + 1} f < c :=
  iSup_lt_lift.{u, v} (by 

Proof state:
α : Type u_1
r : α → α → Prop
ι : Type u
f : ι → Cardinal.{max u v}
c : Cardinal.{max u v}
hc : IsRegular c
hι : lift.{v, u} #ι < c
⊢ lift.{v, u} #ι < Ordinal.cof (ord c)

Next tactic:
rwa [hc.cof_eq]