Polynomial-time computation by a Turing machine

Lax759944.TuringPolytime · concepts/Lax759944/TuringPolytime.lean · lax-759944

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.

    Natural Language Statement

    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.

    Concept map
    2 concepts; 1 descendant hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Lax759944.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 Lax759944.TuringPolytime
    23
    24open Lax759944.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 Lax759944.TuringPolytime
    32

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…