Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(SetTheory/Cardinal/Basic): move IsStrongLimit #19723

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions Mathlib/SetTheory/Cardinal/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ We define cardinal numbers as a quotient of types under the equivalence relation
* Multiplication `c₁ * c₂` is defined by `Cardinal.mul_def : #α * #β = #(α × β)`.
* The order `c₁ ≤ c₂` is defined by `Cardinal.le_def α β : #α ≤ #β ↔ Nonempty (α ↪ β)`.
* Exponentiation `c₁ ^ c₂` is defined by `Cardinal.power_def α β : #α ^ #β = #(β → α)`.
* `Cardinal.isLimit c` means that `c` is a (weak) limit cardinal: `c ≠ 0 ∧ ∀ x < c, succ x < c`.
* `IsSuccLimit c` means that `c` is a (weak) limit cardinal: `c ≠ 0 ∧ ∀ x < c, succ x < c`.
* `Cardinal.IsStrongLimit c` means that `c` is a strong limit cardinal:
`c ≠ 0 ∧ ∀ x < c, 2 ^ x < c`.
* `Cardinal.aleph0` or `ℵ₀` is the cardinality of `ℕ`. This definition is universe polymorphic:
`Cardinal.aleph0.{u} : Cardinal.{u}` (contrast with `ℕ : Type`, which lives in a specific
universe). In some cases the universe level has to be given explicitly.
Expand Down Expand Up @@ -797,6 +799,8 @@ theorem lift_succ (a) : lift.{v, u} (succ a) = succ (lift.{v, u} a) :=
exact h.not_lt (lt_succ _))
(succ_le_of_lt <| lift_lt.2 <| lt_succ a)

/-! ### Limit cardinals -/

/-- A cardinal is a limit if it is not zero or a successor cardinal. Note that `ℵ₀` is a limit
cardinal by this definition, but `0` isn't.
Deprecated. Use `Order.IsSuccLimit` instead. -/
Expand Down Expand Up @@ -839,6 +843,25 @@ alias isSuccLimit_zero := isSuccPrelimit_zero

end deprecated

/-- A cardinal is a strong limit if it is not zero and it is closed under powersets. Note that `ℵ₀`
is a strong limit by this definition. -/
structure IsStrongLimit (c : Cardinal) : Prop where
ne_zero : c ≠ 0
two_power_lt {x} : x < c → 2 ^ x < c

protected theorem IsStrongLimit.isSuccLimit {c} (H : IsStrongLimit c) : IsSuccLimit c := by
rw [Cardinal.isSuccLimit_iff]
exact ⟨H.ne_zero, isSuccPrelimit_of_succ_lt fun x h ↦
(succ_le_of_lt <| cantor x).trans_lt (H.two_power_lt h)⟩

protected theorem IsStrongLimit.isSuccPrelimit {c} (H : IsStrongLimit c) : IsSuccPrelimit c :=
H.isSuccLimit.isSuccPrelimit

set_option linter.deprecated false in
@[deprecated IsStrongLimit.isSuccLimit (since := "2024-09-17")]
theorem IsStrongLimit.isLimit {c} (H : IsStrongLimit c) : IsLimit c :=
⟨H.ne_zero, H.isSuccPrelimit⟩

/-! ### Indexed cardinal `sum` -/

/-- The indexed sum of cardinals is the cardinality of the
Expand Down Expand Up @@ -1519,6 +1542,14 @@ theorem aleph0_le_of_isSuccLimit {c : Cardinal} (h : IsSuccLimit c) : ℵ₀ ≤
contrapose! h
exact not_isSuccLimit_of_lt_aleph0 h

theorem isStrongLimit_aleph0 : IsStrongLimit ℵ₀ := by
refine ⟨aleph0_ne_zero, fun hx ↦ ?_⟩
obtain ⟨n, rfl⟩ := lt_aleph0.1 hx
exact_mod_cast nat_lt_aleph0 _

theorem IsStrongLimit.aleph0_le {c} (H : IsStrongLimit c) : ℵ₀ ≤ c :=
aleph0_le_of_isSuccLimit H.isSuccLimit

section deprecated

set_option linter.deprecated false in
Expand Down Expand Up @@ -2167,4 +2198,4 @@ end Cardinal

-- end Tactic

set_option linter.style.longFile 2200
set_option linter.style.longFile 2400
42 changes: 4 additions & 38 deletions Mathlib/SetTheory/Cardinal/Cofinality.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ This file contains the definition of cofinality of an ordinal number and regular
* `Ordinal.cof o` is the cofinality of the ordinal `o`.
If `o` is the order type of the relation `<` on `α`, then `o.cof` is the smallest cardinality of a
subset `s` of α that is *cofinal* in `α`, i.e. `∀ x : α, ∃ y ∈ s, ¬ y < x`.
* `Cardinal.IsStrongLimit c` means that `c` is a strong limit cardinal:
`c ≠ 0 ∧ ∀ x < c, 2 ^ x < c`.
* `Cardinal.IsRegular c` means that `c` is a regular cardinal: `ℵ₀ ≤ c ∧ c.ord.cof = c`.
* `Cardinal.IsInaccessible c` means that `c` is strongly inaccessible:
`ℵ₀ < c ∧ IsRegular c ∧ IsStrongLimit c`.
Expand Down Expand Up @@ -797,43 +795,11 @@ namespace Cardinal

open Ordinal

/-- A cardinal is a strong limit if it is not zero and it is
closed under powersets. Note that `ℵ₀` is a strong limit by this definition. -/
def IsStrongLimit (c : Cardinal) : Prop :=
c ≠ 0 ∧ ∀ x < c, (2^x) < c

theorem IsStrongLimit.ne_zero {c} (h : IsStrongLimit c) : c ≠ 0 :=
h.1

theorem IsStrongLimit.two_power_lt {x c} (h : IsStrongLimit c) : x < c → (2^x) < c :=
h.2 x

theorem isStrongLimit_aleph0 : IsStrongLimit ℵ₀ :=
⟨aleph0_ne_zero, fun x hx => by
rcases lt_aleph0.1 hx with ⟨n, rfl⟩
exact mod_cast nat_lt_aleph0 (2 ^ n)⟩

protected theorem IsStrongLimit.isSuccLimit {c} (H : IsStrongLimit c) : IsSuccLimit c := by
rw [Cardinal.isSuccLimit_iff]
exact ⟨H.ne_zero, isSuccPrelimit_of_succ_lt fun x h =>
(succ_le_of_lt <| cantor x).trans_lt (H.two_power_lt h)⟩

protected theorem IsStrongLimit.isSuccPrelimit {c} (H : IsStrongLimit c) : IsSuccPrelimit c :=
H.isSuccLimit.isSuccPrelimit

theorem IsStrongLimit.aleph0_le {c} (H : IsStrongLimit c) : ℵ₀ ≤ c :=
aleph0_le_of_isSuccLimit H.isSuccLimit

set_option linter.deprecated false in
@[deprecated IsStrongLimit.isSuccLimit (since := "2024-09-17")]
theorem IsStrongLimit.isLimit {c} (H : IsStrongLimit c) : IsLimit c :=
⟨H.ne_zero, H.isSuccPrelimit⟩

theorem isStrongLimit_beth {o : Ordinal} (H : IsSuccPrelimit o) : IsStrongLimit (ℶ_ o) := by
rcases eq_or_ne o 0 with (rfl | h)
· rw [beth_zero]
exact isStrongLimit_aleph0
· refine ⟨beth_ne_zero o, fun a ha => ?_⟩
· refine ⟨beth_ne_zero o, fun ha => ?_⟩
rw [beth_limit ⟨h, isSuccPrelimit_iff_succ_lt.1 H⟩] at ha
rcases exists_lt_of_lt_ciSup' ha with ⟨⟨i, hi⟩, ha⟩
have := power_le_power_left two_ne_zero ha.le
Expand All @@ -849,7 +815,7 @@ theorem mk_bounded_subset {α : Type*} (h : ∀ x < #α, (2^x) < #α) {r : α
constructor
rintro ⟨s, hs⟩
exact (not_unbounded_iff s).2 hs (unbounded_of_isEmpty s)
have h' : IsStrongLimit #α := ⟨ha, h⟩
have h' : IsStrongLimit #α := ⟨ha, @h⟩
have ha := h'.aleph0_le
apply le_antisymm
· have : { s : Set α | Bounded r s } = ⋃ i, 𝒫{ j | r j i } := setOf_exists _
Expand All @@ -874,7 +840,7 @@ theorem mk_subset_mk_lt_cof {α : Type*} (h : ∀ x < #α, (2^x) < #α) :
#{ s : Set α // #s < cof (#α).ord } = #α := by
rcases eq_or_ne #α 0 with (ha | ha)
· simp [ha]
have h' : IsStrongLimit #α := ⟨ha, h⟩
have h' : IsStrongLimit #α := ⟨ha, @h⟩
rcases ord_eq α with ⟨r, wo, hr⟩
haveI := wo
apply le_antisymm
Expand Down Expand Up @@ -1182,7 +1148,7 @@ def IsInaccessible (c : Cardinal) :=

theorem IsInaccessible.mk {c} (h₁ : ℵ₀ < c) (h₂ : c ≤ c.ord.cof) (h₃ : ∀ x < c, (2^x) < c) :
IsInaccessible c :=
⟨h₁, ⟨h₁.le, h₂⟩, (aleph0_pos.trans h₁).ne', h₃⟩
⟨h₁, ⟨h₁.le, h₂⟩, (aleph0_pos.trans h₁).ne', @h₃⟩

-- Lean's foundations prove the existence of ℵ₀ many inaccessible cardinals
theorem univ_inaccessible : IsInaccessible univ.{u, v} :=
Expand Down
Loading