Download data/lean/OAI/SetTheory/PartitionPrinciple/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/SetTheory/PartitionPrinciple/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/SetTheory/PartitionPrinciple/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/SetTheory/PartitionPrinciple/Model.lean
9.24 kB
| import Mathlib | |
| namespace OAI | |
| namespace PartitionPilot.Forcing | |
| universe u | |
| inductive SetFormula : Nat β Type | |
| | equal {n} : Fin n β Fin n β SetFormula n | |
| | mem {n} : Fin n β Fin n β SetFormula n | |
| | neg {n} : SetFormula n β SetFormula n | |
| | conj {n} : SetFormula n β SetFormula n β SetFormula n | |
| | all {n} : SetFormula (n + 1) β SetFormula n | |
| namespace SetFormula | |
| def extend {A : Type u} {n : Nat} (x : A) (env : Fin n β A) : Fin (n + 1) β A := | |
| Fin.cases x env | |
| def Realize (U : Set ZFSet.{u}) : {n : Nat} β SetFormula n β (Fin n β ZFSet.{u}) β Prop | |
| | _, .equal i j, env => env i = env j | |
| | _, .mem i j, env => env i β env j | |
| | _, .neg Ο, env => Β¬ Realize U Ο env | |
| | _, .conj Ο Ο, env => Realize U Ο env β§ Realize U Ο env | |
| | _, .all Ο, env => β x β U, Realize U Ο (extend x env) | |
| def ex {n : Nat} (Ο : SetFormula (n + 1)) : SetFormula n := .neg (.all (.neg Ο)) | |
| def disj {n : Nat} (Ο Ο : SetFormula n) : SetFormula n := .neg (.conj (.neg Ο) (.neg Ο)) | |
| def imp {n : Nat} (Ο Ο : SetFormula n) : SetFormula n := .neg (.conj Ο (.neg Ο)) | |
| end SetFormula | |
| inductive BoundedFormula : Nat β Type | |
| | equal {n} : Fin n β Fin n β BoundedFormula n | |
| | mem {n} : Fin n β Fin n β BoundedFormula n | |
| | neg {n} : BoundedFormula n β BoundedFormula n | |
| | conj {n} : BoundedFormula n β BoundedFormula n β BoundedFormula n | |
| | allMem {n} : Fin n β BoundedFormula (n + 1) β BoundedFormula n | |
| namespace BoundedFormula | |
| open SetFormula | |
| def imp {n} (Ο Ο : BoundedFormula n) : BoundedFormula n := .neg (.conj Ο (.neg Ο)) | |
| def disj {n} (Ο Ο : BoundedFormula n) : BoundedFormula n := .neg (.conj (.neg Ο) (.neg Ο)) | |
| def exMem {n} (b : Fin n) (Ο : BoundedFormula (n + 1)) : BoundedFormula n := | |
| .neg (.allMem b (.neg Ο)) | |
| def toFormula : {n : Nat} β BoundedFormula n β SetFormula n | |
| | _, .equal i j => .equal i j | |
| | _, .mem i j => .mem i j | |
| | _, .neg Ο => .neg Ο.toFormula | |
| | _, .conj Ο Ο => .conj Ο.toFormula Ο.toFormula | |
| | _, .allMem b Ο => .all (SetFormula.imp (.mem 0 b.succ) Ο.toFormula) | |
| def singletonFormula {n} (z x : Fin n) : BoundedFormula n := | |
| .conj (.mem x z) (.allMem z (.equal 0 x.succ)) | |
| def unorderedPairFormula {n} (z x y : Fin n) : BoundedFormula n := | |
| .conj (.mem x z) (.conj (.mem y z) (.allMem z (disj (.equal 0 x.succ) (.equal 0 y.succ)))) | |
| def orderedPairFormula {n} (z x y : Fin n) : BoundedFormula n := | |
| exMem z (.conj (singletonFormula 0 x.succ) | |
| (exMem z.succ (.conj (unorderedPairFormula 0 x.succ.succ y.succ.succ) | |
| (unorderedPairFormula z.succ.succ 1 0)))) | |
| def pairMembershipFormula {n} (x y r : Fin n) : BoundedFormula n := | |
| exMem r (orderedPairFormula 0 x.succ y.succ) | |
| def relationBetweenFormula {n} (a b f : Fin n) : BoundedFormula n := | |
| .allMem f (exMem a.succ (exMem b.succ.succ (orderedPairFormula 2 1 0))) | |
| def functionFormula {n} (a b f : Fin n) : BoundedFormula n := | |
| .conj (relationBetweenFormula a b f) | |
| (.allMem a (exMem b.succ (.conj (pairMembershipFormula 1 0 f.succ.succ) | |
| (.allMem b.succ.succ (imp (pairMembershipFormula 2 0 f.succ.succ.succ) (.equal 0 1)))))) | |
| def nonemptyFormula {n} (x : Fin n) : BoundedFormula n := exMem x (.equal 0 0) | |
| def choiceFunctionFormula {n} (a f : Fin n) : BoundedFormula n := | |
| .conj (.allMem f (exMem a.succ (exMem 0 (orderedPairFormula 2 1 0)))) | |
| (.allMem a (exMem 0 (.conj (pairMembershipFormula 1 0 f.succ.succ) | |
| (.allMem 1 (imp (pairMembershipFormula 2 0 f.succ.succ.succ) (.equal 0 1)))))) | |
| end BoundedFormula | |
| structure TransitiveGround where | |
| sets : Set ZFSet.{u} | |
| transitive : β {x y}, x β sets β y β x β y β sets | |
| structure InjectionCode (D N f : ZFSet.{u}) : Prop where | |
| function : ZFSet.IsFunc D N f | |
| injective : β x y z, ZFSet.pair x z β f β ZFSet.pair y z β f β x = y | |
| namespace TransitiveGround | |
| open SetFormula | |
| variable (M : TransitiveGround.{u}) | |
| def groundEmbeddable (D N : ZFSet.{u}) : Prop := β f β M.sets, InjectionCode D N f | |
| end TransitiveGround | |
| def setTransitive (x : ZFSet.{u}) : Prop := β y β x, β z β y, z β x | |
| def ordinalSetProperty (x : ZFSet.{u}) : Prop := | |
| setTransitive x β§ β y β x, setTransitive y | |
| namespace TransitiveGround | |
| open SetFormula | |
| variable (M : TransitiveGround.{u}) | |
| noncomputable def groundPower (B : ZFSet.{u}) : ZFSet.{u} := | |
| ZFSet.sep (fun p => p β M.sets) (ZFSet.powerset B) | |
| end TransitiveGround | |
| def GroundBelow (M : TransitiveGround.{u}) (A K : ZFSet.{u}) : Prop := | |
| β Ξ² β K, M.groundEmbeddable A Ξ² | |
| def GroundCardinal (M : TransitiveGround.{u}) (ΞΊ : ZFSet.{u}) : Prop := | |
| ordinalSetProperty ΞΊ β§ β Ξ² β ΞΊ, Β¬ M.groundEmbeddable ΞΊ Ξ² | |
| def CofinalFunctionCode (Ξ± K f : ZFSet.{u}) : Prop := | |
| ZFSet.IsFunc Ξ± K f β§ β Ξ² β K, β x β Ξ±, β y β K, | |
| ZFSet.pair x y β f β§ (Ξ² = y β¨ Ξ² β y) | |
| def GroundCofinalRegular (M : TransitiveGround.{u}) (K : ZFSet.{u}) : Prop := | |
| β Ξ± β K, β f β M.sets, Β¬ CofinalFunctionCode Ξ± K f | |
| def GroundCardinalStrongLimit (M : TransitiveGround.{u}) (K : ZFSet.{u}) : Prop := | |
| β ΞΊ β K, GroundCardinal M ΞΊ β GroundBelow M (M.groundPower ΞΊ) K | |
| def GroundStandardInaccessible (M : TransitiveGround.{u}) (K : ZFSet.{u}) : Prop := | |
| GroundCardinal M K β§ Β¬ M.groundEmbeddable K ZFSet.omega β§ | |
| GroundCofinalRegular M K β§ GroundCardinalStrongLimit M K | |
| namespace SetFormula | |
| def extensionality : SetFormula 0 := | |
| .all (.all (imp | |
| (.all (.conj (imp (.mem 0 2) (.mem 0 1)) (imp (.mem 0 1) (.mem 0 2)))) | |
| (.equal 1 0))) | |
| def foundation : SetFormula 0 := | |
| .all (imp (ex (.mem 0 1)) | |
| (ex (.conj (.mem 0 1) (.all (.neg (.conj (.mem 0 2) (.mem 0 1))))))) | |
| def emptySet : SetFormula 0 := ex (.all (.neg (.mem 0 1))) | |
| def pairing : SetFormula 0 := | |
| .all (.all (ex (.all (.conj | |
| (imp (.mem 0 1) (disj (.equal 0 3) (.equal 0 2))) | |
| (imp (disj (.equal 0 3) (.equal 0 2)) (.mem 0 1)))))) | |
| def union : SetFormula 0 := | |
| .all (ex (.all (.conj | |
| (imp (.mem 0 1) (ex (.conj (.mem 0 3) (.mem 1 0)))) | |
| (imp (ex (.conj (.mem 0 3) (.mem 1 0))) (.mem 0 1))))) | |
| def powerSet : SetFormula 0 := | |
| .all (ex (.all (.conj | |
| (imp (.mem 0 1) (.all (imp (.mem 0 1) (.mem 0 3)))) | |
| (imp (.all (imp (.mem 0 1) (.mem 0 3))) (.mem 0 1))))) | |
| def SeparationSchema (U : Set ZFSet.{u}) : Prop := | |
| β {n} (Ο : SetFormula (n + 1)) (params : Fin n β ZFSet.{u}), | |
| (β i, params i β U) β β x β U, β y β U, | |
| β z β U, z β y β z β x β§ Realize U Ο (extend z params) | |
| def CollectionSchema (U : Set ZFSet.{u}) : Prop := | |
| β {n} (Ο : SetFormula (n + 2)) (params : Fin n β ZFSet.{u}), | |
| (β i, params i β U) β β a β U, | |
| (β x β U, x β a β β y β U, Realize U Ο (extend x (extend y params))) β | |
| β b β U, β x β U, x β a β | |
| β y β U, y β b β§ Realize U Ο (extend x (extend y params)) | |
| def emptySetFormula {n : Nat} (x : Fin n) : SetFormula n := .all (.neg (.mem 0 x.succ)) | |
| def successorFormula {n : Nat} (y x : Fin n) : SetFormula n := | |
| .all (.conj (imp (.mem 0 y.succ) (disj (.equal 0 x.succ) (.mem 0 x.succ))) | |
| (imp (disj (.equal 0 x.succ) (.mem 0 x.succ)) (.mem 0 y.succ))) | |
| def infinity : SetFormula 0 := | |
| ex (.conj (ex (.conj (.mem 0 1) (emptySetFormula 0))) | |
| (.all (imp (.mem 0 1) (ex (.conj (.mem 0 2) (successorFormula 0 1)))))) | |
| def choice : SetFormula 0 := | |
| .all (imp (BoundedFormula.allMem 0 (BoundedFormula.nonemptyFormula 0)).toFormula | |
| (ex (BoundedFormula.choiceFunctionFormula 1 0).toFormula)) | |
| def ReplacementSchema (U : Set ZFSet.{u}) : Prop := | |
| β {n} (Ο : SetFormula (n + 2)) (params : Fin n β ZFSet.{u}), | |
| (β i, params i β U) β β A β U, | |
| (β x β U, x β A β β y β U, Realize U Ο (extend x (extend y params)) β§ | |
| β z β U, Realize U Ο (extend x (extend z params)) β z = y) β | |
| β B β U, β y β U, y β B β β x β U, x β A β§ Realize U Ο (extend x (extend y params)) | |
| def finiteZFAxioms : SetFormula 0 := | |
| .conj extensionality (.conj foundation (.conj emptySet | |
| (.conj pairing (.conj SetFormula.union (.conj powerSet infinity))))) | |
| def ZFRealization (U : Set ZFSet.{u}) : Prop := | |
| Realize U finiteZFAxioms Fin.elim0 β§ SeparationSchema U β§ ReplacementSchema U | |
| end SetFormula | |
| namespace BoundedFormula | |
| open SetFormula | |
| def injectionFormula {n} (d c f : Fin n) : BoundedFormula n := | |
| .conj (functionFormula d c f) (.allMem d (.allMem d.succ (.allMem c.succ.succ | |
| (imp (.conj (pairMembershipFormula 2 0 f.succ.succ.succ) | |
| (pairMembershipFormula 1 0 f.succ.succ.succ)) (.equal 2 1))))) | |
| end BoundedFormula | |
| namespace SetFormula | |
| def hasInjectionFormula {n} (d c : Fin n) : SetFormula n := | |
| ex (BoundedFormula.injectionFormula d.succ c.succ 0).toFormula | |
| end SetFormula | |
| namespace BoundedFormula | |
| open SetFormula | |
| def surjectionFormula {n : Nat} (a b f : Fin n) : BoundedFormula n := | |
| .conj (functionFormula a b f) | |
| (.allMem b (exMem a.succ (pairMembershipFormula 0 1 f.succ.succ))) | |
| end BoundedFormula | |
| namespace SetFormula | |
| def partitionPrinciple : SetFormula 0 := | |
| .all (.all (.all (imp (BoundedFormula.surjectionFormula (n := 3) 2 1 0).toFormula | |
| (hasInjectionFormula (n := 3) 1 2)))) | |
| end SetFormula | |
| end PartitionPilot.Forcing | |
| end OAI | |