math / data /lean /OAI /SetTheory /PartitionPrinciple /Definability /CodedEqualityRelations.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.91 kB
import OAI.SetTheory.PartitionPrinciple.Geometry.GroundEqualityStep
namespace OAI
section
namespace PartitionPilot.Forcing.SetFormula
def tripleMembershipFormula {n : Nat} (p x y r : Fin n) : SetFormula n :=
ex (.conj (orderedPairFormula 0 x.succ y.succ)
(pairMembershipFormula p.succ 0 r.succ))
end PartitionPilot.Forcing.SetFormula
namespace PartitionPilot.Forcing.Name
open SetRealization
universe u
variable {P : Type u} (s : Presentation P)
def codedEqualityRelation (S : ZFSet.{u}) (p : P) (Οƒ Ο„ : Name s) : Prop :=
ZFSet.pair (s.encode p) (ZFSet.pair Οƒ.val Ο„.val) ∈ S
theorem codedEqualityRelation_mono {S T : ZFSet.{u}} (h : S βŠ† T) (p : P) (Οƒ Ο„ : Name s) :
codedEqualityRelation s S p Οƒ Ο„ β†’ codedEqualityRelation s T p Οƒ Ο„ :=
fun member => h member
end PartitionPilot.Forcing.Name
namespace PartitionPilot.Forcing.TransitiveGround
open SetRealization SetFormula
universe u
variable (M : TransitiveGround.{u})
theorem realize_tripleMembershipFormula
(pairing : Realize M.sets SetFormula.pairing Fin.elim0)
{n : Nat} (p x y r : Fin n) (env : Fin n β†’ ZFSet.{u})
(hp : env p ∈ M.sets) (hx : env x ∈ M.sets)
(hy : env y ∈ M.sets) (hr : env r ∈ M.sets) :
Realize M.sets (tripleMembershipFormula p x y r) env ↔
ZFSet.pair (env p) (ZFSet.pair (env x) (env y)) ∈ env r := by
rw [tripleMembershipFormula, realize_ex]
constructor
· rintro ⟨z, hz, shape, member⟩
have eq := (M.realize_orderedPairFormula pairing 0 x.succ y.succ
(extend z env) hz hx hy).1 shape
have raw := (M.realize_pairMembershipFormula pairing p.succ 0 r.succ
(extend z env) hp hz hr).1 member
change z = ZFSet.pair (env x) (env y) at eq
change ZFSet.pair (env p) z ∈ env r at raw
exact eq β–Έ raw
Β· intro member
have hz := M.orderedPair_mem pairing hx hy
refine ⟨ZFSet.pair (env x) (env y), hz, ?_, ?_⟩
Β· exact (M.realize_orderedPairFormula pairing 0 x.succ y.succ
(extend (ZFSet.pair (env x) (env y)) env) hz hx hy).2 rfl
Β· exact (M.realize_pairMembershipFormula pairing p.succ 0 r.succ
(extend (ZFSet.pair (env x) (env y)) env) hp hz hr).2 member
variable {P : Type u} (s : Presentation P)
theorem relationMeaning_coded (D : Name.NameDomain s)
(ground : βˆ€ Ο„ ∈ D.names, Ο„.val ∈ M.sets)
(pairing : Realize M.sets SetFormula.pairing Fin.elim0)
(carrier : s.carrier ∈ M.sets)
{k : Nat} (r : Fin k) (constants : Fin k β†’ ZFSet.{u})
(hr : constants r ∈ M.sets) :
M.RelationMeaning s D (Name.codedEqualityRelation s (constants r))
(tripleMembershipFormula 0 1 2 r.succ.succ.succ) constants := by
intro p Οƒ Ο„
exact M.realize_tripleMembershipFormula pairing 0 1 2 r.succ.succ.succ _
(M.transitive carrier (s.encode_mem p)) (ground Οƒ.val Οƒ.property)
(ground Ο„.val Ο„.property) hr
theorem coded_postfixed_sound [Preorder P] (D : Name.NameDomain s) (S : ZFSet.{u})
(post : βˆ€ Οƒ ∈ D.names, βˆ€ Ο„ ∈ D.names, βˆ€ p,
Name.codedEqualityRelation s S p Οƒ Ο„ β†’
Name.EqualityStep (Name.codedEqualityRelation s S) p Οƒ Ο„)
{Οƒ Ο„ : Name s} (hΟƒ : Οƒ ∈ D.names) (hΟ„ : Ο„ ∈ D.names) (p : P) :
Name.codedEqualityRelation s S p Οƒ Ο„ β†’ Name.ForcesEq p Οƒ Ο„ :=
Name.postfixed_equality_sound D (Name.codedEqualityRelation s S) post σ hσ τ hτ p
theorem coded_fixed_iff [Preorder P] (D : Name.NameDomain s) (S : ZFSet.{u})
(fixed : βˆ€ Οƒ ∈ D.names, βˆ€ Ο„ ∈ D.names, βˆ€ p,
Name.codedEqualityRelation s S p Οƒ Ο„ ↔
Name.EqualityStep (Name.codedEqualityRelation s S) p Οƒ Ο„)
{Οƒ Ο„ : Name s} (hΟƒ : Οƒ ∈ D.names) (hΟ„ : Ο„ ∈ D.names) (p : P) :
Name.codedEqualityRelation s S p Οƒ Ο„ ↔ Name.ForcesEq p Οƒ Ο„ :=
Name.fixed_equality_iff D (Name.codedEqualityRelation s S) fixed hσ hτ p
end PartitionPilot.Forcing.TransitiveGround
end
end OAI