Documentation

Complexitylib.Classes.NP.Closure

Closure of NP and coNP under polynomial-time reductions #

Main results #

theorem Complexity.mem_NP_preimage {f : List BoolList Bool} {L : Language} (hf : f FP) (hL : L NP) :

If f is polynomial-time computable and L is in NP, then the preimage language {x | f x ∈ L} is in NP.

theorem Complexity.MapReducesPoly.mem_NP {L₁ L₂ : Language} (hred : L₁ ≤ₚ L₂) (hL₂ : L₂ NP) :
L₁ NP

NP is closed under polynomial-time many-one reductions. Membership in NP transports backward along a Karp reduction.

theorem Complexity.MapReducesPoly.mem_coNP {L₁ L₂ : Language} (hred : L₁ ≤ₚ L₂) (hL₂ : L₂ coNP) :
L₁ coNP

coNP is closed under polynomial-time many-one reductions.

An NP-complete language lies in coNP iff NP = coNP (Arora–Barak, discussion after Definition 2.20): once a single NP-complete language has a coNP certificate, every NP language does.