The Cook–Levin theorem, by first-order reductions
Lax904597.CookLevin · concepts/Lax904597/CookLevin.lean · lax-904597
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
SAT is NP-complete, with NP read as existential second-order definability and hardness as cofinal hardness under relativized ordered first-order reductions. The two halves are stated in their sharper forms as well: SAT is -definable, by the sentence that guesses a truth assignment and checks, in first-order logic, that every clause contains a true literal; and every -definable problem has a plain ordered first-order reduction to SAT. The reduction is generic and machine-free: in the manner of Dahlhaus, it rewrites the first-order kernel of the defining sentence into clauses over the elements of the input structure, with the guessed relations as propositional variables.
Since ordered first-order reductions are computable in (a standard fact, not formalized here), the hardness half is stronger than hardness under polynomial-time reductions.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax904597.Classes |
| 2 | import Lax904597.Sat |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: The Cook–Levin theorem, by first-order reductions |
| 7 | type: theorem |
| 8 | --- |
| 9 | SAT is NP-complete, with NP read as existential second-order definability |
| 10 | and hardness as cofinal hardness under relativized ordered first-order |
| 11 | reductions. The two halves are stated in their sharper forms as well: SAT is |
| 12 | -definable, by the sentence that guesses a truth assignment and |
| 13 | checks, in first-order logic, that every clause contains a true literal; and |
| 14 | every -definable problem has a plain ordered first-order reduction |
| 15 | to SAT. The reduction is generic and machine-free: in the manner of |
| 16 | Dahlhaus, it rewrites the first-order kernel of the defining sentence into |
| 17 | clauses over the elements of the input structure, with the guessed relations |
| 18 | as propositional variables. |
| 19 | |
| 20 | Since ordered first-order reductions are computable in (a |
| 21 | standard fact, not formalized here), the hardness half is stronger than |
| 22 | hardness under polynomial-time reductions. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax904597.CookLevin |
| 26 | |
| 27 | open FirstOrder FirstOrder.Language |
| 28 | open Lax904597.Problems Lax904597.Interpretations Lax904597.SecondOrder Lax904597.Classes |
| 29 | Lax904597.Sat |
| 30 | |
| 31 | /-- SAT is `Σ₁`-definable: SAT is in NP. -/ |
| 32 | axiom sat_sigmaSODefinable : SigmaSODefinable 1 SAT |
| 33 | |
| 34 | /-- Every `Σ₁`-definable problem has an ordered first-order reduction to |
| 35 | SAT. -/ |
| 36 | axiom sat_hard_of_sigmaSODefinable : ∀ {L : Language.{0, 0}} [L.IsRelational] |
| 37 | (Q : DecisionProblem L), SigmaSODefinable 1 Q → Nonempty (OrderedFOReduction Q SAT) |
| 38 | |
| 39 | /-- The Cook–Levin theorem: SAT is NP-complete. -/ |
| 40 | axiom SAT_NP_complete : NP.Complete SAT |
| 41 | |
| 42 | end Lax904597.CookLevin |
| 43 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments