OAI/Computability/MaxCut/Machines/MachineTemplateAddress.lean
83 declarations, 0 contain sorry, 0 declared as axioms
A fixed canonical-word template followed by actual radix-address execution. The program is determined by the fixed tokens and tape layout. Numeric field values enter only the tape invariants and execution theorem, never the labels.
- inductive
OAI.MaxCutGames.Reduction.MachineTemplateAddress.Tapeline 18 - abbrev
OAI.MaxCutGames.Reduction.MachineTemplateAddress.Stateline 25 - abbrev
OAI.MaxCutGames.Reduction.MachineTemplateAddress.Alphabetline 26 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.hornerLayoutline 30 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.hornerSlotsline 46 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.chosenline 49 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.mem_chosenline 52 - abbrev
OAI.MaxCutGames.Reduction.MachineTemplateAddress.Labelline 56 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.emitLabelline 60 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.reverseLabelline 62 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parseLabelline 63 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.hornerLabelline 65 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.cleanupLabelline 67 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parseDestinationline 70 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parseDestination_belowline 74 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.instructionline 78Source documentation
Fixed finite instruction assembly, with arbitrary placement and continuation.
def instruction (tokens : List (MachineFieldTemplate.Token q)) (slots : Tape q width ↪ K) (place : Label tokens.length width (chosen slots) → Λ) (exit : Option Λ) : Label tokens.length width (chosen slots) → TM2.Stmt (Alphabet (K := K)) Λ (State σ) …Mentions: OAI.MaxCutGames.Reduction.MachineFieldTemplate.Token, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Tape, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Label, OAI.MaxCutGames.Reduction.MachineTemplateAddress.chosen, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Alphabet, OAI.MaxCutGames.Reduction.MachineTemplateAddress.State
- def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.programline 101 - structure
OAI.MaxCutGames.Reduction.MachineTemplateAddress.Cleanline 107 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.digitsline 117 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.forwardTapesline 119 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parsedTapesline 122 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.resultTapesline 127 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.afterHornerline 130 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseStepsline 135 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.resultTapes_outputline 142 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.resultTapes_otherline 146 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.hornerValue_eq_radixline 152Source documentation
The numeric recurrence used by the checked Horner machine is the direct canonical-address radix, in the original template-word order.
theorem hornerValue_eq_radix (B : Nat) (values : List Nat) : MachineHorner.value B (digits values) values.length = CanonicalAddress.radix B values := by …Mentions: OAI.MaxCutGames.Reduction.MachineTemplateAddress.digits, OAI.MaxCutGames.Reduction.CanonicalAddress.radix
- theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parsedTapes_otherline 162 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parsedTapes_sourceline 173 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parsedTapes_digitline 182 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parsedTapes_cleanline 201 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.cleanup_resultline 222 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parse_atStartline 262 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parse_atLoopline 271 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.parse_atDoneline 281 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseTraceline 287 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.programTraceline 381Source documentation
The emitted finite program discharges every instruction-placement premise.
theorem programTrace (tokens : List (MachineFieldTemplate.Token q)) (slots : Tape q width ↪ K) (exit : Option (Label tokens.length width (chosen slots))) (base : K → List Bool) (B : Nat) (values : List Nat) (hlen : values.length = width) (clean : Clean slots base) (baseField : base (slots .radix) = encodeWord B) (wordCorrect : MachineFieldTemplate.templateOutput tokens (fun j => base (slots (.field j))) = encodeWords values) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step (program tokens slots exit)))^[phaseSteps tokens slots base B values] (some ⟨some (emitLabel (MachineFieldTemplate.startAt tokens.length 0)), ((ambient, ()), register), base⟩) = some ⟨exit, ((ambient, ()), none), resultTapes slots base (CanonicalAddress.radix B values)⟩ := …Mentions: OAI.MaxCutGames.Reduction.MachineFieldTemplate.Token, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Tape, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Label, OAI.MaxCutGames.Reduction.MachineTemplateAddress.chosen, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Clean, OAI.MaxCutGames.Reduction.MachineFieldTemplate.templateOutput, OAI.MaxCutGames.Reduction.MachineTemplateAddress.program, OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseSteps, OAI.MaxCutGames.Reduction.MachineTemplateAddress.emitLabel, OAI.MaxCutGames.Reduction.MachineFieldTemplate.startAt, OAI.MaxCutGames.Reduction.MachineTemplateAddress.resultTapes, OAI.MaxCutGames.Reduction.CanonicalAddress.radix
- def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseInTimeline 395Source documentation
Timed witness with the exact sum of the five concrete phase counts.
def phaseInTime (tokens : List (MachineFieldTemplate.Token q)) (slots : Tape q width ↪ K) (place : Label tokens.length width (chosen slots) → Λ) (exit : Option Λ) (P : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.MaxCutGames.Reduction.MachineFieldTemplate.Token, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Tape, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Label, OAI.MaxCutGames.Reduction.MachineTemplateAddress.chosen, OAI.MaxCutGames.Reduction.MachineTemplateAddress.Alphabet, OAI.MaxCutGames.Reduction.MachineTemplateAddress.State
- theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.copiedLength_le_inline_MachineTemplateAddressline 414 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.lengthSum_le_inline_MachineTemplateAddressline 432 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.timePolynomialline 446Source documentation
A fixed polynomial in a magnitude bounding input fields, the serialized word list, the radix, and the digits. Width and token count are static.
noncomputable def timePolynomial (tokenCount width : Nat) : Polynomial Nat := …
- theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.timePolynomial_evalline 452 - theorem
OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseSteps_le_timePolynomialline 458 - def
OAI.MaxCutGames.Reduction.MachineTemplateAddress.phaseInPolynomialTimeline 491 - abbrev
OAI.MaxCutGames.Reduction.MachineAddressEdge.Tapeline 525 - abbrev
OAI.MaxCutGames.Reduction.MachineAddressEdge.Stateline 526 - abbrev
OAI.MaxCutGames.Reduction.MachineAddressEdge.Alphabetline 527 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.addressSlotsline 531 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.capacityTapeline 535 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.outputTapeline 536 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.workTapeline 537 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.tempTapeline 538 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.scratchTapeline 539 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.address_ne_outputline 542 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.capacity_ne_outputline 546 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.work_ne_outputline 550 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.temp_ne_workline 554 - abbrev
OAI.MaxCutGames.Reduction.MachineAddressEdge.Labelline 557 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.leftLabelline 560 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.rightLabelline 562 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.plumbingline 564 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.instructionline 567 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.programline 593 - structure
OAI.MaxCutGames.Reduction.MachineAddressEdge.Cleanline 598 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.appendedline 602 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.appended_addressline 605 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.appended_capacityline 611 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.appended_outputline 615 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.appended_otherline 620 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.appended_appendline 625 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.Clean.appendedline 630 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.edgeBitsline 644 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.phaseStepsline 649 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.addressResult_eqline 657 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.transfer_resultline 661 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.literalStepline 692 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.phaseTraceline 703Source 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.MaxCutGames.Reduction.MachineAddressEdge.Clean, OAI.MaxCutGames.Reduction.MachineAddressEdge.addressSlots, OAI.MaxCutGames.Reduction.MachineAddressEdge.capacityTape, OAI.MaxCutGames.Reduction.MachineFieldTemplate.templateOutput, OAI.MaxCutGames.Reduction.MachineAddressEdge.phaseSteps
- theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.programTraceline 836 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.phaseInTimeline 859 - def
OAI.MaxCutGames.Reduction.MachineAddressEdge.timePolynomialline 890Source 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.MaxCutGames.Reduction.MachineAddressEdge.timePolynomial_evalline 896 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.radix_le_magnitudeline 904 - theorem
OAI.MaxCutGames.Reduction.MachineAddressEdge.phaseSteps_le_timePolynomialline 913