Documentation

Complexitylib.Classes.PCP.Internal.AlgFormula

Every NP language, as a formula #

Cook--Levin and Tseitin already reduce any NP language to encoded 3SAT. What the gap reduction needs is slightly more: not a string that lies in 3SAT, but the formula itself, so that the constraint graph can be built from it.

The Tseitin reduction is total — malformed inputs go to a fixed unsatisfiable formula — so the formula is always there to be named: redCNF names it, and reduction_eq_encode says the reduction writes exactly its encoding.

Main definitions #

Main results #

noncomputable def Complexity.redCNF (z : List Bool) :

The exact 3-CNF that the total Tseitin reduction produces.

Equations
Instances For
    theorem Complexity.exists_reduction_cnf {L : Language} (hL : L ∈ NP) :
    ∃ (E : List Bool → List Bool) (Φ : List Bool → SAT.CNF), E ∈ FP ∧ (∀ (x : List Bool), E x = (Φ x).encode) ∧ (∀ (x : List Bool), (Φ x).Is3CNF) ∧ ∀ (x : List Bool), x ∈ L ↔ (Φ x).Satisfiable

    Every NP language is the satisfiability of an FP family of exact 3-CNFs.