OAI/Computability/MaxCut/Machines/MachineSubdivisionTableRead.lean
66 declarations, 0 contain sorry, 0 declared as axioms
Actual execution of the subdivision controller's full-table reader. The reader consumes exactly the fixed number of zero-delimited table entries, retains the unread input suffix, and reverses the saved table into forward order. No table entry is stored in finite control; only the number of delimiters is.
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapesline 22 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes_inputline 25 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes_reverseline 28 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.update_input_inline_MachineSubdivisionTableReadline 31 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.update_reverse_inline_MachineSubdivisionTableReadline 37 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.step_trueline 43 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.step_falseline 53 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.readWordTraceline 65Source documentation
One encoded entry consumes its final delimiter in the same transition that increments the finite completed-entry counter.
theorem readWordTrace (q : Nat) (completed : Fin (q + 1)) (valid : completed.val < q) (base : Tape → List Bool) (value : Nat) (input reversed : List Bool) (ambient : Unit × Unit) (register : Option Bool) : (MachineComposition.advance (TM2.step (program q)))^[value + 1] (some ⟨some (.readTable completed), (ambient, register), tapes base (encodeWord value ++ input) reversed⟩) = some ⟨some (.readTable ⟨completed.val + 1, by omega⟩), (ambient, none), tapes base input ((encodeWord value).reverse ++ reversed)⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes
- theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.readWordsTraceline 87Source documentation
Read a suffix of the q-entry table, stopping before any following data.
theorem readWordsTrace (q : Nat) (words : List Nat) (completed : Fin (q + 1)) (complete : completed.val + words.length = q) (base : Tape → List Bool) (suffix reversed : List Bool) (ambient : Unit × Unit) (register : Option Bool) : (MachineComposition.advance (TM2.step (program q)))^[(encodeWords words).length + 1] (some ⟨some (.readTable completed), (ambient, register), tapes base (encodeWords words ++ suffix) reversed⟩) = some ⟨some .reverseTable, (ambient, none), tapes base suffix ((encodeWords words).reverse ++ reversed)⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapesline 117 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes_otherline 120 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes_inputline 125 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes_reverseline 128 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes_permutationline 131 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tableTraceline 136Source documentation
Full exact table phase: read q delimited entries and reverse the physical saved stack, arriving at the actual row-emission label.
theorem tableTrace (q : Nat) (words : List Nat) (length : words.length = q) (base : Tape → List Bool) (suffix : List Bool) (ambient : Unit × Unit) (register : Option Bool) : (MachineComposition.advance (TM2.step (program q)))^[2 * (encodeWords words).length + 2] (some ⟨some (.readTable 0), (ambient, register), tapes base (encodeWords words ++ suffix) []⟩) = some ⟨some (rowEntry q), (ambient, none), finalTapes base suffix (encodeWords words)⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes, OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tableInTimeline 165Source documentation
Timed witness for the actual controller, with a fixed alphabet-dependent bound on its full forward table. Other row fields and unread input are preserved.
def tableInTime {q : Nat} (table : Target.PermutationTable q) (base : Tape → List Bool) (suffix : List Bool) (ambient : Unit × Unit) (register : Option Bool) : StateTransition.EvalsToInTime (TM2.step (program q)) ⟨some (.readTable 0), (ambient, register), tapes base (encodeWords (tableWords table) ++ suffix) []⟩ (some ⟨some (rowEntry q), (ambient, none), finalTapes base suffix (encodeWords (tableWords table))⟩) (2 * (q * (q + 1)) + 2) where …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.tapes, OAI.MaxCutGames.Explicit.MachineSubdivisionTableRead.finalTapes
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.tableBitsline 197 - structure
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.Readyline 200 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterUline 209 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterVline 213 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterTableline 217 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.rowPayloadline 221 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterRowsline 226 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterDrainUline 231 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterDrainVline 235 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.afterDrainTableline 239 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.incrementTapesline 243 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.bodyResultline 249 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.bodyBudgetline 253 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.rowField_ne_scratch_inline_MachineSubdivisionBodyline 262 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.rowField_ne_accumulator_inline_MachineSubdivisionBodyline 265 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.incrementInTimeline 268 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBody.bodyInTimeline 279Source documentation
Complete actual
.startU → .guardexecution, without a phase-run premise.def bodyInTime {q : Nat} (base : Tape → List Bool) (u v : Nat) (table : Target.PermutationTable q) (suffix : List Bool) (ready : Ready base u v table suffix) : StateTransition.EvalsToInTime (TM2.step (program q)) ⟨some .startU, initialState, base⟩ (some ⟨some .guard, initialState, bodyResult base u v table suffix⟩) (bodyBudget base u v table suffix) := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionBody.Ready, OAI.MaxCutGames.Explicit.MachineSubdivisionBody.bodyResult, OAI.MaxCutGames.Explicit.MachineSubdivisionBody.bodyBudget
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.bodyBitsline 355 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.bodyBits_nilline 358 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.bodyBits_consline 360 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.identityBitsline 367 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.rowBitsline 370 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.outputRowsline 377 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.frameline 381 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.afterGuardline 392 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.frame_preparedline 396 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.guard_consline 403 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.guard_nilline 424 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoopFrame.readyline 441 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.resultTapesline 467 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.bodyResult_eqline 478Source documentation
Every tape at the body boundary, including all preserved headers and counters.
theorem bodyResult_eq {q : Nat} (base : Tape → List Bool) (u v : Nat) (table : Target.PermutationTable q) (suffix : List Bool) (_ready : Ready base u v table suffix) : bodyResult base u v table suffix = resultTapes base u v table suffix := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.resultTapes
- theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.result_inputline 488 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.result_localsline 495 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.result_accumulatorline 506 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.encodeWord_succline 514 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.result_indicesline 517 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.rowBitsline 533Source documentation
Four whole rows, with the final table already in left-to-right orientation.
def rowBits {q : Nat} (u middle first last v : Nat) (table : Target.PermutationTable q) : List Bool := … - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.rowPayload_eqline 541 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.rowBits_eq_dynamicline 556Source documentation
The natural-word description is literally the established finite-target constraint codec, rather than an alternative encoding.
theorem rowBits_eq_dynamic {N q : Nat} (vertices : Fin 5 → Fin N) (table : Target.PermutationTable q) : rowBits (vertices 0).val (vertices 2).val (vertices 1).val (vertices 3).val (vertices 4).val table = MachineSubdivisionDynamicRows.rowBits vertices table := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.rowBits, OAI.MaxCutGames.Explicit.MachineSubdivisionDynamicRows.rowBits
- theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionBodySpec.bodyBudget_leline 565Source documentation
One conservative bound uniform over all occurrences in this output. Only the fixed alphabet and the runtime header sizes appear in the polynomial.
theorem bodyBudget_le {q : Nat} (base : Tape → List Bool) (u v : Nat) (table : Target.PermutationTable q) (suffix : List Bool) (ready : Ready base u v table suffix) (n Q e : Nat) (hu : u < n) (hv : v < n) (he : e ≤ Q) (middle : base .middle = encodeWord (n + e)) (first : base .first = encodeWord (n + Q + 2 * e)) (last : base .last = encodeWord (n + Q + 2 * e + 1)) : bodyBudget base u v table suffix ≤ 100 * (n + 3 * Q + q * (q + 1) + 1) := by … - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.rowPayload_eqline 594 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.bodyResult_eq_frameline 603 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.bodyBoundline 626 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.bodyInTimeline 628 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.loopInTimeline 644Source documentation
Every list occurrence is read once, emits exactly its four rows, and advances the three private numeric names. The loop includes its final zero-counter test.
def loopInTime {n q : Nat} (Q e : Nat) (edges : List (Constraint n q)) (emitted : List Bool) (fit : e + edges.length ≤ Q) : StateTransition.EvalsToInTime (machine q).step ⟨some .guard, initialState, frame Q e edges emitted⟩ (some ⟨some .finishStart, initialState, frame Q (e + edges.length) ([] : List (Constraint n q)) (emitted ++ outputRows Q e edges)⟩) (edges.length * (bodyBound n q Q + 1) + 1) := by …Mentions: OAI.MaxCutGames.Explicit.MachineSubdivisionLoop.bodyBound
- def
OAI.MaxCutGames.Explicit.MachineSubdivisionFinish.timePolynomialline 699 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionFinish.haltList_eqline 702 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionFinish.finishStartInTimeline 711 - theorem
OAI.MaxCutGames.Explicit.MachineSubdivisionFinish.coversline 723 - def
OAI.MaxCutGames.Explicit.MachineSubdivisionFinish.completePrefixline 730