OAI/Computability/UniqueGames/Machines/MachineCanonicalOutputLemmas.lean
88 declarations, 0 contain sorry, 0 declared as axioms
Canonical output for finite Boolean machines
A raw machine may halt with retained metadata and a changed finite state.
This wrapper redirects its halt to a fixed list of actual tape drains, then
executes one state-reset instruction. The output tape is preserved and the
result is literally haltList. Its cost follows from the raw execution and
the maximum number of pushes in a raw statement.
The cleanup list is fixed with the program, not selected from the input. It may contain repetitions and may be empty when output is the only tape.
- structure
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Programline 29Source documentation
The homogeneous parts of a finite machine, without dependent alphabet casts.
structure Program (K Λ σ : Type) where …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.extendedLabelline 40 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.extendedCfgline 44 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.extendedStmtline 50Source documentation
Add one finite scratch register while preserving each raw transition.
def extendedStmt (labels : Λ → Λ') (haltTarget : Option Λ') : TM2.Stmt (fun _ : K => Bool) Λ σ → TM2.Stmt (fun _ : K => Bool) Λ' (σ × Option Bool) | .push k f next => .push k (fun state => f state.1) (extendedStmt labels haltTarget next) | .peek k f next => .peek k (fun state symbol => (f state.1 symbol, state.2)) (extendedStmt labels haltTarget next) | .pop k f next => .pop k (fun state symbol => (f state.1 symbol, state.2)) (extendedStmt labels haltTarget next) | .load f next => .load (fun state => (f state.1, state.2)) (extendedStmt labels haltTarget next) | .branch test yes no => .branch (fun state => test state.1) … - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.stepAux_extendedline 68 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.sourceMachineline 92 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Labelline 103 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.cleanupLabelline 105 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.resetLabelline 108 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.cleanupEntryline 110 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedProgramline 113 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedMachineline 121Source documentation
A fixed finite program over the same Boolean tapes as the raw machine.
def completedMachine (P : Program K Λ σ) (chosen : List K) : FinTM2 where …
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.finiteAlphabetline 132 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.embeddedCfgline 137 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.step_simulationline 141 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.embedded_initline 157 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.finalTapes_eqline 162 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.haltList_eqline 173 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.cleanupExecutionline 179Source documentation
The cleanup path consists of actual drains and one physical state reset.
def cleanupExecution (P : Program K Λ σ) (chosen : List K) (complete : ∀ k, k ∈ chosen ↔ k ≠ P.output) (state : σ) (register : Option Bool) (base : K → List Bool) : StateTransition.EvalsToInTime (completedMachine P chosen).step ⟨cleanupEntry chosen, (state, register), base⟩ (some (haltList (completedMachine P chosen) (base P.output))) (MachineDrainMany.steps chosen base + 1) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedMachine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.cleanupEntry, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDrainMany.steps
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.outputsInTimeline 211Source documentation
No assumption about cleanup execution or clean raw work tapes is required.
def outputsInTime (P : Program K Λ σ) (chosen : List K) (complete : ∀ k, k ∈ chosen ↔ k ≠ P.output) (input output : List Bool) (state : σ) (base : K → List Bool) (budget : Nat) (raw : StateTransition.EvalsToInTime (sourceMachine P).step (initList (sourceMachine P) input) (some ⟨none, state, base⟩) budget) (correctOutput : base P.output = output) : TM2OutputsInTime (completedMachine P chosen) input (some output) (budget + chosen.length * (input.length + budget * Runtime.programPushBound (sourceMachine P) + 1) + 1) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.sourceMachine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedMachine, OAI.UniqueGamesTheorem.Foundations.Complexity.Runtime.programPushBound
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedTimeline 236 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.completedTime_evalline 241 - structure
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.TerminalRunline 249Source documentation
An actual raw terminal execution, with arbitrary remaining state and tapes.
structure TerminalRun (P : Program K Λ σ) (input output : List Bool) (budget : Nat) where …
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.computableInPolyTimeline 257Source documentation
A polynomial raw run becomes a full canonical-output computation certificate.
noncomputable def computableInPolyTime {α β : Type} (P : Program K Λ σ) (chosen : List K) (complete : ∀ k, k ∈ chosen ↔ k ≠ P.output) (encodeIn : α → List Bool) (encodeOut : β → List Bool) (f : α → β) (rawTime : Polynomial Nat) (run : ∀ a, TerminalRun P (encodeIn a) (encodeOut (f a)) (rawTime.eval (encodeIn a).length)) : TM2ComputableInPolyTime encodeIn encodeOut f where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.TerminalRun
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.computableInPolyTime_finite_alphabetline 276 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.computableInPolyTimeOfEnumerationline 288Source documentation
An explicit finite enumeration supplies the fixed cleanup list.
noncomputable def computableInPolyTimeOfEnumeration {α β : Type} {N : Nat} (P : Program K Λ σ) (enumeration : Fin N ≃ K) (encodeIn : α → List Bool) (encodeOut : β → List Bool) (f : α → β) (rawTime : Polynomial Nat) (run : ∀ a, TerminalRun P (encodeIn a) (encodeOut (f a)) (rawTime.eval (encodeIn a).length)) : TM2ComputableInPolyTime encodeIn encodeOut f := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.Program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCanonicalOutput.TerminalRun
- inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Labelline 306 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label.enumListline 311 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label.enumList_getElem?_ctorIdx_eqline 314 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label.enumList_nodupline 318 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.(instance at line 320)line 320 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Alphabetline 326 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.routineline 330Source documentation
fields 0,fields 1, andfields 2are the tail, reverse index, and encoded relation tapes. Every instruction reads or writes a single tape head.def routine (fields : Fin 3 → K) (row output scratch : K) (labels : Label → Λ) (exit : Option Λ) : Label → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.fieldBitsline 353Source documentation
Exact row field concatenation at the level of stored bits.
def fieldBits (fields : Fin 3 → K) (base : K → List Bool) : List Bool := …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.fieldSizeline 356 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.fieldBits_lengthline 360 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.prefixTapesline 364 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.prefixTraceline 368Source documentation
The three actual preserving-copy phases, with exact tape handoffs.
theorem prefixTrace (fields : Fin 3 → K) (row output scratch : K) (hfields : ∀ i, fields i ≠ row ∧ fields i ≠ scratch) (hrowScratch : row ≠ scratch) (labels : Label → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Alphabet
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.appendTraceline 420 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.rowBits_eqline 465Source documentation
The full existing graph codec, including all 4096 unary predicate fields.
theorem rowBits_eq {n m : Nat} (r : DartRow n m) : encodeWords (rowWords r) = encodeWord r.tail.val ++ encodeWord r.reverseIndex.val ++ encodeWords (relationWords r.relation) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.fieldBits_eq_rowBitsline 471 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.timePolynomialline 479 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.timePolynomial_boundsline 482 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.rowAppendInTimeline 491Source documentation
A composable actual execution certificate for a correctly encoded row. The program is fixed; row data occur only in the input-tape equalities.
def rowAppendInTime {n m : Nat} (r : DartRow n m) (fields : Fin 3 → K) (row output scratch : K) (hfields : ∀ i, fields i ≠ row ∧ fields i ≠ scratch) (hrowOutput : row ≠ output) (hrowScratch : row ≠ scratch) (houtputScratch : output ≠ scratch) (labels : Label → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.machineline 518Source documentation
A fixed nine-label six-stack finite machine implementing the routine. Its inputs may be supplied in a caller's distributed tape configuration.
def machine : FinTM2 where …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.machineRowInTimeline 531Source documentation
Direct execution of the concrete finite machine on caller-supplied unary fields. This instantiates all program equations; no execution premise remains.
def machineRowInTime {n m : Nat} (r : DartRow n m) (base : Fin 6 → List Bool) (hrow : base 3 = []) (hscratch : base 5 = []) (htail : base 0 = encodeWord r.tail.val) (hreverse : base 1 = encodeWord r.reverseIndex.val) (hrelation : base 2 = encodeWords (relationWords r.relation)) (register : Option Bool) : StateTransition.EvalsToInTime machine.step ⟨some .relationRead, ((), register), base⟩ (some ⟨none, ((), none), Function.update base (4 : Fin 6) (base 4 ++ encodeWords (rowWords r))⟩) (timePolynomial.eval ((encodeWords (rowWords r)).length + (base 4).length)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.outputFrameline 561 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.trueRelationline 582Source documentation
The actual 64-by-64 always-accepting relation.
def trueRelation : RelationTable := Vector.replicate 4096 true
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.trueBitsline 584 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.trueBits_lengthline 586 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBitsline 592 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBits_lengthline 594 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBits_eq_graph_rowline 598 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBitsline 604Source documentation
Ordered serialized rows with successive physically stored reverse indices.
def rowsBits (v e : Nat) : Nat → List Bool | 0 => [] | count + 1 => rowBits v e ++ rowsBits v (e + 1) count /-- One initialization label and ten labels per fixed port. -/
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBits
- abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.Labelline 609Source documentation
One initialization label and ten labels per fixed port.
abbrev Label (d : Nat) := Unit ⊕ (Fin d × (MachineTableRows.Label ⊕ Unit))
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.Label
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.startline 611 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowLabelline 612 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.bumpLabelline 614 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldsline 616 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.afterPortline 620Source documentation
The only data-changing index operation is a tape push, below. This function chooses a finite continuation among the fixed port-control labels.
def afterPort {d : Nat} (p : Fin d) : Option (Label d) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.Label
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.entryline 623 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.Alphabetline 628 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.continueAtline 630 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.stepAux_continueAtline 636 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.programline 642Source documentation
No input-dependent natural number occurs in the finite program.
def program (d : Nat) : Label d → TM2.Stmt Alphabet (Label d) (σ × Option Bool) | .inl () => pushWord 2 trueBits.reverse (.load (fun state => (state.1, none)) (continueAt (entry d))) | .inr (p, .inl stage) => MachineTableRows.routine fields 3 4 5 (rowLabel p) (some (bumpLabel p)) stage | .inr (p, .inr ()) => .push 1 (fun _ => true) (continueAt (afterPort p)) /-- The three unary row fields, two empty work tapes, and accumulated output. -/Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.continueAt, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.entry, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineTableRows.routine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fields, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.bumpLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.afterPort
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapesline 650Source documentation
The three unary row fields, two empty work tapes, and accumulated output.
def fieldTapes (v e : Nat) (output : List Bool) : Fin 6 → List Bool := …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initialTapesline 654Source documentation
Before initialization, the fixed-relation tape is empty.
def initialTapes (v e : Nat) (output : List Bool) : Fin 6 → List Bool := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initializeStepline 658Source documentation
The fixed literal relation is actually emitted by a finite push chain.
theorem initializeStep (d v e : Nat) (output : List Bool) (ambient : σ) (register : Option Bool) : TM2.step (program d) ⟨some (start d), (ambient, register), initialTapes v e output⟩ = some ⟨entry d, (ambient, none), fieldTapes v e output⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.start, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initialTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.entry, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowTraceline 671 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.bumpStepline 694Source documentation
The reverse index advances by pushing a real unary bit. The delimiter, all input fields, output, and work tapes have their exact stated contents.
theorem bumpStep {d : Nat} (p : Fin d) (v e : Nat) (output : List Bool) (ambient : σ) : TM2.step (program d) ⟨some (bumpLabel p), (ambient, none), fieldTapes v e output⟩ = some ⟨afterPort p, (ambient, none), fieldTapes v (e + 1) output⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.bumpLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.afterPort
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowAndBumpTraceline 707Source documentation
The concrete row body and its actual index increment are consecutive phases of one fixed program; no whole-body trace is supplied as a premise.
theorem rowAndBumpTrace {d : Nat} (p : Fin d) (v e : Nat) (output : List Bool) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step (program d)))^[ 4 * (v + e + 8194) + 2 * output.length + 10] (some ⟨some (rowLabel p .relationRead), (ambient, register), fieldTapes v e output⟩) = some ⟨afterPort p, (ambient, none), fieldTapes v (e + 1) (output ++ rowBits v e)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineComposition.advance, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.afterPort, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBits
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.stepsline 720Source documentation
Exact sum of actual row-and-increment costs. This recurrence is matched to the program by
suffixTrace, rather than postulated as a runtime.def steps (v e : Nat) (output : List Bool) : Nat → Nat | 0 => 0 | count + 1 => (4 * (v + e + 8194) + 2 * output.length + 10) + steps v (e + 1) (output ++ rowBits v e) count /-- Actual execution from any port boundary to the final halt. The finite control index fixes the remaining number of rows; all unbounded values are physically stored in `fieldTapes`. -/Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowBits, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.suffixTraceline 728Source documentation
Actual execution from any port boundary to the final halt. The finite control index fixes the remaining number of rows; all unbounded values are physically stored in
fieldTapes.theorem suffixTrace {d : Nat} (count : Nat) (p : Fin d) (hp : p.val + count = d) (v e : Nat) (output : List Bool) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step (program d)))^[steps v e output count] (some ⟨some (rowLabel p .relationRead), (ambient, register), fieldTapes v e output⟩) = some ⟨none, (ambient, none), fieldTapes v (e + count) (output ++ rowsBits v e count)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineComposition.advance, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.steps, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.allTraceline 753Source documentation
One fixed-relation initialization transition followed by all actual rows. At zero ports initialization itself halts; no row is spuriously produced.
theorem allTrace (d v e : Nat) (output : List Bool) (ambient : σ) (register : Option Bool) : (MachineComposition.advance (TM2.step (program d)))^[steps v e output d + 1] (some ⟨some (start d), (ambient, register), initialTapes v e output⟩) = some ⟨none, (ambient, none), fieldTapes v (e + d) (output ++ rowsBits v e d)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineComposition.advance, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.steps, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.start, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initialTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.graphRowsline 769Source documentation
Actual finite graph rows in increasing reverse-index order.
def graphRows {n m : Nat} (v : Fin n) (e : Nat) : (count : Nat) → e + count ≤ m → List (DartRow n m) | 0, _ => [] | count + 1, h => ⟨v, ⟨e, by omega⟩, trueRelation⟩ :: graphRows v (e + 1) count (by omega)Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.trueRelation
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.graphRows_lengthline 776 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits_eq_graphRowsline 784Source documentation
The machine's bit stream is exactly the existing codec on the actual ordered row list, including both index fields and every predicate entry.
theorem rowsBits_eq_graphRows {n m : Nat} (v : Fin n) (e count : Nat) (h : e + count ≤ m) : rowsBits v.val e count = encodeWords ((graphRows v e count h).flatMap rowWords) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.graphRows
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.dummyRowsline 796Source documentation
For one vertex of an
n-vertex degree-dgraph, every dummy dart is its own reverse. The caller's initial index is the actual unary valued * v.def dummyRows {n : Nat} (d : Nat) (v : Fin n) : List (DartRow n (n * d)) := … - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.dummyRows_lengthline 801 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.dummyRowsTraceline 804 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.steps_le_boundline 818Source documentation
Every actual row cost is bounded by the largest row and accumulated output encountered during this finite loop.
theorem steps_le_bound (v e : Nat) (output : List Bool) (count : Nat) : steps v e output count ≤ count * (4 * (v + e + count + 8194) + 2 * (output.length + count * (v + e + count + 8194)) + 10) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.steps
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.inputSizeline 852Source documentation
The variable-size input is exactly the two physical unary fields and existing output. The relation field is a fixed program constant.
def inputSize (v e : Nat) (output : List Bool) : Nat := …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.timePolynomialline 856Source documentation
A linear polynomial for each fixed port count
d.noncomputable def timePolynomial (d : Nat) : Polynomial Nat := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.timePolynomial_boundsline 862 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.machineline 885Source documentation
A fixed finite machine. Its control stores only the fixed port position; vertex and reverse-index values reside on the tapes.
def machine (d : Nat) : FinTM2 where …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.machineInTimeline 898Source documentation
The full actual finite-machine execution, including initialization and all rows. No body trace or runtime hypothesis is an input to this certificate.
def machineInTime (d v e : Nat) (output : List Bool) (register : Option Bool) : StateTransition.EvalsToInTime (machine d).step ⟨some (start d), ((), register), initialTapes v e output⟩ (some ⟨none, ((), none), fieldTapes v (e + d) (output ++ rowsBits v e d)⟩) ((timePolynomial d).eval (inputSize v e output)) where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.machine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.start, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initialTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.timePolynomial, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.inputSize
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.machineDummyInTimeline 911Source documentation
The same actual machine on the padding invariant
e = d * v, with its exact existing-codec graph-row output.def machineDummyInTime {n : Nat} (d : Nat) (v : Fin n) (output : List Bool) (register : Option Bool) : StateTransition.EvalsToInTime (machine d).step ⟨some (start d), ((), register), initialTapes v.val (d * v.val) output⟩ (some ⟨none, ((), none), fieldTapes v.val (d * v.val + d) (output ++ encodeWords ((dummyRows d v).flatMap rowWords))⟩) ((timePolynomial d).eval (inputSize v.val (d * v.val) output)) where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.machine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.start, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.initialTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.dummyRows, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.timePolynomial, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.inputSize
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.finalFrameline 926Source documentation
Input tail and both work tapes retain their required contents. The relation tape keeps the one initialized fixed field for subsequent use.
theorem finalFrame (v e : Nat) (output : List Bool) : fieldTapes v e output 0 = encodeWord v ∧ fieldTapes v e output 2 = trueBits ∧ fieldTapes v e output 3 = [] ∧ fieldTapes v e output 5 = [] := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.fieldTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.trueBits