Lax51.TuringToRamGenericTime
Generic-time simulation of Turing machines by word RAMs
concepts/Lax51/TuringToRamGenericTime.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
A finite multi-tape Turing-machine computation with an arbitrary numerical per-input running-time bound can be simulated by one uniform word-RAM program. Both the sufficient word length and the RAM running time have fixed polynomial overhead in the encoded input size plus the supplied Turing running time.
No regularity assumption is made on the running-time function: it need not be polynomial, monotone, or computable. The result is therefore a generic quantitative simulation theorem. Computability and polynomial-time preservation follow by separately imposing the corresponding regularity on the supplied bound.
Lean source view on GitHub
| 1 | import Lax13.Ram |
| 2 | import Lax51.BinaryWordEncoding |
| 3 | import Mathlib.Algebra.Polynomial.Eval.Defs |
| 4 | import Mathlib.Computability.TuringMachine.Computable |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Generic-time simulation of Turing machines by word RAMs |
| 9 | type: theorem |
| 10 | --- |
| 11 | A finite multi-tape Turing-machine computation with an arbitrary numerical |
| 12 | per-input running-time bound can be simulated by one uniform word-RAM |
| 13 | program. Both the sufficient word length and the RAM running time have |
| 14 | fixed polynomial overhead in the encoded input size plus the supplied |
| 15 | Turing running time. |
| 16 | |
| 17 | No regularity assumption is made on the running-time function: it need not |
| 18 | be polynomial, monotone, or computable. The result is therefore a generic |
| 19 | quantitative simulation theorem. Computability and polynomial-time |
| 20 | preservation follow by separately imposing the corresponding regularity on |
| 21 | the supplied bound. |
| 22 | -/ |
| 23 | |
| 24 | namespace Lax51.TuringToRamGenericTime |
| 25 | |
| 26 | open Lax13.Ram |
| 27 | open Lax51.BinaryWordEncoding |
| 28 | open Polynomial Turing |
| 29 | |
| 30 | /-- A finite Turing machine with an arbitrary per-input numerical |
| 31 | running-time bound compiles to one uniform word-RAM program. The sufficient |
| 32 | word length and RAM running time are fixed polynomials in the input bit-size |
| 33 | plus that bound. -/ |
| 34 | axiom turingWithInputTime_to_ramInPolynomialOverhead |
| 35 | {f : List ℕ → List ℕ} |
| 36 | (H : TM2ComputableAux Symbol Symbol) (time : List ℕ → ℕ) |
| 37 | (hrun : ∀ x, TM2OutputsInTime H.tm |
| 38 | (List.map H.inputAlphabet.invFun (encode x)) |
| 39 | (some (List.map H.outputAlphabet.invFun (encode (f x)))) (time x)) : |
| 40 | ∃ (p : Program) (wordOverhead timeOverhead : Polynomial ℕ), |
| 41 | ∀ (x : List ℕ) (w : ℕ), |
| 42 | wordOverhead.eval (bitSize x + time x) ≤ w → |
| 43 | ∃ t ≤ timeOverhead.eval (bitSize x + time x), |
| 44 | RunsTo w p (x.length :: x) (f x) t |
| 45 | |
| 46 | end Lax51.TuringToRamGenericTime |
| 47 |
Builds on
Used by
none
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