Lax51.RamToTuringGenericTime
Generic-time simulation of word RAMs by Turing machines
concepts/Lax51/RamToTuringGenericTime.lean · lax-51
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Evidence
Each proof establishes this claim relative to its assumptions.
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.
Lean source view on GitHub
| 1 | import Lax51.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 Lax51.RamToTuringGenericTime |
| 21 | |
| 22 | open Lax13.Ram |
| 23 | open Lax51.BinaryWordEncoding Lax51.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 Lax51.RamToTuringGenericTime |
| 45 |
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments