Skip to content

Commit 0a0340a

Browse files
vihdzpYnirPaz
andcommitted
feat: singular cardinals (leanprover-community#37098)
We define a singular cardinal as an infinite cardinal which is larger than its cofinality. That's to say, every cardinal is exactly one of the following three: finite, regular, or singular. Co-authored-by: Nir Paz <paznir83@gmail.com>
1 parent bedd394 commit 0a0340a

3 files changed

Lines changed: 117 additions & 27 deletions

File tree

Mathlib/SetTheory/Cardinal/Aleph.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,15 @@ theorem isNormal_aleph : Order.IsNormal aleph :=
446446
theorem aleph_limit {o : Ordinal} (ho : IsSuccLimit o) : ℵ_ o = ⨆ a : Iio o, ℵ_ a :=
447447
isNormal_aleph.apply_of_isSuccLimit ho
448448

449+
@[simp]
449450
theorem aleph0_le_aleph (o : Ordinal) : ℵ₀ ≤ ℵ_ o := by
450451
rw [aleph_eq_preAleph, aleph0_le_preAleph]
451452
exact le_self_add
452453

454+
@[simp]
455+
theorem aleph0_lt_aleph {o : Ordinal} : ℵ₀ < ℵ_ o ↔ 0 < o := by
456+
rw [← aleph_zero, aleph_lt_aleph]
457+
453458
theorem aleph_pos (o : Ordinal) : 0 < ℵ_ o :=
454459
aleph0_pos.trans_le (aleph0_le_aleph o)
455460

Mathlib/SetTheory/Cardinal/Arithmetic.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ theorem aleph0_mul_mk_eq {α : Type*} [Infinite α] : ℵ₀ * #α = #α :=
103103
theorem mk_mul_aleph0_eq {α : Type*} [Infinite α] : #α * ℵ₀ = #α :=
104104
mul_aleph0_eq (aleph0_le_mk α)
105105

106-
@[simp]
107-
theorem aleph0_mul_aleph (o : Ordinal) : ℵ₀ * ℵ_ o = ℵ_ o :=
108-
aleph0_mul_eq (aleph0_le_aleph o)
106+
theorem aleph0_mul_aleph (o : Ordinal) : ℵ₀ * ℵ_ o = ℵ_ o := by
107+
simp
109108

110-
@[simp]
111-
theorem aleph_mul_aleph0 (o : Ordinal) : ℵ_ o * ℵ₀ = ℵ_ o :=
112-
mul_aleph0_eq (aleph0_le_aleph o)
109+
theorem aleph_mul_aleph0 (o : Ordinal) : ℵ_ o * ℵ₀ = ℵ_ o := by
110+
simp
113111

114112
theorem mul_lt_of_lt {a b c : Cardinal} (hc : ℵ₀ ≤ c) (h1 : a < c) (h2 : b < c) : a * b < c :=
115113
(mul_le_mul' (le_max_left a b) (le_max_right a b)).trans_lt <|

Mathlib/SetTheory/Cardinal/Regular.lean

Lines changed: 108 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2017 Mario Carneiro. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios
4+
Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios, Nir Paz
55
-/
66
module
77

@@ -11,18 +11,19 @@ public import Mathlib.SetTheory.Ordinal.FixedPoint
1111
/-!
1212
# Regular cardinals
1313
14-
This file defines regular and inaccessible cardinals.
14+
This file defines regular, singular, and inaccessible cardinals.
1515
1616
## Main definitions
1717
18-
* `Cardinal.IsRegular c` means that `c` is a regular cardinal: `ℵ₀ ≤ c ∧ c.ord.cof = c`.
18+
* `Cardinal.IsRegular c` means that `c` is an infinite cardinal, equal to its own cofinality.
19+
* `Cardinal.IsSingular c` means that `c` is an infinite cardinal which is not regular. That is,
20+
its cofinality is smaller than itself.
1921
* `Cardinal.IsInaccessible c` means that `c` is strongly inaccessible:
2022
`ℵ₀ < c ∧ IsRegular c ∧ IsStrongLimit c`.
2123
2224
## TODO
2325
2426
* Prove more theorems on inaccessible cardinals.
25-
* Define singular cardinals.
2627
-/
2728

2829
@[expose] public section
@@ -32,31 +33,33 @@ universe u v
3233
open Function Cardinal Set Order Ordinal
3334

3435
namespace Cardinal
36+
variable {c : Cardinal}
3537

3638
/-! ### Regular cardinals -/
3739

3840
/-- A cardinal is regular if it is infinite and it equals its own cofinality. -/
41+
@[mk_iff]
3942
structure IsRegular (c : Cardinal) : Prop where
4043
/-- A regular cardinal is infinite. -/
4144
aleph0_le : ℵ₀ ≤ c
4245
/-- A cardinal equals its own cofinality. See `IsRegular.cof_eq`. -/
4346
le_cof_ord : c ≤ c.ord.cof
4447

45-
theorem IsRegular.cof_ord {c : Cardinal} (H : c.IsRegular) : c.ord.cof = c :=
48+
theorem IsRegular.cof_ord (H : c.IsRegular) : c.ord.cof = c :=
4649
(cof_ord_le c).antisymm H.2
4750

4851
@[deprecated (since := "2026-03-22")] alias IsRegular.cof_eq := IsRegular.cof_ord
4952

5053
theorem IsRegular.cof_omega_eq {o : Ordinal} (H : (ℵ_ o).IsRegular) : (ω_ o).cof = ℵ_ o := by
5154
rw [← ord_aleph, H.cof_ord]
5255

53-
theorem IsRegular.pos {c : Cardinal} (H : c.IsRegular) : 0 < c :=
56+
theorem IsRegular.pos (H : c.IsRegular) : 0 < c :=
5457
aleph0_pos.trans_le H.1
5558

56-
theorem IsRegular.nat_lt {c : Cardinal} (H : c.IsRegular) (n : ℕ) : n < c :=
59+
theorem IsRegular.nat_lt (H : c.IsRegular) (n : ℕ) : n < c :=
5760
lt_of_lt_of_le natCast_lt_aleph0 H.aleph0_le
5861

59-
theorem IsRegular.ord_pos {c : Cardinal} (H : c.IsRegular) : 0 < c.ord := by
62+
theorem IsRegular.ord_pos (H : c.IsRegular) : 0 < c.ord := by
6063
rw [Cardinal.lt_ord, card_zero]
6164
exact H.pos
6265

@@ -65,7 +68,7 @@ theorem isRegular_cof {o : Ordinal} (h : IsSuccLimit o) : IsRegular o.cof := by
6568
rwa [aleph0_le_cof_iff, one_lt_cof_iff]
6669

6770
/-- If `c` is a regular cardinal, then `c.ord.ToType` has a least element. -/
68-
lemma IsRegular.ne_zero {c : Cardinal} (H : c.IsRegular) : c ≠ 0 :=
71+
lemma IsRegular.ne_zero (H : c.IsRegular) : c ≠ 0 :=
6972
H.pos.ne'
7073

7174
theorem isRegular_aleph0 : IsRegular ℵ₀ :=
@@ -201,7 +204,7 @@ theorem bsup_lt_ord_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc
201204
(hι : o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.bsup o f < c.ord :=
202205
bsup_lt_ord (by rwa [hc.cof_ord])
203206

204-
@[deprecated lift_iSup_lt_of_lt_cof (since := "2026-03-22")]
207+
@[deprecated lift_iSup_lt_of_lt_cof_ord (since := "2026-03-22")]
205208
theorem iSup_lt_lift_of_isRegular {ι} {f : ι → Cardinal} {c} (hc : IsRegular c)
206209
(hι : Cardinal.lift.{v, u} #ι < c) (hf : ∀ i, f i < c) : iSup f < c := by
207210
apply lift_iSup_lt_of_lt_cof_ord _ hf
@@ -212,13 +215,13 @@ theorem iSup_lt_of_isRegular {ι} {f : ι → Cardinal} {c} (hc : IsRegular c) (
212215
(∀ i, f i < c) → iSup f < c :=
213216
iSup_lt_of_lt_cof_ord (by rwa [hc.cof_ord])
214217

215-
theorem sum_lt_lift_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c)
218+
theorem sum_lt_lift_of_isRegular {ι : Type u} {f : ι → Cardinal} (hc : IsRegular c)
216219
(hι : Cardinal.lift.{v, u} #ι < c) (hf : ∀ i, f i < c) : sum f < c := by
217220
apply (sum_le_lift_mk_mul_iSup _).trans_lt <|
218221
mul_lt_of_lt hc.1 hι (lift_iSup_lt_of_lt_cof_ord _ hf)
219222
rwa [lift_umax, c.lift_id', hc.cof_ord]
220223

221-
theorem sum_lt_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c)
224+
theorem sum_lt_of_isRegular {ι : Type u} {f : ι → Cardinal} (hc : IsRegular c)
222225
(hι : #ι < c) : (∀ i, f i < c) → sum f < c :=
223226
sum_lt_lift_of_isRegular.{u, u} hc (by rwa [lift_id])
224227

@@ -229,7 +232,7 @@ theorem card_lt_of_card_iUnion_lt {ι : Type u} {α : Type u} {t : ι → Set α
229232

230233
@[simp]
231234
theorem card_iUnion_lt_iff_forall_of_isRegular {ι : Type u} {α : Type u} {t : ι → Set α}
232-
{c : Cardinal} (hc : c.IsRegular) (hι : #ι < c) : #(⋃ i, t i) < c ↔ ∀ i, #(t i) < c := by
235+
(hc : c.IsRegular) (hι : #ι < c) : #(⋃ i, t i) < c ↔ ∀ i, #(t i) < c := by
233236
refine ⟨card_lt_of_card_iUnion_lt, fun h ↦ ?_⟩
234237
apply lt_of_le_of_lt (Cardinal.mk_sUnion_le _)
235238
apply Cardinal.mul_lt_of_lt hc.aleph0_le (mk_range_le.trans_lt hι)
@@ -244,7 +247,7 @@ theorem card_lt_of_card_biUnion_lt {α β : Type u} {s : Set α} {t : ∀ a ∈
244247
simp_all only [iUnion_coe_set, Subtype.forall]
245248

246249
theorem card_biUnion_lt_iff_forall_of_isRegular {α β : Type u} {s : Set α} {t : ∀ a ∈ s, Set β}
247-
{c : Cardinal} (hc : c.IsRegular) (hs : #s < c) :
250+
(hc : c.IsRegular) (hs : #s < c) :
248251
#(⋃ a ∈ s, t a ‹_›) < c ↔ ∀ a (ha : a ∈ s), #(t a ha) < c := by
249252
rw [biUnion_eq_iUnion, card_iUnion_lt_iff_forall_of_isRegular hc hs, SetCoe.forall']
250253

@@ -297,6 +300,91 @@ theorem deriv_lt_ord {f : Ordinal.{u} → Ordinal} {c} (hc : IsRegular c) (hc' :
297300
derivFamily_lt_ord_lift hc
298301
(by simpa using Cardinal.one_lt_aleph0.trans (lt_of_le_of_ne hc.1 hc'.symm)) hc' fun _ => hf
299302

303+
/-! ### Singular cardinals -/
304+
305+
/-- A cardinal is singular if it is infinite and not regular. -/
306+
@[mk_iff]
307+
structure IsSingular (c : Cardinal) : Prop where
308+
/-- A singular cardinal is infinite. -/
309+
aleph0_le : ℵ₀ ≤ c
310+
/-- A singular cardinal is not regular, see `IsSingular.not_isRegular`. -/
311+
cof_ord_ne : c.ord.cof ≠ c
312+
313+
theorem IsSingular.cof_ord_lt (hc : c.IsSingular) : c.ord.cof < c :=
314+
(cof_ord_le c).lt_of_ne hc.cof_ord_ne
315+
316+
theorem IsSingular.natCast_lt (hc : c.IsSingular) (n : ℕ) : n < c :=
317+
natCast_lt_aleph0.trans_le hc.aleph0_le
318+
319+
theorem IsSingular.pos (hc : c.IsSingular) : 0 < c :=
320+
hc.natCast_lt 0
321+
322+
theorem IsSingular.not_isRegular (hc : c.IsSingular) : ¬ c.IsRegular :=
323+
fun hc' ↦ hc'.le_cof_ord.not_gt hc.cof_ord_lt
324+
325+
theorem IsRegular.not_isSingular (hc : c.IsRegular) : ¬ c.IsSingular :=
326+
imp_not_comm.1 IsSingular.not_isRegular hc
327+
328+
@[simp]
329+
theorem not_isSingular_aleph0 : ¬ IsSingular ℵ₀ :=
330+
isRegular_aleph0.not_isSingular
331+
332+
@[simp]
333+
theorem not_isSingular_aleph_one : ¬ IsSingular ℵ₁ :=
334+
isRegular_aleph_one.not_isSingular
335+
336+
@[simp]
337+
theorem not_isSingular_succ (c : Cardinal) : ¬ IsSingular (succ c) := by
338+
obtain hc | hc := lt_or_ge c ℵ₀
339+
· obtain ⟨n, rfl⟩ := lt_aleph0.1 hc
340+
refine fun h ↦ h.aleph0_le.not_gt ?_
341+
rw [succ_natCast, ← Nat.cast_add_one]
342+
exact natCast_lt_aleph0
343+
· exact (isRegular_succ hc).not_isSingular
344+
345+
@[simp]
346+
theorem not_isRegular_aleph_add_one (o : Ordinal) : ¬ IsSingular (ℵ_ (o + 1)) := by
347+
simp [← succ_aleph]
348+
349+
theorem IsSingular.isSuccLimit (hc : IsSingular c) : IsSuccLimit c := by
350+
rw [Cardinal.isSuccLimit_iff, isSuccPrelimit_iff_succ_ne]
351+
refine ⟨hc.pos.ne', ?_⟩
352+
rintro c rfl
353+
exact not_isSingular_succ c hc
354+
355+
theorem isRegular_or_isSingular (h : ℵ₀ ≤ c) : c.IsRegular ∨ c.IsSingular := by
356+
rw [isSingular_iff, ← (cof_ord_le c).lt_iff_ne, ← not_le]
357+
tauto
358+
359+
theorem lt_aleph0_or_isRegular_or_isSingular : c < ℵ₀ ∨ c.IsRegular ∨ c.IsSingular := by
360+
have := isRegular_or_isSingular (c := c)
361+
rw [← not_le]
362+
tauto
363+
364+
theorem IsSingular.of_not_isRegular (h₀ : ℵ₀ ≤ c) (hc : ¬ IsRegular c) : IsSingular c :=
365+
(isRegular_or_isSingular h₀).resolve_left hc
366+
367+
theorem IsRegular.of_not_isSingular (h₀ : ℵ₀ ≤ c) (hc : ¬ IsSingular c) : IsRegular c :=
368+
(isRegular_or_isSingular h₀).resolve_right hc
369+
370+
theorem isSingular_aleph_iff {o : Ordinal} : (ℵ_ o).IsSingular ↔ IsSuccLimit o ∧ o.cof < ℵ_ o := by
371+
obtain rfl | ⟨a, rfl⟩ | ho := zero_or_succ_or_isSuccLimit o
372+
· simp
373+
· simp
374+
· rw [isSingular_iff, ← (cof_ord_le _).lt_iff_ne]
375+
simp [ho]
376+
377+
theorem IsSingular.isSuccLimit_of_aleph {o : Ordinal} (hc : IsSingular (ℵ_ o)) : IsSuccLimit o :=
378+
(isSingular_aleph_iff.1 hc).1
379+
380+
theorem isSingular_aleph_omega0 : (ℵ_ ω).IsSingular := by simp [isSingular_aleph_iff]
381+
382+
theorem IsSingular.aleph_omega0_le (hc : IsSingular c) : ℵ_ ω ≤ c := by
383+
obtain ⟨o, rfl⟩ := mem_range_aleph_iff.2 hc.aleph0_le
384+
rw [isSingular_aleph_iff] at hc
385+
rw [aleph_le_aleph]
386+
exact omega0_le_of_isSuccLimit hc.1
387+
300388
/-! ### Inaccessible cardinals -/
301389

302390
/-- A cardinal is inaccessible if it is an uncountable regular strong limit cardinal. -/
@@ -308,23 +396,22 @@ structure IsInaccessible (c : Cardinal) : Prop where
308396
/-- An inaccessible cardinal is a strong limit, see `IsInaccessible.isStrongLimit`. -/
309397
two_power_lt ⦃x⦄ : x < c → 2 ^ x < c
310398

311-
theorem IsInaccessible.nat_lt {c : Cardinal} (h : IsInaccessible c) (n : ℕ) : n < c :=
399+
theorem IsInaccessible.nat_lt (h : IsInaccessible c) (n : ℕ) : n < c :=
312400
natCast_lt_aleph0.trans h.1
313401

314-
theorem IsInaccessible.pos {c : Cardinal} (h : IsInaccessible c) : 0 < c :=
402+
theorem IsInaccessible.pos (h : IsInaccessible c) : 0 < c :=
315403
aleph0_pos.trans h.1
316404

317-
theorem IsInaccessible.ne_zero {c : Cardinal} (h : IsInaccessible c) : c ≠ 0 :=
405+
theorem IsInaccessible.ne_zero (h : IsInaccessible c) : c ≠ 0 :=
318406
h.pos.ne'
319407

320-
theorem IsInaccessible.isRegular {c : Cardinal} (h : IsInaccessible c) : IsRegular c :=
408+
theorem IsInaccessible.isRegular (h : IsInaccessible c) : IsRegular c :=
321409
⟨h.aleph0_lt.le, h.le_cof_ord⟩
322410

323-
theorem IsInaccessible.isStrongLimit {c : Cardinal} (h : IsInaccessible c) : IsStrongLimit c :=
411+
theorem IsInaccessible.isStrongLimit (h : IsInaccessible c) : IsStrongLimit c :=
324412
⟨h.ne_zero, h.two_power_lt⟩
325413

326-
theorem isInaccessible_def {c : Cardinal} :
327-
IsInaccessible c ↔ ℵ₀ < c ∧ IsRegular c ∧ IsStrongLimit c where
414+
theorem isInaccessible_def : IsInaccessible c ↔ ℵ₀ < c ∧ IsRegular c ∧ IsStrongLimit c where
328415
mp h := ⟨h.aleph0_lt, h.isRegular, h.isStrongLimit⟩
329416
mpr := fun ⟨h₁, h₂, h₃⟩ ↦ ⟨h₁, h₂.2, h₃.two_power_lt⟩
330417

0 commit comments

Comments
 (0)