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

Lax979537.PolynomialTime

Polynomial-time queries on ordered structures

concepts/Lax979537/PolynomialTime.lean · lax-979537

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 query is polynomial-time decidable when a finite deterministic Turing machine decides the language of encodings of its satisfying pointed structures within a polynomial in the input bit length. Malformed encodings are rejected. The machine and polynomial are fixed for the query.

    The machine model and step count are mathlib's bundled finite multi-stack Turing machines (TM2ComputableInPolyTimeTM2ComputableInPolyTime), with identity encoding on input bit strings and a single output bit. This is the same underlying complexity notion used in Lax51, specialized directly to bit-string decision problems. There is no abstract computation oracle or machine-simulation hypothesis.

    Lean source view on GitHub

    1import Lax979537.StructureEncoding
    2import Mathlib.Computability.TuringMachine.Computable
    3
    4/-!
    5---
    6title: Polynomial-time queries on ordered structures
    7type: definition
    8---
    9A query is polynomial-time decidable when a finite deterministic Turing
    10machine decides the language of encodings of its satisfying pointed
    11structures within a polynomial in the input bit length. Malformed encodings
    12are rejected. The machine and polynomial are fixed for the query.
    13
    14The machine model and step count are mathlib's bundled finite multi-stack
    15Turing machines (`TM2ComputableInPolyTime`), with identity encoding on input
    16bit strings and a single output bit. This is the same underlying complexity
    17notion used in Lax51, specialized directly to bit-string decision problems.
    18There is no abstract computation oracle or machine-simulation hypothesis.
    19-/
    20
    21namespace Lax979537.PolynomialTime
    22
    23open Lax979537.OrderedStructures Lax979537.StructureEncoding
    24
    25def language {σ : Vocabulary} {k : Nat} (Q : Query σ k) (w : List Bool) : Prop :=
    26 ∃ A : PointedStructure σ k, encode A = w ∧ Q A
    27
    28def InP {σ : Vocabulary} {k : Nat} (Q : Query σ k) : Prop :=
    29 ∃ f : List Bool → Bool,
    30 Nonempty (Turing.TM2ComputableInPolyTime id (fun b => [b]) f) ∧
    31 ∀ w, f w = truelanguage Q w
    32
    33end Lax979537.PolynomialTime
    34

    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…