CNF evaluation (satisfiesB) is PolyTimeDecidable
OpenCookLevin.satisfiesB_polyTimeDecidablepolynomial-timesatisfiabilityturing-machineverifier
The CNF formula evaluation is polynomial-time decidable.
Given a binary string encoding a CNF formula and a certificate encoding a truth assignment , this predicate evaluates whether satisfies . The evaluation proceeds by:
- Decoding into the formula (a list of clauses, each a list of literals).
- Decoding into the assignment (the -th bit of gives the truth value of variable ).
- For each clause , checking whether at least one literal evaluates to true under .
- Accepting if and only if all clauses are satisfied.
Since (total number of literal occurrences) is bounded by and each variable lookup into takes time, the evaluation runs in steps, which is polynomial.
Preamble
import Definitions.Def_CookLevin_Verifier
Formal statement
namespace CookLevin
theorem satisfiesB_polyTimeDecidable :
PolyTimeDecidable (fun x w => satisfiesB (decodeAssignment w) (decodeFormula x)) := by sorry
end CookLevinSource