Buckets:
cfahlgren1/math / lean /OAI /SetTheory /PartitionPrinciple /Geometry /GroundCumulativeHierarchyLevels.lean
| import OAI.SetTheory.PartitionPrinciple.Definability.GroundStrongLimitFormulas | |
| import OAI.SetTheory.PartitionPrinciple.Transfinite.GroundIntervalRecursion | |
| namespace OAI | |
| namespace PartitionPilot.Forcing | |
| open SetFormula | |
| open scoped ZFSet | |
| universe u | |
| namespace SetFormula | |
| def cumulativeMemberFormula {n} (x a p : Fin n) : SetFormula n := | |
| ex (.conj (.mem 0 a.succ) (ex (.conj | |
| (BoundedFormula.pairMembershipFormula 1 0 p.succ.succ).toFormula | |
| (BoundedFormula.subsetFormula x.succ.succ 0).toFormula))) | |
| def cumulativeStepFormula : SetFormula 3 := | |
| .all (.conj | |
| (imp (.mem 0 3) (cumulativeMemberFormula 0 1 2)) | |
| (imp (cumulativeMemberFormula 0 1 2) (.mem 0 3))) | |
| end SetFormula | |
| namespace TransitiveGround | |
| variable (M : TransitiveGround.{u}) | |
| noncomputable def cumulativeNext (a p : ZFSet.{u}) : ZFSet.{u} := | |
| ZFSet.sep (fun x => ∃ b ∈ a, ∃ v, ZFSet.pair b v ∈ p ∧ x ⊆ v) | |
| (M.groundPower (⋃₀ ⋃₀ ⋃₀ p)) | |
| theorem mem_cumulativeNext (a p x : ZFSet.{u}) : | |
| x ∈ M.cumulativeNext a p ↔ | |
| x ∈ M.sets ∧ ∃ b ∈ a, ∃ v, ZFSet.pair b v ∈ p ∧ x ⊆ v := by | |
| rw [cumulativeNext, ZFSet.mem_sep, M.mem_groundPower] | |
| constructor | |
| · exact fun h => ⟨h.1.1, h.2⟩ | |
| · rintro ⟨hx, b, hb, v, entry, subset⟩ | |
| exact ⟨⟨hx, fun z hz => ZFSet.mem_sUnion.2 | |
| ⟨v, pair_second_mem_doubleUnion entry, subset hz⟩⟩, b, hb, v, entry, subset⟩ | |
| theorem realize_cumulativeMemberFormula {n} (x a p : Fin n) | |
| (env : Fin n → ZFSet.{u}) (members : ∀ i, env i ∈ M.sets) : | |
| Realize M.sets (cumulativeMemberFormula x a p) env ↔ | |
| ∃ b ∈ env a, ∃ v, ZFSet.pair b v ∈ env p ∧ env x ⊆ v := by | |
| simp only [cumulativeMemberFormula, realize_ex, Realize] | |
| constructor | |
| · rintro ⟨b, hbM, hb, v, hvM, pairCode, subsetCode⟩ | |
| have mem2 : ∀ i, extend v (extend b env) i ∈ M.sets := | |
| Fin.cases hvM (Fin.cases hbM members) | |
| exact ⟨b, hb, v, | |
| (BoundedFormula.truth_pairMembershipFormula 1 0 p.succ.succ _).1 | |
| ((BoundedFormula.realize_toFormula M _ _ mem2).1 pairCode), | |
| (BoundedFormula.truth_subsetFormula x.succ.succ 0 _).1 | |
| ((BoundedFormula.realize_toFormula M _ _ mem2).1 subsetCode)⟩ | |
| · rintro ⟨b, hb, v, entry, subset⟩ | |
| have hbM := M.transitive (members a) hb | |
| have hvM : v ∈ M.sets := M.transitive | |
| (M.transitive (M.transitive (members p) entry) | |
| (ZFSet.mem_pair.2 (Or.inr rfl))) (ZFSet.mem_pair.2 (Or.inr rfl)) | |
| have mem2 : ∀ i, extend v (extend b env) i ∈ M.sets := | |
| Fin.cases hvM (Fin.cases hbM members) | |
| exact ⟨b, hbM, hb, v, hvM, | |
| (BoundedFormula.realize_toFormula M _ _ mem2).2 | |
| ((BoundedFormula.truth_pairMembershipFormula 1 0 p.succ.succ _).2 entry), | |
| (BoundedFormula.realize_toFormula M _ _ mem2).2 | |
| ((BoundedFormula.truth_subsetFormula x.succ.succ 0 _).2 subset)⟩ | |
| theorem cumulativeNext_mem | |
| (unions : Realize M.sets SetFormula.union Fin.elim0) | |
| (powers : Realize M.sets powerSet Fin.elim0) | |
| (separation : SeparationSchema M.sets) | |
| {a p : ZFSet.{u}} (ha : a ∈ M.sets) (hp : p ∈ M.sets) : | |
| M.cumulativeNext a p ∈ M.sets := by | |
| let params := extend a (extend p Fin.elim0) | |
| have members : ∀ i, params i ∈ M.sets := Fin.cases ha (Fin.cases hp (fun i => Fin.elim0 i)) | |
| have hBound := M.groundPower_mem powers | |
| (M.union_mem unions (M.union_mem unions (M.union_mem unions hp))) | |
| have selected := M.separation_mem separation (cumulativeMemberFormula 0 1 2) | |
| params members hBound | |
| have equal : ZFSet.sep (fun x => Realize M.sets (cumulativeMemberFormula 0 1 2) | |
| (extend x params)) (M.groundPower (⋃₀ ⋃₀ ⋃₀ p)) = M.cumulativeNext a p := by | |
| apply ZFSet.ext | |
| intro x | |
| rw [ZFSet.mem_sep, cumulativeNext, ZFSet.mem_sep] | |
| constructor | |
| · rintro ⟨hx, code⟩ | |
| exact ⟨hx, (M.realize_cumulativeMemberFormula 0 1 2 _ | |
| (Fin.cases (M.transitive hBound hx) members)).1 code⟩ | |
| · rintro ⟨hx, witness⟩ | |
| exact ⟨hx, (M.realize_cumulativeMemberFormula 0 1 2 _ | |
| (Fin.cases (M.transitive hBound hx) members)).2 witness⟩ | |
| exact equal ▸ selected | |
| theorem realize_cumulativeStepFormula {a p y : ZFSet.{u}} | |
| (ha : a ∈ M.sets) (hp : p ∈ M.sets) (hy : y ∈ M.sets) : | |
| Realize M.sets cumulativeStepFormula (extend a (extend p (extend y Fin.elim0))) ↔ | |
| y = M.cumulativeNext a p := by | |
| simp only [cumulativeStepFormula, realize_imp, Realize] | |
| have decode (x : ZFSet.{u}) (hx : x ∈ M.sets) := | |
| M.realize_cumulativeMemberFormula 0 1 2 | |
| (extend x (extend a (extend p (extend y Fin.elim0)))) | |
| (Fin.cases hx (Fin.cases ha (Fin.cases hp (Fin.cases hy (fun i => Fin.elim0 i))))) | |
| constructor | |
| · intro property | |
| apply ZFSet.ext | |
| intro x | |
| rw [M.mem_cumulativeNext] | |
| constructor | |
| · intro hx | |
| have hxM := M.transitive hy hx | |
| exact ⟨hxM, (decode x hxM).1 ((property x hxM).1 hx)⟩ | |
| · rintro ⟨hx, witness⟩ | |
| exact (property x hx).2 ((decode x hx).2 witness) | |
| · intro equal x hx | |
| constructor | |
| · intro member | |
| exact (decode x hx).2 ((M.mem_cumulativeNext a p x).1 (equal ▸ member)).2 | |
| · intro witness | |
| exact equal ▸ (M.mem_cumulativeNext a p x).2 ⟨hx, (decode x hx).1 witness⟩ | |
| end TransitiveGround | |
| end PartitionPilot.Forcing | |
| namespace PartitionPilot.Forcing | |
| open SetFormula | |
| universe u | |
| def GroundCumulativeHierarchyCode (M : TransitiveGround.{u}) (T H : ZFSet.{u}) : Prop := | |
| OrdinalRecursionTrace (fun a p y => y = M.cumulativeNext a p) T H | |
| namespace GroundCumulativeHierarchyCode | |
| variable {M : TransitiveGround.{u}} {T H : ZFSet.{u}} | |
| theorem function (code : GroundCumulativeHierarchyCode M T H) : FunctionGraphOn T H := code.1 | |
| theorem entry_iff (code : GroundCumulativeHierarchyCode M T H) | |
| {a v : ZFSet.{u}} (ha : a ∈ T) (entry : ZFSet.pair a v ∈ H) (x : ZFSet.{u}) : | |
| x ∈ v ↔ x ∈ M.sets ∧ ∃ b ∈ a, ∃ w, ZFSet.pair b w ∈ H ∧ x ⊆ w := by | |
| rw [code.2 a ha v entry, M.mem_cumulativeNext] | |
| constructor | |
| · rintro ⟨hx, b, hb, w, edge, subset⟩ | |
| exact ⟨hx, b, hb, w, (pair_mem_graphRestriction.1 edge).1, subset⟩ | |
| · rintro ⟨hx, b, hb, w, edge, subset⟩ | |
| exact ⟨hx, b, hb, w, pair_mem_graphRestriction.2 ⟨edge, hb⟩, subset⟩ | |
| theorem unique (code : GroundCumulativeHierarchyCode M T H) | |
| {J : ZFSet.{u}} (other : GroundCumulativeHierarchyCode M T J) | |
| (ordinal : ordinalSetProperty T) : H = J := | |
| OrdinalRecursionTrace.unique code other ordinal (fun _ hx => hx) | |
| (fun _ _ _ _ _ _ first second => first.trans second.symm) | |
| theorem restrict (code : GroundCumulativeHierarchyCode M T H) | |
| {a : ZFSet.{u}} (ordinal : ordinalSetProperty a) (subset : a ⊆ T) : | |
| GroundCumulativeHierarchyCode M a (graphRestriction a H) := | |
| OrdinalRecursionTrace.restrict code ordinal subset | |
| end GroundCumulativeHierarchyCode | |
| namespace TransitiveGround | |
| variable (M : TransitiveGround.{u}) | |
| theorem exists_groundCumulativeHierarchy | |
| (pairing : Realize M.sets SetFormula.pairing Fin.elim0) | |
| (unions : Realize M.sets SetFormula.union Fin.elim0) | |
| (powers : Realize M.sets powerSet Fin.elim0) | |
| (separation : SeparationSchema M.sets) (collection : CollectionSchema M.sets) | |
| {T : ZFSet.{u}} (hT : T ∈ M.sets) (ordinal : ordinalSetProperty T) : | |
| ∃ H ∈ M.sets, GroundCumulativeHierarchyCode M T H ∧ | |
| ∀ J, GroundCumulativeHierarchyCode M T J → J = H := by | |
| have closure : GroundOrdinalStepClosure M T cumulativeStepFormula Fin.elim0 := by | |
| intro a ha p hp _ | |
| have haM := M.transitive hT ha | |
| have hy := M.cumulativeNext_mem unions powers separation haM hp | |
| refine ⟨M.cumulativeNext a p, hy, | |
| (M.realize_cumulativeStepFormula haM hp hy).2 rfl, ?_⟩ | |
| intro z hz relation | |
| exact (M.realize_cumulativeStepFormula haM hp hz).1 relation | |
| obtain ⟨H, hH, trace, _, _⟩ := M.exists_unique_ordinalRecursionTrace | |
| pairing unions separation collection hT ordinal cumulativeStepFormula Fin.elim0 | |
| (fun i => Fin.elim0 i) closure | |
| have code : GroundCumulativeHierarchyCode M T H := by | |
| refine ⟨trace.1, ?_⟩ | |
| intro a ha v entry | |
| have step := trace.2 a ha v entry | |
| exact (M.realize_cumulativeStepFormula (M.transitive hT ha) step.1 step.2.1).1 step.2.2 | |
| exact ⟨H, hH, code, fun J other => other.unique code ordinal⟩ | |
| end TransitiveGround | |
| end PartitionPilot.Forcing | |
| namespace PartitionPilot.Forcing.GroundCumulativeHierarchyCode | |
| open SetRealization | |
| open scoped ZFSet | |
| universe u | |
| variable {M : TransitiveGround.{u}} {T H : ZFSet.{u}} | |
| variable (code : GroundCumulativeHierarchyCode M T H) (ordinal : ordinalSetProperty T) | |
| include code ordinal | |
| theorem mem_iff_rank_lt {a v : ZFSet.{u}} (ha : a ∈ T) | |
| (entry : ZFSet.pair a v ∈ H) (x : ZFSet.{u}) : | |
| x ∈ v ↔ x ∈ M.sets ∧ ZFSet.rank x < ZFSet.rank a := by | |
| have all : ∀ a ∈ T, ∀ v, ZFSet.pair a v ∈ H → ∀ x, | |
| x ∈ v ↔ x ∈ M.sets ∧ ZFSet.rank x < ZFSet.rank a := by | |
| intro a | |
| induction a using ZFSet.inductionOn with | |
| | h a ih => | |
| intro ha v entry x | |
| rw [code.entry_iff ha entry x] | |
| constructor | |
| · rintro ⟨hx, b, hb, w, edge, subset⟩ | |
| have hbT := ordinal.1 a ha b hb | |
| have rankLe : ZFSet.rank x ≤ ZFSet.rank b := ZFSet.rank_le_iff.2 | |
| (fun z hz => ((ih b hb hbT w edge z).1 (subset hz)).2) | |
| exact ⟨hx, rankLe.trans_lt (ZFSet.rank_lt_of_mem hb)⟩ | |
| · rintro ⟨hx, rankLt⟩ | |
| let b := ordinalCode (ZFSet.rank x) | |
| have hb : b ∈ a := by | |
| rw [ordinalSetProperty_eq_code_rank a (ordinalSetProperty_member ordinal ha)] | |
| exact (mem_ordinalCode_iff _ _).2 rankLt | |
| have hbT := ordinal.1 a ha b hb | |
| obtain ⟨w, edge⟩ := code.function.total hbT | |
| refine ⟨hx, b, hb, w, edge, ?_⟩ | |
| intro z hz | |
| apply (ih b hb hbT w edge z).2 | |
| refine ⟨M.transitive hx hz, ?_⟩ | |
| simpa only [b, rank_ordinalCode] using ZFSet.rank_lt_of_mem hz | |
| exact all a ha v entry x | |
| theorem value_transitive {a v : ZFSet.{u}} (ha : a ∈ T) | |
| (entry : ZFSet.pair a v ∈ H) : setTransitive v := by | |
| intro x hx z hz | |
| obtain ⟨hxM, rankX⟩ := (code.mem_iff_rank_lt ordinal ha entry x).1 hx | |
| exact (code.mem_iff_rank_lt ordinal ha entry z).2 | |
| ⟨M.transitive hxM hz, (ZFSet.rank_lt_of_mem hz).trans rankX⟩ | |
| theorem value_mono {a b v w : ZFSet.{u}} (ha : a ∈ T) (hb : b ∈ T) | |
| (first : ZFSet.pair a v ∈ H) (second : ZFSet.pair b w ∈ H) | |
| (subset : a ⊆ b) : v ⊆ w := by | |
| intro x hx | |
| obtain ⟨hxM, rankX⟩ := (code.mem_iff_rank_lt ordinal ha first x).1 hx | |
| exact (code.mem_iff_rank_lt ordinal hb second x).2 | |
| ⟨hxM, rankX.trans_le (ZFSet.rank_mono subset)⟩ | |
| theorem value_rank {a v : ZFSet.{u}} (ha : a ∈ T) | |
| (entry : ZFSet.pair a v ∈ H) (haM : a ∈ M.sets) : ZFSet.rank v = ZFSet.rank a := by | |
| apply le_antisymm | |
| · exact ZFSet.rank_le_iff.2 (fun x hx => ((code.mem_iff_rank_lt ordinal ha entry x).1 hx).2) | |
| · apply ZFSet.rank_le_iff.2 | |
| intro b hb | |
| exact ZFSet.rank_lt_of_mem ((code.mem_iff_rank_lt ordinal ha entry b).2 | |
| ⟨M.transitive haM hb, ZFSet.rank_lt_of_mem hb⟩) | |
| theorem zero_value {v : ZFSet.{u}} (zero : (∅ : ZFSet.{u}) ∈ T) | |
| (entry : ZFSet.pair ∅ v ∈ H) : v = ∅ := by | |
| apply ZFSet.ext | |
| intro x | |
| rw [code.mem_iff_rank_lt ordinal zero entry x, ZFSet.rank_empty] | |
| exact ⟨fun h => False.elim (not_lt_zero h.2), | |
| fun h => False.elim (ZFSet.notMem_empty x h)⟩ | |
| theorem successor_value {a v w : ZFSet.{u}} (ha : a ∈ T) | |
| (hs : insert a a ∈ T) (first : ZFSet.pair a v ∈ H) | |
| (second : ZFSet.pair (insert a a) w ∈ H) : w = M.groundPower v := by | |
| have rankSucc : ZFSet.rank (insert a a) = Order.succ (ZFSet.rank a) := by | |
| rw [ZFSet.rank_insert, max_eq_left (Order.le_succ _)] | |
| apply ZFSet.ext | |
| intro x | |
| rw [code.mem_iff_rank_lt ordinal hs second x, rankSucc, Order.lt_succ_iff, | |
| M.mem_groundPower] | |
| constructor | |
| · rintro ⟨hxM, bound⟩ | |
| refine ⟨hxM, ?_⟩ | |
| intro z hz | |
| exact (code.mem_iff_rank_lt ordinal ha first z).2 | |
| ⟨M.transitive hxM hz, (ZFSet.rank_lt_of_mem hz).trans_le bound⟩ | |
| · rintro ⟨hxM, subset⟩ | |
| exact ⟨hxM, ZFSet.rank_le_iff.2 | |
| (fun z hz => ((code.mem_iff_rank_lt ordinal ha first z).1 (subset hz)).2)⟩ | |
| theorem limit_value {a v : ZFSet.{u}} (ha : a ∈ T) | |
| (entry : ZFSet.pair a v ∈ H) (limit : Order.IsSuccLimit (ZFSet.rank a)) : | |
| v = ⋃₀ relationImage a (⋃₀ ⋃₀ H) H := by | |
| apply ZFSet.ext | |
| intro x | |
| constructor | |
| · intro hx | |
| obtain ⟨hxM, bound⟩ := (code.mem_iff_rank_lt ordinal ha entry x).1 hx | |
| let b := ordinalCode (Order.succ (ZFSet.rank x)) | |
| have hb : b ∈ a := by | |
| rw [ordinalSetProperty_eq_code_rank a (ordinalSetProperty_member ordinal ha)] | |
| apply (mem_ordinalCode_iff _ _).2 | |
| exact limit.succ_lt bound | |
| obtain ⟨w, edge⟩ := code.function.total (ordinal.1 a ha b hb) | |
| refine ZFSet.mem_sUnion.2 ⟨w, (mem_relationImage _ _ _ _).2 | |
| ⟨pair_second_mem_doubleUnion edge, b, hb, edge⟩, ?_⟩ | |
| apply (code.mem_iff_rank_lt ordinal (ordinal.1 a ha b hb) edge x).2 | |
| exact ⟨hxM, by simpa only [b, rank_ordinalCode] using Order.lt_succ (ZFSet.rank x)⟩ | |
| · intro hx | |
| obtain ⟨w, hw, xw⟩ := ZFSet.mem_sUnion.1 hx | |
| obtain ⟨_, b, hb, edge⟩ := (mem_relationImage _ _ _ _).1 hw | |
| obtain ⟨hxM, bound⟩ := (code.mem_iff_rank_lt ordinal (ordinal.1 a ha b hb) edge x).1 xw | |
| exact (code.mem_iff_rank_lt ordinal ha entry x).2 | |
| ⟨hxM, bound.trans (ZFSet.rank_lt_of_mem hb)⟩ | |
| end PartitionPilot.Forcing.GroundCumulativeHierarchyCode | |
| namespace PartitionPilot.Forcing | |
| open SetFormula | |
| universe u | |
| namespace GroundCumulativeHierarchyCode | |
| variable {M : TransitiveGround.{u}} {T H : ZFSet.{u}} | |
| theorem value_mem (_code : GroundCumulativeHierarchyCode M T H) | |
| (hH : H ∈ M.sets) {a v : ZFSet.{u}} (entry : ZFSet.pair a v ∈ H) : v ∈ M.sets := | |
| M.pair_right (M.transitive hH entry) | |
| theorem ground_trace_iff | |
| (unions : Realize M.sets SetFormula.union Fin.elim0) | |
| (separation : SeparationSchema M.sets) (hT : T ∈ M.sets) (hH : H ∈ M.sets) : | |
| OrdinalRecursionTrace (groundRecursionStep M cumulativeStepFormula Fin.elim0) T H ↔ | |
| GroundCumulativeHierarchyCode M T H := by | |
| constructor | |
| · intro trace | |
| refine ⟨trace.1, ?_⟩ | |
| intro a ha v entry | |
| have step := trace.2 a ha v entry | |
| exact (M.realize_cumulativeStepFormula (M.transitive hT ha) step.1 step.2.1).1 step.2.2 | |
| · intro code | |
| refine ⟨code.1, ?_⟩ | |
| intro a ha v entry | |
| have haM := M.transitive hT ha | |
| have hp := M.graphRestriction_mem unions separation haM hH | |
| have hv := code.value_mem hH entry | |
| exact ⟨hp, hv, (M.realize_cumulativeStepFormula haM hp hv).2 (code.2 a ha v entry)⟩ | |
| end GroundCumulativeHierarchyCode | |
| namespace TransitiveGround | |
| variable (M : TransitiveGround.{u}) | |
| theorem exists_groundCumulativeLevel | |
| (pairing : Realize M.sets SetFormula.pairing Fin.elim0) | |
| (unions : Realize M.sets SetFormula.union Fin.elim0) | |
| (powers : Realize M.sets powerSet Fin.elim0) | |
| (separation : SeparationSchema M.sets) (collection : CollectionSchema M.sets) | |
| {a : ZFSet.{u}} (ha : a ∈ M.sets) (ordinal : ordinalSetProperty a) : | |
| ∃ H ∈ M.sets, ∃ V ∈ M.sets, | |
| GroundCumulativeHierarchyCode M (insert a a) H ∧ ZFSet.pair a V ∈ H ∧ | |
| (∀ x, x ∈ V ↔ x ∈ M.sets ∧ ZFSet.rank x < ZFSet.rank a) ∧ | |
| setTransitive V ∧ ZFSet.rank V = ZFSet.rank a := by | |
| have hs := M.insert_mem pairing unions ha ha | |
| have ordinalS := ordinalSetProperty_succ ordinal | |
| obtain ⟨H, hH, code, _⟩ := M.exists_groundCumulativeHierarchy pairing unions powers | |
| separation collection hs ordinalS | |
| obtain ⟨V, entry⟩ := code.function.total (ZFSet.mem_insert a a) | |
| exact ⟨H, hH, V, code.value_mem hH entry, code, entry, | |
| code.mem_iff_rank_lt ordinalS (ZFSet.mem_insert a a) entry, | |
| code.value_transitive ordinalS (ZFSet.mem_insert a a) entry, | |
| code.value_rank ordinalS (ZFSet.mem_insert a a) entry ha⟩ | |
| end TransitiveGround | |
| end PartitionPilot.Forcing | |
| end OAI | |
Xet Storage Details
- Size:
- 16.1 kB
- Xet hash:
- abb4bffe65a022ea52430835013ea66757785bb1a79814895025478e7dc4922e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.