Skip to content

Commit fd745ec

Browse files
committed
feat(SetTheory/Cardinal/Aleph): define initial ordinals (#16964)
1 parent 6eec427 commit fd745ec

File tree

3 files changed

+64
-9
lines changed

3 files changed

+64
-9
lines changed

Mathlib/SetTheory/Cardinal/Aleph.lean

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,65 @@ open Function Set Cardinal Equiv Order Ordinal
4141

4242
universe u v w
4343

44-
namespace Cardinal
44+
/-! ### Omega ordinals -/
45+
46+
namespace Ordinal
47+
48+
/-- An ordinal is initial when it is the first ordinal with a given cardinality.
49+
50+
This is written as `o.card.ord = o`, i.e. `o` is the smallest ordinal with cardinality `o.card`. -/
51+
def IsInitial (o : Ordinal) : Prop :=
52+
o.card.ord = o
53+
54+
theorem IsInitial.ord_card {o : Ordinal} (h : IsInitial o) : o.card.ord = o := h
55+
56+
theorem IsInitial.card_le_card {a b : Ordinal} (ha : IsInitial a) : a.card ≤ b.card ↔ a ≤ b := by
57+
refine ⟨fun h ↦ ?_, Ordinal.card_le_card⟩
58+
rw [← ord_le_ord, ha.ord_card] at h
59+
exact h.trans (ord_card_le b)
60+
61+
theorem IsInitial.card_lt_card {a b : Ordinal} (hb : IsInitial b) : a.card < b.card ↔ a < b :=
62+
lt_iff_lt_of_le_iff_le hb.card_le_card
63+
64+
theorem isInitial_ord (c : Cardinal) : IsInitial c.ord := by
65+
rw [IsInitial, card_ord]
66+
67+
theorem isInitial_natCast (n : ℕ) : IsInitial n := by
68+
rw [IsInitial, card_nat, ord_nat]
69+
70+
theorem isInitial_zero : IsInitial 0 := by
71+
exact_mod_cast isInitial_natCast 0
72+
73+
theorem isInitial_one : IsInitial 1 := by
74+
exact_mod_cast isInitial_natCast 1
75+
76+
theorem isInitial_omega0 : IsInitial ω := by
77+
rw [IsInitial, card_omega0, ord_aleph0]
78+
79+
theorem not_bddAbove_isInitial : ¬ BddAbove {x | IsInitial x} := by
80+
rintro ⟨a, ha⟩
81+
have := ha (isInitial_ord (succ a.card))
82+
rw [ord_le] at this
83+
exact (lt_succ _).not_le this
84+
85+
/-- Initial ordinals are order-isomorphic to the cardinals. -/
86+
@[simps!]
87+
def isInitialIso : {x // IsInitial x} ≃o Cardinal where
88+
toFun x := x.1.card
89+
invFun x := ⟨x.ord, isInitial_ord _⟩
90+
left_inv x := Subtype.ext x.2.ord_card
91+
right_inv x := card_ord x
92+
map_rel_iff' {a _} := a.2.card_le_card
93+
94+
-- TODO: define `omega` as the enumerator function of `IsInitial`, and redefine
95+
-- `aleph x = (omega x).card`.
96+
97+
end Ordinal
4598

4699
/-! ### Aleph cardinals -/
47100

101+
namespace Cardinal
102+
48103
/-- The `aleph'` function gives the cardinals listed by their ordinal index. `aleph' n = n`,
49104
`aleph' ω = ℵ₀`, `aleph' (ω + 1) = succ ℵ₀`, etc.
50105

Mathlib/SetTheory/Ordinal/Arithmetic.lean

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,14 +2219,6 @@ namespace Cardinal
22192219

22202220
open Ordinal
22212221

2222-
@[simp]
2223-
theorem ord_aleph0 : ord.{u} ℵ₀ = ω :=
2224-
le_antisymm (ord_le.2 <| le_rfl) <|
2225-
le_of_forall_lt fun o h => by
2226-
rcases Ordinal.lt_lift_iff.1 h with ⟨o, rfl, h'⟩
2227-
rw [lt_ord, ← lift_card, lift_lt_aleph0, ← typein_enum (· < ·) h']
2228-
exact lt_aleph0_iff_fintype.2 ⟨Set.fintypeLTNat _⟩
2229-
22302222
@[simp]
22312223
theorem add_one_of_aleph0_le {c} (h : ℵ₀ ≤ c) : c + 1 = c := by
22322224
rw [add_comm, ← card_ord c, ← card_one, ← card_add, one_add_of_omega0_le]

Mathlib/SetTheory/Ordinal/Basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,14 @@ theorem ord_one : ord 1 = 1 := by simpa using ord_nat 1
12141214
theorem ord_ofNat (n : ℕ) [n.AtLeastTwo] : ord (no_index (OfNat.ofNat n)) = OfNat.ofNat n :=
12151215
ord_nat n
12161216

1217+
@[simp]
1218+
theorem ord_aleph0 : ord.{u} ℵ₀ = ω :=
1219+
le_antisymm (ord_le.2 le_rfl) <|
1220+
le_of_forall_lt fun o h => by
1221+
rcases Ordinal.lt_lift_iff.1 h with ⟨o, rfl, h'⟩
1222+
rw [lt_ord, ← lift_card, lift_lt_aleph0, ← typein_enum (· < ·) h']
1223+
exact lt_aleph0_iff_fintype.2 ⟨Set.fintypeLTNat _⟩
1224+
12171225
@[simp]
12181226
theorem lift_ord (c) : Ordinal.lift.{u,v} (ord c) = ord (lift.{u,v} c) := by
12191227
refine le_antisymm (le_of_forall_lt fun a ha => ?_) ?_

0 commit comments

Comments
 (0)