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

Lax51.TuringPolytime

Polynomial-time computation by a Turing machine

concepts/Lax51/TuringPolytime.lean · lax-51

definition

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

    Definition

    A total function from finite lists of natural numbers to finite lists of natural numbers is Turing-computable in polynomial time when a finite multi-tape Turing machine transforms the canonical binary encoding of every input into the canonical binary encoding of its value within a polynomial number of steps in the encoded input length.

    The underlying machine and time bound are mathlib's Turing.TM2ComputableInPolyTimeTuring.TM2ComputableInPolyTime: a bundled finite multi-stack Turing machine and a polynomial over the natural numbers. Taking NonemptyNonempty forgets the computational content of the bundle and retains the proposition that such a machine exists.

    Lean source view on GitHub

    1import Lax51.BinaryWordEncoding
    2import Mathlib.Computability.TuringMachine.Computable
    3
    4/-!
    5---
    6title: Polynomial-time computation by a Turing machine
    7type: definition
    8---
    9A total function from finite lists of natural numbers to finite lists of
    10natural numbers is Turing-computable in polynomial time when a finite
    11multi-tape Turing machine transforms the canonical binary encoding of every
    12input into the canonical binary encoding of its value within a polynomial
    13number of steps in the encoded input length.
    14
    15The underlying machine and time bound are mathlib's
    16`Turing.TM2ComputableInPolyTime`: a bundled finite multi-stack Turing machine
    17and a polynomial over the natural numbers. Taking `Nonempty` forgets the
    18computational content of the bundle and retains the proposition that such a
    19machine exists.
    20-/
    21
    22namespace Lax51.TuringPolytime
    23
    24open Lax51.BinaryWordEncoding
    25
    26/-- Polynomial-time computation, on the canonical binary word encoding, by
    27a finite multi-tape Turing machine. -/
    28def TuringPolytime (f : List ℕ → List ℕ) : Prop :=
    29 Nonempty (Turing.TM2ComputableInPolyTime encode encode f)
    30
    31end Lax51.TuringPolytime
    32

    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…