The polynomial hierarchy, coNP and PH

Lax564036.Hierarchy · concepts/Lax564036/Hierarchy.lean · lax-564036

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

    The levels of the polynomial hierarchy are defined by logics. Level 0 is polynomial time: Σ0p\Sigma_0^p is PTIME and Π0p\Pi_0^p is coPTIME. For k≥1k \ge 1, Σkp\Sigma_k^p is the class of decision problems definable by a second-order sentence with kk alternating blocks of second-order quantifiers, the first existential, over a first-order kernel, and Πkp\Pi_k^p the class of those definable with the first block universal; these are the levels of the hierarchy by the theorems of Fagin and Stockmeyer. In particular Σ1p\Sigma_1^p is NP, and coNP is Π1p\Pi_1^p, the problems definable in universal second-order logic. Hardness for each level is the cofinal hardness of the NP core, under relativized ordered first-order reductions.

    PH is the union of the levels: a problem is in PH when it is in Σkp\Sigma_k^p for some kk, and PH-hard when it is hard for every level.

    Concept map
    10 concepts; 16 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Lax904597.Problems
    2import Lax904597.SecondOrder
    3import Lax904597.Classes
    4import Lax535992.ClassPTIME
    5
    6/-!
    7---
    8title: The polynomial hierarchy, coNP and PH
    9type: definition
    10---
    11The levels of the polynomial hierarchy are defined by logics. Level 0 is
    12polynomial time: Σ0p\Sigma_0^p is PTIME and Π0p\Pi_0^p is coPTIME. For
    13k≥1k \ge 1, Σkp\Sigma_k^p is the class of decision problems definable by a
    14second-order sentence with kk alternating blocks of second-order
    15quantifiers, the first existential, over a first-order kernel, and
    16Πkp\Pi_k^p the class of those definable with the first block universal;
    17these are the levels of the hierarchy by the theorems of Fagin and
    18Stockmeyer. In particular Σ1p\Sigma_1^p is NP, and coNP is Π1p\Pi_1^p, the
    19problems definable in universal second-order logic. Hardness for each level
    20is the cofinal hardness of the NP core, under relativized ordered
    21first-order reductions.
    22
    23PH is the union of the levels: a problem is in PH when it is in
    24Σkp\Sigma_k^p for some kk, and PH-hard when it is hard for every level.
    25-/
    26
    27namespace Lax564036.Hierarchy
    28
    29open Lax904597.Problems Lax904597.SecondOrder Lax904597.Classes Lax535992.ClassPTIME
    30
    31/-- The level `Σₖᵖ` of the polynomial hierarchy: polynomial time at level `0`,
    32and the problems definable with `k` alternating blocks of second-order
    33quantifiers, existential first, above. -/
    34def SigmaP : ℕ → ComplexityClass
    35 | 0 => PTIME
    36 | k + 1 => sigmaLevel k
    37
    38/-- The level `Πₖᵖ` of the polynomial hierarchy: the complements of polynomial
    39time problems at level `0`, and the problems definable with `k` alternating
    40blocks of second-order quantifiers, universal first, above. -/
    41def PiP : ℕ → ComplexityClass
    42 | 0 => coPTIME
    43 | k + 1 => ComplexityClass.ofMem fun P => PiSODefinable (k + 1) P
    44
    45/-- **coNP** is `Π₁ᵖ`: the problems definable in universal second-order
    46logic. -/
    47def coNP : ComplexityClass := PiP 1
    48
    49/-- **PH**, the polynomial hierarchy: the union of its levels. A problem is
    50PH-hard when it is hard for every level. -/
    51def PH : ComplexityClass where
    52 Mem P := ∃ k, (SigmaP k).Mem P
    53 Hard P := ∀ k, (SigmaP k).Hard P
    54
    55end Lax564036.Hierarchy
    56

    Discussion

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

    Loading discussion…