l3lab/ntp-mathlib huggingface dataset:
theorem aleph_limit {o : Ordinal} (ho : o.IsLimit) : aleph o = ⨆ a : Iio o, aleph a := by
  apply le_antisymm _ (ciSup_le' _)
  · rw [aleph, aleph'_limit (ho.add _)]
    refine' ciSup_mono' (bddAbove_of_small _) _
    rintro ⟨i, hi⟩
    cases' lt_or_le i ω with h h
    · rcases lt_omega.1 h with ⟨n, rfl⟩
      use ⟨0, ho.pos⟩
      

Proof state:
case h
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
n : ℕ
hi : ↑n ∈ Iio (ω + o)
h : ↑n < ω
⊢ aleph' ↑{ val := ↑n, property := hi } ≤ aleph ↑{ val := 0, property := (_ : 0 < o) }

Next tactic:
simpa using (nat_lt_aleph0 n).le
theorem aleph_limit {o : Ordinal} (ho : o.IsLimit) : aleph o = ⨆ a : Iio o, aleph a := by
  apply le_antisymm _ (ciSup_le' _)
  · rw [aleph, aleph'_limit (ho.add _)]
    refine' ciSup_mono' (bddAbove_of_small _) _
    rintro ⟨i, hi⟩
    cases' lt_or_le i ω with h h
    · rcases lt_omega.1 h with ⟨n, rfl⟩
      use ⟨0, ho.pos⟩
      simpa using (nat_lt_aleph0 n).le
    · 

Proof state:
case mk.inr
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
i : Ordinal.{u_1}
hi : i ∈ Iio (ω + o)
h : ω ≤ i
⊢ ∃ i', aleph' ↑{ val := i, property := hi } ≤ aleph ↑i'

Next tactic:
exact ⟨⟨_, (sub_lt_of_le h).2 hi⟩, aleph'_le.2 (le_add_sub _ _)⟩
theorem aleph_limit {o : Ordinal} (ho : o.IsLimit) : aleph o = ⨆ a : Iio o, aleph a := by
  apply le_antisymm _ (ciSup_le' _)
  · rw [aleph, aleph'_limit (ho.add _)]
    refine' ciSup_mono' (bddAbove_of_small _) _
    rintro ⟨i, hi⟩
    cases' lt_or_le i ω with h h
    · rcases lt_omega.1 h with ⟨n, rfl⟩
      use ⟨0, ho.pos⟩
      simpa using (nat_lt_aleph0 n).le
    · exact ⟨⟨_, (sub_lt_of_le h).2 hi⟩, aleph'_le.2 (le_add_sub _ _)⟩
  · 

Proof state:
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
⊢ ∀ (i : ↑(Iio o)), aleph ↑i ≤ aleph o

Next tactic:
exact fun i => aleph_le.2 (le_of_lt i.2)
theorem aleph0_le_aleph' {o : Ordinal} : ℵ₀ ≤ aleph' o ↔ ω ≤ o := by 

Proof state:
o : Ordinal.{u_1}
⊢ ℵ₀ ≤ aleph' o ↔ ω ≤ o

Next tactic:
rw [← aleph'_omega, aleph'_le]
theorem aleph0_le_aleph (o : Ordinal) : ℵ₀ ≤ aleph o := by
  

Proof state:
o : Ordinal.{u_1}
⊢ ℵ₀ ≤ aleph o

Next tactic:
rw [aleph, aleph0_le_aleph']
theorem aleph0_le_aleph (o : Ordinal) : ℵ₀ ≤ aleph o := by
  rw [aleph, aleph0_le_aleph']
  

Proof state:
o : Ordinal.{u_1}
⊢ ω ≤ ω + o

Next tactic:
apply Ordinal.le_add_right
theorem aleph'_pos {o : Ordinal} (ho : 0 < o) : 0 < aleph' o := by 

Proof state:
o : Ordinal.{u_1}
ho : 0 < o
⊢ 0 < aleph' o

Next tactic:
rwa [← aleph'_zero, aleph'_lt]
instance nonempty_out_aleph (o : Ordinal) : Nonempty (aleph o).ord.out.α := by
  

Proof state:
o : Ordinal.{?u.83252}
⊢ Nonempty (Quotient.out (ord (aleph o))).α

Next tactic:
rw [out_nonempty_iff_ne_zero, ← ord_zero]
instance nonempty_out_aleph (o : Ordinal) : Nonempty (aleph o).ord.out.α := by
  rw [out_nonempty_iff_ne_zero, ← ord_zero]
  

Proof state:
o : Ordinal.{?u.83269}
⊢ ord (aleph o) ≠ ord 0

Next tactic:
exact fun h => (ord_injective h).not_gt (aleph_pos o)
theorem exists_aleph {c : Cardinal} : ℵ₀ ≤ c ↔ ∃ o, c = aleph o :=
  ⟨fun h =>
    ⟨alephIdx c - ω, by
      

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c = aleph (alephIdx c - ω)

Next tactic:
rw [aleph, Ordinal.add_sub_cancel_of_le, aleph'_alephIdx]
theorem exists_aleph {c : Cardinal} : ℵ₀ ≤ c ↔ ∃ o, c = aleph o :=
  ⟨fun h =>
    ⟨alephIdx c - ω, by
      rw [aleph, Ordinal.add_sub_cancel_of_le, aleph'_alephIdx]
      

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ ω ≤ alephIdx c

Next tactic:
rwa [← aleph0_le_aleph', aleph'_alephIdx]
theorem aleph'_isNormal : IsNormal (ord ∘ aleph') :=
  ⟨fun o => ord_lt_ord.2 <| aleph'_lt.2 <| lt_succ o, fun o l a => by
    

Proof state:
o : Ordinal.{u_1}
l : Ordinal.IsLimit o
a : Ordinal.{u_1}
⊢ (ord ∘ aleph') o ≤ a ↔ ∀ b < o, (ord ∘ aleph') b ≤ a

Next tactic:
simp [ord_le, aleph'_le_of_limit l]
theorem succ_aleph0 : succ ℵ₀ = aleph 1 := by 

Proof state:
⊢ succ ℵ₀ = aleph 1

Next tactic:
rw [← aleph_zero, ← aleph_succ, Ordinal.succ_zero]
theorem aleph0_lt_aleph_one : ℵ₀ < aleph 1 := by
  

Proof state:
⊢ ℵ₀ < aleph 1

Next tactic:
rw [← succ_aleph0]
theorem aleph0_lt_aleph_one : ℵ₀ < aleph 1 := by
  rw [← succ_aleph0]
  

Proof state:
⊢ ℵ₀ < succ ℵ₀

Next tactic:
apply lt_succ
theorem countable_iff_lt_aleph_one {α : Type*} (s : Set α) : s.Countable ↔ #s < aleph 1 := by
  

Proof state:
α : Type u_1
s : Set α
⊢ Set.Countable s ↔ #↑s < aleph 1

Next tactic:
rw [← succ_aleph0, lt_succ_iff, le_aleph0_iff_set_countable]
/-- Ordinals that are cardinals are unbounded. -/
theorem ord_card_unbounded : Unbounded (· < ·) { b : Ordinal | b.card.ord = b } :=
  unbounded_lt_iff.2 fun a =>
    ⟨_,
      ⟨by
        

Proof state:
a : Ordinal.{u_1}
⊢ ord (succ (card a)) ∈ {b | ord (card b) = b}

Next tactic:
dsimp
/-- Ordinals that are cardinals are unbounded. -/
theorem ord_card_unbounded : Unbounded (· < ·) { b : Ordinal | b.card.ord = b } :=
  unbounded_lt_iff.2 fun a =>
    ⟨_,
      ⟨by
        dsimp
        

Proof state:
a : Ordinal.{u_1}
⊢ ord (card (ord (succ (card a)))) = ord (succ (card a))

Next tactic:
rw [card_ord]
theorem eq_aleph'_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) : ∃ a, (aleph' a).ord = o :=
  ⟨Cardinal.alephIdx.relIso o.card, by 

Proof state:
o : Ordinal.{u_1}
ho : ord (card o) = o
⊢ ord (aleph' (alephIdx.relIso (card o))) = o

Next tactic:
simpa using ho
/-- `ord ∘ aleph'` enumerates the ordinals that are cardinals. -/
theorem ord_aleph'_eq_enum_card : ord ∘ aleph' = enumOrd { b : Ordinal | b.card.ord = b } := by
  

Proof state:
⊢ ord ∘ aleph' = enumOrd {b | ord (card b) = b}

Next tactic:
rw [← eq_enumOrd _ ord_card_unbounded, range_eq_iff]
/-- `ord ∘ aleph'` enumerates the ordinals that are cardinals. -/
theorem ord_aleph'_eq_enum_card : ord ∘ aleph' = enumOrd { b : Ordinal | b.card.ord = b } := by
  rw [← eq_enumOrd _ ord_card_unbounded, range_eq_iff]
  

Proof state:
⊢ StrictMono (ord ∘ aleph') ∧
    (∀ (a : Ordinal.{u_1}), (ord ∘ aleph') a ∈ {b | ord (card b) = b}) ∧
      ∀ b ∈ {b | ord (card b) = b}, ∃ a, (ord ∘ aleph') a = b

Next tactic:
exact
    ⟨aleph'_isNormal.strictMono,
      ⟨fun a => by
        dsimp
        rw [card_ord], fun b hb => eq_aleph'_of_eq_card_ord hb⟩⟩
/-- `ord ∘ aleph'` enumerates the ordinals that are cardinals. -/
theorem ord_aleph'_eq_enum_card : ord ∘ aleph' = enumOrd { b : Ordinal | b.card.ord = b } := by
  rw [← eq_enumOrd _ ord_card_unbounded, range_eq_iff]
  exact
    ⟨aleph'_isNormal.strictMono,
      ⟨fun a => by
        

Proof state:
a : Ordinal.{u_1}
⊢ (ord ∘ aleph') a ∈ {b | ord (card b) = b}

Next tactic:
dsimp
/-- `ord ∘ aleph'` enumerates the ordinals that are cardinals. -/
theorem ord_aleph'_eq_enum_card : ord ∘ aleph' = enumOrd { b : Ordinal | b.card.ord = b } := by
  rw [← eq_enumOrd _ ord_card_unbounded, range_eq_iff]
  exact
    ⟨aleph'_isNormal.strictMono,
      ⟨fun a => by
        dsimp
        

Proof state:
a : Ordinal.{u_1}
⊢ ord (card (ord (aleph' a))) = ord (aleph' a)

Next tactic:
rw [card_ord]
theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o := by
  

Proof state:
o : Ordinal.{u_1}
ho : ord (card o) = o
ho' : ω ≤ o
⊢ ∃ a, ord (aleph a) = o

Next tactic:
cases' eq_aleph'_of_eq_card_ord ho with a ha
theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o := by
  cases' eq_aleph'_of_eq_card_ord ho with a ha
  

Proof state:
case intro
o : Ordinal.{u_1}
ho : ord (card o) = o
ho' : ω ≤ o
a : Ordinal.{u_1}
ha : ord (aleph' a) = o
⊢ ∃ a, ord (aleph a) = o

Next tactic:
use a - ω
theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o := by
  cases' eq_aleph'_of_eq_card_ord ho with a ha
  use a - ω
  

Proof state:
case h
o : Ordinal.{u_1}
ho : ord (card o) = o
ho' : ω ≤ o
a : Ordinal.{u_1}
ha : ord (aleph' a) = o
⊢ ord (aleph (a - ω)) = o

Next tactic:
unfold aleph
theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o := by
  cases' eq_aleph'_of_eq_card_ord ho with a ha
  use a - ω
  unfold aleph
  

Proof state:
case h
o : Ordinal.{u_1}
ho : ord (card o) = o
ho' : ω ≤ o
a : Ordinal.{u_1}
ha : ord (aleph' a) = o
⊢ ord (aleph' (ω + (a - ω))) = o

Next tactic:
rwa [Ordinal.add_sub_cancel_of_le]
theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o := by
  cases' eq_aleph'_of_eq_card_ord ho with a ha
  use a - ω
  unfold aleph
  rwa [Ordinal.add_sub_cancel_of_le]
  

Proof state:
case h
o : Ordinal.{u_1}
ho : ord (card o) = o
ho' : ω ≤ o
a : Ordinal.{u_1}
ha : ord (aleph' a) = o
⊢ ω ≤ a

Next tactic:
rwa [← aleph0_le_aleph', ← ord_le_ord, ha, ord_aleph0]
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  

Proof state:
⊢ ord ∘ aleph = enumOrd {b | ord (card b) = b ∧ ω ≤ b}

Next tactic:
rw [← eq_enumOrd _ ord_card_unbounded']
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  

Proof state:
⊢ StrictMono (ord ∘ aleph) ∧ range (ord ∘ aleph) = {b | ord (card b) = b ∧ ω ≤ b}

Next tactic:
use aleph_isNormal.strictMono
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  use aleph_isNormal.strictMono
  

Proof state:
case right
⊢ range (ord ∘ aleph) = {b | ord (card b) = b ∧ ω ≤ b}

Next tactic:
rw [range_eq_iff]
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  use aleph_isNormal.strictMono
  rw [range_eq_iff]
  

Proof state:
case right
⊢ (∀ (a : Ordinal.{u_1}), (ord ∘ aleph) a ∈ {b | ord (card b) = b ∧ ω ≤ b}) ∧
    ∀ b ∈ {b | ord (card b) = b ∧ ω ≤ b}, ∃ a, (ord ∘ aleph) a = b

Next tactic:
refine' ⟨fun a => ⟨_, _⟩, fun b hb => eq_aleph_of_eq_card_ord hb.1 hb.2⟩
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  use aleph_isNormal.strictMono
  rw [range_eq_iff]
  refine' ⟨fun a => ⟨_, _⟩, fun b hb => eq_aleph_of_eq_card_ord hb.1 hb.2⟩
  · 

Proof state:
case right.refine'_1
a : Ordinal.{u_1}
⊢ ord (card ((ord ∘ aleph) a)) = (ord ∘ aleph) a

Next tactic:
rw [Function.comp_apply, card_ord]
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  use aleph_isNormal.strictMono
  rw [range_eq_iff]
  refine' ⟨fun a => ⟨_, _⟩, fun b hb => eq_aleph_of_eq_card_ord hb.1 hb.2⟩
  · rw [Function.comp_apply, card_ord]
  · 

Proof state:
case right.refine'_2
a : Ordinal.{u_1}
⊢ ω ≤ (ord ∘ aleph) a

Next tactic:
rw [← ord_aleph0, Function.comp_apply, ord_le_ord]
/-- `ord ∘ aleph` enumerates the infinite ordinals that are cardinals. -/
theorem ord_aleph_eq_enum_card :
    ord ∘ aleph = enumOrd { b : Ordinal | b.card.ord = b ∧ ω ≤ b } := by
  rw [← eq_enumOrd _ ord_card_unbounded']
  use aleph_isNormal.strictMono
  rw [range_eq_iff]
  refine' ⟨fun a => ⟨_, _⟩, fun b hb => eq_aleph_of_eq_card_ord hb.1 hb.2⟩
  · rw [Function.comp_apply, card_ord]
  · rw [← ord_aleph0, Function.comp_apply, ord_le_ord]
    

Proof state:
case right.refine'_2
a : Ordinal.{u_1}
⊢ ℵ₀ ≤ aleph a

Next tactic:
exact aleph0_le_aleph _
theorem beth_strictMono : StrictMono beth := by
  

Proof state:
⊢ StrictMono beth

Next tactic:
intro a b
theorem beth_strictMono : StrictMono beth := by
  intro a b
  

Proof state:
a b : Ordinal.{u_1}
⊢ a < b → beth a < beth b

Next tactic:
induction' b using Ordinal.induction with b IH generalizing a
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  

Proof state:
case h
b : Ordinal.{u_1}
IH : ∀ k < b, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
a : Ordinal.{u_1}
⊢ a < b → beth a < beth b

Next tactic:
intro h
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  

Proof state:
case h
b : Ordinal.{u_1}
IH : ∀ k < b, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
a : Ordinal.{u_1}
h : a < b
⊢ beth a < beth b

Next tactic:
rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · 

Proof state:
case h.inl
a : Ordinal.{u_1}
IH : ∀ k < 0, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a < 0
⊢ beth a < beth 0

Next tactic:
exact (Ordinal.not_lt_zero a h).elim
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · 

Proof state:
case h.inr.inl.intro
a c : Ordinal.{u_1}
IH : ∀ k < succ c, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a < succ c
⊢ beth a < beth (succ c)

Next tactic:
rw [lt_succ_iff] at h
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    

Proof state:
case h.inr.inl.intro
a c : Ordinal.{u_1}
IH : ∀ k < succ c, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a ≤ c
⊢ beth a < beth (succ c)

Next tactic:
rw [beth_succ]
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    

Proof state:
case h.inr.inl.intro
a c : Ordinal.{u_1}
IH : ∀ k < succ c, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a ≤ c
⊢ beth a < 2 ^ beth c

Next tactic:
apply lt_of_le_of_lt _ (cantor _)
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    

Proof state:
a c : Ordinal.{u_1}
IH : ∀ k < succ c, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a ≤ c
⊢ beth a ≤ beth c

Next tactic:
rcases eq_or_lt_of_le h with (rfl | h)
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    rcases eq_or_lt_of_le h with (rfl | h)
    · 

Proof state:
case inl
a : Ordinal.{u_1}
IH : ∀ k < succ a, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h : a ≤ a
⊢ beth a ≤ beth a

Next tactic:
rfl
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    rcases eq_or_lt_of_le h with (rfl | h)
    · rfl
    

Proof state:
case inr
a c : Ordinal.{u_1}
IH : ∀ k < succ c, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
h✝ : a ≤ c
h : a < c
⊢ beth a ≤ beth c

Next tactic:
exact (IH c (lt_succ c) h).le
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    rcases eq_or_lt_of_le h with (rfl | h)
    · rfl
    exact (IH c (lt_succ c) h).le
  · 

Proof state:
case h.inr.inr
b : Ordinal.{u_1}
IH : ∀ k < b, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
a : Ordinal.{u_1}
h : a < b
hb : Ordinal.IsLimit b
⊢ beth a < beth b

Next tactic:
apply (cantor _).trans_le
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    rcases eq_or_lt_of_le h with (rfl | h)
    · rfl
    exact (IH c (lt_succ c) h).le
  · apply (cantor _).trans_le
    

Proof state:
case h.inr.inr
b : Ordinal.{u_1}
IH : ∀ k < b, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
a : Ordinal.{u_1}
h : a < b
hb : Ordinal.IsLimit b
⊢ 2 ^ beth a ≤ beth b

Next tactic:
rw [beth_limit hb, ← beth_succ]
theorem beth_strictMono : StrictMono beth := by
  intro a b
  induction' b using Ordinal.induction with b IH generalizing a
  intro h
  rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
  · exact (Ordinal.not_lt_zero a h).elim
  · rw [lt_succ_iff] at h
    rw [beth_succ]
    apply lt_of_le_of_lt _ (cantor _)
    rcases eq_or_lt_of_le h with (rfl | h)
    · rfl
    exact (IH c (lt_succ c) h).le
  · apply (cantor _).trans_le
    rw [beth_limit hb, ← beth_succ]
    

Proof state:
case h.inr.inr
b : Ordinal.{u_1}
IH : ∀ k < b, ∀ ⦃a : Ordinal.{u_1}⦄, a < k → beth a < beth k
a : Ordinal.{u_1}
h : a < b
hb : Ordinal.IsLimit b
⊢ beth (succ a) ≤ ⨆ a, beth ↑a

Next tactic:
exact le_ciSup (bddAbove_of_small _) (⟨_, hb.succ_lt h⟩ : Iio b)
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  

Proof state:
o : Ordinal.{u_1}
⊢ aleph o ≤ beth o

Next tactic:
induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
  | H₃ o ho IH =>
    rw [aleph_limit ho, beth_limit ho]
    exact ciSup_mono (bddAbove_of_small _) fun x => IH x.1 x.2
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  

Proof state:
case H₁
⊢ aleph 0 ≤ beth 0

Next tactic:
| H₁ => simp
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => 

Proof state:
case H₁
⊢ aleph 0 ≤ beth 0

Next tactic:
simp
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  

Proof state:
case H₂
o : Ordinal.{u_1}
h : aleph o ≤ beth o
⊢ aleph (succ o) ≤ beth (succ o)

Next tactic:
| H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    

Proof state:
case H₂
o : Ordinal.{u_1}
h : aleph o ≤ beth o
⊢ aleph (succ o) ≤ beth (succ o)

Next tactic:
rw [aleph_succ, beth_succ, succ_le_iff]
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    

Proof state:
case H₂
o : Ordinal.{u_1}
h : aleph o ≤ beth o
⊢ aleph o < 2 ^ beth o

Next tactic:
exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
  

Proof state:
case H₃
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
IH : ∀ o' < o, aleph o' ≤ beth o'
⊢ aleph o ≤ beth o

Next tactic:
| H₃ o ho IH =>
    rw [aleph_limit ho, beth_limit ho]
    exact ciSup_mono (bddAbove_of_small _) fun x => IH x.1 x.2
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
  | H₃ o ho IH =>
    

Proof state:
case H₃
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
IH : ∀ o' < o, aleph o' ≤ beth o'
⊢ aleph o ≤ beth o

Next tactic:
rw [aleph_limit ho, beth_limit ho]
theorem aleph_le_beth (o : Ordinal) : aleph o ≤ beth o := by
  induction o using limitRecOn with
  | H₁ => simp
  | H₂ o h =>
    rw [aleph_succ, beth_succ, succ_le_iff]
    exact (cantor _).trans_le (power_le_power_left two_ne_zero h)
  | H₃ o ho IH =>
    rw [aleph_limit ho, beth_limit ho]
    

Proof state:
case H₃
o : Ordinal.{u_1}
ho : Ordinal.IsLimit o
IH : ∀ o' < o, aleph o' ≤ beth o'
⊢ ⨆ a, aleph ↑a ≤ ⨆ a, beth ↑a

Next tactic:
exact ciSup_mono (bddAbove_of_small _) fun x => IH x.1 x.2
theorem beth_normal : IsNormal.{u} fun o => (beth o).ord :=
  (isNormal_iff_strictMono_limit _).2
    ⟨ord_strictMono.comp beth_strictMono, fun o ho a ha => by
      

Proof state:
o : Ordinal.{u}
ho : Ordinal.IsLimit o
a : Ordinal.{u}
ha : ∀ b < o, ord (beth b) ≤ a
⊢ ord (beth o) ≤ a

Next tactic:
rw [beth_limit ho, ord_le]
theorem beth_normal : IsNormal.{u} fun o => (beth o).ord :=
  (isNormal_iff_strictMono_limit _).2
    ⟨ord_strictMono.comp beth_strictMono, fun o ho a ha => by
      rw [beth_limit ho, ord_le]
      

Proof state:
o : Ordinal.{u}
ho : Ordinal.IsLimit o
a : Ordinal.{u}
ha : ∀ b < o, ord (beth b) ≤ a
⊢ ⨆ a, beth ↑a ≤ card a

Next tactic:
exact ciSup_le' fun b => ord_le.1 (ha _ b.2)
/-- If `α` is an infinite type, then `α × α` and `α` have the same cardinality. -/
theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
  

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c * c = c

Next tactic:
refine' le_antisymm _ (by simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c)
/-- If `α` is an infinite type, then `α × α` and `α` have the same cardinality. -/
theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
  refine' le_antisymm _ (by 

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c ≤ c * c

Next tactic:
simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c
/-- If `α` is an infinite type, then `α × α` and `α` have the same cardinality. -/
theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
  refine' le_antisymm _ (by simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c)
  -- the only nontrivial part is `c * c ≤ c`. We prove it inductively.
  

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c * c ≤ c

Next tactic:
refine' Acc.recOn (Cardinal.lt_wf.apply c) (fun c _ => Quotient.inductionOn c fun α IH ol => _) h
/-- If `α` is an infinite type, then `α × α` and `α` have the same cardinality. -/
theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
  refine' le_antisymm _ (by simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c)
  -- the only nontrivial part is `c * c ≤ c`. We prove it inductively.
  refine' Acc.recOn (Cardinal.lt_wf.apply c) (fun c _ => Quotient.inductionOn c fun α IH ol => _) h
  -- consider the minimal well-order `r` on `α` (a type with cardinality `c`).
  

Proof state:
c✝ : Cardinal.{u_1}
h : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ y < ⟦α⟧, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ ⟦α⟧
⊢ ⟦α⟧ * ⟦α⟧ ≤ ⟦α⟧

Next tactic:
rcases ord_eq α with ⟨r, wo, e⟩