forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAleph.lean
More file actions
738 lines (548 loc) · 25.4 KB
/
Aleph.lean
File metadata and controls
738 lines (548 loc) · 25.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
/-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios
-/
module
public import Mathlib.Algebra.Order.Monoid.Basic
public import Mathlib.SetTheory.Cardinal.ToNat
public import Mathlib.SetTheory.Cardinal.ENat
public import Mathlib.SetTheory.Ordinal.Enum
/-!
# Omega, aleph, and beth functions
This file defines the `ω`, `ℵ`, and `ℶ` functions which enumerate certain kinds of ordinals and
cardinals. Each is provided in two variants: the standard versions which only take infinite values,
and "preliminary" versions which include finite values and are sometimes more convenient.
* The function `Ordinal.preOmega` enumerates the initial ordinals, i.e. the smallest ordinals with
any given cardinality. Thus `preOmega n = n`, `preOmega ω = ω`, `preOmega (ω + 1) = ω₁`, etc.
`Ordinal.omega` is the more standard function which skips over finite ordinals.
* The function `Cardinal.preAleph` is an order isomorphism between ordinals and cardinals. Thus
`preAleph n = n`, `preAleph ω = ℵ₀`, `preAleph (ω + 1) = ℵ₁`, etc. `Cardinal.aleph` is the more
standard function which skips over finite cardinals.
* The function `Cardinal.preBeth` is the unique normal function with `beth 0 = 0` and
`beth (succ o) = 2 ^ beth o`. `Cardinal.beth` is the more standard function which skips over
finite cardinals.
## Notation
The following notations are scoped to the `Ordinal` namespace.
- `ω_ o` is notation for `Ordinal.omega o`. `ω₁` is notation for `ω_ 1`.
The following notations are scoped to the `Cardinal` namespace.
- `ℵ_ o` is notation for `aleph o`. `ℵ₁` is notation for `ℵ_ 1`.
- `ℶ_ o` is notation for `beth o`. The value `ℶ_ 1` equals the continuum `𝔠`, which is defined in
`Mathlib/SetTheory/Cardinal/Continuum.lean`.
-/
@[expose] public section
assert_not_exists Field Finsupp Module Cardinal.mul_eq_self
noncomputable section
open Function Set Cardinal Equiv Order Ordinal
universe u v w
/-! ### Omega ordinals -/
namespace Ordinal
/-- An ordinal is initial when it is the first ordinal with a given cardinality.
This is written as `o.card.ord = o`, i.e. `o` is the smallest ordinal with cardinality `o.card`. -/
def IsInitial (o : Ordinal) : Prop :=
o.card.ord = o
theorem IsInitial.ord_card {o : Ordinal} (h : IsInitial o) : o.card.ord = o := h
theorem IsInitial.card_le_card {a b : Ordinal} (ha : IsInitial a) : a.card ≤ b.card ↔ a ≤ b := by
refine ⟨fun h ↦ ?_, Ordinal.card_le_card⟩
rw [← ord_le_ord, ha.ord_card] at h
exact h.trans (ord_card_le b)
theorem IsInitial.card_lt_card {a b : Ordinal} (hb : IsInitial b) : a.card < b.card ↔ a < b :=
lt_iff_lt_of_le_iff_le hb.card_le_card
theorem isInitial_ord (c : Cardinal) : IsInitial c.ord := by
rw [IsInitial, card_ord]
@[simp]
theorem isInitial_natCast (n : ℕ) : IsInitial n := by
rw [IsInitial, card_nat, ord_nat]
theorem isInitial_zero : IsInitial 0 := by
exact_mod_cast isInitial_natCast 0
theorem isInitial_one : IsInitial 1 := by
exact_mod_cast isInitial_natCast 1
theorem isInitial_omega0 : IsInitial ω := by
rw [IsInitial, card_omega0, ord_aleph0]
theorem isInitial_succ {o : Ordinal} : IsInitial (succ o) ↔ o < ω :=
⟨Function.mtr fun hwo ↦ ne_of_lt <| by simp_all [ord_card_le],
fun how ↦ (Ordinal.lt_omega0.1 how).rec fun n h ↦ h ▸ isInitial_natCast (n + 1)⟩
theorem not_bddAbove_isInitial : ¬ BddAbove {x | IsInitial x} := by
rintro ⟨a, ha⟩
have := ha (isInitial_ord (succ a.card))
rw [ord_le] at this
exact (lt_succ _).not_ge this
/-- Initial ordinals are order-isomorphic to the cardinals. -/
@[simps!]
def isInitialIso : {x // IsInitial x} ≃o Cardinal where
toFun x := x.1.card
invFun x := ⟨x.ord, isInitial_ord _⟩
left_inv x := Subtype.ext x.2.ord_card
right_inv x := card_ord x
map_rel_iff' {a _} := a.2.card_le_card
/-- The "pre-omega" function gives the initial ordinals listed by their ordinal index.
`preOmega n = n`, `preOmega ω = ω`, `preOmega (ω + 1) = ω₁`, etc.
For the more common omega function skipping over finite ordinals, see `Ordinal.omega`. -/
def preOmega : Ordinal.{u} ↪o Ordinal.{u} where
toFun := enumOrd {x | IsInitial x}
inj' _ _ h := enumOrd_injective not_bddAbove_isInitial h
map_rel_iff' := enumOrd_le_enumOrd not_bddAbove_isInitial
theorem coe_preOmega : preOmega = enumOrd {x | IsInitial x} :=
rfl
theorem preOmega_strictMono : StrictMono preOmega :=
preOmega.strictMono
theorem preOmega_lt_preOmega {o₁ o₂ : Ordinal} : preOmega o₁ < preOmega o₂ ↔ o₁ < o₂ :=
preOmega.lt_iff_lt
theorem preOmega_le_preOmega {o₁ o₂ : Ordinal} : preOmega o₁ ≤ preOmega o₂ ↔ o₁ ≤ o₂ :=
preOmega.le_iff_le
theorem preOmega_max (o₁ o₂ : Ordinal) : preOmega (max o₁ o₂) = max (preOmega o₁) (preOmega o₂) :=
preOmega.monotone.map_max
theorem isInitial_preOmega (o : Ordinal) : IsInitial (preOmega o) :=
enumOrd_mem not_bddAbove_isInitial o
theorem le_preOmega_self (o : Ordinal) : o ≤ preOmega o :=
preOmega_strictMono.le_apply
@[simp]
theorem preOmega_zero : preOmega 0 = 0 := by
rw [coe_preOmega, enumOrd_zero]
exact csInf_eq_bot_of_bot_mem isInitial_zero
@[simp]
theorem preOmega_natCast (n : ℕ) : preOmega n = n := by
induction n with
| zero => exact preOmega_zero
| succ n IH =>
apply (le_preOmega_self _).antisymm'
apply enumOrd_succ_le not_bddAbove_isInitial (isInitial_natCast _) (IH.trans_lt _)
rw [Nat.cast_lt]
exact lt_succ n
@[simp]
theorem preOmega_ofNat (n : ℕ) [n.AtLeastTwo] : preOmega ofNat(n) = n :=
preOmega_natCast n
theorem preOmega_le_of_forall_lt {o a : Ordinal} (ha : IsInitial a) (H : ∀ b < o, preOmega b < a) :
preOmega o ≤ a :=
enumOrd_le_of_forall_lt ha H
theorem isNormal_preOmega : IsNormal preOmega := by
rw [isNormal_iff]
refine ⟨preOmega_strictMono, fun o ho a ha ↦
(preOmega_le_of_forall_lt (isInitial_ord _) fun b hb ↦ ?_).trans (ord_card_le a)⟩
rw [← (isInitial_ord _).card_lt_card, card_ord]
apply lt_of_lt_of_le _ (card_le_card <| ha _ (ho.succ_lt hb))
rw [(isInitial_preOmega _).card_lt_card, preOmega_lt_preOmega]
exact lt_succ b
@[simp]
theorem range_preOmega : range preOmega = {x | IsInitial x} :=
range_enumOrd not_bddAbove_isInitial
theorem mem_range_preOmega_iff {x : Ordinal} : x ∈ range preOmega ↔ IsInitial x := by
rw [range_preOmega, mem_setOf]
alias ⟨_, IsInitial.mem_range_preOmega⟩ := mem_range_preOmega_iff
@[simp]
theorem preOmega_omega0 : preOmega ω = ω := by
simp_rw [← apply_omega0_of_isNormal isNormal_preOmega, preOmega_natCast, iSup_natCast]
@[simp]
theorem omega0_le_preOmega_iff {x : Ordinal} : ω ≤ preOmega x ↔ ω ≤ x := by
conv_lhs => rw [← preOmega_omega0, preOmega_le_preOmega]
@[simp]
theorem omega0_lt_preOmega_iff {x : Ordinal} : ω < preOmega x ↔ ω < x := by
conv_lhs => rw [← preOmega_omega0, preOmega_lt_preOmega]
/-- The `omega` function gives the infinite initial ordinals listed by their ordinal index.
`omega 0 = ω`, `omega 1 = ω₁` is the first uncountable ordinal, and so on.
This is not to be confused with the first infinite ordinal `Ordinal.omega0`.
For a version including finite ordinals, see `Ordinal.preOmega`. -/
def omega : Ordinal ↪o Ordinal :=
(OrderEmbedding.addLeft ω).trans preOmega
@[inherit_doc] scoped notation "ω_ " => omega
recommended_spelling "omega" for "ω_" in [omega, «termω_»]
/-- `ω₁` is the first uncountable ordinal. -/
scoped notation "ω₁" => ω_ 1
recommended_spelling "omega_one" for "ω₁" in [«termω₁»]
theorem omega_eq_preOmega (o : Ordinal) : ω_ o = preOmega (ω + o) :=
rfl
theorem omega_strictMono : StrictMono omega :=
omega.strictMono
theorem omega_lt_omega {o₁ o₂ : Ordinal} : ω_ o₁ < ω_ o₂ ↔ o₁ < o₂ :=
omega.lt_iff_lt
theorem omega_le_omega {o₁ o₂ : Ordinal} : ω_ o₁ ≤ ω_ o₂ ↔ o₁ ≤ o₂ :=
omega.le_iff_le
theorem omega_max (o₁ o₂ : Ordinal) : ω_ (max o₁ o₂) = max (ω_ o₁) (ω_ o₂) :=
omega.monotone.map_max
theorem preOmega_le_omega (o : Ordinal) : preOmega o ≤ ω_ o :=
preOmega_le_preOmega.2 le_add_self
theorem isInitial_omega (o : Ordinal) : IsInitial (omega o) :=
isInitial_preOmega _
theorem le_omega_self (o : Ordinal) : o ≤ omega o :=
omega_strictMono.le_apply
@[simp]
theorem omega_zero : ω_ 0 = ω := by
rw [omega_eq_preOmega, add_zero, preOmega_omega0]
theorem omega0_le_omega (o : Ordinal) : ω ≤ ω_ o := by
rw [← omega_zero, omega_le_omega]
exact zero_le o
/-- For the theorem `0 < ω`, see `omega0_pos`. -/
theorem omega_pos (o : Ordinal) : 0 < ω_ o :=
omega0_pos.trans_le (omega0_le_omega o)
theorem omega0_lt_omega_one : ω < ω₁ := by
rw [← omega_zero, omega_lt_omega]
exact zero_lt_one
@[deprecated (since := "2025-12-22")]
alias omega0_lt_omega1 := omega0_lt_omega_one
theorem isNormal_omega : IsNormal omega :=
isNormal_preOmega.comp (isNormal_add_right _)
@[simp]
theorem range_omega : range omega = {x | ω ≤ x ∧ IsInitial x} := by
ext x
constructor
· rintro ⟨a, rfl⟩
exact ⟨omega0_le_omega a, isInitial_omega a⟩
· rintro ⟨ha', ha⟩
obtain ⟨a, rfl⟩ := ha.mem_range_preOmega
use a - ω
rw [omega0_le_preOmega_iff] at ha'
rw [omega_eq_preOmega, Ordinal.add_sub_cancel_of_le ha']
theorem mem_range_omega_iff {x : Ordinal} : x ∈ range omega ↔ ω ≤ x ∧ IsInitial x := by
rw [range_omega, mem_setOf]
end Ordinal
/-! ### Aleph cardinals -/
namespace Cardinal
/-- The "pre-aleph" function gives the cardinals listed by their ordinal index. `preAleph n = n`,
`preAleph ω = ℵ₀`, `preAleph (ω + 1) = succ ℵ₀`, etc.
For the more common aleph function skipping over finite cardinals, see `Cardinal.aleph`. -/
def preAleph : Ordinal.{u} ≃o Cardinal.{u} :=
(enumOrdOrderIso _ not_bddAbove_isInitial).trans isInitialIso
@[simp]
theorem _root_.Ordinal.card_preOmega (o : Ordinal) : (preOmega o).card = preAleph o :=
rfl
@[simp]
theorem ord_preAleph (o : Ordinal) : (preAleph o).ord = preOmega o := by
rw [← o.card_preOmega, (isInitial_preOmega o).ord_card]
@[simp]
theorem type_cardinal : typeLT Cardinal = Ordinal.univ.{u, u + 1} := by
rw [Ordinal.univ_id]
exact Quotient.sound ⟨preAleph.symm.toRelIsoLT⟩
@[simp]
theorem mk_cardinal : #Cardinal = univ.{u, u + 1} := by
simpa only [card_type, card_univ] using congr_arg card type_cardinal
theorem preAleph_lt_preAleph {o₁ o₂ : Ordinal} : preAleph o₁ < preAleph o₂ ↔ o₁ < o₂ :=
preAleph.lt_iff_lt
theorem preAleph_le_preAleph {o₁ o₂ : Ordinal} : preAleph o₁ ≤ preAleph o₂ ↔ o₁ ≤ o₂ :=
preAleph.le_iff_le
theorem preAleph_max (o₁ o₂ : Ordinal) : preAleph (max o₁ o₂) = max (preAleph o₁) (preAleph o₂) :=
preAleph.monotone.map_max
@[simp]
theorem preAleph_zero : preAleph 0 = 0 :=
preAleph.map_bot
theorem preAleph_add_one (o : Ordinal) : preAleph (o + 1) = succ (preAleph o) :=
preAleph.map_succ o
-- TODO: deprecate
theorem preAleph_succ (o : Ordinal) : preAleph (succ o) = succ (preAleph o) :=
preAleph.map_succ o
@[simp]
theorem preAleph_nat (n : ℕ) : preAleph n = n := by
rw [← card_preOmega, preOmega_natCast, card_nat]
@[simp]
theorem preAleph_omega0 : preAleph ω = ℵ₀ := by
rw [← card_preOmega, preOmega_omega0, card_omega0]
@[simp]
theorem preAleph_pos {o : Ordinal} : 0 < preAleph o ↔ 0 < o := by
rw [← preAleph_zero, preAleph_lt_preAleph]
@[simp]
theorem aleph0_le_preAleph {o : Ordinal} : ℵ₀ ≤ preAleph o ↔ ω ≤ o := by
rw [← preAleph_omega0, preAleph_le_preAleph]
theorem _root_.Ordinal.card_le_preAleph (o : Ordinal) : o.card ≤ preAleph o :=
o.card_preOmega.trans_ge <| card_le_card <| o.le_preOmega_self
theorem le_preAleph_ord (c : Cardinal) : c ≤ preAleph c.ord := by
simpa using c.ord.card_le_preAleph
@[simp]
theorem lift_preAleph (o : Ordinal.{u}) : lift.{v} (preAleph o) = preAleph (Ordinal.lift.{v} o) :=
(preAleph.toInitialSeg.trans liftInitialSeg).eq
(Ordinal.liftInitialSeg.trans preAleph.toInitialSeg) o
@[simp]
theorem _root_.Ordinal.lift_preOmega (o : Ordinal.{u}) :
Ordinal.lift.{v} (preOmega o) = preOmega (Ordinal.lift.{v} o) := by
rw [← ord_preAleph, lift_ord, lift_preAleph, ord_preAleph]
theorem isNormal_preAleph : Order.IsNormal preAleph :=
OrderIso.isNormal _
theorem preAleph_le_of_isSuccPrelimit {o : Ordinal} (l : IsSuccPrelimit o) {c} :
preAleph o ≤ c ↔ ∀ o' < o, preAleph o' ≤ c := by
obtain rfl | ho := eq_or_ne o 0
· simp
· exact isNormal_preAleph.le_iff_forall_le ⟨by simpa, l⟩
theorem preAleph_limit {o : Ordinal} (ho : IsSuccPrelimit o) :
preAleph o = ⨆ a : Iio o, preAleph a := by
obtain rfl | h := eq_or_ne o 0
· simp
· exact isNormal_preAleph.apply_of_isSuccLimit ⟨by simpa, ho⟩
theorem preAleph_le_of_strictMono {f : Ordinal → Cardinal} (hf : StrictMono f) (o : Ordinal) :
preAleph o ≤ f o := by
simpa using (hf.comp preAleph.symm.strictMono).id_le (preAleph o)
/-- The `aleph` function gives the infinite cardinals listed by their ordinal index. `aleph 0 = ℵ₀`,
`aleph 1 = succ ℵ₀` is the first uncountable cardinal, and so on.
For a version including finite cardinals, see `Cardinal.preAleph`. -/
def aleph : Ordinal ↪o Cardinal :=
(OrderEmbedding.addLeft ω).trans preAleph.toOrderEmbedding
@[inherit_doc] scoped notation "ℵ_ " => aleph
recommended_spelling "aleph" for "ℵ_" in [aleph, «termℵ_»]
/-- `ℵ₁` is the first uncountable cardinal. -/
scoped notation "ℵ₁" => ℵ_ 1
recommended_spelling "aleph_one" for "ℵ₁" in [«termℵ₁»]
theorem aleph_eq_preAleph (o : Ordinal) : ℵ_ o = preAleph (ω + o) :=
rfl
@[simp]
theorem _root_.Ordinal.card_omega (o : Ordinal) : (ω_ o).card = ℵ_ o :=
rfl
@[simp]
theorem ord_aleph (o : Ordinal) : (ℵ_ o).ord = ω_ o :=
ord_preAleph _
theorem aleph_lt_aleph {o₁ o₂ : Ordinal} : ℵ_ o₁ < ℵ_ o₂ ↔ o₁ < o₂ :=
aleph.lt_iff_lt
theorem aleph_le_aleph {o₁ o₂ : Ordinal} : ℵ_ o₁ ≤ ℵ_ o₂ ↔ o₁ ≤ o₂ :=
aleph.le_iff_le
theorem aleph_max (o₁ o₂ : Ordinal) : ℵ_ (max o₁ o₂) = max (ℵ_ o₁) (ℵ_ o₂) :=
aleph.monotone.map_max
theorem preAleph_le_aleph (o : Ordinal) : preAleph o ≤ ℵ_ o :=
preAleph_le_preAleph.2 le_add_self
@[simp]
theorem aleph_add_one (o : Ordinal) : ℵ_ (o + 1) = succ (ℵ_ o) := by
rw [aleph_eq_preAleph, ← add_assoc, preAleph_add_one, aleph_eq_preAleph]
-- TODO: deprecate
theorem aleph_succ (o : Ordinal) : ℵ_ (succ o) = succ (ℵ_ o) :=
aleph_add_one o
@[simp]
theorem aleph_zero : ℵ_ 0 = ℵ₀ := by rw [aleph_eq_preAleph, add_zero, preAleph_omega0]
@[simp]
theorem lift_aleph (o : Ordinal.{u}) : lift.{v} (aleph o) = aleph (Ordinal.lift.{v} o) := by
simp [aleph_eq_preAleph]
/-- For the theorem `lift ω = ω`, see `lift_omega0`. -/
@[simp]
theorem _root_.Ordinal.lift_omega (o : Ordinal.{u}) :
Ordinal.lift.{v} (ω_ o) = ω_ (Ordinal.lift.{v} o) := by
simp [omega_eq_preOmega]
theorem isNormal_aleph : Order.IsNormal aleph :=
isNormal_preAleph.comp (isNormal_add_right _)
theorem aleph_limit {o : Ordinal} (ho : IsSuccLimit o) : ℵ_ o = ⨆ a : Iio o, ℵ_ a :=
isNormal_aleph.apply_of_isSuccLimit ho
theorem aleph0_le_aleph (o : Ordinal) : ℵ₀ ≤ ℵ_ o := by
rw [aleph_eq_preAleph, aleph0_le_preAleph]
exact le_self_add
theorem aleph_pos (o : Ordinal) : 0 < ℵ_ o :=
aleph0_pos.trans_le (aleph0_le_aleph o)
theorem _root_.Ordinal.card_le_aleph (o : Ordinal) : o.card ≤ ℵ_ o :=
o.card_le_preAleph.trans (preAleph_le_aleph o)
theorem le_aleph_ord (c : Cardinal) : c ≤ ℵ_ c.ord := by
simpa using c.ord.card_le_aleph
@[simp]
theorem aleph_toNat (o : Ordinal) : toNat (ℵ_ o) = 0 :=
toNat_apply_of_aleph0_le <| aleph0_le_aleph o
@[simp]
theorem aleph_toENat (o : Ordinal) : toENat (ℵ_ o) = ⊤ :=
(toENat_eq_top.2 (aleph0_le_aleph o))
theorem isSuccLimit_omega (o : Ordinal) : IsSuccLimit (ω_ o) := by
rw [← ord_aleph]
exact isSuccLimit_ord (aleph0_le_aleph _)
@[simp]
theorem range_aleph : range aleph = Set.Ici ℵ₀ := by
ext c
refine ⟨fun ⟨o, e⟩ => e ▸ aleph0_le_aleph _, fun hc ↦ ⟨preAleph.symm c - ω, ?_⟩⟩
rw [aleph_eq_preAleph, Ordinal.add_sub_cancel_of_le, preAleph.apply_symm_apply]
rwa [← aleph0_le_preAleph, preAleph.apply_symm_apply]
theorem mem_range_aleph_iff {c : Cardinal} : c ∈ range aleph ↔ ℵ₀ ≤ c := by
rw [range_aleph, mem_Ici]
@[simp]
theorem succ_aleph0 : succ ℵ₀ = ℵ₁ := by
rw [← aleph_zero, ← aleph_add_one, zero_add]
theorem aleph0_lt_aleph_one : ℵ₀ < ℵ₁ := by
rw [← succ_aleph0]
apply lt_succ
theorem aleph0_lt_iff_aleph_one_le {c} : ℵ₀ < c ↔ ℵ₁ ≤ c := by
rw [← succ_le_iff, succ_aleph0]
theorem aleph1_le_mk_iff {α : Type*} : ℵ₁ ≤ #α ↔ Uncountable α := by
rw [← aleph0_lt_iff_aleph_one_le, aleph0_lt_mk_iff]
@[simp]
theorem aleph1_le_mk (α : Type*) [Uncountable α] : ℵ₁ ≤ #α :=
aleph1_le_mk_iff.mpr ‹_›
theorem countable_iff_lt_aleph_one {α : Type*} (s : Set α) : s.Countable ↔ #s < ℵ₁ := by
rw [← succ_aleph0, lt_succ_iff, le_aleph0_iff_set_countable]
@[simp]
theorem aleph_one_le_lift {c : Cardinal.{u}} : ℵ₁ ≤ lift.{v} c ↔ ℵ₁ ≤ c := by
simpa using lift_le (a := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias aleph1_le_lift := aleph_one_le_lift
@[simp]
theorem lift_le_aleph_one {c : Cardinal.{u}} : lift.{v} c ≤ ℵ₁ ↔ c ≤ ℵ₁ := by
simpa using lift_le (b := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias lift_le_aleph1 := lift_le_aleph_one
@[simp]
theorem aleph_one_lt_lift {c : Cardinal.{u}} : ℵ₁ < lift.{v} c ↔ ℵ₁ < c := by
simpa using lift_lt (a := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias aleph1_lt_lift := aleph_one_lt_lift
@[simp]
theorem lift_lt_aleph_one {c : Cardinal.{u}} : lift.{v} c < ℵ₁ ↔ c < ℵ₁ := by
simpa using lift_lt (b := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias lift_lt_aleph1 := lift_lt_aleph_one
@[simp]
theorem aleph_one_eq_lift {c : Cardinal.{u}} : ℵ₁ = lift.{v} c ↔ ℵ₁ = c := by
simpa using lift_inj (a := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias aleph1_eq_lift := aleph_one_eq_lift
@[simp]
theorem lift_eq_aleph_one {c : Cardinal.{u}} : lift.{v} c = ℵ₁ ↔ c = ℵ₁ := by
simpa using lift_inj (b := ℵ₁)
@[deprecated (since := "2025-12-22")]
alias lift_eq_aleph1 := lift_eq_aleph_one
theorem lt_omega_iff_card_lt {x o : Ordinal} : x < ω_ o ↔ x.card < ℵ_ o := by
rw [← (isInitial_omega o).card_lt_card, card_omega]
/-! ### Beth cardinals -/
/-- The "pre-beth" function is defined so that `preBeth o` is the supremum of `2 ^ preBeth a` for
`a < o`. This implies `beth 0 = 0`, `beth (succ o) = 2 ^ beth o`, and that for a limit ordinal `o`,
`beth o` is the supremum of `beth a` for `a < o`.
For the usual function starting at `ℵ₀`, see `Cardinal.beth`. -/
def preBeth (o : Ordinal.{u}) : Cardinal.{u} :=
⨆ a : Iio o, 2 ^ preBeth a
termination_by o
decreasing_by exact a.2
theorem preBeth_strictMono : StrictMono preBeth := by
intro a b h
conv_rhs => rw [preBeth]
rw [lt_ciSup_iff' (bddAbove_of_small _)]
exact ⟨⟨a, h⟩, cantor _⟩
theorem preBeth_mono : Monotone preBeth :=
preBeth_strictMono.monotone
theorem preAleph_le_preBeth (o : Ordinal) : preAleph o ≤ preBeth o :=
preAleph_le_of_strictMono preBeth_strictMono o
@[simp]
theorem preBeth_lt_preBeth {o₁ o₂ : Ordinal} : preBeth o₁ < preBeth o₂ ↔ o₁ < o₂ :=
preBeth_strictMono.lt_iff_lt
@[simp]
theorem preBeth_le_preBeth {o₁ o₂ : Ordinal} : preBeth o₁ ≤ preBeth o₂ ↔ o₁ ≤ o₂ :=
preBeth_strictMono.le_iff_le
@[simp]
theorem preBeth_inj {o₁ o₂ : Ordinal} : preBeth o₁ = preBeth o₂ ↔ o₁ = o₂ :=
preBeth_strictMono.injective.eq_iff
@[simp]
theorem preBeth_zero : preBeth 0 = 0 := by
rw [preBeth]
simp
@[simp]
theorem preBeth_add_one (o : Ordinal) : preBeth (o + 1) = 2 ^ preBeth o := by
rw [preBeth, ← succ_eq_add_one, Iio_succ]
exact ciSup_Iic o fun x y h ↦ power_le_power_left two_ne_zero (preBeth_mono h)
-- TODO: deprecate
theorem preBeth_succ (o : Ordinal) : preBeth (succ o) = 2 ^ preBeth o :=
preBeth_add_one o
theorem preBeth_limit {o : Ordinal} (ho : IsSuccPrelimit o) :
preBeth o = ⨆ a : Iio o, preBeth a := by
rw [preBeth]
apply (ciSup_mono (bddAbove_of_small _) fun _ ↦ (cantor _).le).antisymm'
rw [ciSup_le_iff' (bddAbove_of_small _)]
intro a
rw [← preBeth_succ]
exact le_ciSup (bddAbove_of_small _) (⟨_, ho.succ_lt a.2⟩ : Iio o)
theorem isNormal_preBeth : Order.IsNormal preBeth := by
rw [isNormal_iff]
refine ⟨preBeth_strictMono, fun o ho ↦ ?_⟩
simp [preBeth_limit ho.isSuccPrelimit, ciSup_le_iff' (bddAbove_of_small _)]
theorem preBeth_nat : ∀ n : ℕ, preBeth n = (2 ^ ·)^[n] (0 : ℕ)
| 0 => by simp
| n + 1 => by
rw [natCast_succ, preBeth_succ, Function.iterate_succ_apply', preBeth_nat]
simp
@[simp]
theorem preBeth_one : preBeth 1 = 1 := by
simpa using preBeth_nat 1
@[simp]
theorem preBeth_omega : preBeth ω = ℵ₀ := by
apply le_antisymm
· rw [preBeth_limit isSuccLimit_omega0.isSuccPrelimit, ciSup_le_iff' (bddAbove_of_small _)]
rintro ⟨a, ha⟩
obtain ⟨n, rfl⟩ := lt_omega0.1 ha
rw [preBeth_nat]
exact natCast_le_aleph0
· simpa using preAleph_le_preBeth ω
@[simp]
theorem preBeth_pos {o : Ordinal} : 0 < preBeth o ↔ 0 < o := by
simpa using preBeth_lt_preBeth (o₁ := 0)
theorem _root_.Ordinal.card_le_preBeth (o : Ordinal) : o.card ≤ preBeth o :=
o.card_le_preAleph.trans (preAleph_le_preBeth o)
theorem le_preBeth_ord (c : Cardinal) : c ≤ preBeth c.ord := by
simpa using c.ord.card_le_preBeth
@[simp]
theorem preBeth_eq_zero {o : Ordinal} : preBeth o = 0 ↔ o = 0 := by
simpa using preBeth_inj (o₂ := 0)
theorem isStrongLimit_preBeth {o : Ordinal} : IsStrongLimit (preBeth o) ↔ IsSuccLimit o := by
by_cases H : IsSuccLimit o
· refine iff_of_true ⟨by simpa using H.ne_bot, fun a ha ↦ ?_⟩ H
rw [preBeth_limit H.isSuccPrelimit] at ha
rcases exists_lt_of_lt_ciSup' ha with ⟨⟨i, hi⟩, ha⟩
have := power_le_power_left two_ne_zero ha.le
rw [← preBeth_succ] at this
exact this.trans_lt (preBeth_strictMono (H.succ_lt hi))
· apply iff_of_false _ H
rw [not_isSuccLimit_iff, not_isSuccPrelimit_iff'] at H
obtain ho | ⟨a, rfl⟩ := H
· simp [ho.eq_bot]
· intro h
simpa using h.two_power_lt (preBeth_strictMono (lt_add_one a))
@[simp]
theorem lift_preBeth (o : Ordinal) : lift.{v} (preBeth o) = preBeth (Ordinal.lift.{v} o) := by
induction o using SuccOrder.prelimitRecOn with
| succ o _ IH => simp [IH]
| isSuccPrelimit o ho IH =>
rw [preBeth_limit ho, preBeth_limit (isSuccPrelimit_lift.2 ho), lift_iSup (bddAbove_of_small _)]
apply congrArg sSup
ext x
constructor <;> rintro ⟨⟨i, hi⟩, rfl⟩
· refine ⟨⟨i.lift, ?_⟩, (IH _ hi).symm⟩
simpa
· obtain ⟨i, rfl⟩ := Ordinal.mem_range_lift_of_le hi.le
rw [mem_Iio, Ordinal.lift_lt] at hi
exact ⟨⟨i, hi⟩, IH _ hi⟩
/-- The Beth function is defined so that `beth 0 = ℵ₀'`, `beth (succ o) = 2 ^ beth o`, and that for
a limit ordinal `o`, `beth o` is the supremum of `beth a` for `a < o`.
Assuming the generalized continuum hypothesis, which is undecidable in ZFC, we have `ℶ_ o = ℵ_ o`
for all ordinals.
For a version which starts at zero, see `Cardinal.preBeth`. -/
def beth (o : Ordinal.{u}) : Cardinal.{u} :=
preBeth (ω + o)
@[inherit_doc] scoped notation "ℶ_ " => beth
recommended_spelling "beth" for "ℶ_" in [«termℶ_»]
theorem beth_eq_preBeth (o : Ordinal) : beth o = preBeth (ω + o) :=
rfl
theorem preBeth_le_beth (o : Ordinal) : preBeth o ≤ ℶ_ o :=
preBeth_le_preBeth.2 le_add_self
theorem beth_strictMono : StrictMono beth :=
preBeth_strictMono.comp fun _ _ h ↦ by gcongr
theorem beth_mono : Monotone beth :=
beth_strictMono.monotone
@[simp]
theorem beth_lt_beth {o₁ o₂ : Ordinal} : ℶ_ o₁ < ℶ_ o₂ ↔ o₁ < o₂ :=
beth_strictMono.lt_iff_lt
@[simp]
theorem beth_le_beth {o₁ o₂ : Ordinal} : ℶ_ o₁ ≤ ℶ_ o₂ ↔ o₁ ≤ o₂ :=
beth_strictMono.le_iff_le
@[simp]
theorem beth_zero : ℶ_ 0 = ℵ₀ := by
simp [beth]
@[simp]
theorem beth_add_one (o : Ordinal) : ℶ_ (o + 1) = 2 ^ ℶ_ o := by
simp [beth, ← add_assoc]
-- TODO; deprecate
theorem beth_succ (o : Ordinal) : ℶ_ (succ o) = 2 ^ ℶ_ o :=
beth_add_one o
theorem isNormal_beth : Order.IsNormal beth :=
isNormal_preBeth.comp (isNormal_add_right _)
theorem beth_limit {o : Ordinal} (ho : IsSuccLimit o) : ℶ_ o = ⨆ a : Iio o, ℶ_ a :=
isNormal_beth.apply_of_isSuccLimit ho
theorem aleph_le_beth (o : Ordinal) : ℵ_ o ≤ ℶ_ o :=
preAleph_le_preBeth _
theorem aleph0_le_beth (o : Ordinal) : ℵ₀ ≤ ℶ_ o :=
(aleph0_le_aleph o).trans <| aleph_le_beth o
theorem beth_pos (o : Ordinal) : 0 < ℶ_ o :=
aleph0_pos.trans_le <| aleph0_le_beth o
theorem beth_ne_zero (o : Ordinal) : ℶ_ o ≠ 0 :=
(beth_pos o).ne'
theorem _root_.Ordinal.card_le_beth (o : Ordinal) : o.card ≤ ℶ_ o :=
o.card_le_aleph.trans (aleph_le_beth o)
theorem le_beth_ord (c : Cardinal) : c ≤ ℶ_ c.ord := by
simpa using c.ord.card_le_beth
theorem isStrongLimit_beth {o : Ordinal} : IsStrongLimit (ℶ_ o) ↔ IsSuccPrelimit o := by
rw [beth_eq_preBeth, isStrongLimit_preBeth, isSuccLimit_add_iff_of_isSuccLimit isSuccLimit_omega0]
@[simp]
theorem lift_beth (o : Ordinal) : lift.{v} (ℶ_ o) = ℶ_ (Ordinal.lift.{v} o) := by
rw [beth_eq_preBeth, beth_eq_preBeth, lift_preBeth, Ordinal.lift_add, lift_omega0]
end Cardinal