OAI/Computability/UniqueGames/Reduction/MachineTransfer.lean
33 declarations, 0 contain sorry, 0 declared as axioms
Certified reversal and relabeling between finite alphabets
The actual TM2 machine transfers a list over a finite alphabet α to a second
stack over β, reverses its order, and applies a fixed map f : α → β to each
symbol. The trace has exactly input.length + 1 transitions. An explicit
fallback symbol makes the push expression total, including the unused branch
where the internal register is empty.
This primitive supports machine composition when intermediate stack alphabets differ. It does not yet implement the Unique Games reduction.
- abbrev
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.alphabetline 22 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopline 28 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.machineline 35 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapeStacksline 47 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.runningline 52 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.haltedline 56 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.update_inputline 60 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.update_outputline 66 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.step_emptyline 71 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.step_consline 79 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.nextline 88 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.transfer_stepsline 92Source documentation
Exact actual-machine trace, for any accumulator and internal register.
theorem transfer_steps (f : α → β) (fallback : β) (input : List α) (output : List β) (state : Option β) : (next f fallback)^[input.length + 1] (some (running f fallback input output state)) = some (halted f fallback (input.reverse.map f ++ output)) := by …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineTransfer.next, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.running, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.halted
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.initList_eqline 109 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.haltList_eqline 116 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.transfer_init_stepsline 123 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.outputsInTimeline 135 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.outputsInTime_stepsline 142 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.computableInPolyTimeline 146Source documentation
A genuine finite-machine certificate with identity encodings and bound
X+1.noncomputable def computableInPolyTime (f : α → β) (fallback : β) : TM2ComputableInPolyTime (id : List α → List α) (id : List β → List β) (fun input => input.reverse.map f) where … - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.exitAtline 166 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopAtline 171 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAtline 178 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt_srcline 182 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt_dstline 187 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt_otherline 192 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt_selfline 197 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.update_tapesAt_srcline 201 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.update_tapesAt_dstline 215 - def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.nextAtline 226 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.stepAt_emptyline 231 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.stepAt_consline 245 - theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.transferAt_stepsline 263Source documentation
Placement-aware exact transfer, preserving all ambient state and other tapes. The optional exit label is reached in the same final empty-pop transition.
theorem transferAt_steps (src dst : K) (distinct : src ≠ dst) (f : Γ src → Γ dst) (fallback : Γ dst) (loopLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt Γ Λ (σ × Option (Γ dst))) (atLoop : program loopLabel = loopAt src dst f fallback loopLabel exit) (base : (k : K) → List (Γ k)) (input : List (Γ src)) (output : List (Γ dst)) (ambient : σ) (register : Option (Γ dst)) : (nextAt dst program)^[input.length + 1] (some ⟨some loopLabel, (ambient, register), tapesAt src dst base input output⟩) = some ⟨exit, (ambient, none), tapesAt src dst base [] (input.reverse.map f ++ output)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.nextAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt
- theorem
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.transferAt_fromTapesline 288Source documentation
The same trace starting with an arbitrary actual ambient tape family.
theorem transferAt_fromTapes (src dst : K) (distinct : src ≠ dst) (f : Γ src → Γ dst) (fallback : Γ dst) (loopLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt Γ Λ (σ × Option (Γ dst))) (atLoop : program loopLabel = loopAt src dst f fallback loopLabel exit) (base : (k : K) → List (Γ k)) (ambient : σ) (register : Option (Γ dst)) : (nextAt dst program)^[(base src).length + 1] (some ⟨some loopLabel, (ambient, register), base⟩) = some ⟨exit, (ambient, none), tapesAt src dst base [] ((base src).reverse.map f ++ base dst)⟩ := by …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.nextAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt
- def
OAI.UniqueGamesTheorem.Reduction.MachineTransfer.transferAtInTimeline 303Source documentation
A timed execution witness suitable for composing this bridge with other phases of the same actual transition system.
def transferAtInTime (src dst : K) (distinct : src ≠ dst) (f : Γ src → Γ dst) (fallback : Γ dst) (loopLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt Γ Λ (σ × Option (Γ dst))) (atLoop : program loopLabel = loopAt src dst f fallback loopLabel exit) (base : (k : K) → List (Γ k)) (ambient : σ) (register : Option (Γ dst)) : StateTransition.EvalsToInTime (TM2.step program) ⟨some loopLabel, (ambient, register), base⟩ (some ⟨exit, (ambient, none), tapesAt src dst base [] ((base src).reverse.map f ++ base dst)⟩) ((base src).length + 1) where …Mentions: OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.tapesAt