OAI/Computability/UniqueGames/PCP/SourceDescriptorEmissionLemmas.lean
89 declarations, 0 contain sorry, 0 declared as axioms
Emit one fixed descriptor equation from three preserved unary base registers. The output order is first address, second address, third address, RHS. The actual stack program emits those fields in reverse order.
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.codedEquationline 24 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorWordsline 28 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorBitsline 31 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorWords_lengthline 34 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorBits_length_leline 38 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.decode_descriptorBitsline 42 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.parse_descriptorWordsline 46 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.decode_codedEquationline 54Source documentation
Decoding the finite address suffixes recovers the exact local equation, including all repeated occurrences and the Boolean correction.
theorem decode_codedEquation (u D : ℕ) (state : LocalInput u D) : mapEquation (localKeyEncoding u).code.symm (codedEquation u D state) = SourceLocalEquation.emit u D state := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.mapEquation, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.codedEquation, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceLocalEquation.emit
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.codedEquation_globalline 65 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorPushBoundline 74 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorPushBound_leline 77 - instance
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.localInputDecidableEqline 94Source documentation
Executable state equality is obtained from the explicit radix code.
instance localInputDecidableEq (u D : ℕ) : DecidableEq (LocalInput u D) := …
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.emitDescriptorline 102Source documentation
Concrete finite-table statement. Its state is the finite signature/tape pair; every branch leaf contains a fixed finite push chain.
def emitDescriptor (u D : ℕ) (dst : K) (next : TM2.Stmt (fun _ : K => Bool) Λ (LocalInput u D)) : TM2.Stmt (fun _ : K => Bool) Λ (LocalInput u D) := … - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.stepAux_emitDescriptorline 108 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.emitDescriptor_push_boundline 119 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.emitDescriptorInTimeline 128Source documentation
One actual TM2 transition emits the descriptor and enters the chosen continuation label. Only a program-definition equation is required.
def emitDescriptorInTime (u D : ℕ) (dst : K) (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ (LocalInput u D)) (label exitLabel : Λ) (atLabel : program label = emitDescriptor u D dst (.goto (fun _ => exitLabel))) (state : LocalInput u D) (tapes : K → List Bool) : StateTransition.EvalsToInTime (TM2.step program) ⟨some label, state, tapes⟩ (some ⟨some exitLabel, state, Function.update tapes dst (descriptorBits u D state ++ tapes dst)⟩) 1 := …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.emitDescriptor, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptorBits
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceDescriptorEmission.descriptor_output_frameline 141 - inductive
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Labelline 160 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Label.enumListline 165 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Label.enumList_getElem?_ctorIdx_eqline 168 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Label.enumList_nodupline 172 - instance
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.(instance at line 174)line 174 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Alphabetline 178 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Stateline 179 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.rhsBitline 181 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.stepsline 183 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.statementline 188 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.programline 211 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.prefixTapesline 215 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.prefixTapes_otherline 218 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.equationTraceline 222 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.equationInTimeline 293 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.programInTimeline 312 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.Tapeline 327 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.machineline 329 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceEquationEmit.machineInTimeline 340 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.positionEncodingline 358 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.namesline 361 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.nameWordsline 365 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.reindexProfileline 369 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.computed_profile_eqline 373 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.prepared_signature_eqline 381 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.nameWords_length_le_inputline 391Source documentation
Every isolated unary variable-name field is bounded by the true CNF input encoding, including formulas with unused declared variable names.
theorem nameWords_length_le_input (F : Formula) {u : ℕ} (c : ClauseContext F u) (i : Fin (positionEncoding u).size) : (nameWords F c i).length ≤ (formulaBits F).length := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.positionEncoding, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceProfileBridge.nameWords
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.rankline 407 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseDigitsline 410 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseDigits_applyline 413 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.horner_value_sumline 417 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.horner_reverse_eq_rankline 432 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseSlotsline 452Source documentation
Reverse only digit positions. All six fixed work/control roles stay put.
def reverseSlots (slots : MachineHorner.Layout width ↪ K) : MachineHorner.Layout width ↪ K := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseSlots_controlline 455 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseSlots_digitline 458 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.clean_reverseSlotsline 464 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.statementline 471 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.programline 476 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.rankTraceline 482Source documentation
Exact execution using existing digit fields; only the destination changes.
theorem rankTrace (slots : MachineHorner.Layout width ↪ K) (labels : MachineHorner.Label width → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (fun _ : K => Bool) Λ (MachineHorner.State σ)) (atLabels : ∀ label, p (labels label) = statement slots labels exit label) (base : K → List Bool) (radix : Nat) (digits : Fin width → Nat) (operandRadix : base (slots (.inl 0)) = encodeWord radix) (operandDigits : ∀ i, base (slots (.inr i)) = encodeWord (digits i)) (clean : MachineHorner.Clean slots base) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step p))^[ MachineHorner.steps radix (reverseDigits digits) width] (some ⟨some (labels .start), ((ambient, ()), register), base⟩) = some ⟨exit, ((ambient, ()), none), MachineHorner.resultTapes slots base (rank radix digits)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.statement, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.reverseDigits, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.rank
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.rankInTimeline 501 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.rankInPolynomialTimeline 518 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.variableRankInTimeline 537 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.clauseRankInTimeline 553 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.programInTimeline 569 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.machineline 581 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.machineInTimeline 592 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.clauseSlotsline 607Source documentation
Control roles may include preserved headers and dedicated protected extras.
def clauseSlots (controls : Fin 6 ↪ Extra) : MachineHorner.Layout u ↪ SourceContextLoad.Tape u Extra where …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceContextLoad.Tape
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.variableSlotsline 625Source documentation
Each coordinate selects its own loaded variable field, even if names repeat.
def variableSlots (controls : Fin 6 ↪ Extra) (selected : SlotContext u) : MachineHorner.Layout u ↪ SourceContextLoad.Tape u Extra where …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceContextLoad.Tape
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.clauseSlots_controlline 642 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.clauseSlots_digitline 645 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.variableSlots_controlline 648 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.variableSlots_digitline 651 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceRankPhase.selectedDigits_loadedline 655 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.positionsline 676Source documentation
An explicit computable enumeration, without an arbitrary finite-type equivalence. Slots occur first, second, third within each clause coordinate.
def positions (u : ℕ) : List (Position u) := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.mem_positionsline 679 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.fillSignsline 683Source documentation
The mathematical result of the individual finite sign-register writes.
def fillSigns {u : ℕ} (values initial : Position u → Bool) (cells : List (Position u)) : Position u → Bool := … - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.fillSigns_applyline 687 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.fillSigns_positionsline 701 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.Stateline 709 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.Alphabetline 710 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.finishline 712 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.peekChainline 719Source documentation
Each statement reads only the head of one supplied polarity field. The other signature fields and the entire ambient-register component are copied.
def peekChain (field : Position u → K) (exit : Option Λ) : List (Position u) → TM2.Stmt (Alphabet (K := K)) Λ (State u τ) …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.Alphabet, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.State
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.statementline 727 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.readSignsline 733Source documentation
The head defaults make the finite program total on malformed tapes too; the correctness theorem below supplies the actual unary-field representation.
def readSigns (field : Position u → K) (tapes : K → List Bool) : Position u → Bool := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.stepAux_peekChainline 736 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.stepAux_statementline 749 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.peekChain_pushBoundline 756 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.statement_pushBoundline 764 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.readSigns_of_unaryline 769 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.loadStepline 779Source documentation
Exact actual caller-program step. Every stored field and unread suffix is preserved, as are sameName, selected, and all ambient registers.
theorem loadStep (field : Position u → K) (entryLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State u τ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.Alphabet, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.State
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.loadInTimeline 790 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.loaded_ofContextline 809Source documentation
The actual context signature is recovered when equality and selected-slot data have already been loaded by their separate verified preparation stages.
theorem loaded_ofContext (F : Target.Formula) (c : SourceContexts.ClauseContext F u) (selected : SourceContexts.SlotContext u) (initial : Signature u) (hnames : initial.sameName = contextNameProfile F c) (hselected : initial.selected = selected) : {initial with signs := (ofContext F c selected).signs} = ofContext F c selected := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Target.Formula, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceContexts.ClauseContext, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceContexts.SlotContext
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceSignLoad.loadContextInTimeline 821