OAI/Computability/UniqueGames/PCP/Emitter.lean
40 declarations, 0 contain sorry, 0 declared as axioms
Actual finite TM2 templates for affine unary fields and finite relation bits. Commands write in forward bit order onto a stack, so their concatenated result appears reversed in the accumulator. Every unbounded operand is read from an isolated unary tape and restored by the checked preserving transducer.
- inductive
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Commandline 20Source documentation
All varying literals are finite: one Boolean or one bounded offset.
inductive Command (h : Nat) (σ : Type) (bound : Nat) | literal (word : List Bool) | bit (value : σ → Bool) | bounded (value : σ → Fin bound) | scaled (source : Fin h) (coefficient : Nat) | scaledIf (source : Fin h) (coefficient : Nat) (active : σ → Bool)
- inductive
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Phaseline 27 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabetline 32 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Stateline 33 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.transitionline 35 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.payloadline 36 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandBitsline 39 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandStepsline 48 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandStatementline 59Source documentation
A literal Boolean is emitted by a real finite branch. A bounded offset is dispatched to a finite label, whose push chain has a fixed length.
def commandStatement (sources : Fin h → K) (scratch output : K) (labels : Phase bound → Λ) (next : Λ) (command : Command h σ bound) : Phase bound → TM2.Stmt (Alphabet (K := K)) Λ (State σ) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Phase, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.output_encodeWordline 93 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandTraceline 109Source documentation
Exact execution of one command of the supplied actual program. The only program hypotheses are equations for its concrete finite statements.
theorem commandTrace (sources : Fin h → K) (scratch output : K) (sourceScratch : ∀ i, sources i ≠ scratch) (sourceOutput : ∀ i, sources i ≠ output) (scratchOutput : scratch ≠ output) (labels : Phase bound → Λ) (next : Λ) (command : Command h σ bound) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Phase, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.program, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Labelline 186 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.labelAtline 188 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandAtline 191 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.statementline 195 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.programline 205 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.machineline 212Source documentation
Bundling makes the fixed finite tape, control-label, and register sets explicit. Neither the label type nor the state type contains a natural input.
def machine [Fintype K] [Fintype σ] {count : Nat} (commands : Fin count → Command h σ bound) (sources : Fin h → K) (scratch output input : K) (ambient : σ) : FinTM2 where …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.prefixBitsline 225 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.prefixStepsline 231 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.resultTapesline 236 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.resultTapes_outputline 239 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.resultTapes_otherline 243 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.prefixTraceline 249Source documentation
Composition of the actual finite command traces, with preserved operand stacks available again at every command boundary.
theorem prefixTrace {count : Nat} (commands : Fin count → Command h σ bound) (sources : Fin h → K) (scratch output : K) (sourceScratch : ∀ i, sources i ≠ scratch) (sourceOutput : ∀ i, sources i ≠ output) (scratchOutput : scratch ≠ output) (labels : Label count bound → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Label, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.planTraceline 289Source documentation
The complete callable program, including its actual final jump or halt.
theorem planTrace {count : Nat} (commands : Fin count → Command h σ bound) (sources : Fin h → K) (scratch output : K) (sourceScratch : ∀ i, sources i ≠ scratch) (sourceOutput : ∀ i, sources i ≠ output) (scratchOutput : scratch ≠ output) (labels : Label count bound → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Label, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.prefixSteps_leline 310 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.planInTimeline 330Source documentation
A linear bound in the largest unary input field; plan size is fixed.
def planInTime {count : Nat} (commands : Fin count → Command h σ bound) (sources : Fin h → K) (scratch output : K) (sourceScratch : ∀ i, sources i ≠ scratch) (sourceOutput : ∀ i, sources i ≠ output) (scratchOutput : scratch ≠ output) (labels : Label count bound → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Label, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.listCommandsline 351 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.prefixBits_listCommandsline 354 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.bits_listCommandsline 366 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineCommandsline 372 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineValueline 376 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.scaleBitsline 379 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineCommands_bitsline 389 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineCommands_lengthline 397 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.bitCommandsline 402Source documentation
The finite relation table is encoded one actual Boolean branch at a time.
def bitCommands (bits : List (σ → Bool)) : List (Command h σ bound) := bits.map .bit
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.bitCommands_bitsline 404 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineInTimeline 414Source documentation
The affine template itself has an actual composable machine certificate.
def affineInTime (terms : List (Fin h × Nat)) (offset : σ → Fin bound) (sources : Fin h → K) (scratch output : K) (sourceScratch : ∀ i, sources i ≠ scratch) (sourceOutput : ∀ i, sources i ≠ output) (scratchOutput : scratch ≠ output) (labels : Label (affineCommands terms offset).length bound → Λ) (exit : Option Λ) (p : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Label, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.affineCommands, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.State
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command.mapAmbientline 439Source documentation
Enlarge the finite ambient registers by reading a projection of them.
def Command.mapAmbient {τ : Type} (view : σ → τ) : Command h τ bound → Command h σ bound | .literal word => .literal word | .bit value => .bit (value ∘ view) | .bounded value => .bounded (value ∘ view) | .scaled source coefficient => .scaled source coefficient | .scaledIf source coefficient active => .scaledIf source coefficient (active ∘ view)Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.Command
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandBits_mapAmbientline 447 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Emitter.commandSteps_mapAmbientline 453