OAI/Computability/MaxCut/Machines/MachineClone100Table.lean
85 declarations, 0 contain sorry, 0 declared as axioms
The literal four-word row used by the hundred-clone finite machine. The natural-number triple is a fixed program parameter; its bounds and distinctness are needed only when identifying the output with the typed parity instance.
- def
OAI.MaxCutGames.Explicit.MachineClone100Table.cloneEquationWordsline 18 - inductive
OAI.MaxCutGames.Explicit.MachineClone100Model.Tapeline 33 - abbrev
OAI.MaxCutGames.Explicit.MachineClone100Model.Contextline 37 - abbrev
OAI.MaxCutGames.Explicit.MachineClone100Model.Stateline 38 - abbrev
OAI.MaxCutGames.Explicit.MachineClone100Model.Alphabetline 39 - inductive
OAI.MaxCutGames.Explicit.MachineClone100Model.Labelline 41 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.defaultControlline 57 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.initialStateline 58 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.headerTapeline 60 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.contextSourceline 62 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.contextScaleline 66 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.tripleFieldline 70 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.contextOffsetline 77 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.affineEmitline 81 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.emissionline 85 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.contextNextline 88 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.cleanupNextline 95 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.drainline 98 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.programline 105 - def
OAI.MaxCutGames.Explicit.MachineClone100Model.machineline 128 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextSource_ne_scratchline 149 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextSource_ne_reversedline 157 - def
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapesline 165 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapes_reversedline 171 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapes_otherline 178 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapes_sourceline 184 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapes_scratchline 189 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.setupStepline 195Source documentation
Setup discards arbitrary old control and register values before scanning.
theorem setupStep (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (context : Context triples.length) (base : Tape → List Bool) (state : State triples.length) : TM2.step (program triples nonempty) ⟨some (.setup context), state, base⟩ = some ⟨some (.scan context), (((), context), none), base⟩ := rfl - theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextTraceline 201 - def
OAI.MaxCutGames.Explicit.MachineClone100Context.contextInTimeline 225Source documentation
The exact trace packaged for composition with neighboring cloning stages.
def contextInTime (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (context : Context triples.length) (base : Tape → List Bool) (scratchEmpty : base .scratch = []) (state : State triples.length) : StateTransition.EvalsToInTime (TM2.step (program triples nonempty)) ⟨some (.setup context), state, base⟩ (some ⟨contextNext context, initialState _, contextTapes triples context base⟩) (3 * (base (contextSource context)).length + 3) where …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Context.contextTapes
- theorem
OAI.MaxCutGames.Explicit.MachineClone100Context.contextInTime_stepsline 236 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_eq_flatMapline 252Source documentation
Identity control transitions reduce exactly to fixed symbol substitution.
theorem output_eq_flatMap {Q : Type} [Fintype Q] (emit : Q → Bool → List Bool) (q : Q) (input : List Bool) : MachineTransducer.output (fun state _ => state) emit q input = input.flatMap (emit q) := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_appendline 261 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.affineEmit_replicate_trueline 268 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.affineEmit_wordline 276Source documentation
This includes zero scale and zero offset, with no positivity assumptions.
theorem affineEmit_word (scale offset v : Nat) : (encodeWord v).flatMap (affineEmit scale offset) = encodeWord (offset + scale * v) := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.affineEmit_word_appendline 283 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.affineEmit_wordsline 288 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_wordline 297Source documentation
Exact symbolic context transform used by the shared clone-table machine.
theorem output_word (triples : List (Nat × Nat × Nat)) (c : Context triples.length) (v : Nat) : MachineTransducer.output (fun q _ => q) (emission triples) c (encodeWord v) = encodeWord (contextOffset triples c + contextScale c * v) := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_word_appendline 304 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_wordsline 311 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_header_variablesline 318 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_header_countline 324Source documentation
The equation-count multiplier remains the arbitrary symbolic table length.
theorem output_header_count (triples : List (Nat × Nat × Nat)) (v : Nat) : MachineTransducer.output (fun q _ => q) (emission triples) (.inl 1) (encodeWord v) = encodeWord (triples.length * v) := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_fieldline 329 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_first_fieldline 335 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_second_fieldline 341 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_third_fieldline 347 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Affine.output_rhs_fieldline 354Source documentation
RHS words are copied exactly, including both legal Boolean values.
theorem output_rhs_field (triples : List (Nat × Nat × Nat)) (i : Fin triples.length) (v : Nat) : MachineTransducer.output (fun q _ => q) (emission triples) (.inr (i, 3)) (encodeWord v) = encodeWord v := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.drainStep_consline 373Source documentation
The finite drain statement pops one symbol and retains the ambient control.
theorem drainStep_cons (tape : Tape) (again next : Label D) (program : Label D → TM2.Stmt Alphabet (Label D) (State D)) (atAgain : program again = drain tape again next) (base : Tape → List Bool) (bit : Bool) (input : List Bool) (control : Unit × Context D) (register : Option Bool) : TM2.step program ⟨some again, (control, register), Function.update base tape (bit :: input)⟩ = some ⟨some again, (control, some bit), Function.update base tape input⟩ := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.drainStep_nilline 387Source documentation
The exit transition observes the empty tape and resets the optional bit.
theorem drainStep_nil (tape : Tape) (again next : Label D) (program : Label D → TM2.Stmt Alphabet (Label D) (State D)) (atAgain : program again = drain tape again next) (base : Tape → List Bool) (control : Unit × Context D) (register : Option Bool) : TM2.step program ⟨some again, (control, register), Function.update base tape []⟩ = some ⟨some next, (control, none), Function.update base tape []⟩ := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.drainTraceline 401Source documentation
Direct list induction gives exactly one transition per symbol plus the empty-tape exit; no whole execution trace is assumed.
theorem drainTrace (tape : Tape) (again next : Label D) (program : Label D → TM2.Stmt Alphabet (Label D) (State D)) (atAgain : program again = drain tape again next) (base : Tape → List Bool) (input : List Bool) (control : Unit × Context D) (register : Option Bool) : (MachineComposition.advance (TM2.step program))^[input.length + 1] (some ⟨some again, (control, register), Function.update base tape input⟩) = some ⟨some next, (control, none), Function.update base tape []⟩ := by … - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.drainTrace_baseline 422Source documentation
Caller form: the selected tape's initial contents are read from the frame.
theorem drainTrace_base (tape : Tape) (again next : Label D) (program : Label D → TM2.Stmt Alphabet (Label D) (State D)) (atAgain : program again = drain tape again next) (base : Tape → List Bool) (control : Unit × Context D) (register : Option Bool) : (MachineComposition.advance (TM2.step program))^[(base tape).length + 1] (some ⟨some again, (control, register), base⟩) = some ⟨some next, (control, none), Function.update base tape []⟩ := by … - def
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.drainInTimeline 432 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearHeaderTraceline 446 - def
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearHeaderInTimeline 454 - def
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFieldsline 464Source documentation
The four explicit updates made by the successive cleanup labels.
def clearFields (base : Tape → List Bool) : Tape → List Bool := …
- theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_fieldline 468 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_otherline 472 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_inputline 476 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_headerline 478 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_counterline 480 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_scratchline 482 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_reversedline 484 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_outputline 486 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_eq_selfline 489 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields_idempotentline 494 - def
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.cleanupStepsline 498 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.cleanupTraceline 502 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.cleanupFourTraceline 513Source documentation
All four field stacks are consumed by the actual cleanup program.
theorem cleanupFourTrace (triples : List (Nat × Nat × Nat)) (nonempty : triples ≠ []) (base : Tape → List Bool) (control : Unit × Context triples.length) (register : Option Bool) : (MachineComposition.advance (TM2.step (program triples nonempty)))^[cleanupSteps base] (some ⟨some (.cleanup 0), (control, register), base⟩) = some ⟨some .guard, (control, none), clearFields base⟩ := by …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Cleanup.cleanupSteps, OAI.MaxCutGames.Explicit.MachineClone100Cleanup.clearFields
- def
OAI.MaxCutGames.Explicit.MachineClone100Cleanup.cleanupFourInTimeline 552 - def
OAI.MaxCutGames.Explicit.MachineClone100Headers.parsedTapesline 576 - def
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapesline 585Source documentation
Exact header-stage endpoint. The occurrence counter is retained for the body loop; generated output is accumulated in reverse.
def resultTapes (triples : List (Nat × Nat × Nat)) (base : Tape → List Bool) (n m : Nat) (suffix : List Bool) : Tape → List Bool | .input => suffix | .header => [] | .counter => encodeWord m | .reversed => (encodeWords [100 * n, triples.length * m]).reverse | tape => base tape - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_inputline 593 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_headerline 595 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_counterline 597 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_reversedline 599 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_scratchline 602 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_fieldline 604 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes_outputline 606 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.twoFieldsTapes_inline_MachineClone100Headersline 609 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.firstContextTapes_inline_MachineClone100Headersline 618 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.secondContextTapes_inline_MachineClone100Headersline 626 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.clearHeaderTapes_inline_MachineClone100Headersline 636 - theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.headersTraceline 645 - def
OAI.MaxCutGames.Explicit.MachineClone100Headers.headersInTimeline 721Source documentation
The exact header trace packaged in the machine execution-time interface.
def headersInTime (triples : List (Nat × Nat × Nat)) (hne : triples ≠ []) (base : Tape → List Bool) (n m : Nat) (suffix : List Bool) (hinput : base .input = encodeWords [n, m] ++ suffix) (hheader : base .header = []) (hcounter : base .counter = []) (hscratch : base .scratch = []) (hreversed : base .reversed = []) : StateTransition.EvalsToInTime (TM2.step (program triples hne)) ⟨some (.headerStart 0), initialState triples.length, base⟩ (some ⟨some .guard, initialState triples.length, resultTapes triples base n m suffix⟩) (5 * n + 4 * m + 18) where …Mentions: OAI.MaxCutGames.Explicit.MachineClone100Headers.resultTapes
- theorem
OAI.MaxCutGames.Explicit.MachineClone100Headers.headersTime_linearline 734