File size: 4,530 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import OAI.Computability.DegreeRigidity.OrdinalCodes.OmegaModelCore

namespace OAI

namespace TuringRigidity.OmegaModelCore
open BoundedSetTheory TransitiveNameModel SetModelReals
universe u
noncomputable section
namespace OmegaData
variable {α : Type u} (S : OmegaData α)

def collapse : S.Core → ZFSet.{u} := S.core_wellFounded.fix
  (fun x rec => ZFSet.range (fun y : {y : S.Core // S.Rel y x} => rec y.val y.property))

theorem collapse_eq (x : S.Core) :
    S.collapse x = ZFSet.range (fun y : {y : S.Core // S.Rel y x} => S.collapse y.val) := by
  rw [collapse,WellFounded.fix_eq]

@[simp] theorem mem_collapse (x : S.Core) (z : ZFSet.{u}) :
    z ∈ S.collapse x ↔ ∃ y : S.Core, S.Rel y x ∧ z = S.collapse y := by
  rw [S.collapse_eq,ZFSet.mem_range]
  constructor
  · rintro ⟨⟨y,hy⟩,he⟩
    exact ⟨y,hy,he.symm⟩
  · rintro ⟨y,hy,he⟩
    exact ⟨⟨y,hy⟩,he.symm⟩

theorem collapse_injective : Function.Injective S.collapse := by
  intro x
  induction x using S.core_wellFounded.induction with
  | h x ih =>
    intro y he
    apply S.core_extensional
    intro z
    constructor
    · intro hz
      have hm : S.collapse z ∈ S.collapse y := he ▸ (S.mem_collapse x _).mpr ⟨z,hz,rfl⟩
      obtain ⟨w,hw,hew⟩ := (S.mem_collapse y _).mp hm
      have hzw := ih z hz hew
      exact hzw ▸ hw
    · intro hz
      have hm : S.collapse z ∈ S.collapse x := he.symm ▸ (S.mem_collapse y _).mpr ⟨z,hz,rfl⟩
      obtain ⟨w,hw,hew⟩ := (S.mem_collapse x _).mp hm
      have hwz := ih w hw hew.symm
      exact hwz ▸ hw

@[simp] theorem collapse_mem_iff (x y : S.Core) : S.collapse x ∈ S.collapse y ↔ S.Rel x y := by
  rw [S.mem_collapse]
  constructor
  · rintro ⟨z,hz,he⟩
    exact S.collapse_injective he ▸ hz
  · intro h
    exact ⟨x,h,rfl⟩

def collapsedModel : ZFSet.{u} := ZFSet.range S.collapse

@[simp] theorem mem_collapsedModel (z : ZFSet.{u}) :
    z ∈ S.collapsedModel ↔ ∃ x : S.Core, z = S.collapse x := by
  rw [collapsedModel,ZFSet.mem_range]
  exact exists_congr (fun x => eq_comm)

theorem collapsedModel_transitive : Transitive S.collapsedModel := by
  intro x hx y hy
  obtain ⟨a,rfl⟩ := (S.mem_collapsedModel x).mp hx
  obtain ⟨b,hb,rfl⟩ := (S.mem_collapse a y).mp hy
  exact (S.mem_collapsedModel _).mpr ⟨b,rfl⟩

def numNode (n : ℕ) : S.Core := ⟨S.num n,0,(S.omega_mem _).mpr ⟨n,rfl⟩⟩

theorem rel_numNode (x : S.Core) (n : ℕ) :
    S.Rel x (S.numNode n) ↔ ∃ k < n, x = S.numNode k := by
  change S.mem x.val (S.num n) ↔ _
  rw [S.num_mem]
  constructor
  · rintro ⟨k,hk,he⟩
    exact ⟨k,hk,Subtype.ext he⟩
  · rintro ⟨k,hk,rfl⟩
    exact ⟨k,hk,rfl⟩

theorem collapse_num (n : ℕ) : S.collapse (S.numNode n) = natSet n := by
  induction n using Nat.strong_induction_on with
  | h n ih =>
    apply ZFSet.ext
    intro z
    rw [S.mem_collapse,mem_natSet]
    constructor
    · rintro ⟨x,hx,hz⟩
      obtain ⟨k,hk,rfl⟩ := (S.rel_numNode x n).mp hx
      exact ⟨k,hk,hz.trans (ih k hk)⟩
    · rintro ⟨k,hk,rfl⟩
      exact ⟨S.numNode k,(S.rel_numNode _ n).mpr ⟨k,hk,rfl⟩,(ih k hk).symm⟩

def omegaNode : S.Core := ⟨S.omega,1,(S.mem_power S.omega S.omega).mpr (fun _ h => h)⟩

theorem collapse_omega : S.collapse S.omegaNode = ZFSet.omega := by
  apply ZFSet.ext
  intro z
  rw [S.mem_collapse,mem_omega]
  constructor
  · rintro ⟨x,hx,hz⟩
    obtain ⟨n,hn⟩ := (S.omega_mem x.val).mp hx
    have he : x = S.numNode n := Subtype.ext hn
    exact ⟨n,by rw [hz,he,S.collapse_num]⟩
  · rintro ⟨n,rfl⟩
    exact ⟨S.numNode n,(S.omega_mem _).mpr ⟨n,rfl⟩,(S.collapse_num n).symm⟩

theorem collapsedModel_omega : ZFSet.omega.{u} ∈ S.collapsedModel :=
  (S.mem_collapsedModel _).mpr ⟨S.omegaNode,S.collapse_omega.symm⟩

theorem collapse_real (x : α) (hx : S.mem x (S.power S.omega)) :
    ∃ A : TuringRigidity.Oracle,
      S.collapse (⟨x,1,hx⟩ : S.Core) = realSet A ∧
      ∀ n, A n = true ↔ S.mem (S.num n) x := by
  let c : S.Core := ⟨x,1,hx⟩
  have hsub : S.collapse c ⊆ ZFSet.omega := by
    intro z hz
    obtain ⟨y,hy,rfl⟩ := (S.mem_collapse c z).mp hz
    have hyω := (S.mem_power _ _).mp hx y.val hy
    rw [←S.collapse_omega,S.collapse_mem_iff]
    exact hyω
  refine ⟨oracleOf (S.collapse c),(realSet_oracleOf hsub).symm,?_⟩
  intro n
  simp only [oracleOf,decide_eq_true_eq]
  rw [←S.collapse_num,S.collapse_mem_iff]
  rfl

end OmegaData
end
end TuringRigidity.OmegaModelCore

end OAI