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

Lax51.TuringRamPolytimeEquivalence

Polynomial-time equivalence of Turing machines and word RAMs

concepts/Lax51/TuringRamPolytimeEquivalence.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

    Finite multi-tape Turing machines and uniform word random access machines compute exactly the same total functions in polynomial time, when both use the length of the canonical binary encoding as input size and the word RAM is required to have a polynomially bounded sufficient word length.

    Concretely, a Turing machine must transform the binary encoding of an input word into the binary encoding of its output in polynomially many Turing steps. A word RAM receives the same semantic input as a native list of numbers, physically prefixed by its length so that the input tape is self-delimiting; one program must return the exact output in polynomially many RAM instructions at every sufficiently large word length, and a polynomial in the encoded input length must suffice to represent the length prefix, all input and output entries, and to make the computation correct.

    The claim concerns polynomial-time function computation, commonly called FPFP. The usual machine-independence statement for the decision class PP is its specialization to functions with Boolean-valued output. No fixed polynomial simulation overhead is claimed, only preservation of the class of polynomial-time computable functions.

    Lean source view on GitHub

    1import Lax51.RamPolytime
    2import Lax51.TuringPolytime
    3
    4/-!
    5---
    6title: Polynomial-time equivalence of Turing machines and word RAMs
    7type: theorem
    8---
    9Finite multi-tape Turing machines and uniform word random access machines
    10compute exactly the same total functions in polynomial time, when both use
    11the length of the canonical binary encoding as input size and the word RAM
    12is required to have a polynomially bounded sufficient word length.
    13
    14Concretely, a Turing machine must transform the binary encoding of an input
    15word into the binary encoding of its output in polynomially many Turing
    16steps. A word RAM receives the same semantic input as a native list of
    17numbers, physically prefixed by its length so that the input tape is
    18self-delimiting; one program must return the exact output in polynomially
    19many RAM instructions at every sufficiently large word length, and a
    20polynomial in the encoded input length must suffice to represent the length
    21prefix, all input and output entries, and to make the computation correct.
    22
    23The claim concerns polynomial-time function computation, commonly called
    24`FP`. The usual machine-independence statement for the decision class `P`
    25is its specialization to functions with Boolean-valued output. No fixed
    26polynomial simulation overhead is claimed, only preservation of the class
    27of polynomial-time computable functions.
    28-/
    29
    30namespace Lax51.TuringRamPolytimeEquivalence
    31
    32open Lax51.RamPolytime Lax51.TuringPolytime
    33
    34/-- **Polynomial-time machine invariance.** A total function on finite words
    35is computable in polynomial time by a uniform word RAM with a polynomially
    36bounded sufficient word length if and only if it is computable in polynomial
    37time by a finite multi-tape Turing machine. -/
    38axiom ramPolytime_iff_turingPolytime (f : List ℕ → List ℕ) :
    39 RamPolytime f ↔ TuringPolytime f
    40
    41end Lax51.TuringRamPolytimeEquivalence
    42
    Show Proof

    Used by

    none

    From Mathlib

    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

    Loading discussion…