OAI/Computability/MaxCut/PCP/DescriptorEmission.lean
58 declarations, 0 contain sorry, 0 declared as axioms
An actual fixed finite traversal of all query/noise tapes. The finite control contains one branch for each prescribed tape. The input-dependent signature and the three address bases remain in registers throughout.
- def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.codedEquationline 14 - def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorWordsline 18 - def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorBitsline 21 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorWords_lengthline 24 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorBits_length_leline 28 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.decode_descriptorBitsline 32 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.parse_descriptorWordsline 36 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.decode_codedEquationline 44Source 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.MaxCutGames.Foundations.Hastad.mapEquation, OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.codedEquation, OAI.MaxCutGames.Foundations.Hastad.SourceLocalEquation.emit
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.codedEquation_globalline 55 - def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorPushBoundline 64 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorPushBound_leline 67 - instance
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.localInputDecidableEqline 84Source documentation
Executable state equality is obtained from the explicit radix code.
instance localInputDecidableEq (u D : ℕ) : DecidableEq (LocalInput u D) := …
- def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.emitDescriptorline 92Source 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.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.stepAux_emitDescriptorline 98 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.emitDescriptor_push_boundline 109 - def
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.emitDescriptorInTimeline 118Source 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.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.emitDescriptor, OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptorBits
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceDescriptorEmission.descriptor_output_frameline 131 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.Labelline 147 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.Stateline 148 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.localEquationline 150 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.bodyLabelline 153 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.programline 158 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.testTraceline 168Source documentation
The table selector is one real transition; every subsequent copy/push transition belongs to the same fixed program.
theorem testTrace (u D : ℕ) (sources : Fin 3 → K) (destination scratch : K) (sourceDestination : ∀ side, sources side ≠ destination) (sourceScratch : ∀ side, sources side ≠ scratch) (destinationScratch : destination ≠ scratch) (exit : Option (Label u D)) (state : LocalInput u D) (base : K → List Bool) (values : Fin 3 → ℕ) (sourceWords : ∀ side, base (sources side) = encodeWord (values side)) (scratchEmpty : base scratch = []) (register : Option Bool) : (MachineComposition.advance (TM2.step (program u D sources destination scratch exit)))^[ SourceEquationEmit.steps values (localEquation u D state) + 1] (some ⟨some (.inl ()), (state, register), base⟩) = some ⟨exit, (state, none), prefixTapes destination base (words values (localEquation u D state))⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.Label, OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.program, OAI.MaxCutGames.Foundations.Hastad.SourceEquationEmit.steps, OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.localEquation
- def
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.testInTimeline 189 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestEmit.sourceTestInTimeline 206 - inductive
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Labelline 244 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Stateline 249 - structure
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Layoutline 251 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.equationBitsline 263 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.stepsline 266 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.bodyLabelline 272 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.statementline 276 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.programline 285 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapesline 289 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes_otherline 292 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes_sourceline 296 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes_temporaryline 300 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes_scratchline 304 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.emitTraceline 309Source documentation
Placement-aware finite selection plus actual equation emission.
theorem emitTrace (u D : Nat) (layout : Layout K) (labels : Label u D → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (fun _ : K => Bool) Λ (State u D)) (atLabels : ∀ label, p (labels label) = statement u D layout labels exit label) (state : LocalInput u D) (base : K → List Bool) (values : Fin 3 → Nat) (sourceWords : ∀ side, base (layout.sources side) = encodeWord (values side)) (scratchEmpty : base layout.scratch = []) (register : Option Bool) : (MachineComposition.advance (TM2.step p))^[ SourceEquationEmit.steps values (localEquation u D state) + 1] (some ⟨some (labels (.test (.inl ()))), (state, register), base⟩) = some ⟨some (labels .append), (state, none), prefixTapes layout.temporary base (words values (localEquation u D state))⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Layout, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Label, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.State, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.statement, OAI.MaxCutGames.Foundations.Hastad.SourceEquationEmit.steps
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.appendTraceline 338Source documentation
Exact one-record append trace in an arbitrary caller program.
theorem appendTrace (u D : Nat) (layout : Layout K) (labels : Label u D → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (fun _ : K => Bool) Λ (State u D)) (atLabels : ∀ label, p (labels label) = statement u D layout labels exit label) (state : LocalInput u D) (base : K → List Bool) (values : Fin 3 → Nat) (sourceWords : ∀ side, base (layout.sources side) = encodeWord (values side)) (scratchEmpty : base layout.scratch = []) (temporaryEmpty : base layout.temporary = []) (register : Option Bool) : (MachineComposition.advance (TM2.step p))^[steps u D values state] (some ⟨some (labels (.test (.inl ()))), (state, register), base⟩) = some ⟨exit, (state, none), resultTapes layout base (equationBits u D values state)⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Layout, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Label, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.State, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.statement, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.steps, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.equationBits
- def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.appendInTimeline 381 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.programInTimeline 397 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.sourceAppendInTimeline 409 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Tapeline 445 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.standardLayoutline 447 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.machineline 459 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.machineInTimeline 470 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.Queryline 492 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.Stateline 493 - inductive
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.Labelline 495 - def
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.finishline 502 - def
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.statementline 508 - def
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.prefixBitsline 520 - def
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.prefixStepsline 526 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.resultTapes_appendline 532 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.prefixTraceline 543 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.prefixSteps_leline 595 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.loopInTimeline 608Source documentation
The complete finite traversal, including its final exit transition.
theorem loopInTime (u D n B : Nat) (queries : Nat → Query u D) (layout : SourceTestAppend.Layout K) (labels : Label u D n → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (fun _ : K => Bool) Λ (State u D)) (atLabels : ∀ l, p (labels l) = statement u D n queries layout labels exit l) (signature : Signature u) (initialQuery : Query u D) (base : K → List Bool) (values : Fin 3 → Nat) (sourceWords : ∀ side, base (layout.sources side) = encodeWord (values side)) (scratchEmpty : base layout.scratch = []) (temporaryEmpty : base layout.temporary = []) (hbound : ∀ i, i < n → SourceTestAppend.steps u D values (signature, queries i) ≤ B) : ∃ lastQuery : Query u D, Nonempty (StateTransition.EvalsToInTime (TM2.step p) ⟨some (labels (.load ⟨0, by omega⟩)), ((signature, initialQuery), none), base⟩ …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.Query, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.Layout, OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.Label, OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.State, OAI.MaxCutGames.Foundations.Hastad.SourceQueryLoop.statement, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.steps