OAI/Computability/UniqueGames/Machines/PoweringGlobalEnumerationLemmas.lean
90 declarations, 0 contain sorry, 0 declared as axioms
Explicit executable enumeration of the global powering tapes
The four header tapes come first, followed by the eleven shared roles, the bounded trajectory tapes, and the final output tape. Both directions use constructor cases and arithmetic sum encodings. No enumeration is selected from a cardinality theorem.
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.headerTapeEquivline 24 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.unitTapeEquivline 36Source documentation
The single extra output tape occupies its unique local index.
def unitTapeEquiv : Unit ≃ Fin 1 where …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.sharedTapeEquivline 42 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.extraTapeEquivline 45 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.globalTapeEquivline 49Source documentation
Exact arithmetic numbering of every physical global tape.
def globalTapeEquiv (max : Nat) : GlobalTape max ≃ Fin (4 + (11 + max + 1)) := …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.enumerationline 53Source documentation
The executable equivalence consumed by Finish and DrainMany.
def enumeration (max : Nat) : Fin (4 + (11 + max + 1)) ≃ GlobalTape max := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.globalTapeEquiv_enumerationline 56 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.enumeration_globalTapeEquivline 60 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.source_indexline 64 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.counter_indexline 67 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.vertices_indexline 70 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.darts_indexline 73 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.sharedRole_indexline 76 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.trajectory_indexline 79 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.finalOutput_indexline 82 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.card_globalTapeline 86Source documentation
The exact cardinality follows from the explicit executable bijection.
theorem card_globalTape (max : Nat) : Fintype.card (GlobalTape max) = 4 + (11 + max + 1) := by … - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.natCard_globalTapeline 90 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.allTapesline 95Source documentation
A fixed finite list of all tape names is available without ambient search.
def allTapes (max : Nat) : List (GlobalTape max) := List.ofFn (enumeration max)
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.enumeration
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.allTapes_lengthline 97 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringGlobalEnumeration.mem_allTapesline 100 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.Alphabetline 121 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.Stateline 122 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.Labelline 123 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.lookupTapesline 125 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.lookupTapes_injectiveline 129 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.source_outside_lookupline 135 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.endpointline 145 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.endpoint_eq_wordEndline 148 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.bitline 155 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.instructionline 159 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.afterWordline 168 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.finalTapesline 174 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.stepsline 182 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.afterWord_frameline 188 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.finalTapes_frameline 205Source documentation
Table, start, scratch and both comparison stacks satisfy these numerical inequalities, so their contents are preserved without an emptiness premise.
theorem finalTapes_frame (placement : PoweringMachineTapes.Tape max → K) (distinct : Function.Injective placement) (path : List (Fin d)) (lengthBound : path.length ≤ max) (port : Fin d) (left right : PortTables.Label) (table : PortTables.Table n d) (vertex : Fin n) (base : K → List Bool) (role : Fin 11) (h₂ : role ≠ 2) (h₃ : role ≠ 3) (h₄ : role ≠ 4) (h₆ : role ≠ 6) (h₁₀ : role ≠ 10) : finalTapes placement path lengthBound port left right table vertex base (placement (.inl role)) = base (placement (.inl role)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineTapes.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.finalTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.finalTapes_otherline 224Source documentation
Any caller tape outside the shared placement is preserved, including a separate accumulator for already completed output rows.
theorem finalTapes_other (placement : PoweringMachineTapes.Tape max → K) (path : List (Fin d)) (lengthBound : path.length ≤ max) (port : Fin d) (left right : PortTables.Label) (table : PortTables.Table n d) (vertex : Fin n) (base : K → List Bool) (k : K) (outside : ∀ i, k ≠ placement i) : finalTapes placement path lengthBound port left right table vertex base k = base k := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineTapes.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.finalTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.fieldTraceline 237 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRelationField.steps_leline 294 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.Tapeline 312 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.Stateline 313 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.Labelline 315 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.labelFintypeline 319 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.labelDecidableEqline 322 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.entryline 325 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.instructionline 329 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.finalTapesline 338 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.stepsline 348 - structure
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.Readyline 352 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.finalTapes_roleline 360 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.ready_finalTapesline 375 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.finalTapes_otherline 392 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.fieldTraceline 405 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineField.finalTapes_outputline 427 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.Commandline 463 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.LocalLabelline 464 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.Labelline 465 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.entryline 467 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.instructionline 471 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.resultline 478 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.finalTapesline 482 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.stepsline 486 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.planTraceline 491 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.ready_finalTapesline 517 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.finalTapes_outputline 530 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.boundedRowPlanline 552Source documentation
Each command of the actual row plan has a fixed bound of twice the radius.
def boundedRowPlan (n : Nat) (ports : Fin (n + 1) → Fin d) (direction : Bool) : List (Command d (2 * (n + 1))) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.Command
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.boundedRowPlan_valuesline 559 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachinePlan.rowPlan_outputline 564 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacementline 590Source documentation
The existing word placement, with its result directed to row-output 10.
def headerPlacement {t max : Nat} (h : t ≤ max) : PoweringMachineWord.Tape t → Tape max := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineWord.Tape
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_injectiveline 593 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_tableline 597 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_queryline 601 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_scanline 605 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_reverseline 609 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_scratchline 613 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_outputline 617 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_startline 621 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_succline 625 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.Labelline 629 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.entryline 632 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.tailEntryline 634 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.affineInstructionline 637 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.instructionline 645Source documentation
Only the coefficient, word, and direction are built into finite control.
def instruction (n : Nat) (h : n + 1 ≤ max) (placement : Tape max → K) (ports : Fin (n + 1) → Fin d) (direction : Bool) (labels : Label n → Λ) (exit : Option Λ) : Label n → TM2.Stmt (fun _ : K => Bool) Λ (σ × Option Bool) | .inl q => affineInstruction (placement (start max)) (placement (scratch max)) (placement (rowOutput max)) (blockSize d n) (reverseOffset d n ports direction) (fun z => labels (.inl z)) (some (labels (tailEntry n direction))) q | .inr (.inl q) => PoweringMachineWord.copyInstruction (placement (start max)) (placement (scratch max)) (placement (rowOutput max)) (fun z => labels (.inr (.inl z))) exit q | .inr (.inr q) => PoweringMachineWord.instruction (n + 1) (placement ∘ headerPlacement h) ports (fun z => labels (.inr (.inr z))) exit qMentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.affineInstruction, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.tailEntry, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineWord.copyInstruction, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineWord.instruction, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.afterReverseline 658 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.finalTapesline 663 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.stepsline 672 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.headerTraceline 680Source documentation
Compose the actual affine and word/copy instructions. The trace and both header values are derived; the only data premises describe the physical input.
theorem headerTrace (input : PortTables.Table vertices d) (n : Nat) (h : n + 1 ≤ max) (placement : Tape max → K) (distinct : Function.Injective placement) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) (labels : Label n → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ (σ × Option Bool)) (atLabels : ∀ l, program (labels l) = instruction n h placement ports direction labels exit l) (base : K → List Bool) (tableWord : base (placement (table max)) = PortTables.tableBits input) (scratchEmpty : base (placement (scratch max)) = []) (suffix : List Bool) (sourceWord : base (placement (start max)) = encodeWord vertex.val ++ suffix) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[steps input n vertex ports direction] (some ⟨some (labels (entry n)), (ambient, register), base⟩) = …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.instruction, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.steps, OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.entry
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes_otherline 752 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes_sharedline 777Source documentation
In particular, table 0, start 1, scratch 5, and saved endpoint/copy tapes 6--9 survive the header phase. Only roles 2, 3, 4, 10 and trajectory tapes may change.
theorem finalTapes_shared (input : PortTables.Table vertices d) (n : Nat) (h : n + 1 ≤ max) (placement : Tape max → K) (distinct : Function.Injective placement) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) (base : K → List Bool) (i : Fin 11) (hquery : i ≠ 2) (hscan : i ≠ 3) (hreverse : i ≠ 4) (houtput : i ≠ 10) : finalTapes input n h placement vertex ports direction base (placement (.inl i)) = base (placement (.inl i)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.steps_leline 792Source documentation
Linear in the serialized input length for the fixed word length.
theorem steps_le (input : PortTables.Table vertices d) (n : Nat) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) : steps input n vertex ports direction ≤ (14 * (n + 1) + 4) * (PortTables.tableBits input).length + 12 * (n + 1) + 6 := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.steps
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PoweringMachineRowHeaders.machineline 810Source documentation
A closed finite-control instance. Embedded uses instantiate
instructionon the caller's common tapes and preserve its larger ambient register.def machine (degree n : Nat) (ports : Fin (n + 1) → Fin degree) (direction : Bool) : FinTM2 where …