File size: 3,464 Bytes
9dbc64e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Computability.DegreeRigidity.OrdinalCodes.TrimmedSumGraph

namespace OAI

namespace TuringRigidity.OrdinalArithmetic
open TransitiveNameModel BoundedSetTheory RelationCollapse ElementaryModel RelativeConstructible OrdinalCoding
universe u

theorem sum_graph_spec_with_internal_nodes (A : ZFSet.{u}) (hA : Transitive A) (a b : Ordinal.{u}) (hω : ZFSet.omega.{u} ∈ A)
    (ha : a.toZFSet ∈ A) (hb : b.toZFSet ∈ A)
    (h0 : (∅ : ZFSet.{u}) ∈ A) (h1 : ({∅} : ZFSet.{u}) ∈ A)
    (hlocal : ∀ t < b, (a+t).toZFSet ∈ A ∧ SumCertificates (A) a t)
    (hnodes : sumDomain a.toZFSet b.toZFSet ⊆ A)
    (z : ZFSet.{u}) (hz : z ∈ A) :
    trimmedSumGraphSentence.Sat (A : Set ZFSet)
      (cons z (cons a.toZFSet (cons b.toZFSet (cons ∅ (fun _ => {∅}))))) ↔
        ∃ x ∈ sumDomain a.toZFSet b.toZFSet, z = ZFSet.pair x (sumValue a x) := by
  let e := cons z (cons a.toZFSet (cons b.toZFSet (cons ∅ (fun _ => {∅}))))
  have he (i : ℕ) : e i ∈ A := by
    rcases i with _|_|_|_|i; exact hz; exact ha; exact hb; exact h0; exact h1
  rw [trimmedSumGraphSentence_semantics A hA e he]
  constructor
  · rintro ⟨t,ht,x,hx,y,hy,hleft|⟨hright,hq⟩⟩
    · obtain ⟨hta,hxdef,hzdef,hydef⟩ := hleft
      change x = leftNode t at hxdef
      refine ⟨x,(mem_sumDomain _ _ _).mpr (Or.inl ⟨t,hta,hxdef⟩),?_⟩
      change z = ZFSet.pair x y at hzdef
      rw [hzdef,hydef,hxdef,sumValue_left]
    · obtain ⟨htb,hxdef,hzdef⟩ := hright
      change t ∈ b.toZFSet at htb
      obtain ⟨t,htb,rfl⟩ := Ordinal.mem_toZFSet_iff.mp htb
      have htb := Ordinal.toZFSet_mem_toZFSet_iff.mp htb
      have hE : ∀ i, cons y (cons x (cons t.toZFSet e)) i ∈ A := by
        intro i; rcases i with _|_|_|i; exact hy; exact hx; exact ht; exact he i
      have hydef := codeSumAt_sound A hA 0 4 2 _ hE a t rfl rfl hq
      change x = rightNode t.toZFSet at hxdef
      refine ⟨x,(mem_sumDomain _ _ _).mpr (Or.inr
        ⟨t.toZFSet,Ordinal.toZFSet_mem_toZFSet_iff.mpr htb,hxdef⟩),?_⟩
      change z = ZFSet.pair x y at hzdef
      change y = (a+t).toZFSet at hydef
      rw [hzdef,hydef,hxdef,sumValue_right,Ordinal.rank_toZFSet]
  · rintro ⟨x,hx,hzdef⟩
    rcases (mem_sumDomain _ _ _).mp hx with ⟨t,ht,rfl⟩|⟨t,ht,rfl⟩
    · have htA := hA _ ha _ ht
      have hxA := hnodes ((mem_sumDomain _ _ _).mpr (Or.inl ⟨t,ht,rfl⟩))
      refine ⟨t,htA,_,hxA,t,htA,Or.inl ⟨ht,rfl,?_,rfl⟩⟩
      rw [sumValue_left] at hzdef
      simpa only [e,cons_zero,leftNode] using hzdef
    · obtain ⟨t,ht,rfl⟩ := Ordinal.mem_toZFSet_iff.mp ht
      have ht := Ordinal.toZFSet_mem_toZFSet_iff.mp ht
      have htA := hA _ hb _ (Ordinal.toZFSet_mem_toZFSet_iff.mpr ht)
      have hxA := hnodes ((mem_sumDomain _ _ _).mpr (Or.inr ⟨t.toZFSet,Ordinal.toZFSet_mem_toZFSet_iff.mpr ht,rfl⟩))
      obtain ⟨hy,hq⟩ := hlocal t ht
      let E := cons (a+t).toZFSet (cons (rightNode t.toZFSet) (cons t.toZFSet e))
      have hE (i : ℕ) : E i ∈ A := by
        rcases i with _|_|_|i; exact hy; exact hxA; exact htA; exact he i
      refine ⟨t.toZFSet,htA,_,hxA,(a+t).toZFSet,hy,Or.inr
        ⟨⟨Ordinal.toZFSet_mem_toZFSet_iff.mpr ht,rfl,?_⟩,?_⟩⟩
      · rw [sumValue_right,Ordinal.rank_toZFSet] at hzdef
        simpa only [e,cons_zero,rightNode] using hzdef
      · exact codeSumAt_of_certificates A hA hω 0 4 2 E hE a t rfl rfl hq rfl

end TuringRigidity.OrdinalArithmetic

end OAI