OAI/Computability/UniqueGames/Machines/MachineRadixStepLemmas.lean
72 declarations, 0 contain sorry, 0 declared as axioms
One actual Horner step on unary field stacks. Multiplication and addition are executions of the same finite program. All three operands are preserved; only the output stack receives a new field and both work stacks return empty.
- inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.Labelline 18 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.Alphabetline 23 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.Stateline 24 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlotsline 30Source documentation
Multiplication uses radix, accumulator, output, counter, and scratch, skipping the independently preserved digit stack.
def multiplySlots (slots : Fin 6 ↪ K) : Fin 5 ↪ K := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlots_zeroline 33 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlots_oneline 34 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlots_twoline 35 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlots_threeline 36 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.multiplySlots_fourline 37 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.statementline 41 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.programline 53 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.machineline 56 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.resultTapesline 67 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.resultTapes_outputline 70 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.resultTapes_otherline 74 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.stepsline 78 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.radixStepTraceline 82Source documentation
A concrete Horner execution. Caller hypotheses identify the finite code, not an assumed execution or arithmetic oracle.
theorem radixStepTrace (slots : Fin 6 ↪ K) (labels : Label → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.radixStepInTimeline 166 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.timePolynomialline 184 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.steps_le_timePolynomialline 187 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.programTraceline 198 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRadixStep.programInPolynomialTimeline 210 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layoutline 246 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabetline 247 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Stateline 248 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.parityline 250 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.accumulatorline 254 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.accumulator_neline 256 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixLayoutline 259 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlotsline 271 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_baseline 274 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_accline 276 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_digitline 278 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_outline 280 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_counterline 282 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radixSlots_scratchline 284 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Labelline 287 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.entryLabelline 294 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.drainLoopline 298Source documentation
Consume an isolated unary field, including its delimiter.
def drainLoop (tape : K) (loopLabel : Λ) (exit : Option Λ) : TM2.Stmt (Alphabet (K := K)) Λ (State σ) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.statementline 307 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.programline 321 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.machineline 324 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.valueline 335 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.stepCostline 339 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.prefixStepsline 342 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.stageTapesline 346 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.resultTapesline 349 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.drainTraceline 352 - structure
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Cleanline 376 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Clean.accline 383 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.digitTraceline 391Source documentation
One genuine radix execution followed by a unary drain of its old input accumulator. The new accumulator is left in the alternate physical tape.
theorem digitTrace (slots : Layout width ↪ K) (labels : Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layout, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.prefixTraceline 463Source documentation
Prefix induction follows the fixed finite sequence of digit labels.
theorem prefixTrace (slots : Layout width ↪ K) (labels : Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layout, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.finishTraceline 486Source documentation
Move the final accumulator to the external output, restoring its order and emptying accumulator/scratch. The old destination is retained as a suffix.
theorem finishTrace (slots : Layout width ↪ K) (labels : Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layout, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.stepsline 557 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.hornerTraceline 562Source documentation
Complete actual Horner execution on preserved digit/base fields. Initial work tapes are empty; only the destination changes at the optional continuation.
theorem hornerTrace (slots : Layout width ↪ K) (labels : Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layout, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.value_eq_foldlline 593 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.value_add_one_leline 606Source documentation
A magnitude bound accommodates arbitrary digits, including fixed polynomial coefficients larger than the radix. No bounded-digit assumption is needed for execution correctness.
theorem value_add_one_le (radix : Nat) (digits : Nat → Nat) (width magnitude : Nat) (radixBound : radix ≤ magnitude) (digitBound : ∀ i, i < width → digits i ≤ magnitude) (n : Nat) (hn : n ≤ width) : value radix digits n + 1 ≤ (magnitude + 1) ^ n := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.value
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.value_leline 625 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.perDigitBoundline 633 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.stepCost_leline 637 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.prefixSteps_leline 646 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.timePolynomialline 665 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.timePolynomial_evalline 672 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.steps_le_timePolynomialline 678 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.hornerInTimeline 688 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.hornerInPolynomialTimeline 704 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.operandLengthline 725Source documentation
The actual total bit length of the isolated radix and digit fields.
def operandLength (radix : Nat) (digits : Nat → Nat) (width : Nat) : Nat := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.radix_le_operandLengthline 729 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.digit_le_operandLengthline 736 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.resultTapes_outputline 747 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.resultTapes_otherline 751 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.hornerInEncodedPolynomialTimeline 757Source documentation
Actual subroutine time bounded in the concrete lengths of its operand fields. The destination suffix and unrelated tapes are preserved without scans.
def hornerInEncodedPolynomialTime (slots : Layout width ↪ K) (labels : Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Layout, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineHorner.State