The complexity class NP

Lax434930.NondeterministicPolynomialTime · concepts/Lax434930/NondeterministicPolynomialTime.lean · lax-434930

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 binary language AA belongs to NP\mathrm{NP} if there are a verifier language V∈PV\in\mathrm{P} and a polynomial p∈N[X]p\in\mathbb{N}[X] such that x∈Ax\in A precisely when some binary certificate yy with ∣y∣≤p(∣x∣)|y|\le p(|x|) satisfies ⟨x,y⟩∈V\langle x,y\rangle\in V. The verifier is a single deterministic polynomial-time decider on the explicit pair encoding, and its running time is polynomial in the combined input and certificate lengths. The certificate bound depends only on the original input length. This is the standard certificate definition of NP.

    Concept map
    3 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.

    In the paper

    • page 1 of this submission's paper

    Lean source view on GitHub

    1import Lax434930.Certificates
    2
    3/-!
    4---
    5title: The complexity class NP
    6type: definition
    7---
    8A binary language AA belongs to NP\mathrm{NP} if there are a verifier
    9language V∈PV\in\mathrm{P} and a polynomial p∈N[X]p\in\mathbb{N}[X] such that
    10x∈Ax\in A precisely when some binary certificate yy with ∣y∣≤p(∣x∣)|y|\le p(|x|)
    11satisfies ⟨x,y⟩∈V\langle x,y\rangle\in V.
    12The verifier is a single deterministic polynomial-time decider on the
    13explicit pair encoding, and its running time is polynomial in the combined
    14input and certificate lengths. The certificate bound depends only on the
    15original input length. This is the standard certificate definition of NP.
    16-/
    17
    18namespace Lax434930.NondeterministicPolynomialTime
    19
    20open PolynomialTime Certificates
    21
    22/-- Languages with polynomially bounded, polynomial-time verifiable certificates. -/
    23def NP : Set Language :=
    24 {A | ∃ V : Language, V ∈ P ∧ ∃ p : Polynomial ℕ, ∀ x : Word,
    25 x ∈ A ↔ ∃ y : Word, y.length ≤ p.eval x.length ∧ pair x y ∈ V}
    26
    27end Lax434930.NondeterministicPolynomialTime
    28

    Discussion

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

    Loading discussion…