OAI/Computability/MaxCut/Machines/PoweringMachineRowHeaders.lean
59 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacementline 17Source 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.MaxCutGames.Foundations.Complexity.PoweringMachineWord.Tape
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_injectiveline 20 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_tableline 24 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_queryline 28 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_scanline 32 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_reverseline 36 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_scratchline 40 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_outputline 44 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_startline 48 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement_succline 52 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.Labelline 56 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.entryline 59 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.tailEntryline 61 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.affineInstructionline 64 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.instructionline 72Source 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.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.affineInstruction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.tailEntry, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineWord.copyInstruction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineWord.instruction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerPlacement
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.afterReverseline 85 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.finalTapesline 90 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.stepsline 99 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.headerTraceline 107Source 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.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.instruction, OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.steps, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.entry
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes_otherline 179 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes_sharedline 204Source 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.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.finalTapes
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.steps_leline 219Source 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.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.steps
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowHeaders.machineline 237Source 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 …
- abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.capacityline 257 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.bufferSizeline 258 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Stateline 259 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.commandsline 261 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Labelline 264 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.planMainline 269Source documentation
A finite main label also exists for an empty command list.
def planMain {max : Nat} {E : Type} (ops : List (PoweringMachinePlan.Command d max)) (fallback : E) : PoweringMachinePlan.Label ops ⊕ E := …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachinePlan.Command, OAI.MaxCutGames.Foundations.Complexity.PoweringMachinePlan.Label
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.plan_entry_eqline 276 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.entryline 283 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.headerPlacementline 287Source documentation
Only the header phase directs shared output role 10 to the external output.
def headerPlacement {max : Nat} (placement : PoweringMachineTapes.Tape max → K) (output : K) (i : PoweringMachineTapes.Tape max) : K := …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineTapes.Tape
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.headerPlacement_outputline 292 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.headerPlacement_otherline 297 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.headerPlacement_injectiveline 303 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.headerPlacement_excludes_dataline 319 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.instructionline 331 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.afterPlanline 342 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowRelationline 346 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowWordsline 351 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.afterEmitline 356 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapesline 363 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.planStepsline 371 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.planSteps_eqline 376 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.stepsline 389 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Readyline 394 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.plan_other_inline_PoweringMachineRowBodyline 399 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.afterEmit_dataline 412 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.afterEmit_roleline 419 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.afterEmit_readyline 429 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes_dataline 451 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes_readyline 464 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes_otherline 489 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowBlock_eq_rowRelationline 508 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes_outputline 525Source documentation
The full serialized row is prepended to the caller's existing output.
theorem finalTapes_output (graph : PortTables.Table vertices d) (n : Nat) (placement : PoweringMachineTapes.Tape (capacity n) → K) (distinct : Function.Injective placement) (output : K) (outside : ∀ i, output ≠ placement i) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) (base : K → List Bool) (suffix : List Bool) (ready : Ready graph n placement vertex suffix base) : finalTapes graph n placement output vertex ports direction base output = encodeWords (rowWords graph n vertex ports direction) ++ base output := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineTapes.Tape, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.capacity, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Ready, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowWords
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowTraceline 556Source documentation
The complete row producer executes its concrete plan, one row transition, and the concrete two-header writer. No local execution hypothesis is assumed.
theorem rowTrace (graph : PortTables.Table vertices d) (n : Nat) (placement : PoweringMachineTapes.Tape (capacity n) → K) (distinct : Function.Injective placement) (output : K) (outside : ∀ i, output ≠ placement i) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) (labels : Label n ports direction → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ (State d n)) (atLabels : ∀ l, program (labels l) = instruction n placement output ports direction labels exit l) (base : K → List Bool) (suffix : List Bool) (ready : Ready graph n placement vertex suffix base) : (advance (TM2.step program))^[steps graph vertex n ports direction] (some ⟨some (labels (entry n ports direction)), PoweringMasterState.clean (bufferSize d n), base⟩) = some ⟨exit, PoweringMasterState.clean (bufferSize d n), finalTapes graph n placement output vertex ports direction base⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineTapes.Tape, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.capacity, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.State, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.instruction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Ready, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.steps, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.entry, OAI.MaxCutGames.Foundations.Complexity.PoweringMasterState.clean, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.bufferSize, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.budgetline 608 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.steps_leline 612 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.rowInTimeline 625Source documentation
The row subroutine's genuine execution certificate has the explicit fixed-parameter affine bound in the serialized graph length.
def rowInTime (graph : PortTables.Table vertices d) (n : Nat) (placement : PoweringMachineTapes.Tape (capacity n) → K) (distinct : Function.Injective placement) (output : K) (outside : ∀ i, output ≠ placement i) (vertex : Fin vertices) (ports : Fin (n + 1) → Fin d) (direction : Bool) (labels : Label n ports direction → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ (State d n)) (atLabels : ∀ l, program (labels l) = instruction n placement output ports direction labels exit l) (base : K → List Bool) (suffix : List Bool) (ready : Ready graph n placement vertex suffix base) : StateTransition.EvalsToInTime (TM2.step program) ⟨some (labels (entry n ports direction)), PoweringMasterState.clean (bufferSize d n), base⟩ (some ⟨exit, PoweringMasterState.clean (bufferSize d n), finalTapes graph n placement output vertex ports direction base⟩) …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineTapes.Tape, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.capacity, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.State, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.instruction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.Ready, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.entry, OAI.MaxCutGames.Foundations.Complexity.PoweringMasterState.clean, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.bufferSize, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineRowBody.finalTapes