OAI/Computability/MaxCut/Machines/MachineClone100Triples.lean
70 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowOutputline 15 - def
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowStepsline 21 - def
OAI.MaxCutGames.Explicit.MachineClone100Triples.startAtline 25 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.contextTapes_fieldline 28 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowOutput_updateline 33 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowSteps_updateline 38 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.chain_inline_MachineClone100Triplesline 42 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.fourContexts_tapesline 46 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowTraceline 58Source documentation
Execute each of the four actual contexts in slot order.
theorem rowTrace (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (i : Fin triples.length) (base : Tape → List Bool) (scratchEmpty : base .scratch = []) (state : State triples.length) : (MachineComposition.advance (TM2.step (program triples nonempty)))^[rowSteps base] (some ⟨some (.setup (.inr (i, 0))), state, base⟩) = some ⟨startAt triples.length (i.val + 1), initialState _, Function.update base .reversed ((rowOutput (triples.get i) base).reverse ++ base .reversed)⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Triples.rowSteps, OAI.MaxCutGames.Explicit.MachineClone100Triples.startAt, OAI.MaxCutGames.Explicit.MachineClone100Triples.rowOutput
- theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.tailTrace_inline_MachineClone100Triplesline 93 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.tableTrace_rawline 133 - def
OAI.MaxCutGames.Explicit.MachineClone100Triples.affineRecordline 144 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.rowOutput_wordsline 147 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.tableOutput_wordsline 155 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.tableTraceline 168Source documentation
The actual inner loop outputs the concrete cloned equation words.
theorem tableTrace (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (base : Tape → List Bool) (scratchEmpty : base .scratch = []) (state : State triples.length) (a b c rhs : Nat) (h0 : base (.field 0) = encodeWord a) (h1 : base (.field 1) = encodeWord b) (h2 : base (.field 2) = encodeWord c) (h3 : base (.field 3) = encodeWord rhs) : (MachineComposition.advance (TM2.step (program triples nonempty)))^[ triples.length * (3 * ((a + 1) + (b + 1) + (c + 1) + (rhs + 1)) + 12)] (some ⟨some (.setup (.inr (⟨0, List.length_pos_iff.mpr nonempty⟩, 0))), state, base⟩) = some ⟨some (.cleanup 0), initialState _, Function.update base .reversed ((encodeWords (triples.flatMap (affineRecord a b c rhs))).reverse ++ base .reversed)⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Triples.affineRecord
- theorem
OAI.MaxCutGames.Explicit.MachineClone100Triples.tableTapes_otherline 182 - structure
OAI.MaxCutGames.Explicit.MachineClone100Loop.Recordline 199 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordWordsline 205 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordBitsline 206 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordsBitsline 207 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.clonedRecordBitsline 209 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.clonedRecordsBitsline 212 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordFieldsline 215 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.tapesline 220Source documentation
The frame records all tapes, including untouched header and output tapes. At every loop guard the four fields are empty and scratch is empty.
def tapes (base : Tape → List Bool) (input counter accumulator : List Bool) (fields : Fin 4 → List Bool) : Tape → List Bool | .input => input | .header => base .header | .counter => counter | .field j => fields j | .scratch => [] | .reversed => accumulator | .output => base .output - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.update_reversedline 230 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.counterTapes_eqline 237 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.fourTapes_eqline 245 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.clearFields_eqline 260 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.cleanupSteps_eqline 267 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordBits_lengthline 274 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.bodyCostline 279 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.bodyCost_eq_inline_MachineClone100Loopline 282 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.bodyInTimeline 289 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.loopCostline 338 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.loopCost_eqline 342 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.loopInTimeline 355Source documentation
The complete record loop consumes exactly the specified occurrence list. The final zero guard retains the counter delimiter for the final cleanup stage. Arbitrary suffixes and already emitted prefixes are preserved explicitly.
def loopInTime (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (base : Tape → List Bool) (suffix : List Bool) (rs : List Record) (acc : List Bool) : StateTransition.EvalsToInTime (TM2.step (program triples nonempty)) ⟨some .guard, initialState _, tapes base (recordsBits rs ++ suffix) (encodeWord rs.length) acc (fun _ => [])⟩ (some ⟨some .finalCounter, initialState _, tapes base suffix (encodeWord 0) ((clonedRecordsBits triples rs).reverse ++ acc) (fun _ => [])⟩) (loopCost triples.length rs) := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Loop.Record, OAI.MaxCutGames.Explicit.MachineClone100Loop.tapes, OAI.MaxCutGames.Explicit.MachineClone100Loop.recordsBits, OAI.MaxCutGames.Explicit.MachineClone100Loop.clonedRecordsBits, OAI.MaxCutGames.Explicit.MachineClone100Loop.loopCost
- def
OAI.MaxCutGames.Explicit.MachineClone100Loop.loopInTime_linearline 390Source documentation
A linear bound derived from the actual composed execution.
def loopInTime_linear (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (base : Tape → List Bool) (suffix : List Bool) (rs : List Record) (acc : List Bool) : StateTransition.EvalsToInTime (TM2.step (program triples nonempty)) ⟨some .guard, initialState _, tapes base (recordsBits rs ++ suffix) (encodeWord rs.length) acc (fun _ => [])⟩ (some ⟨some .finalCounter, initialState _, tapes base suffix (encodeWord 0) ((clonedRecordsBits triples rs).reverse ++ acc) (fun _ => [])⟩) ((2 + 3 * triples.length) * (recordsBits rs).length + (9 + 12 * triples.length) * rs.length + 1) := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Loop.Record, OAI.MaxCutGames.Explicit.MachineClone100Loop.tapes, OAI.MaxCutGames.Explicit.MachineClone100Loop.recordsBits, OAI.MaxCutGames.Explicit.MachineClone100Loop.clonedRecordsBits
- def
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordOfEquationline 402 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.recordsBits_equationsline 405 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Loop.clonedRecordsBits_equations_tableline 415 - def
OAI.MaxCutGames.Explicit.MachineClone100Loop.sourceLoopInTime_tableline 426 - def
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTapesline 452 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTapes_counterline 456 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTapes_reversedline 459 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTapes_outputline 462 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTapes_otherline 466 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.counterStepline 471 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishTraceline 478 - def
OAI.MaxCutGames.Explicit.MachineClone100Finish.finishInTimeline 502 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Finish.finish_eq_haltListline 511 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.tmline 536 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.emptyTapesline 539 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.sourceBodyline 541 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.outputHeadersline 544 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.outputBodyline 548 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.outputBitsline 553 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.inputTapesline 557 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.guardTapesline 560 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.afterLoopTapesline 565 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.inputBits_eqline 570 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.initList_eqline 575 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.headers_result_eqline 588 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.afterLoop_reversedline 595 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.afterLoop_lengthline 600 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Run.finish_eqline 606 - def
OAI.MaxCutGames.Explicit.MachineClone100Run.runInTimeline 620Source documentation
Actual execution from the existing input codec to the complete literal halt configuration, with the sum of the three proved phase budgets.
def runInTime (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (input : SourceEncoding.Input) : TM2OutputsInTime (tm triples nonempty) (SourceEncoding.inputBits input) (some (outputBits triples input)) (((outputBits triples input).length + 2) + (((2 + 3 * triples.length) * (sourceBody input).length + (9 + 12 * triples.length) * input.equations.length + 1) + (5 * input.«variables» + 4 * input.equations.length + 18))) := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Run.tm, OAI.MaxCutGames.Explicit.MachineClone100Run.outputBits, OAI.MaxCutGames.Explicit.MachineClone100Run.sourceBody
- def
OAI.MaxCutGames.Explicit.MachineClone100Certified.timePolynomialline 667 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Certified.timePolynomial_evalline 671 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Certified.numericalBudget_inline_MachineClone100Certifiedline 677 - def
OAI.MaxCutGames.Explicit.MachineClone100Certified.certifiedFunctionline 691