Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 7c2ce0c

Browse files
committed
refactor(set_theory/cardinal/basic): redefine cardinal.is_limit in terms of is_succ_limit (#18523)
We redefine `cardinal.is_limit x` as `x ≠ 0 ∧ is_succ_limit x`. This will allow us to make use of the extensive `is_succ_limit` API in the future.
1 parent 94eaaaa commit 7c2ce0c

3 files changed

Lines changed: 45 additions & 32 deletions

File tree

src/set_theory/cardinal/basic.lean

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import data.nat.part_enat
99
import data.set.countable
1010
import logic.small.basic
1111
import order.conditionally_complete_lattice.basic
12-
import order.succ_pred.basic
12+
import order.succ_pred.limit
1313
import set_theory.cardinal.schroeder_bernstein
1414
import tactic.positivity
1515

@@ -30,6 +30,7 @@ We define cardinal numbers as a quotient of types under the equivalence relation
3030
* Multiplication `c₁ * c₂` is defined by `cardinal.mul_def : #α * #β = #(α × β)`.
3131
* The order `c₁ ≤ c₂` is defined by `cardinal.le_def α β : #α ≤ #β ↔ nonempty (α ↪ β)`.
3232
* Exponentiation `c₁ ^ c₂` is defined by `cardinal.power_def α β : #α ^ #β = #(β → α)`.
33+
* `cardinal.is_limit c` means that `c` is a (weak) limit cardinal: `c ≠ 0 ∧ ∀ x < c, succ x < c`.
3334
* `cardinal.aleph_0` or `ℵ₀` is the cardinality of `ℕ`. This definition is universe polymorphic:
3435
`cardinal.aleph_0.{u} : cardinal.{u}` (contrast with `ℕ : Type`, which lives in a specific
3536
universe). In some cases the universe level has to be given explicitly.
@@ -560,6 +561,20 @@ instance : succ_order cardinal :=
560561
succ_order.of_succ_le_iff (λ c, Inf {c' | c < c'})
561562
(λ a b, ⟨lt_of_lt_of_le $ Inf_mem $ exists_gt a, cInf_le'⟩)
562563

564+
/-- A cardinal is a limit if it is not zero or a successor cardinal. Note that `ℵ₀` is a limit
565+
cardinal by this definition, but `0` isn't.
566+
567+
Use `is_succ_limit` if you want to include the `c = 0` case. -/
568+
def is_limit (c : cardinal) : Prop := c ≠ 0 ∧ is_succ_limit c
569+
570+
protected theorem is_limit.ne_zero {c} (h : is_limit c) : c ≠ 0 := h.1
571+
572+
protected theorem is_limit.is_succ_limit {c} (h : is_limit c) : is_succ_limit c := h.2
573+
574+
theorem is_limit.succ_lt {x c} (h : is_limit c) : x < c → succ x < c := h.is_succ_limit.succ_lt
575+
576+
theorem is_succ_limit_zero : is_succ_limit (0 : cardinal) := is_succ_limit_bot
577+
563578
theorem succ_def (c : cardinal) : succ c = Inf {c' | c < c'} := rfl
564579

565580
theorem add_one_le_succ (c : cardinal.{u}) : c + 1 ≤ succ c :=
@@ -1000,6 +1015,24 @@ lt_aleph_0_iff_finite.trans finite_coe_iff
10001015

10011016
alias lt_aleph_0_iff_set_finite ↔ _ _root_.set.finite.lt_aleph_0
10021017

1018+
theorem is_succ_limit_aleph_0 : is_succ_limit ℵ₀ :=
1019+
is_succ_limit_of_succ_lt $ λ a ha, begin
1020+
rcases lt_aleph_0.1 ha with ⟨n, rfl⟩,
1021+
rw ←nat_succ,
1022+
apply nat_lt_aleph_0
1023+
end
1024+
1025+
theorem is_limit_aleph_0 : is_limit ℵ₀ := ⟨aleph_0_ne_zero, is_succ_limit_aleph_0⟩
1026+
1027+
theorem is_limit.aleph_0_le {c : cardinal} (h : is_limit c) : ℵ₀ ≤ c :=
1028+
begin
1029+
by_contra' h',
1030+
rcases lt_aleph_0.1 h' with ⟨_ | n, rfl⟩,
1031+
{ exact h.ne_zero.irrefl },
1032+
{ rw nat_succ at h,
1033+
exact not_is_succ_limit_succ _ h.is_succ_limit }
1034+
end
1035+
10031036
@[simp] theorem lt_aleph_0_iff_subtype_finite {p : α → Prop} :
10041037
#{x // p x} < ℵ₀ ↔ {x | p x}.finite :=
10051038
lt_aleph_0_iff_set_finite

src/set_theory/cardinal/cofinality.lean

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ This file contains the definition of cofinality of an ordinal number and regular
2020
* `ordinal.cof o` is the cofinality of the ordinal `o`.
2121
If `o` is the order type of the relation `<` on `α`, then `o.cof` is the smallest cardinality of a
2222
subset `s` of α that is *cofinal* in `α`, i.e. `∀ x : α, ∃ y ∈ s, ¬ y < x`.
23-
* `cardinal.is_limit c` means that `c` is a (weak) limit cardinal: `c ≠ 0 ∧ ∀ x < c, succ x < c`.
2423
* `cardinal.is_strong_limit c` means that `c` is a strong limit cardinal:
2524
`c ≠ 0 ∧ ∀ x < c, 2 ^ x < c`.
2625
* `cardinal.is_regular c` means that `c` is a regular cardinal: `ℵ₀ ≤ c ∧ c.ord.cof = c`.
@@ -715,25 +714,6 @@ open ordinal
715714

716715
local infixr (name := cardinal.pow) ^ := @pow cardinal.{u} cardinal cardinal.has_pow
717716

718-
/-- A cardinal is a limit if it is not zero or a successor
719-
cardinal. Note that `ℵ₀` is a limit cardinal by this definition. -/
720-
def is_limit (c : cardinal) : Prop :=
721-
c ≠ 0 ∧ ∀ x < c, succ x < c
722-
723-
theorem is_limit.ne_zero {c} (h : is_limit c) : c ≠ 0 :=
724-
h.1
725-
726-
theorem is_limit.succ_lt {x c} (h : is_limit c) : x < c → succ x < c :=
727-
h.2 x
728-
729-
theorem is_limit.aleph_0_le {c} (h : is_limit c) : ℵ₀ ≤ c :=
730-
begin
731-
by_contra' h',
732-
rcases lt_aleph_0.1 h' with ⟨_ | n, rfl⟩,
733-
{ exact h.1.irrefl },
734-
{ simpa using h.2 n }
735-
end
736-
737717
/-- A cardinal is a strong limit if it is not zero and it is
738718
closed under powersets. Note that `ℵ₀` is a strong limit by this definition. -/
739719
def is_strong_limit (c : cardinal) : Prop :=
@@ -751,23 +731,23 @@ theorem is_strong_limit_aleph_0 : is_strong_limit ℵ₀ :=
751731
exact_mod_cast nat_lt_aleph_0 (pow 2 n)
752732
end
753733

754-
theorem is_strong_limit.is_limit {c} (H : is_strong_limit c) : is_limit c :=
755-
⟨H.1, λ x h, (succ_le_of_lt $ cantor x).trans_lt (H.2 _ h)⟩
734+
protected theorem is_strong_limit.is_succ_limit {c} (H : is_strong_limit c) : is_succ_limit c :=
735+
is_succ_limit_of_succ_lt $ λ x h, (succ_le_of_lt $ cantor x).trans_lt (H.two_power_lt h)
756736

757-
theorem is_limit_aleph_0 : is_limit ℵ₀ :=
758-
is_strong_limit_aleph_0.is_limit
737+
theorem is_strong_limit.is_limit {c} (H : is_strong_limit c) : is_limit c :=
738+
⟨H.ne_zero, H.is_succ_limit⟩
759739

760-
theorem is_strong_limit_beth {o : ordinal} (H : ∀ a < o, succ a < o) : is_strong_limit (beth o) :=
740+
theorem is_strong_limit_beth {o : ordinal} (H : is_succ_limit o) : is_strong_limit (beth o) :=
761741
begin
762742
rcases eq_or_ne o 0 with rfl | h,
763743
{ rw beth_zero,
764744
exact is_strong_limit_aleph_0 },
765745
{ refine ⟨beth_ne_zero o, λ a ha, _⟩,
766-
rw beth_limit ⟨h, H⟩ at ha,
746+
rw beth_limit ⟨h, is_succ_limit_iff_succ_lt.1 H⟩ at ha,
767747
rcases exists_lt_of_lt_csupr' ha with ⟨⟨i, hi⟩, ha⟩,
768748
have := power_le_power_left two_ne_zero ha.le,
769749
rw ←beth_succ at this,
770-
exact this.trans_lt (beth_lt.2 (H i hi)) }
750+
exact this.trans_lt (beth_lt.2 (H.succ_lt hi)) }
771751
end
772752

773753
theorem mk_bounded_subset {α : Type*} (h : ∀ x < #α, 2 ^ x < #α) {r : α → α → Prop}

src/set_theory/cardinal/ordinal.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ theorem aleph'_le_of_limit {o : ordinal} (l : o.is_limit) {c} :
182182
exact h _ h'
183183
end
184184

185-
theorem aleph'_limit {o : ordinal} (ho : is_limit o) : aleph' o = ⨆ a : Iio o, aleph' a :=
185+
theorem aleph'_limit {o : ordinal} (ho : o.is_limit) : aleph' o = ⨆ a : Iio o, aleph' a :=
186186
begin
187187
refine le_antisymm _ (csupr_le' (λ i, aleph'_le.2 (le_of_lt i.2))),
188188
rw aleph'_le_of_limit ho,
@@ -223,7 +223,7 @@ by rw [aleph, add_succ, aleph'_succ, aleph]
223223
@[simp] theorem aleph_zero : aleph 0 = ℵ₀ :=
224224
by rw [aleph, add_zero, aleph'_omega]
225225

226-
theorem aleph_limit {o : ordinal} (ho : is_limit o) : aleph o = ⨆ a : Iio o, aleph a :=
226+
theorem aleph_limit {o : ordinal} (ho : o.is_limit) : aleph o = ⨆ a : Iio o, aleph a :=
227227
begin
228228
apply le_antisymm _ (csupr_le' _),
229229
{ rw [aleph, aleph'_limit (ho.add _)],
@@ -261,7 +261,7 @@ begin
261261
exact λ h, (ord_injective h).not_gt (aleph_pos o)
262262
end
263263

264-
theorem ord_aleph_is_limit (o : ordinal) : is_limit (aleph o).ord :=
264+
theorem ord_aleph_is_limit (o : ordinal) : (aleph o).ord.is_limit :=
265265
ord_is_limit $ aleph_0_le_aleph _
266266

267267
instance (o : ordinal) : no_max_order (aleph o).ord.out.α :=
@@ -347,7 +347,7 @@ limit_rec_on_zero _ _ _
347347
@[simp] theorem beth_succ (o : ordinal) : beth (succ o) = 2 ^ beth o :=
348348
limit_rec_on_succ _ _ _ _
349349

350-
theorem beth_limit {o : ordinal} : is_limit o → beth o = ⨆ a : Iio o, beth a :=
350+
theorem beth_limit {o : ordinal} : o.is_limit → beth o = ⨆ a : Iio o, beth a :=
351351
limit_rec_on_limit _ _ _ _
352352

353353
theorem beth_strict_mono : strict_mono beth :=

0 commit comments

Comments
 (0)