The polynomial hierarchy #
This file defines the polynomial hierarchy via certificate quantifiers, following
the quantified-formula definition (Arora–Barak Definition 5.4, stated over the
library's pair codec): polyExistsLang p L holds of x when some witness w
of length at most p.eval |x| puts the encoded pair pair x w in L, and
polyForallLang p L requires this of every such witness. Lifting these to class
operators gives the levels SigmaP 0 = P, SigmaP (n + 1) = polyExistsClass (PiP n), PiP n = complClass (SigmaP n), and their union PH.
The level inclusions SigmaP n ⊆ SigmaP (n + 1) and PiP n ⊆ PiP (n + 1) need
one computational fact: decoding the first component of a canonical pair is
polynomial-time computable (pairFst_mem_FP, from
Complexitylib.Classes.P.Pairing), so every result in this file is
unconditional.
Main definitions #
polyExistsLang,polyForallLang— witness quantifiers on languagespolyExistsClass,polyForallClass— the induced operators on classesSigmaP,PiP,PH— the hierarchy levels and their union
Main results #
compl_polyExistsLang/compl_polyForallLang— quantifier dualitycomplClass_polyExistsClass/complClass_polyForallClass— class dualitySigmaP_zero,PiP_zero,SigmaP_succ,PiP_succ— recursion lawspairFst_mem_FP— the pair decoder is polynomial-timeP_subset_polyExistsClass_P/P_subset_polyForallClass_P— base inclusionsSigmaP_subset_SigmaP_succ/PiP_subset_PiP_succ— level inclusionsSigmaP_subset_PH,P_subset_PH
TODO #
- Relate
SigmaP 1to the NTM-basedNPthrough the witness characterization interface inComplexitylib.Classes.NP.Witness.
Witness quantifiers on languages #
The language of inputs x admitting a witness w of length at most
p.eval |x| such that the encoded pair pair x w lies in L.
Equations
Instances For
The language of inputs x such that every witness w of length at most
p.eval |x| puts the encoded pair pair x w in L.
Equations
Instances For
Membership in polyExistsLang unfolds to a bounded existential.
Membership in polyForallLang unfolds to a bounded universal.
Complementing a bounded existential yields a bounded universal over the complement: some-witness failure is all-witness exclusion.
Complementing a bounded universal yields a bounded existential over the complement.
Quantifier operators on classes #
The class of languages expressible as a polynomially-bounded existential
over some language of C.
Equations
- Complexity.polyExistsClass C = {L : Complexity.Language | ∃ (p : Polynomial ℕ), ∃ L' ∈ C, L = Complexity.polyExistsLang p L'}
Instances For
The class of languages expressible as a polynomially-bounded universal
over some language of C.
Equations
- Complexity.polyForallClass C = {L : Complexity.Language | ∃ (p : Polynomial ℕ), ∃ L' ∈ C, L = Complexity.polyForallLang p L'}
Instances For
polyExistsClass is monotone in the base class.
polyForallClass is monotone in the base class.
Class-level quantifier duality: the complement class of a bounded existential class is the bounded universal class over the complement class.
Class-level quantifier duality: the complement class of a bounded universal class is the bounded existential class over the complement class.
Base inclusions #
Every language of P is a bounded existential over P: take the zero
witness bound, so the only witness is [], and decide pair x [] by decoding
the first component and running the original decider.
Every language of P is a bounded universal over P: with the zero
witness bound the only witness is [], decided as in
P_subset_polyExistsClass_P.
The hierarchy #
The polynomial hierarchy: the union of all Σ levels.
Equations
- Complexity.PH = ⋃ (n : ℕ), Complexity.SigmaP n
Instances For
The complement class of a Σ level is the corresponding Π level.
The complement class of a Π level is the corresponding Σ level.
The zeroth Π level is P, since P is closed under complement.
The first Σ level is the bounded existential closure of P — the
certificate form of NP.
The first Π level is the bounded universal closure of P — the
certificate form of coNP.
Level inclusions #
PH #
Every Σ level is contained in the hierarchy.