Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax51.RamToTuringGenericTime

Generic-time simulation of word RAMs by Turing machines

concepts/Lax51/RamToTuringGenericTime.lean · lax-51

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    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

    1import Lax51.RamPolytime
    2import Mathlib.Computability.TuringMachine.Computable
    3
    4/-!
    5---
    6title: Generic-time simulation of word RAMs by Turing machines
    7type: theorem
    8---
    9An arbitrary finite execution of a fixed word-RAM program, using a word
    10length polynomially bounded in the encoded input size, can be simulated by
    11one finite multi-tape Turing machine. The Turing running time has fixed
    12polynomial overhead in the encoded input size plus the number of executed
    13RAM instructions.
    14
    15No regularity assumption is made on the RAM running time. A polynomial word
    16length bound is retained because a Turing machine must explicitly process
    17the bits of every RAM word.
    18-/
    19
    20namespace Lax51.RamToTuringGenericTime
    21
    22open Lax13.Ram
    23open Lax51.BinaryWordEncoding Lax51.RamPolytime
    24open Polynomial Turing
    25
    26/-- At a polynomially bounded selected word length, every `t`-step execution
    27of a fixed word-RAM program is simulated by one finite Turing machine in a
    28fixed polynomial of the input bit-size plus `t`. -/
    29axiom 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
    44end Lax51.RamToTuringGenericTime
    45
    Show Proof

    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

    Loading discussion…