OAI/Computability/UniqueGames/Reduction/MachineAddressEdgeLemmas.lean
79 declarations, 0 contain sorry, 0 declared as axioms
Actual edge emission from two fixed address templates. Capacity is copied before unary addition, so the original capacity tape is preserved. All local labels and literal instructions depend only on fixed templates and layout.
- abbrev
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Tapeline 20 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Stateline 21 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Alphabetline 22 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.addressSlotsline 26 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.capacityTapeline 30 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.outputTapeline 31 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.workTapeline 32 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.tempTapeline 33 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.scratchTapeline 34 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.address_ne_outputline 37 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.capacity_ne_outputline 41 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.work_ne_outputline 45 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.temp_ne_workline 49 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Labelline 52 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.leftLabelline 55 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.rightLabelline 57 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.plumbingline 59 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.instructionline 62 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.programline 88 - structure
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Cleanline 93 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appendedline 97 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appended_addressline 100 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appended_capacityline 106 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appended_outputline 110 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appended_otherline 115 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.appended_appendline 120 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Clean.appendedline 125 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.edgeBitsline 139 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.phaseStepsline 144 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.addressResult_eqline 152 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.transfer_resultline 156 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.literalStepline 187 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.phaseTraceline 198Source documentation
Both actual address computations, a preserved-capacity copy, unary addition, cleanup, two reverse transfers, and the fixed permutation instruction.
theorem phaseTrace (base : K → List Bool) (B C : Nat) (leftValues rightValues : List Nat) (leftLength : leftValues.length = width) (rightLength : rightValues.length = width) (clean : Clean slots base) (baseField : base (addressSlots slots .radix) = encodeWord B) (capacityField : base (capacityTape slots) = encodeWord C) (leftCorrect : MachineFieldTemplate.templateOutput left (fun j => base (addressSlots slots (.field j))) = encodeWords leftValues) (rightCorrect : MachineFieldTemplate.templateOutput right (fun j => base (addressSlots slots (.field j))) = encodeWords rightValues) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step P))^[phaseSteps left right slots base B C leftValues rightValues] …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Clean, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.addressSlots, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.capacityTape, OAI.UniqueGamesTheorem.Reduction.MachineFieldTemplate.templateOutput, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.phaseSteps
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.programTraceline 331 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.phaseInTimeline 354 - def
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.timePolynomialline 385Source documentation
A fixed polynomial in a common magnitude bound for the input fields, serialized words, radix, capacity, and digits.
noncomputable def timePolynomial (leftCount rightCount width : Nat) : Polynomial Nat := …
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.timePolynomial_evalline 391 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.radix_le_magnitudeline 399 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.phaseSteps_le_timePolynomialline 408 - structure
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Specline 447 - structure
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Valuesline 453Source documentation
Numeric interpretations are proof-side data, separate from the program.
structure Values (width : Nat) where …
- abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Rhsline 459 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Rowline 460 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Stateline 461 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Alphabetline 462 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.LocalLabelline 466 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.localMainline 470 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.localInstructionline 475 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.payloadline 480 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowResultline 484 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCostline 489 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCostsline 496Source documentation
Exact per-row costs at their actual accumulated output frames.
def rowCosts (slots : MachineAddressEdge.Tape q width ↪ K) (B C : Nat) (values : Spec q width → Values width) : List (Spec q width) → (K → List Bool) → List Nat | [], _ => [] | row :: rows, base => rowCost slots B C values row base :: rowCosts slots B C values rows (rowResult slots B C values row base)Mentions: OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Tape, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Spec, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Values, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCost, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowResult
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCosts_lengthline 503 - structure
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Invariantline 511 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Invariant.appendedline 525 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.appended_nilline 536 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.sequence_resultline 540 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.sequence_stepsline 552 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.sequenceInstructionline 561 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.sequenceTraceline 569Source documentation
The generic finite-sequence local obligation is discharged by the concrete edge program, including its address arithmetic and capacity restoration.
theorem sequenceTrace (slots : MachineAddressEdge.Tape q width ↪ K) (rows : List (Spec q width)) (place : MachineFiniteSequence.Label (LocalLabel slots) rows → Λ) (exit : Option Λ) (P : Λ → TM2.Stmt (Alphabet (K := K)) Λ (MachineAddressEdge.State σ)) …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Tape, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Spec, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.LocalLabel, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Alphabet, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.State
- def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.selectedline 596 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.selected_lengthline 599 - abbrev
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Labelline 602 - instance
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.localLabelFintypeline 605 - instance
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.localLabelDecidableEqline 608 - instance
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.labelFintypeline 619 - instance
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.labelDecidableEqline 622 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.sequenceEntryline 625 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.dispatcherline 633Source documentation
Reuse the RHS vector already loaded by
MachineRhsLoad; dispatch takes one real transition, and resets only the optional temporary bit.def dispatcher (slots : MachineAddressEdge.Tape q width ↪ K) : (rows : List (Row k q width)) → (Label slots rows → Λ) → Option Λ → TM2.Stmt (Alphabet (K := K)) Λ (State k σ) …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Tape, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Row, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Label, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Alphabet, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.State
- def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.instructionline 641 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.programline 648 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.dispatcherStepline 652 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.phaseTraceline 665 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.phaseInTimeline 687 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.emitted_outputline 704 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.exact_row_countline 713 - def
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.timePolynomialline 721Source documentation
Sum of fixed row polynomials; the additional constant is the dispatcher. This proof-side polynomial contains no runtime input field values.
noncomputable def timePolynomial (rows : List (Spec q width)) : Polynomial Nat := …
Mentions: OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Spec
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCosts_sum_leline 725 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.phaseCost_le_timePolynomialline 756Source documentation
The actual dispatcher-and-rows count is bounded by a fixed polynomial in explicit tape and digit magnitudes, using the checked edge arithmetic bound.
theorem phaseCost_le_timePolynomial (slots : MachineAddressEdge.Tape q width ↪ K) (rows : List (Spec q width)) (base : K → List Bool) (B C : Nat) (values : Spec q width → Values width) (M : Nat) (clean : MachineAddressEdge.Clean slots base) (fieldsBound : ∀ j, (base (MachineAddressEdge.addressSlots slots (.field j))).length ≤ M) (radixBound : B ≤ M) (capacityBound : C ≤ M) (valuesBound : ∀ row ∈ rows, (encodeWords (values row).left).length ≤ M ∧ (encodeWords (values row).right).length ≤ M ∧ (∀ i, i < width → MachineTemplateAddress.digits (values row).left i ≤ M) ∧ (∀ i, i < width → MachineTemplateAddress.digits (values row).right i ≤ M)) : (rowCosts slots B C values rows base).sum + 1 ≤ (timePolynomial rows).eval M := by …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Tape, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Spec, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.Values, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.Clean, OAI.UniqueGamesTheorem.Reduction.MachineAddressEdge.addressSlots, OAI.UniqueGamesTheorem.Reduction.MachineTemplateAddress.digits, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.rowCosts, OAI.UniqueGamesTheorem.Reduction.MachineOutcomeRows.timePolynomial