Theorem: Cardinal.mk_bounded_subset
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rcases eq_or_ne (#α) 0 with (ha | ha)
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
⊢ (#{ s // Bounded r s }) = (#α)

tactic: have h' : IsStrongLimit (#α) := ⟨ha, h⟩
state_before: case inr
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) ≠ 0
⊢ (#{ s // Bounded r s }) = (#α)

tactic: have ha := h'.isLimit.aleph0_le
state_before: case inr
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) ≠ 0
h' : IsStrongLimit (#α)
⊢ (#{ s // Bounded r s }) = (#α)

tactic: apply le_antisymm
state_before: case inr
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
⊢ (#{ s // Bounded r s }) = (#α)

tactic: rw [ha]
state_before: case inl
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
⊢ (#{ s // Bounded r s }) = (#α)

tactic: haveI := mk_eq_zero_iff.1 ha
state_before: case inl
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
⊢ (#{ s // Bounded r s }) = 0

tactic: rw [mk_eq_zero_iff]
state_before: case inl
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
this : IsEmpty α
⊢ (#{ s // Bounded r s }) = 0

tactic: constructor
state_before: case inl
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
this : IsEmpty α
⊢ IsEmpty { s // Bounded r s }

tactic: rintro ⟨s, hs⟩
state_before: case inl.false
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
this : IsEmpty α
⊢ { s // Bounded r s } → False

tactic: exact (not_unbounded_iff s).2 hs (unbounded_of_isEmpty s)
state_before: case inl.false.mk
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha : (#α) = 0
this : IsEmpty α
s : Set α
hs : Bounded r s
⊢ False

tactic: have : { s : Set α | Bounded r s } = ⋃ i, 𝒫{ j | r j i } := setOf_exists _
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
⊢ (#{ s // Bounded r s }) ≤ (#α)

tactic: rw [← coe_setOf, this]
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
⊢ (#{ s // Bounded r s }) ≤ (#α)

tactic: refine mk_iUnion_le_sum_mk.trans ((sum_le_iSup (fun i => #(𝒫{ j | r j i }))).trans
  ((mul_le_max_of_aleph0_le_left ha).trans ?_))
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
⊢ (#↑(⋃ (i : α), 𝒫{j | r j i})) ≤ (#α)

tactic: rw [max_eq_left]
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
⊢ max (#α) (⨆ (i : α), #↑(𝒫{j | r j i})) ≤ (#α)

tactic: apply ciSup_le' _
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
⊢ (⨆ (i : α), #↑(𝒫{j | r j i})) ≤ (#α)

tactic: intro i
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
⊢ ∀ (i : α), (#↑(𝒫{j | r j i})) ≤ (#α)

tactic: rw [mk_powerset]
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
i : α
⊢ (#↑(𝒫{j | r j i})) ≤ (#α)

tactic: apply (h'.two_power_lt _).le
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
i : α
⊢ 2 ^ (#↑{j | r j i}) ≤ (#α)

tactic: rw [coe_setOf, card_typein, ← lt_ord, hr]
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
i : α
⊢ (#↑{j | r j i}) < (#α)

tactic: apply typein_lt_type
state_before: α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
this : {s | Bounded r s} = ⋃ (i : α), 𝒫{j | r j i}
i : α
⊢ typein (fun x => r x) i < type r

tactic: refine' @mk_le_of_injective α _ (fun x => Subtype.mk {x} _) _
state_before: case inr.a
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
⊢ (#α) ≤ (#{ s // Bounded r s })

tactic: apply bounded_singleton
state_before: case inr.a.refine'_1
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
x : α
⊢ Bounded r {x}

tactic: rw [← hr]
state_before: case inr.a.refine'_1.hr
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
x : α
⊢ Ordinal.IsLimit (type r)

tactic: apply ord_isLimit ha
state_before: case inr.a.refine'_1.hr
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
x : α
⊢ Ordinal.IsLimit (ord (#α))

tactic: intro a b hab
state_before: case inr.a.refine'_2
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
⊢ Injective fun x => { val := {x}, property := (_ : Bounded r {x}) }

tactic: simpa [singleton_eq_singleton_iff] using hab
state_before: case inr.a.refine'_2
α✝ : Type ?u.115548
r✝ : α✝ → α✝ → Prop
α : Type u_1
h : ∀ (x : Cardinal), x < (#α) → 2 ^ x < (#α)
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : ord (#α) = type r
ha✝ : (#α) ≠ 0
h' : IsStrongLimit (#α)
ha : ℵ₀ ≤ (#α)
a b : α
hab :
  (fun x => { val := {x}, property := (_ : Bounded r {x}) }) a =
    (fun x => { val := {x}, property := (_ : Bounded r {x}) }) b
⊢ a = b