Grace/Cumulus/LargeCardinal/Inaccessible.g17
Imports
Universe · Set.Hierarchy · Set.Ordinal.Basic
Declarations
- Inaccessible predicate
- Inaccessible.ordinal theorem derivation
- Inaccessible.omega theorem derivation
- Inaccessible.universe theorem derivation
- GrothendieckUniverse.rank theorem derivation
- GrothendieckUniverse.V_limit theorem derivation
- GrothendieckUniverse.V theorem derivation
- GrothendieckUniverse.eq_V theorem derivation
- GrothendieckUniverse.inaccessible theorem derivation
Source
1-- Inaccessible cardinals as the heights of Grothendieck universes, and every2-- universe as a stage V(κ) of the cumulative hierarchy3-- Part of Cumulus, the Grace17 mathematics library.4-- Copyright (c) 2026 Grant Passmore.5-- Released under the Apache License 2.0. See LICENSE in the repository root.6-- Authors: Grant Passmore78module Grace.Cumulus.LargeCardinal.Inaccessible9import Universe10import Set.Hierarchy11import Set.Ordinal.Basic1213-- κ is inaccessible when it is an ordinal above ω whose stage V(κ) is a14-- Grothendieck universe. Under ZFC this is equivalent to κ being strongly15-- inaccessible (uncountable, regular, and a strong limit); this module does16-- not prove that equivalence.17predicate Inaccessible (κ : Set) :=18 κ ∈ Ordinal ∧ ω ∈ κ ∧ GrothendieckUniverse(V(κ))19register largecardinal Inaccessible "an inaccessible cardinal"2021theorem Inaccessible.ordinal (κ : Set)22 requires inaccessible : Inaccessible(κ)23 shows κ ∈ Ordinal24proof25 obtain ⟨ordinal, _, _⟩ := inaccessible26 exact ordinal2728theorem Inaccessible.omega (κ : Set)29 requires inaccessible : Inaccessible(κ)30 shows ω ∈ κ31proof32 obtain ⟨_, omega, _⟩ := inaccessible33 exact omega3435theorem Inaccessible.universe (κ : Set)36 requires inaccessible : Inaccessible(κ)37 shows GrothendieckUniverse(V(κ))38proof39 obtain ⟨_, _, universe⟩ := inaccessible40 exact universe4142-- Rank stays inside a universe: the ranks of the members of x form the43-- range of a function from x into U.44theorem GrothendieckUniverse.rank (U x : Set)45 requires universe : GrothendieckUniverse(U)46 requires hx : x ∈ U47 shows rank(x) ∈ U48proof49 revert hx50 induction x using membership51 intros current ih hCurrent52 have values : ∀ y ∈ current, rank(y) ∈ U53 intros y hy54 exact ih with y, hy, (GrothendieckUniverse.member_of_member with universe, hCurrent, hy)55 have history : FunctionBetween(rank.history(current), current, U)56 refine ⟨?_, ?_, ?_⟩57 . intros p hp58 obtain ⟨y, hy, shape⟩ := rank.history_characterization.forward with hp59 rw shape60 exact product.pair with hy, (values with y, hy)61 . intros a b hab c hac62 obtain ⟨y, _, first⟩ := rank.history_characterization.forward with hab63 obtain ⟨z, _, second⟩ := rank.history_characterization.forward with hac64 obtain ⟨ay, by⟩ := orderedPair.injective with first65 obtain ⟨az, cz⟩ := orderedPair.injective with second66 rw [by, cz, ← ay, ← az]67 . intros y hy68 refine ⟨rank(y), (values with y, hy), (rank.history.contains with hy)⟩69 have ranks := GrothendieckUniverse.range with universe, hCurrent, history70 have supremum := GrothendieckUniverse.union with universe, ranks71 rw rank.unfold72 exact GrothendieckUniverse.next with universe, supremum7374-- At a limit λ in U whose earlier stages lie in U, the stage V(λ) lies in U:75-- the earlier stages are the values of a function from λ into U.76theorem GrothendieckUniverse.V_limit (U λ : Set)77 requires universe : GrothendieckUniverse(U)78 requires limit : Limit(λ)79 requires hλ : λ ∈ U80 requires earlier : ∀ β ∈ λ, V(β) ∈ U81 shows V(λ) ∈ U82proof83 have history : FunctionBetween(V.history(λ), λ, U)84 refine ⟨?_, ?_, ?_⟩85 . intros p hp86 obtain ⟨β, hβ, shape⟩ := V.history.membership.forward with hp87 rw shape88 exact product.pair with hβ, (earlier with β, hβ)89 . intros a b hab c hac90 obtain ⟨β, _, first⟩ := V.history.membership.forward with hab91 obtain ⟨γ, _, second⟩ := V.history.membership.forward with hac92 obtain ⟨aβ, bβ⟩ := orderedPair.injective with first93 obtain ⟨aγ, cγ⟩ := orderedPair.injective with second94 rw [bβ, cγ, ← aβ, ← aγ]95 . intros β hβ96 refine ⟨V(β), (earlier with β, hβ), (V.history.contains with hβ)⟩97 have unions := GrothendieckUniverse.indexed_union with universe, hλ, history98 have bounded : V(λ) ⊆ ⋃(functionImage(V.history(λ), λ, U))99 intros x hx100 have stages := V.limit_membership at x, λ with limit101 obtain ⟨β, hβ, hxβ⟩ := stages.forward with hx102 have mapped := V.history.contains with hβ103 have value := FunctionBetween.apply_value with history, hβ, mapped104 have image := functionImage.value with history, hβ105 rw value at image106 exact set.union.backward with ⟨V(β), image, hxβ⟩107 exact GrothendieckUniverse.subset with universe, unions, bounded108109-- Every stage V(α) with α an ordinal of U lies in U.110theorem GrothendieckUniverse.V (U α : Set)111 requires universe : GrothendieckUniverse(U)112 requires hα : α ∈ ordinalsWithin(U)113 shows V(α) ∈ U114proof115 revert hα116 induction α using membership117 intros current ih hCurrent118 obtain ⟨member, ordinal⟩ := ordinalsWithin.membership.forward with hCurrent119 have earlier : ∀ β ∈ current, V(β) ∈ U120 intros β hβ121 have βMember := GrothendieckUniverse.member_of_member with universe, member, hβ122 have βOrdinal := Ordinal.member with ordinal, hβ123 exact ih with β, hβ, (ordinalsWithin.membership.backward with ⟨βMember, βOrdinal⟩)124 have cases := Ordinal.cases with ordinal125 cases cases with zero | positive126 . rw [zero, ← nat.zero, V.zero]127 exact GrothendieckUniverse.empty with universe128 . cases positive with successor | limit129 . obtain ⟨γ, hγ, step⟩ := successor130 have γOrdinal := Ordinal.member with ordinal, hγ131 rw [← step, V.next with γOrdinal]132 exact GrothendieckUniverse.powerset with universe, (earlier with γ, hγ)133 . exact GrothendieckUniverse.V_limit with universe, limit, member, earlier134135-- Williamson's theorem: every Grothendieck universe is the stage V(κ) at the136-- ordinal κ of its ordinals.137theorem GrothendieckUniverse.eq_V (U : Set)138 requires universe : GrothendieckUniverse(U)139 shows U = V(ordinalsWithin(U))140proof141 have limit := GrothendieckUniverse.ordinalsWithin_limit with universe142 ext x143 have stages := V.limit_membership at x, ordinalsWithin(U) with limit144 constructor145 . intro hx146 have rankMember := GrothendieckUniverse.rank with universe, hx147 have rankOrdinal := rank.ordinal at x148 have rankWithin := ordinalsWithin.membership.backward at U, rank(x) with ⟨rankMember, rankOrdinal⟩149 exact stages.backward with ⟨rank(x), rankWithin, rank.membership at x⟩150 . intro hx151 obtain ⟨β, hβ, hxβ⟩ := stages.forward with hx152 have stage := GrothendieckUniverse.V with universe, hβ153 exact GrothendieckUniverse.member_of_member with universe, stage, hxβ154155theorem GrothendieckUniverse.inaccessible (U : Set)156 requires universe : GrothendieckUniverse(U)157 shows Inaccessible(ordinalsWithin(U))158proof159 have ordinal := GrothendieckUniverse.ordinalsWithin with universe160 have omega := GrothendieckUniverse.omega_ordinalsWithin with universe161 have stage := GrothendieckUniverse.eq_V with universe162 rw stage at universe163 exact ⟨ordinal, omega, universe⟩164