OAI/Computability/MaxCut/Machines/PoweringMachineVertex.lean
78 declarations, 0 contain sorry, 0 declared as axioms
Actual variable-size vertex enumeration. The finite guard decrements the live unary counter, a one-step bridge enters the fixed vertex producer, and the producer returns to the guard. Work tapes may change after every vertex.
- abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.Commandline 13 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.portsline 15 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.directionline 18 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.commandsline 21 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.commands_lengthline 23 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.LocalLabelline 27 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.SequenceLabelline 28 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.Labelline 29 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.Stateline 30 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceEntryline 32 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.entryline 37 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceInstructionline 40 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.instructionline 49 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.resultline 55 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceTapesline 61 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.finalTapesline 67 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceStepsline 72 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.costSumline 78 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceSteps_eqline 84 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.stepsline 97 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.budgetline 100 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.costSum_leline 103 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.steps_leline 116 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceTraceline 120 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.vertexTraceline 150 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceTapes_readyline 168 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.finalTapes_readyline 182 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceTapes_otherline 191 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.finalTapes_otherline 205 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.rowBitsline 212 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.blockIndex_eq_encodeDartline 217Source documentation
Decoding a command gives exactly its existing vertex-block row index.
theorem blockIndex_eq_encodeDart (n : Nat) (vertex : Fin vertices) (j : Command d n) : PoweringTableLayout.blockIndex d n vertex j = PoweringEnumeration.encodeDart vertices d n (direction j, vertex, ports j) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.Command, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.direction, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.ports
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.rowBits_eqline 225 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.encodeWords_flatMap_inline_PoweringMachineVertexline 232 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.rows_eq_vertexRowBitsline 238 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.sequenceTapes_outputline 261 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.finalTapes_outputline 281 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.vertexInTimeline 292 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.Placementline 322 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.Stateline 323 - structure
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.Readyline 325 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.counterline 333 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.counter_otherline 336 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.ready_vertexline 343 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.ready_of_vertexline 362 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.vertexStartline 368 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.vertexEntryline 371 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.bridgeline 389 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.finalTapesline 394Source documentation
The exact tapes produced by repeatedly executing the actual vertex body.
def finalTapes (graph : PortTables.Table vertices d) (n : Nat) (placement : Placement K n) (output : K) : (remaining : Nat) → remaining ≤ vertices → (K → List Bool) → K → List Bool | 0, _, base => counter placement base 0 | r + 1, bounded, base => finalTapes graph n placement output r (by omega) (PoweringMachineVertex.finalTapes graph n placement output ⟨r, by omega⟩ (counter placement base r))Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.Placement, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.counter, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineVertex.finalTapes
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.stepsline 402 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.steps_leline 408 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.finalTapes_readyline 420 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.prefixRowsline 445 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.prefixRows_ofFnline 450 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.prefixRows_allline 467 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.finalTapes_outputline 474 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.finalTapes_otherline 500 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.loopTraceline 512 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineOuterLoop.loopInTimeline 578 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Alphabetline 620 - abbrev
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Labelline 622 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.copyInstructionline 626 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.instructionline 634Source documentation
The labels contain two fixed affine copies and one fixed list of drains.
def instruction (enumeration : Fin N ≃ K) (headerV headerD output scratch : K) (labels : Label enumeration output → Λ) : Label enumeration output → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool) …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Alphabet
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.programline 647Source documentation
Actual finite control, independent of both runtime header values.
def program (enumeration : Fin N ≃ K) (headerV headerD output scratch : K) : Label enumeration output → TM2.Stmt (Alphabet (K := K)) (Label enumeration output) (σ × Option Bool) := …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Alphabet
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.afterDline 652 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.afterHeadersline 655 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.afterHeaders_outputline 658 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.afterHeaders_otherline 662 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.copyStepsline 666 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.copySteps_eqline 668 - def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.stepsline 673Source documentation
Exact cleanup cost is computed on the actual post-copy tape contents.
def steps (enumeration : Fin N ≃ K) (output : K) (base : K → List Bool) (n m : Nat) : Nat := …
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.budgetline 677 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.trace_trans_inline_PoweringMachineFinishline 681 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.traceAtline 687Source documentation
Exact execution inside any ambient program containing these instructions. The only data premises describe physical header words and an empty scratch tape.
theorem traceAt (enumeration : Fin N ≃ K) (headerV headerD output scratch : K) (hvs : headerV ≠ scratch) (hvo : headerV ≠ output) (hds : headerD ≠ scratch) (hdo : headerD ≠ output) (hso : scratch ≠ output) (labels : Label enumeration output → Λ) (target : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Label, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.Alphabet
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.traceline 737Source documentation
The standalone program satisfies the trace with no code or execution premise.
theorem trace (enumeration : Fin N ≃ K) (headerV headerD output scratch : K) (hvs : headerV ≠ scratch) (hvo : headerV ≠ output) (hds : headerD ≠ scratch) (hdo : headerD ≠ output) (hso : scratch ≠ output) (base : K → List Bool) (n m : Nat) (suffixV suffixD : List Bool) (wordV : base headerV = encodeWord n ++ suffixV) (wordD : base headerD = encodeWord m ++ suffixD) (scratchEmpty : base scratch = []) (ambient : σ) (register : Option Bool) : (advance (TM2.step (program enumeration headerV headerD output scratch)))^[ steps enumeration output base n m] (some ⟨some (.inl .seed), (ambient, register), base⟩) = some ⟨none, (ambient, none), MachineDrainMany.haltTapes output (encodeWords [n, m] ++ base output)⟩ := …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.program, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.steps, OAI.MaxCutGames.Foundations.Complexity.MachineDrainMany.haltTapes, OAI.MaxCutGames.Foundations.Complexity.encodeWords
- theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.steps_le_budgetline 753 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.afterHeaders_length_leline 759 - theorem
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.steps_le_uniformline 773Source documentation
A uniform pre-cleanup stack bound gives a linear finishing budget.
theorem steps_le_uniform (enumeration : Fin N ≃ K) (output : K) (base : K → List Bool) (n m bound : Nat) (bounded : ∀ k, (base k).length ≤ bound) : steps enumeration output base n m ≤ 2 * (n + m) + 6 + N * (bound + n + m + 3) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.steps
- def
OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.executionline 788Source documentation
A bounded execution witness, obtained from the physical trace above.
def execution (enumeration : Fin N ≃ K) (headerV headerD output scratch : K) (hvs : headerV ≠ scratch) (hvo : headerV ≠ output) (hds : headerD ≠ scratch) (hdo : headerD ≠ output) (hso : scratch ≠ output) (base : K → List Bool) (n m : Nat) (suffixV suffixD : List Bool) (wordV : base headerV = encodeWord n ++ suffixV) (wordD : base headerD = encodeWord m ++ suffixD) (scratchEmpty : base scratch = []) (ambient : σ) (register : Option Bool) : StateTransition.EvalsToInTime (TM2.step (program enumeration headerV headerD output scratch)) ⟨some (.inl .seed), (ambient, register), base⟩ (some ⟨none, (ambient, none), MachineDrainMany.haltTapes output (encodeWords [n, m] ++ base output)⟩) (budget enumeration output base n m) where …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.program, OAI.MaxCutGames.Foundations.Complexity.MachineDrainMany.haltTapes, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.PoweringMachineFinish.budget