OAI/Computability/MaxCut/Machines/MachineProductLoop.lean
32 declarations, 0 contain sorry, 0 declared as axioms
Whole tuple traversal of the concrete product program. The odometer theorem is instantiated by the proved actual row trace, not by an assumed row machine.
- structure
OAI.MaxCutGames.Explicit.MachineProductLoop.BaseReadyline 22 - def
OAI.MaxCutGames.Explicit.MachineProductLoop.tupleTapesline 28 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.tupleTapes_frameline 33 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.tupleTapes_currentline 45 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.tupleTapes_accumulatorline 50 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.tupleTapes_readyline 55 - def
OAI.MaxCutGames.Explicit.MachineProductLoop.rowBitsline 106 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.input_lengthline 110 - def
OAI.MaxCutGames.Explicit.MachineProductLoop.bodyBoundline 116 - theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.bodyTraceline 121Source documentation
The actual row execution supplies the local obligation of the generic odometer schedule. Its cost is uniformly polynomial in the original bits.
theorem bodyTrace (H : Target.Instance q) (base : Tape t → List Bool) (ready : BaseReady H base) : SourceOdometerSchedule.BodyTrace (program q t) (rowMain q t) (nextCheck q t 0) ((), ()) (Sum.inl (6 : Fin 10)) base (rowBits (t := t) H) (bodyBound H t) := by …Mentions: OAI.MaxCutGames.Explicit.MachineProductLoop.BaseReady, OAI.MaxCutGames.Explicit.MachineProductLoop.rowBits, OAI.MaxCutGames.Explicit.MachineProductLoop.bodyBound
- theorem
OAI.MaxCutGames.Explicit.MachineProductLoop.traversalInTimeline 174Source documentation
Complete positive-radix tuple traversal with actual row bodies discharged.
theorem traversalInTime (H : Target.Instance q) (base : Tape t → List Bool) (ready : BaseReady H base) : Nonempty (StateTransition.EvalsToInTime (TM2.step (program q t)) (SourceOdometerSchedule.initialConfiguration (m := H.constraints.length) t (rowMain q t) ((), ()) base) …Mentions: OAI.MaxCutGames.Explicit.MachineProductLoop.BaseReady
- theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.base_readyline 210 - def
OAI.MaxCutGames.Explicit.MachineProductFinish.afterRowsline 220 - theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.afterRows_outputline 224 - theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.allRows_eqline 231 - theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.afterRows_accumulatorline 237 - def
OAI.MaxCutGames.Explicit.MachineProductFinish.finishInTimeline 250Source documentation
The entry hop reaches the actual cleanup list, then all work is drained, the accumulator is reversed, and the final finite register is reset.
def finishInTime (base : Tape t → List Bool) (emptyOutput : base (output t) = []) : StateTransition.EvalsToInTime (TM2.step (program q t)) ⟨some .finishStart, (((), ()), none), base⟩ (some ⟨none, (((), ()), none), SourceRuntimeFinish.canonicalTapes (output t) (base (accumulator t)).reverse⟩) (1 + SourceRuntimeFinish.finishCost (clearKeys t) (accumulator t) base) := by … - theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.finishCost_le_uniformline 272Source documentation
A uniform bound on the real cleanup work, from bounds on actual stacks.
theorem finishCost_le_uniform (base : Tape t → List Bool) (bound : Nat) (bounded : ∀ k, (base k).length ≤ bound) : SourceRuntimeFinish.finishCost (clearKeys t) (accumulator t) base ≤ ((clearKeys t).length + 1) * bound + (clearKeys t).length + 2 := by … - theorem
OAI.MaxCutGames.Explicit.MachineProductFinish.finish_afterRowsline 283 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.loopPolynomialline 328 - theorem
OAI.MaxCutGames.Explicit.MachineProductRuntime.loop_budgetline 332 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.prefixPolynomialline 341 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.prefixInTimeline 345Source documentation
Actual header initialization followed by every product row and odometer step.
def prefixInTime {q : Nat} (H : Instance q) (t : Nat) : StateTransition.EvalsToInTime (machine q t).step (initList (machine q t) (gameBits H)) (some (MachineProductFinish.afterRows H t)) ((prefixPolynomial q t).eval (gameBits H).length) := by …Mentions: OAI.MaxCutGames.Explicit.MachineProductFinish.afterRows, OAI.MaxCutGames.Explicit.MachineProductRuntime.prefixPolynomial
- def
OAI.MaxCutGames.Explicit.MachineProductRuntime.timePolynomialline 367 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.outputInTimeline 373Source documentation
The complete run produces the literal full-table target code, clears all private stacks, resets its finite state, and halts.
def outputInTime {q : Nat} (H : Instance q) (presentation : MachineOutputContract.SimpleBipartite H) (t : Nat) (ht : 0 < t) : TM2OutputsInTime (machine q t) (gameBits H) (some (gameBits (ProductPaddedOutput.output H presentation t ht))) ((timePolynomial q t).eval (gameBits H).length) := by …Mentions: OAI.MaxCutGames.Explicit.MachineOutputContract.SimpleBipartite, OAI.MaxCutGames.Explicit.ProductPaddedOutput.output, OAI.MaxCutGames.Explicit.MachineProductRuntime.timePolynomial
- abbrev
OAI.MaxCutGames.Explicit.MachineProductRuntime.Inputline 404Source documentation
The bipartition is proof-side data. Its codec is exactly the underlying instance code and the fixed program does not inspect it.
abbrev Input (q : Nat) := Σ H : Instance q, MachineOutputContract.SimpleBipartite H
Mentions: OAI.MaxCutGames.Explicit.MachineOutputContract.SimpleBipartite
- def
OAI.MaxCutGames.Explicit.MachineProductRuntime.constructline 406 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.computationline 409 - theorem
OAI.MaxCutGames.Explicit.MachineProductRuntime.finiteAlphabetline 424 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.certifyline 430 - def
OAI.MaxCutGames.Explicit.MachineProductRuntime.composeline 441Source documentation
Direct composition with an actual preceding simple-bipartite producer.
def compose (upstream : TM2ComputableInPolyTime encode gameBits f) (presentation : ∀ a, MachineOutputContract.SimpleBipartite (f a)) (t : Nat) (ht : 0 < t) : TM2ComputableInPolyTime encode gameBits (fun a => ProductPaddedOutput.output (f a) (presentation a) t ht) := …Mentions: OAI.MaxCutGames.Explicit.MachineOutputContract.SimpleBipartite, OAI.MaxCutGames.Explicit.ProductPaddedOutput.output
- theorem
OAI.MaxCutGames.Explicit.MachineProductRuntime.compose_finiteAlphabetline 448