File size: 18,007 Bytes
3277efa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
import OAI.SetTheory.PartitionPrinciple.Definability.CodedLayerRestrictions
import OAI.SetTheory.PartitionPrinciple.Geometry.GroundExternalSlotCopies
import OAI.SetTheory.PartitionPrinciple.Transfinite.ExternalChronologyStageLaws

namespace OAI


namespace PartitionPilot.Forcing
open SetFormula
universe u

namespace GroundExternalBirthData
variable {M : TransitiveGround.{u}} {initial : RecursiveStateData.{u}}
variable {I Sources Reps G m one T τ P0 r0 μ0 A0 oldTimes oldBirth : ZFSet.{u}}
variable {completion : GroundCompressionCompletion M initial I Sources Reps G m one T τ}
variable (births : GroundExternalBirthData M initial I Sources Reps G m one T τ P0 r0 μ0 A0 oldTimes oldBirth completion)
local notation "U" => completion.algebra.union.fields 0
local notation "B" => completion.externalPointCarrier P0 r0 μ0 A0
local notation "V" => M.externalStarVertices G (externalChildLetters I P0 (externalRectangles P0 G r0 μ0 A0))
  (externalRequestCarrier I P0 (externalRectangles P0 G r0 μ0 A0)) m one
local notation "owner" => completion.externalStarOwner P0 r0 μ0 A0

noncomputable def layerFiber (k : Nat) : ZFSet.{u} := layerBirthFiber B births.birth (compressionStamp oldTimes k)
noncomputable def layerOwners (k : Nat) : ZFSet.{u} := relationImage (births.layerFiber k) V owner
noncomputable def layerComponents (k : Nat) : ZFSet.{u} := graphRestriction (births.layerFiber k) owner
noncomputable def layerIndices (k : Nat) : ZFSet.{u} := constantFamilyGraph (births.layerOwners k) oldTimes
noncomputable def layerMaps (k : Nat) : ZFSet.{u} :=
  completion.externalSlotCopyMaps P0 r0 μ0 A0 (births.layerOwners k) (natSetCode (k % 3))
noncomputable def layerWitness (k : Nat) : ZFSet.{u} :=
  separatedLayerWitness (births.layerOwners k) (births.layerIndices k) (births.layerMaps k)
    (M.groundRelations U B) (births.layerComponents k) (births.layerFiber k)

theorem mem_layerFiber (k : Nat) (x : ZFSet.{u}) :
    x ∈ births.layerFiber k ↔ x ∈ B ∧ ZFSet.pair x (compressionStamp oldTimes k) ∈ births.birth :=
  mem_layerBirthFiber _ _ _ _

theorem layerFiber_level {k : Nat} {x : ZFSet.{u}} (hx : x ∈ births.layerFiber k) :
    ZFSet.pair x (natSetCode k) ∈ completion.externalOwnerLevels P0 r0 μ0 A0 :=
  ((births.stamp_fiber k x).1 ((births.mem_layerFiber k x).1 hx).2).2

theorem layerOwners_cases {k : Nat} {v : ZFSet.{u}} (hv : v ∈ births.layerOwners k) :
    v ∈ V ∧ ∃ x ∈ births.layerFiber k, ZFSet.pair x v ∈ owner :=
  (mem_relationImage _ _ _ _).1 hv

variable {inv : ZFSet.{u}}
variable (data : GroundExternalGeometryInputs M initial I Sources Reps G m inv one T τ P0 r0 μ0 A0 completion)
variable (group : GroupCode G m inv one) (oldAction : PosetActionCode G P0 m one r0 A0)
variable (pairing : Realize M.sets SetFormula.pairing Fin.elim0)
variable (unions : Realize M.sets SetFormula.union Fin.elim0)
variable (powers : Realize M.sets powerSet Fin.elim0) (separation : SeparationSchema M.sets)
variable (infinite : Realize M.sets infinity Fin.elim0) (hG : G ∈ M.sets) (hP0 : P0 ∈ M.sets)
include data group oldAction pairing unions powers separation infinite hG hP0

theorem layer_fields_ground (k : Nat) :
    births.layerFiber k ∈ M.sets ∧ births.layerOwners k ∈ M.sets ∧
      births.layerComponents k ∈ M.sets ∧ births.layerIndices k ∈ M.sets ∧
      births.layerMaps k ∈ M.sets ∧ M.groundRelations U B ∈ M.sets := by
  have geometry := data.externalGeometryData group oldAction pairing unions powers separation infinite hG hP0
  have owners := data.externalStarOwner_ground_function group oldAction pairing unions powers separation infinite hG hP0
  have vertices := (data.externalStarCarriers_ground pairing unions powers separation hG).1
  have fiber := M.layerBirthFiber_mem separation geometry.carrier_ground births.birth_ground
    (M.transitive births.limit_ground (births.times.stamp_mem_limit k))
  have active := M.relationImage_mem separation fiber vertices owners.1
  have components := M.graphRestriction_mem unions separation fiber owners.1
  have indices := M.constantFamilyGraph_mem pairing unions powers separation active
    (M.transitive births.limit_ground births.times.base_mem_limit)
  have maps := data.externalSlotCopyMaps_spec group oldAction pairing unions powers separation infinite hG hP0
    active (M.natSetCode_mem separation infinite (k % 3))
  exact ⟨fiber, active, components, indices, maps.1,
    M.groundRelations_mem pairing unions powers separation (completion.algebra.union.ground 0) geometry.carrier_ground⟩

theorem layerComponents_function (k : Nat) :
    ZFSet.IsFunc (births.layerFiber k) (births.layerOwners k) (births.layerComponents k) := by
  have ownerCode := (data.externalStarOwner_ground_function group oldAction pairing unions powers separation infinite hG hP0).2
  have restricted := (show FunctionGraphOn B owner from ⟨V, ownerCode⟩).restrict
    (fun x hx => (births.mem_layerFiber k x).1 hx |>.1)
  apply isFunc_retarget_of_entries restricted.to_isFunc
  intro x v entry
  obtain ⟨owned, hx⟩ := pair_mem_graphRestriction.1 entry
  exact (mem_relationImage _ _ _ _).2
    ⟨(ZFSet.pair_mem_prod.1 (ownerCode.1 owned)).2, x, hx, owned⟩

omit data group oldAction pairing unions powers separation infinite hG hP0 in
theorem layerIndices_function (k : Nat) :
    ZFSet.IsFunc (births.layerOwners k) (compressionStamp oldTimes k) (births.layerIndices k) := by
  apply isFunc_retarget_of_entries (constantFamilyGraph_function (births.layerOwners k) oldTimes)
  intro v t entry
  rw [((pair_mem_constantFamilyGraph _ _ _ _).1 entry).2]
  exact compressionStamp_base_mem oldTimes k

theorem layerMaps_spec (k : Nat) :
    ZFSet.IsFunc (births.layerOwners k) (M.groundRelations U B) (births.layerMaps k) ∧
      ∀ v e, ZFSet.pair v e ∈ births.layerMaps k ↔ v ∈ births.layerOwners k ∧
        e = indexedRelationSection U B (completion.externalSlotCopyRelation P0 r0 μ0 A0 (natSetCode (k % 3))) v := by
  exact (data.externalSlotCopyMaps_spec group oldAction pairing unions powers separation infinite hG hP0
    (births.layer_fields_ground data group oldAction pairing unions powers separation infinite hG hP0 k).2.1
    (M.natSetCode_mem separation infinite (k % 3))).2

theorem layerWitness_ground (k : Nat) : births.layerWitness k ∈ M.sets := by
  have ground := births.layer_fields_ground data group oldAction pairing unions powers separation infinite hG hP0 k
  exact M.separatedLayerWitness_mem pairing unions ground.2.1 ground.2.2.2.1
    ground.2.2.2.2.1 ground.2.2.2.2.2 ground.2.2.1 ground.1

end GroundExternalBirthData
end PartitionPilot.Forcing




namespace PartitionPilot.Forcing.GroundExternalBirthData
open SetFormula SetRealization Compression Compression.RecursiveMaps.CosetGeometry
universe u
variable {M : TransitiveGround.{u}} {initial : RecursiveStateData.{u}}
variable {I Sources Reps G m inv one T τ P0 r0 μ0 A0 oldTimes oldBirth : ZFSet.{u}}
variable {completion : GroundCompressionCompletion M initial I Sources Reps G m one T τ}
variable (births : GroundExternalBirthData M initial I Sources Reps G m one T τ P0 r0 μ0 A0 oldTimes oldBirth completion)
variable (data : GroundExternalGeometryInputs M initial I Sources Reps G m inv one T τ P0 r0 μ0 A0 completion)
variable (group : GroupCode G m inv one) (oldAction : PosetActionCode G P0 m one r0 A0)
variable (pairing : Realize M.sets SetFormula.pairing Fin.elim0)
variable (unions : Realize M.sets SetFormula.union Fin.elim0)
variable (powers : Realize M.sets powerSet Fin.elim0) (separation : SeparationSchema M.sets)
variable (infinite : Realize M.sets infinity Fin.elim0) (hG : G ∈ M.sets) (hP0 : P0 ∈ M.sets)
local notation "family" => completion.externalFamily group oldAction data.original
local notation "s" => completion.externalFamilyGroupPresentation group oldAction data.original
  pairing unions powers separation infinite hG data.words.letters_ground
local notation "vpres" => data.externalStarVertexPresentation group oldAction pairing unions powers separation infinite hG
local notation "U" => completion.algebra.union.fields 0
local notation "B" => completion.externalPointCarrier P0 r0 μ0 A0
local notation "P" => completion.externalSeedCarrier P0 r0 μ0 A0
local notation "owner" => completion.externalStarOwner P0 r0 μ0 A0
local notation "levels" => completion.externalOwnerLevels P0 r0 μ0 A0
include births data group oldAction pairing unions powers separation infinite hG hP0

theorem layerMaps_copy (k : Nat) {x v e : ZFSet.{u}}
    (hx : x ∈ births.layerFiber k) (owned : ZFSet.pair x v ∈ owner)
    (mapEntry : ZFSet.pair v e ∈ births.layerMaps k) :
    letI := group.toGroup
    ∃ w r, v = (vpres).encode (.inr (w, r)) ∧
      e = completion.externalCopyGraph P0 r0 μ0 A0
        ((s).encode ((family).flatWord w r (data.externalBirthCopyVertex group oldAction k r))) ∧
      x ∈ relationImage U B e := by
  let := group.toGroup
  have level := births.layerFiber_level hx
  obtain ⟨w, r, actualOwner, covered⟩ := data.externalBirthCopy_witness group oldAction
    pairing unions powers separation infinite hG hP0 k level
  have ownerCode : FunctionGraphOn B owner :=
    ⟨_, (data.externalStarOwner_ground_function group oldAction pairing unions powers separation infinite hG hP0).2⟩
  have same := ownerCode.unique owned actualOwner
  obtain ⟨n, _, rank⟩ := data.externalBirthCopy_level_slot group oldAction
    pairing unions powers separation infinite hG hP0 w r k actualOwner level
  let i := data.externalBirthCopyVertex group oldAction k r
  have slot : ((family).request r).vertexSlot i = k % 3 := by
    rw [rank, depthSlotIndex, Nat.add_mod]
    simp only [i, Nat.mul_mod, Nat.mod_self, Nat.zero_mul, Nat.zero_mod, Nat.zero_add,
      Nat.mod_eq_of_lt (((family).request r).vertexSlot_lt_three (data.externalBirthCopyVertex group oldAction k r))]
  have literal : completion.externalFamilyVertexCode group oldAction data.original r i = natSetCode (k % 3) :=
    (completion.externalFamilyVertexCode_eq_slot group oldAction data.original r i).trans
      (congrArg natSetCode slot)
  have mapEq := ((births.layerMaps_spec data group oldAction pairing unions powers separation infinite hG hP0 k).2 v e).1 mapEntry |>.2
  have sectionEq := data.externalSlotCopySection_eq group oldAction pairing unions powers separation infinite hG w r i
  rw [literal, ← same] at sectionEq
  have actual := mapEq.trans sectionEq
  exact ⟨w, r, same, actual, actual.symm ▸ covered⟩

theorem layerMaps_embedding (k : Nat) {v e : ZFSet.{u}}
    (mapEntry : ZFSet.pair v e ∈ births.layerMaps k) :
    MeetEmbeddingCode U B (completion.algebra.union.fields 1) (completion.externalPointOrder P0 r0 μ0 A0)
      (completion.algebra.union.fields 2) (completion.externalPointMeet P0 r0 μ0 A0) e := by
  let := group.toGroup
  have active := ((births.layerMaps_spec data group oldAction pairing unions powers separation infinite hG hP0 k).2 v e).1 mapEntry |>.1
  obtain ⟨_, x, hx, owned⟩ := births.layerOwners_cases active
  obtain ⟨w, r, _, rfl, _⟩ := births.layerMaps_copy data group oldAction pairing unions powers separation infinite hG hP0 k hx owned mapEntry
  have geometry := data.externalGeometryData group oldAction pairing unions powers separation infinite hG hP0
  have sc := completion.externalFamilyGroupPresentation_carrier group oldAction data.original
    pairing unions powers separation infinite hG data.words.letters_ground
  exact geometry.copies _ (sc ▸ (s).encode_mem _)

theorem layerMaps_outputs_cutoff (k n : Nat) (before : k ≤ n) {v e u y : ZFSet.{u}}
    (mapEntry : ZFSet.pair v e ∈ births.layerMaps k) (copied : ZFSet.pair u y ∈ e) :
    y ∈ births.cutoff n := by
  let := group.toGroup
  have active := ((births.layerMaps_spec data group oldAction pairing unions powers separation infinite hG hP0 k).2 v e).1 mapEntry |>.1
  obtain ⟨_, x, hx, owned⟩ := births.layerOwners_cases active
  obtain ⟨w, r, same, actual, _⟩ := births.layerMaps_copy data group oldAction pairing unions powers separation infinite hG hP0 k hx owned mapEntry
  rcases data.externalBirthCopy_level_bound group oldAction pairing unions powers separation infinite hG hP0
    w r k (same ▸ owned) (births.layerFiber_level hx) (actual ▸ copied) with old | ⟨l, bound, level⟩
  · exact births.cutoff_old n old
  · have levelCode := (data.externalOwnerLevels_ground_function group oldAction pairing unions powers separation infinite hG hP0).2
    have fresh := (mem_ownerFresh P B y).1 (ZFSet.pair_mem_prod.1 (levelCode.1 level)).1
    apply (mem_ownerLevelPrefix _ _ _ _ _).2
    refine Or.inr ⟨fresh.1, fresh.2, natSetCode l, natSetCode_mem_omega l, level, ?_⟩
    rcases Nat.lt_or_eq_of_le (Nat.le_trans bound before) with less | same
    · exact Or.inr ((natSetCode_mem_iff _ _).2 less)
    · exact Or.inl (congrArg natSetCode same)

theorem layerMaps_cutoff_embedding (k n : Nat) (before : k ≤ n) {v e : ZFSet.{u}}
    (mapEntry : ZFSet.pair v e ∈ births.layerMaps k) :
    MeetEmbeddingCode U (births.cutoff n) (completion.algebra.union.fields 1) (births.cutoffOrder n)
      (completion.algebra.union.fields 2) (births.cutoffMeet n) e :=
  (births.layerMaps_embedding data group oldAction pairing unions powers separation infinite hG hP0 k mapEntry).restrictTarget
    (fun _ _ copied => births.layerMaps_outputs_cutoff data group oldAction pairing unions powers separation infinite hG hP0 k n before mapEntry copied)

end PartitionPilot.Forcing.GroundExternalBirthData




namespace PartitionPilot.Forcing.GroundExternalBirthData
open SetFormula SetRealization Compression Compression.RecursiveMaps.CosetGeometry
universe u
variable {M : TransitiveGround.{u}} {initial : RecursiveStateData.{u}}
variable {I Sources Reps G m inv one T τ P0 r0 μ0 A0 oldTimes oldBirth : ZFSet.{u}}
variable {completion : GroundCompressionCompletion M initial I Sources Reps G m one T τ}
variable (births : GroundExternalBirthData M initial I Sources Reps G m one T τ P0 r0 μ0 A0 oldTimes oldBirth completion)
variable (data : GroundExternalGeometryInputs M initial I Sources Reps G m inv one T τ P0 r0 μ0 A0 completion)
variable (group : GroupCode G m inv one) (oldAction : PosetActionCode G P0 m one r0 A0)
variable (pairing : Realize M.sets SetFormula.pairing Fin.elim0)
variable (unions : Realize M.sets SetFormula.union Fin.elim0)
variable (powers : Realize M.sets powerSet Fin.elim0) (separation : SeparationSchema M.sets)
variable (infinite : Realize M.sets infinity Fin.elim0) (hG : G ∈ M.sets) (hP0 : P0 ∈ M.sets)
local notation "family" => completion.externalFamily group oldAction data.original
local notation "s" => completion.externalFamilyGroupPresentation group oldAction data.original
  pairing unions powers separation infinite hG data.words.letters_ground
local notation "vpres" => data.externalStarVertexPresentation group oldAction pairing unions powers separation infinite hG
local notation "U" => completion.algebra.union.fields 0
local notation "B" => completion.externalPointCarrier P0 r0 μ0 A0
local notation "P" => completion.externalSeedCarrier P0 r0 μ0 A0
local notation "owner" => completion.externalStarOwner P0 r0 μ0 A0
local notation "levels" => completion.externalOwnerLevels P0 r0 μ0 A0
include births data group oldAction pairing unions powers separation infinite hG hP0

omit data group oldAction pairing unions powers separation infinite hG hP0 in
theorem layerFiber_cutoff (k n : Nat) (before : k ≤ n) :
    births.layerFiber k = layerBirthFiber (births.cutoff n) (births.cutoffBirth n) (compressionStamp oldTimes k) := by
  apply ZFSet.ext
  intro x
  rw [births.mem_layerFiber, mem_layerBirthFiber]
  constructor
  · rintro ⟨hx, entry⟩
    have fresh := (births.stamp_fiber k x).1 entry
    have hxCut : x ∈ births.cutoff n := by
      apply (mem_ownerLevelPrefix _ _ _ _ _).2
      refine Or.inr ⟨hx, ((mem_ownerFresh P B x).1 fresh.1).2,
        natSetCode k, natSetCode_mem_omega k, fresh.2, ?_⟩
      rcases Nat.lt_or_eq_of_le before with less | same
      · exact Or.inr ((natSetCode_mem_iff _ _).2 less)
      · exact Or.inl (congrArg natSetCode same)
    exact ⟨hxCut, pair_mem_graphRestriction.2 ⟨entry, hxCut⟩⟩
  · rintro ⟨hx, entry⟩
    exact ⟨births.cutoff_subset n hx, (pair_mem_graphRestriction.1 entry).1⟩

theorem layerComponents_earlier_meet (k : Nat) {x y v w : ZFSet.{u}}
    (hx : x ∈ births.layerFiber k) (hy : y ∈ births.layerFiber k)
    (first : ZFSet.pair x v ∈ births.layerComponents k)
    (second : ZFSet.pair y w ∈ births.layerComponents k) (different : v ≠ w) :
    ∃ z a, ZFSet.pair (ZFSet.pair x y) z ∈ completion.externalPointMeet P0 r0 μ0 A0 ∧
      ZFSet.pair z a ∈ births.birth ∧ a ∈ compressionStamp oldTimes k := by
  have geometry := data.externalGeometryData group oldAction pairing unions powers separation infinite hG hP0
  have bounds := ZFSet.pair_mem_prod.2
    ⟨((births.mem_layerFiber k x).1 hx).1, ((births.mem_layerFiber k y).1 hy).1⟩
  obtain ⟨z, meetEntry, _⟩ := geometry.meet.operation.2 (ZFSet.pair x y) bounds
  have hz := (ZFSet.pair_mem_prod.1 (geometry.meet.operation.1 meetEntry)).2
  obtain ⟨a, born, _⟩ := births.function.2 z hz
  have earlier := data.externalOwnerLevels_meet_old_or_lower group oldAction pairing unions powers separation infinite hG hP0
    (pair_mem_graphRestriction.1 first).1 (pair_mem_graphRestriction.1 second).1 different
    (births.layerFiber_level hx) (births.layerFiber_level hy) meetEntry
  refine ⟨z, a, meetEntry, born, ?_⟩
  apply ownerBirthGraph_earlier_of_level births.seed_function
    (data.externalOwnerLevels_ground_function group oldAction pairing unions powers separation infinite hG hP0).2
    births.times.ownerStampCode ?_ ((births.times.entries k _).2 rfl) born earlier
  intro u b j t entry stamp
  rw [(births.times.entries j t).1 stamp]
  exact births.old_before entry j

end PartitionPilot.Forcing.GroundExternalBirthData

end OAI