Generic-time simulation of word RAMs by Turing machines
Lax759944.RamToTuringGenericTime · concepts/Lax759944/RamToTuringGenericTime.lean · lax-759944
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
An arbitrary finite execution of a fixed word-RAM program, using a word length polynomially bounded in the encoded input size, can be simulated by one finite multi-tape Turing machine. The Turing running time has fixed polynomial overhead in the encoded input size plus the number of executed RAM instructions.
No regularity assumption is made on the RAM running time. A polynomial word length bound is retained because a Turing machine must explicitly process the bits of every RAM word.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax759944.RamPolytime |
| 2 | import Mathlib.Computability.TuringMachine.Computable |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Generic-time simulation of word RAMs by Turing machines |
| 7 | type: theorem |
| 8 | --- |
| 9 | An arbitrary finite execution of a fixed word-RAM program, using a word |
| 10 | length polynomially bounded in the encoded input size, can be simulated by |
| 11 | one finite multi-tape Turing machine. The Turing running time has fixed |
| 12 | polynomial overhead in the encoded input size plus the number of executed |
| 13 | RAM instructions. |
| 14 | |
| 15 | No regularity assumption is made on the RAM running time. A polynomial word |
| 16 | length bound is retained because a Turing machine must explicitly process |
| 17 | the bits of every RAM word. |
| 18 | -/ |
| 19 | |
| 20 | namespace Lax759944.RamToTuringGenericTime |
| 21 | |
| 22 | open Lax808846.Ram |
| 23 | open Lax759944.BinaryWordEncoding Lax759944.RamPolytime |
| 24 | open Polynomial Turing |
| 25 | |
| 26 | /-- At a polynomially bounded selected word length, every `t`-step execution |
| 27 | of a fixed word-RAM program is simulated by one finite Turing machine in a |
| 28 | fixed polynomial of the input bit-size plus `t`. -/ |
| 29 | axiom ramInTime_to_turingInPolynomialOverhead |
| 30 | (p : Program) (wordBound : Polynomial ℕ) : |
| 31 | ∃ (H : TM2ComputableAux Symbol Symbol) |
| 32 | (widthOverhead timeOverhead : Polynomial ℕ), |
| 33 | (∀ n, wordBound.eval n ≤ widthOverhead.eval n) ∧ |
| 34 | ∀ (x output : List ℕ) (t : ℕ), |
| 35 | FitsInWords (wordBound.eval (bitSize x)) |
| 36 | ((x.length :: x) ++ output) → |
| 37 | RunsTo (widthOverhead.eval (bitSize x)) p |
| 38 | (x.length :: x) output t → |
| 39 | Nonempty (TM2OutputsInTime H.tm |
| 40 | (List.map H.inputAlphabet.invFun (encode x)) |
| 41 | (some (List.map H.outputAlphabet.invFun (encode output))) |
| 42 | (timeOverhead.eval (bitSize x + t))) |
| 43 | |
| 44 | end Lax759944.RamToTuringGenericTime |
| 45 |
Builds on
Used by
none
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments