coNP: structural theory and coNP-completeness #
This file develops the elementary structural theory of coNP on top of the
definition coNP = complClass NP from Complexitylib.Classes.NP:
P_subset_coNPandP_subset_NP_inter_coNP— deterministic polynomial time sits insideNP ∩ coNP, via closure ofPunder complement.MapReducesPoly.compl— a Karp reductionL₁ ≤ₚ L₂is simultaneously a reductionL₁ᶜ ≤ₚ L₂ᶜ(the same function witnesses both).coNPHard/coNPComplete— hardness and completeness forcoNP, dual toNPHard/NPComplete.NPHard.compl,NPComplete.compland their converses — completeness dualizes:Lis NP-complete iffLᶜis coNP-complete.NP_eq_coNP_of_P_eq_NP— ifP = NPthenNP = coNP; contrapositively (P_ne_NP_of_NP_ne_coNP), separatingNPfromcoNPseparatesPfromNP.
The headline application is SAT.coNPComplete_compl_language (the
complement of SAT is coNP-complete), in
Complexitylib/SAT/CookLevin/Corollaries.lean.
Complements and membership #
P is contained in coNP. A language decidable in deterministic
polynomial time has its complement decidable in deterministic polynomial
time (P_compl), hence in NP.
Reductions dualize #
coNP-hardness and coNP-completeness #
coNP-hardness. L is coNP-hard when every language in coNP
reduces to L in polynomial time.
Equations
- Complexity.coNPHard L = ∀ L' ∈ Complexity.coNP, L' ≤ₚ L
Instances For
coNP-completeness. L is coNP-complete when it is in coNP and
coNP-hard.
Equations
Instances For
A language in coNP is coNP-complete when a coNP-hard language reduces
to it.
coNP-completeness transfers forward along a polynomial-time reduction
once membership of the target language in coNP is known.
Completeness dualizes #
The complement of an NP-complete language is coNP-complete (Arora–Barak, Definition 2.20 and the surrounding discussion).
The complement of a coNP-complete language is NP-complete.