OAI/Computability/MaxCut/Machines/MachineLazyTableRuntime.lean
96 declarations, 0 contain sorry, 0 declared as axioms
Canonical polynomial-time computation of the executable lazy preprocessing map.
The raw machine's retained original input is physically drained by the checked
canonical-output wrapper before it reaches the standard haltList endpoint.
- def
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.rawProgramline 17 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.sourceMachine_eqline 25 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.cleanupTapesline 30Source documentation
A fixed explicit list of every non-output tape, independent of input data.
def cleanupTapes : List Tape := …
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.cleanup_completeline 34 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.terminalRunline 40Source documentation
The terminal witness is the checked full lazy-table execution. The wrapper then drains the retained original input rather than assuming it disappeared.
def terminalRun (d : Nat) (positive : 0 < d) (a : PortTables.Input d) : MachineCanonicalOutput.TerminalRun (rawProgram d positive) (PortTables.inputBits a) (PortTables.inputBits (PreprocessingStageMaps.lazy d a)) ((MachineLazyTable.timePolynomial d).eval (PortTables.inputBits a).length) where …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCanonicalOutput.TerminalRun, OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.rawProgram, OAI.MaxCutGames.Foundations.Complexity.MachineLazyTable.timePolynomial
- def
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.computableInPolyTimeline 52Source documentation
The actual canonical-output finite machine computes precisely the shared degree-d to degree-2d stage map in polynomial time.
noncomputable def computableInPolyTime (d : Nat) (positive : 0 < d) : TM2ComputableInPolyTime (PortTables.inputBits (ports := d)) … - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.finite_alphabetline 60Source documentation
Every tape alphabet of this exact completed computation certificate is finite.
theorem finite_alphabet (d : Nat) (positive : 0 < d) : ∀ k, Finite ((computableInPolyTime d positive).tm.Γ k) := …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineLazyTableRuntime.computableInPolyTime
- def
OAI.MaxCutGames.Foundations.PCP.PreprocessingFinishRuntime.finishline 76 - theorem
OAI.MaxCutGames.Foundations.PCP.PreprocessingFinishRuntime.output_eq_finishline 81 - theorem
OAI.MaxCutGames.Foundations.PCP.PreprocessingFinishRuntime.finish_degree_positiveline 85 - def
OAI.MaxCutGames.Foundations.PCP.PreprocessingFinishRuntime.computableInPolyTimeline 90Source documentation
Both stages supply complete executions, cleanup, and polynomial bounds; the sequential composition includes the physical interstage bit transfer.
noncomputable def computableInPolyTime (H : PreprocessingTables.BaseTable) (d : Nat) (hd : 0 < d) : TM2ComputableInPolyTime (PortTables.inputBits (ports := d)) …Mentions: OAI.MaxCutGames.Foundations.PCP.PreprocessingTables.BaseTable, OAI.MaxCutGames.Foundations.PCP.PortTables.inputBits
- theorem
OAI.MaxCutGames.Foundations.PCP.PreprocessingFinishRuntime.finite_alphabetline 101 - def
OAI.MaxCutGames.Foundations.PCP.PreprocessingRuntime.tablePolynomialTimeline 119 - theorem
OAI.MaxCutGames.Foundations.PCP.PreprocessingRuntime.finiteAlphabetline 132 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.bitLengthline 155 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.bitLength_zeroline 157 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.bitLength_positiveline 159 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.bitLength_halfline 162 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.incrementsline 169 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.increments_trueline 172 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.increments_halfline 175 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.increments_falseline 179 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTimeline 184 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTime_zeroline 189 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTime_positiveline 191 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTime_boundline 195 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.Alphabetline 205 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.Stateline 206 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.initialStateline 208 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.rawTapesline 210 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.update_input_inline_MachineLogCounterline 215 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.update_scratch_inline_MachineLogCounterline 220 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.update_output_inline_MachineLogCounterline 225 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.stripLoopline 230 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.guardLoopline 236 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.halfLoopline 245 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.programline 254 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.machineline 261 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.configurationline 272 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.nextline 276 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.stripStep_trueline 278 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.stripStep_falseline 286 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.stripTraceline 294 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.halfStep_nilline 310 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.halfStep_falseline 318 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.halfStep_trueline 327 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.halfTraceline 337Source documentation
A parity bit implements division by two using actual pop/push transitions.
theorem halfTrace (n m : Nat) (output : List Bool) (parity started : Bool) (register : Option Bool) : next^[n + 1] (some (configuration (some 3) ((parity, started), register) (List.replicate n true) (List.replicate m true) output)) = some (configuration (some 4) ((false, started), none) [] (List.replicate (m + (n + if parity then 1 else 0) / 2) true) output) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.next, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.configuration
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.restoreTraceline 369 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.guardStep_zeroline 386 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.guardStep_positiveline 394 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTraceline 407Source documentation
The halving rounds are actual guard, scan, and restoration executions.
theorem coreTrace (n : Nat) (output : List Bool) (started : Bool) : next^[coreTime n] (some (configuration (some 2) ((false, started), none) (List.replicate n true) [] output)) = some (configuration none initialState [] [] (List.replicate (increments n started) true ++ output)) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.next, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.coreTime, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.configuration, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.initialState, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.increments
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.initList_eqline 439 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.haltList_eqline 448 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.initialStepline 456 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.totalTimeline 465 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.totalTime_boundline 467 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.machineTraceline 472 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.outputsInTimeline 487 - def
OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.computableInPolyTimeline 495Source documentation
A genuine finite-machine certificate for unary
log2(n)+1; its linear polynomial is measured in the actual encoded input length.noncomputable def computableInPolyTime : TM2ComputableInPolyTime encodeWord encodeWord (fun n => n.log2 + 1) where … - inductive
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraTapeline 526 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraTape.enumListline 530 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraTape.enumList_getElem?_ctorIdx_eqline 532 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraTape.enumList_nodupline 536 - instance
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.(instance at line 538)line 538 - inductive
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraLabelline 542 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraLabel.enumListline 547 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraLabel.enumList_getElem?_ctorIdx_eqline 550 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.ExtraLabel.enumList_nodupline 554 - instance
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.(instance at line 556)line 556 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Tapeline 560 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Labelline 561 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Alphabetline 562 - abbrev
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Stateline 563 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.initialStateline 565 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockLabelline 567 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockStatementline 572Source documentation
Homogeneous Boolean embedding of the fixed logarithm program.
def clockStatement : TM2.Stmt MachineLogCounter.Alphabet (Fin 5) MachineLogCounter.State → TM2.Stmt Alphabet Label State | .push k f next => .push (.inl k) (fun state => f state.1) (clockStatement next) | .peek k f next => .peek (.inl k) (fun state x => (f state.1 x, state.2)) (clockStatement next) | .pop k f next => .pop (.inl k) (fun state x => (f state.1 x, state.2)) (clockStatement next) | .load f next => .load (fun state => (f state.1, state.2)) (clockStatement next) | .branch f yes no => .branch (fun state => f state.1) (clockStatement yes) (clockStatement no) | .goto f => .goto (fun state => .inl (f state.1)) | .halt => .goto (fun _ => .inr .clearInput)Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.Alphabet, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.State, OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Alphabet, OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.Label, OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.State
- def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.readHeaderline 582 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.programline 588 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.machineline 606 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockTapesline 617 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockConfigurationline 621 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockTapes_updateline 625 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockStatement_simulationline 632 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockStepline 657 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockInTimeline 672 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startExtraline 689 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startMemoryline 694 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startMemory_input_updateline 698 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startMemory_sum_updateline 706 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.headerStep_zeroline 714 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.headerStep_succline 728 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.headerTraceline 745 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.headerInTimeline 762 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.initialMemoryline 774 - theorem
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockInitialMemoryline 786 - def
OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startInTimeline 800Source documentation
Exact handoff from the genuine machine input to the actual logarithm machine, with the original graph word protected in the archive.
def startInTime (n m : Nat) (rest : List Bool) : StateTransition.EvalsToInTime machine.step (initList machine (encodeWords [n, m] ++ rest)) (some (clockConfiguration (startExtra rest (encodeWords [n, m] ++ rest)) none (initList MachineLogCounter.machine (encodeWord (n + m))))) (2 * ((encodeWords [n, m] ++ rest).length + 1) + 1 + (n + 1) + (m + 1)) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.machine, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.clockConfiguration, OAI.MaxCutGames.Foundations.Complexity.GraphCounterModel.startExtra, OAI.MaxCutGames.Foundations.Complexity.MachineLogCounter.machine, OAI.MaxCutGames.Foundations.Complexity.encodeWord