Skip to content
The Lumenary

Formal mathematics laboratory

Lumenary.AxiomaticSetTheory

Axiomatic set theory: hierarchy, cardinal arithmetic and L

Formal library

  • vonNeumann_succtheoremApplies a library theorempropext, Classical.choice, Quot.sound
    vonNeumann_succLean 4Applies a library theoremFormally verified
    /-- The successor step of the cumulative hierarchy: `V_{α+1} = 𝒫(V_α)`.
    This applies Mathlib's `ZFSet.vonNeumann_add_one`. -/
    theorem vonNeumann_succ (α : Ordinal) :
        ZFSet.vonNeumann (α + 1) = ZFSet.powerset (ZFSet.vonNeumann α) :=
      ZFSet.vonNeumann_add_one α
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • vonNeumann_limittheoremApplies a library theorempropext, Classical.choice, Quot.sound
    vonNeumann_limitLean 4Applies a library theoremFormally verified
    /-- The limit step: for a limit ordinal `λ` (or `0`), `V_λ = ⋃_{α<λ} V_α`.
    This applies Mathlib's `ZFSet.vonNeumann_of_isSuccPrelimit`. -/
    theorem vonNeumann_limit {l : Ordinal} (h : Order.IsSuccPrelimit l) :
        ZFSet.vonNeumann l = ZFSet.iUnion fun α : Set.Iio l => ZFSet.vonNeumann α :=
      ZFSet.vonNeumann_of_isSuccPrelimit h
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • mem_vonNeumann_succ_ranktheoremProved here from basic factspropext, Classical.choice, Quot.sound
    mem_vonNeumann_succ_rankLean 4Proved here from basic factsFormally verified
    /-- **Every set appears in the hierarchy**, at the stage after its rank: `x ∈ V_{rank(x)+1}`.
    Here `rank` is defined by ∈-recursion, `rank x = sup {rank y + 1 | y ∈ x}`, which is possible
    because membership is well founded (the axiom of foundation); Mathlib shows `x ∈ V_α` iff
    `rank x < α` (`ZFSet.mem_vonNeumann`). -/
    theorem mem_vonNeumann_succ_rank (x : ZFSet) :
        x ∈ ZFSet.vonNeumann (Order.succ (ZFSet.rank x)) :=
      ZFSet.mem_vonNeumann.mpr (Order.lt_succ (ZFSet.rank x))
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • exists_mem_vonNeumanntheoremApplies a library theorempropext, Classical.choice, Quot.sound
    exists_mem_vonNeumannLean 4Applies a library theoremFormally verified
    /-- `V = ⋃_α V_α`: every set lies in some `V_α`. This applies `ZFSet.exists_mem_vonNeumann`. -/
    theorem exists_mem_vonNeumann (x : ZFSet) : ∃ α, x ∈ ZFSet.vonNeumann α :=
      ZFSet.exists_mem_vonNeumann x
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • not_mem_selftheoremProved here from basic factspropext, Classical.choice, Quot.sound
    not_mem_selfLean 4Proved here from basic factsFormally verified
    /-- No set is a member of itself. Proof via rank: `y ∈ x` implies `rank y < rank x`, so `x ∈ x`
    would give `rank x < rank x`. (Mathlib proves the same as `ZFSet.mem_irrefl`.) -/
    theorem not_mem_self (x : ZFSet) : x ∉ x := fun h =>
      lt_irrefl _ (ZFSet.rank_lt_of_mem h)
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • no_mem_two_cycletheoremProved here from basic factspropext, Classical.choice, Quot.sound
    no_mem_two_cycleLean 4Proved here from basic factsFormally verified
    /-- There are no membership 2-cycles `x ∈ y ∈ x`: their ranks would satisfy
    `rank x < rank y < rank x`. The same argument excludes cycles of every length. -/
    theorem no_mem_two_cycle (x y : ZFSet) : ¬ (x ∈ y ∧ y ∈ x) := fun ⟨hxy, hyx⟩ =>
      lt_irrefl _ ((ZFSet.rank_lt_of_mem hxy).trans (ZFSet.rank_lt_of_mem hyx))
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • card_vonNeumanntheoremApplies a library theorempropext, Classical.choice, Quot.sound
    card_vonNeumannLean 4Applies a library theoremFormally verified
    /-- The size of the hierarchy: `|V_α| = ℶ'_α` (Mathlib's `preBeth`: `0, 1, 2, 4, 16, …` for
    finite `α`, and `ℶ_α` from `ω` on, since `V_{α+1} = 𝒫(V_α)` has `2^|V_α|` elements). This applies
    `ZFSet.card_vonNeumann`. -/
    theorem card_vonNeumann (α : Ordinal) : (ZFSet.vonNeumann α).card = preBeth α :=
      ZFSet.card_vonNeumann α
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • koenig_power_coftheoremApplies a library theorempropext, Classical.choice, Quot.sound
    koenig_power_cofLean 4Applies a library theoremFormally verified
    /-- **König's theorem**, in the form `κ < κ^cf(κ)` for infinite `κ`: an infinite cardinal is
    smaller than the number of `cf(κ)`-sequences from it. (It follows from `∑ᵢ κᵢ < ∏ᵢ λᵢ` when
    `κᵢ < λᵢ`, Mathlib's `Cardinal.sum_lt_prod`.) This applies `Cardinal.lt_power_cof_ord`; here
    `c.ord.cof` is the cofinality of the initial ordinal of `c`. -/
    theorem koenig_power_cof {κ : Cardinal} (hκ : ℵ₀ ≤ κ) : κ < κ ^ κ.ord.cof :=
      lt_power_cof_ord hκ
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • koenig_cof_two_powertheoremProved here from basic factspropext, Classical.choice, Quot.sound
    koenig_cof_two_powerLean 4Proved here from basic factsFormally verified
    /-- **König's corollary: `cf(2^κ) > κ`** for every infinite cardinal `κ`. Proof as in the lesson:
    put `λ = 2^κ` and suppose `cf(λ) ≤ κ`. Then
    `λ < λ^cf(λ) ≤ λ^κ = 2^(κ·κ) = 2^κ = λ`, a contradiction. -/
    theorem koenig_cof_two_power {κ : Cardinal} (hκ : ℵ₀ ≤ κ) :
        κ < ((2 : Cardinal) ^ κ).ord.cof := by
      by_contra h
      push Not at h
      have hl : ℵ₀ ≤ (2 : Cardinal) ^ κ := hκ.trans (cantor κ).le
      have hne : (2 : Cardinal) ^ κ ≠ 0 := power_ne_zero κ two_ne_zero
      have hle : ((2 : Cardinal) ^ κ) ^ ((2 : Cardinal) ^ κ).ord.cof ≤ (2 : Cardinal) ^ κ :=
        calc ((2 : Cardinal) ^ κ) ^ ((2 : Cardinal) ^ κ).ord.cof
            ≤ ((2 : Cardinal) ^ κ) ^ κ := power_le_power_left hne h
          _ = (2 : Cardinal) ^ (κ * κ) := power_mul.symm
          _ = (2 : Cardinal) ^ κ := by rw [mul_eq_self hκ]
      exact absurd (koenig_power_cof hl) (not_lt.mpr hle)
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • koenig_cof_two_power_librarytheoremApplies a library theorempropext, Classical.choice, Quot.sound
    koenig_cof_two_power_libraryLean 4Applies a library theoremFormally verified
    /-- The same corollary from Mathlib, for any base `b > 1`: `κ < cf(b^κ)`.
    This applies `Cardinal.lt_cof_ord_power`. -/
    theorem koenig_cof_two_power_library {κ : Cardinal} (hκ : ℵ₀ ≤ κ) :
        κ < ((2 : Cardinal) ^ κ).ord.cof :=
      lt_cof_ord_power hκ one_lt_two
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • two_power_aleph0_ne_aleph_omegatheoremProved here from basic factspropext, Classical.choice, Quot.sound
    two_power_aleph0_ne_aleph_omegaLean 4Proved here from basic factsFormally verified
    /-- **The continuum is not `ℵ_ω`.** The cardinal `ℵ_ω = sup {ℵₙ | n < ω}` has cofinality `ℵ₀`,
    while König gives `cf(2^ℵ₀) > ℵ₀`. Here `ℵ_ω` is `ℵ_ ω` and its initial ordinal is `ω_ ω`, whose
    cofinality equals that of `ω` (Mathlib's `Ordinal.cof_omega`). -/
    theorem two_power_aleph0_ne_aleph_omega : (2 : Cardinal) ^ ℵ₀ ≠ ℵ_ ω := by
      intro h
      have hk := koenig_cof_two_power (le_refl ℵ₀)
      rw [h, ord_aleph, cof_omega isSuccLimit_omega0, cof_omega0] at hk
      exact lt_irrefl _ hk
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • GCHdefDefinitionpropext, Classical.choice, Quot.sound
    GCHLean 4Formally verified
    /-- The **generalised continuum hypothesis**: `2^κ = κ⁺` for every infinite cardinal `κ`, where
    `κ⁺ = Order.succ κ` is the next cardinal. Gödel showed that it holds in `L`, so it is consistent
    with ZFC (if ZF is); Cohen showed that its negation is consistent too. -/
    def GCH : Prop :=
      ∀ κ : Cardinal.{u}, ℵ₀ ≤ κ → 2 ^ κ = Order.succ κ
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
  • gch_continuumtheoremProved here from basic factspropext, Classical.choice, Quot.sound
    gch_continuumLean 4Proved here from basic factsFormally verified
    /-- GCH implies CH: `2^ℵ₀ = ℵ₁`, since the successor cardinal of `ℵ₀` is `ℵ₁`
    (`Cardinal.succ_aleph0`). -/
    theorem gch_continuum (h : GCH.{u}) : (2 : Cardinal.{u}) ^ ℵ₀ = ℵ₁ := by
      rw [h ℵ₀ le_rfl, succ_aleph0]
    Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor

Formal exercises

Each exercise contains a sorry for you to replace. Open it in the Lean web editor, or clone the repository and run lake build.

no_mem_two_cyclesorry × 1Try it in the Lean web editor
/-- There are no membership 2-cycles `x ∈ y ∈ x`.
Hint: `ZFSet.rank_lt_of_mem : y ∈ x → rank y < rank x`; chain two of these and use `lt_irrefl`. -/
theorem no_mem_two_cycle (x y : ZFSet) : ¬ (x ∈ y ∧ y ∈ x) := by
  sorry
Show the compiled solution
no_mem_two_cycleLean 4Proved here from basic factsFormally verified
/-- There are no membership 2-cycles `x ∈ y ∈ x`: their ranks would satisfy
`rank x < rank y < rank x`. The same argument excludes cycles of every length. -/
theorem no_mem_two_cycle (x y : ZFSet) : ¬ (x ∈ y ∧ y ∈ x) := fun ⟨hxy, hyx⟩ =>
  lt_irrefl _ ((ZFSet.rank_lt_of_mem hxy).trans (ZFSet.rank_lt_of_mem hyx))
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor
gch_continuumsorry × 1Try it in the Lean web editor
/-- The generalised continuum hypothesis implies the continuum hypothesis.
Hint: specialise `h` to `κ = ℵ₀` and rewrite with `Cardinal.succ_aleph0`. -/
theorem gch_continuum (h : Lumenary.AxiomaticSetTheory.GCH.{0}) :
    (2 : Cardinal.{0}) ^ ℵ₀ = ℵ₁ := by
  sorry
Show the compiled solution
gch_continuumLean 4Proved here from basic factsFormally verified
/-- GCH implies CH: `2^ℵ₀ = ℵ₁`, since the successor cardinal of `ℵ₀` is `ℵ₁`
(`Cardinal.succ_aleph0`). -/
theorem gch_continuum (h : GCH.{u}) : (2 : Cardinal.{u}) ^ ℵ₀ = ℵ₁ := by
  rw [h ℵ₀ le_rfl, succ_aleph0]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/AxiomaticSetTheory.leanTry it in the Lean web editor