File size: 4,016 Bytes
e3e0a0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import OAI.SetTheory.PartitionPrinciple.Geometry.GroundDefinableSelections

namespace OAI


namespace PartitionPilot.Forcing.SetFormula

def forcingWitnessFormula {k n m : Nat} (A : ForcingPrimitives k) (φ : SetFormula (n + 2))
    (params : Fin k → Fin m) (names : Fin n → Fin m) (z y : Fin m) : SetFormula m :=
  ex (exConditions (params A.carrier).succ
    (.conj (orderedPairFormula z.succ.succ 1 0)
      (.conj (domainApplication A.domain (fun j => (params j).succ.succ) 1)
        (.conj (domainApplication A.domain (fun j => (params j).succ.succ) y.succ.succ)
          (forcingTranslation A φ (fun j => (params j).succ.succ) 0
            (extend 1 (extend y.succ.succ (fun j => (names j).succ.succ))))))))

end PartitionPilot.Forcing.SetFormula

namespace PartitionPilot.Forcing.TransitiveGround

open SetRealization SetFormula
universe u
variable (M : TransitiveGround.{u}) {P : Type u} [Preorder P] (s : Presentation P)

theorem realize_forcingWitnessFormula (D : Name.NameDomain s)
    (ground : ∀ τ ∈ D.names, τ.val ∈ M.sets)
    (pairing : Realize M.sets SetFormula.pairing Fin.elim0)
    (carrier : s.carrier ∈ M.sets) (order : s.conditionOrder ∈ M.sets)
    {k n m : Nat} (A : ForcingPrimitives k) (φ : SetFormula (n + 2))
    (params : Fin k → Fin m) (names : Fin n → Fin m) (zi yi : Fin m) (env : Fin m → ZFSet.{u})
    (hc : env (params A.carrier) = s.carrier) (ho : env (params A.order) = s.conditionOrder)
    (atomic : M.EqualityMeaning s D A.equality (fun j => env (params j)))
    (domain : M.DomainMeaning s D A.domain (fun j => env (params j)))
    (nameEnv : Assignment D n) (hnames : ∀ i, env (names i) = (nameEnv i).val.val)
    (hz : env zi ∈ M.sets) (hy : env yi ∈ M.sets) :
    Realize M.sets (forcingWitnessFormula A φ params names zi yi) env ↔
      ∃ σ : D.names, ∃ p, env zi = ZFSet.pair σ.val.val (s.encode p) ∧
        ∃ ρ : D.names, ρ.val.val = env yi ∧ Forces D φ (extend σ (extend ρ nameEnv)) p := by
  rw [forcingWitnessFormula, realize_ex]
  constructor
  · rintro ⟨x, hx, body⟩
    obtain ⟨p, shape, source, target, forced⟩ := (M.realize_exConditions s (params A.carrier).succ _
      (extend x env) carrier hc).1 body
    rw [realize_domainApplication] at source target
    obtain ⟨σ, eq⟩ := (domain x hx).1 source
    obtain ⟨ρ, eqρ⟩ := (domain (env yi) hy).1 target
    let e := extend (s.encode p) (extend x env)
    have raw := (M.realize_orderedPairFormula pairing zi.succ.succ 1 0 e hz hx
      (M.transitive carrier (s.encode_mem p))).1 shape
    refine ⟨σ, p, raw.trans (congrArg (fun z => ZFSet.pair z (s.encode p)) eq.symm), ρ, eqρ, ?_⟩
    exact (M.realize_forcingTranslation s D ground pairing carrier order A φ
      (fun j => (params j).succ.succ) 0 (extend 1 (extend yi.succ.succ (fun j => (names j).succ.succ)))
      e hc ho atomic domain p (extend σ (extend ρ nameEnv)) rfl
      (Fin.cases eq.symm (Fin.cases eqρ.symm hnames))).1 forced
  · rintro ⟨σ, p, shape, ρ, eqρ, forced⟩
    refine ⟨σ.val.val, ground σ.val σ.property, ?_⟩
    apply (M.realize_exConditions s (params A.carrier).succ _ (extend σ.val.val env) carrier hc).2
    let e := extend (s.encode p) (extend σ.val.val env)
    refine ⟨p, ?_, ?_, ?_, ?_⟩
    · exact (M.realize_orderedPairFormula pairing zi.succ.succ 1 0 e hz (ground σ.val σ.property)
        (M.transitive carrier (s.encode_mem p))).2 shape
    · rw [realize_domainApplication]
      exact (domain σ.val.val (ground σ.val σ.property)).2 ⟨σ, rfl⟩
    · rw [realize_domainApplication]
      exact (domain (env yi) hy).2 ⟨ρ, eqρ⟩
    · exact (M.realize_forcingTranslation s D ground pairing carrier order A φ
        (fun j => (params j).succ.succ) 0 (extend 1 (extend yi.succ.succ (fun j => (names j).succ.succ)))
        e hc ho atomic domain p (extend σ (extend ρ nameEnv)) rfl
        (Fin.cases rfl (Fin.cases eqρ.symm hnames))).2 forced

end PartitionPilot.Forcing.TransitiveGround

end OAI