Write and Explain Cook’s Theorem (Cook–Levin Theorem)

Write and Explain Cook’s Theorem (Cook–Levin Theorem)

Verified Sources
Sep 29, 2026

Cook’s theorem (often grouped with the Cook–Levin theorem) is the foundational result in computational complexity that establishes SAT (Boolean satisfiability) as NP-complete. Concretely, it shows two things:

  1. SAT is in NP (a satisfying assignment can be verified in polynomial time), and
  2. Every language in NP can be reduced to SAT in polynomial time, meaning SAT is NP-hard, hence NP-complete. 2

A useful way to “write and explain” Cook’s theorem is to separate the story into (i) formal definitions (NP, reductions, NP-complete), (ii) the verifier-to-formula translation, and (iii) the resulting complexity consequence. We’ll follow that structure.

Key learning targets:

  • SAT
  • NP
  • NP-complete
  • Polynomial-time reduction
  • Cook reduction

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

Cook–Levin theorem / Cook’s theorem overview (NP-completeness of SAT)

Definitions you must write down before proving anything

To explain Cook’s theorem rigorously, you need standard definitions.

  1. NP
    A language LL is in NP if there exists a nondeterministic polynomial-time Turing machine deciding it, i.e., every input xx has an accepting computation of length polynomial in ∣x∣|x| if and only if x∈Lx \in L.

  2. Polynomial-time many-one reduction (≤mp\le_m^p)
    We say A≤mpBA \le_m^p B if there exists a polynomial-time computable function ff such that for all xx:

x∈A  ⟺  f(x)∈B.x \in A \iff f(x) \in B.

This is the type of reduction used in Cook’s theorem to show NP-hardness of SAT. 2

  1. NP-complete
    A language BB is NP-complete if:
  • B∈NPB \in \text{NP}, and
  • for every A∈NPA \in \text{NP}, A≤mpBA \le_m^p B.
    Cook’s theorem’s main goal is to show SAT meets both conditions. 2

Footnotes

  1. NP (definition via nondeterministic polynomial time / verifiers). https://en.wikipedia.org/wiki/NP - Formal characterization of NP used in complexity proofs. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩ ↩2

  3. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

  4. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

Write and prove Cook’s theorem (proof sketch with the core construction)

  1. 1
    Step 1

    Let L∈NPL \in \text{NP}. By definition, there exists a nondeterministic Turing machine MM and a polynomial p(n)p(n) such that for any input xx with ∣x∣=n|x|=n, x∈Lx \in L iff MM has an accepting computation that halts within p(n)p(n) steps.

    Footnotes

    1. NP (definition via nondeterministic polynomial time / verifiers). https://en.wikipedia.org/wiki/NP - Formal characterization of NP used in complexity proofs. ↩

  2. 2
    Step 2

    Consider a time horizon T=p(n)T=p(n). Any accepting run can be viewed as a sequence of configurations C0,C1,…,CTC_0, C_1, \dots, C_T (starting from the initial configuration and ending in an accepting one). The key idea is to encode the existence of such a sequence using Boolean variables. 2

    Footnotes

    1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

    2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

  3. 3
    Step 3

    Create variables that represent, for each time t∈{0,…,T}t \in \{0,\dots,T\} and tape cell position ii, which tape symbol appears, and which state (if any) the head is in. Also include variables to represent head position / state. This forms a tableau encoding of the computation. 2

    Footnotes

    1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

    2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

  4. 4
    Step 4

    Write clauses ensuring (i) the initial configuration matches xx, (ii) transitions follow the transition function of MM, (iii) exactly one symbol/state assignment holds where required, and (iv) the final configuration is accepting. These constraints ensure the formula can be true only if the encoded computation is valid. 2

    Footnotes

    1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

    2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

  5. 5
    Step 5

    Prove both directions:
    • If x∈Lx \in L, then the accepting run of MM gives a consistent tableau, producing a satisfying assignment for the constructed formula.
    • If the formula is satisfiable, then the satisfying assignment defines a valid accepting computation of MM within TT steps, so x∈Lx \in L. 2

    Footnotes

    1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

    2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

  6. 6
    Step 6

    Show the constructed Boolean formula has size polynomial in ∣x∣|x| (roughly because TT is polynomial and you add polynomially many local constraints). Since the mapping f(x)=φxf(x)=\varphi_x is computable in polynomial time, you get L≤mpSATL \le_m^p \text{SAT}. Together with SAT∈NP\text{SAT} \in \text{NP}, SAT is NP-complete. 3

    Footnotes

    1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

    2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

    3. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

The heart of the explanation: “local constraints” simulate transitions

When you write the Cook theorem argument, the most important explanation sentence is usually:

“The Boolean formula enforces that consecutive configurations differ exactly according to the transition function of the nondeterministic machine, using local (time tt to t+1t+1) constraints.”

This is why the tableau method works: TM computation is inherently “step-by-step,” and SAT can represent consistency across steps via clauses that constrain pairs of adjacent time layers. 2

A compact way to visualize the encoding is:

Footnotes

  1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

  2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

Pro Tip: write Cook’s theorem as two proofs

To “write and explain” Cook’s theorem cleanly, structure it as: (1) SAT ∈ NP, (2) for arbitrary L ∈ NP, build a poly-time reduction L ≤p SAT via computation tableau. Readers follow faster when SAT’s membership and NP-hardness are separate mini-proofs. 2

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

Common pitfall: confusing NP with verification vs. search

NP is about existence of a short certificate verifiable in poly time (or equivalently nondeterministic poly-time computation), not about finding that certificate efficiently. Cook’s construction encodes existence of an accepting computation as satisfiability, not the act of finding it. 2

Footnotes

  1. NP (definition via nondeterministic polynomial time / verifiers). https://en.wikipedia.org/wiki/NP - Formal characterization of NP used in complexity proofs. ↩

  2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

Why the theorem is “complete” for NP

Once you have shown that every NP language reduces to SAT, you can phrase Cook’s theorem as a completeness statement:

  • If you could solve SAT efficiently (e.g., in polynomial time), then by reduction you could solve every language in NP efficiently.
  • Conversely, if SAT is hard, then all of NP inherits that hardness under reductions.

Formally, Cook’s theorem implies SAT is NP-complete, meaning it is in NP and NP-hard. 2

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

From NP definitions to Cook’s theorem and NP-completeness

Define NP

Step A

NP languages have polynomial-size accepting witnesses (or nondeterministic poly-time machines). "

Footnotes

  1. NP (definition via nondeterministic polynomial time / verifiers). https://en.wikipedia.org/wiki/NP - Formal characterization of NP used in complexity proofs. ↩

Define reductions

Step B

Polynomial-time many-one reductions preserve yes-instances. 2"

Footnotes

  1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

  2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

Encode computation as SAT

Step C

Create tableau variables and clauses for valid transitions and acceptance. 2"

Footnotes

  1. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

  2. Reduction and NP-complete definitions via polynomial-time many-one reductions. https://en.wikipedia.org/wiki/NP-completeness - Explains reductions (lemp\\le_m^p) and the definition of NP-complete. ↩

Prove equivalence

Step D

Accepting run ↔ satisfiable formula; mapping is polynomial-time. 2"

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

Conclude NP-completeness

Step E

SAT ∈ NP and every NP language reduces to SAT. 2"

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

  2. NP-completeness (Cook–Levin theorem / Cook’s theorem) overview and SAT NP-completeness discussion. https://en.wikipedia.org/wiki/Cook%27s_theorem - States SAT is NP-complete and describes the core reduction idea. ↩

What Cook’s theorem establishes (and what each part requires)

Conceptual checklist for writing the proof.

Frequently needed details when you write the proof

Cook’s theorem: write/teach yourself terms

1 / 5
Question · Term

SAT

Click to reveal
Answer · Definition

Decision problem asking whether a Boolean formula has a satisfying assignment; SAT is the canonical NP-complete problem.

Footnotes

  1. Stephen A. Cook, “The Complexity of Theorem-Proving Procedures” (1971). https://doi.org/10.1145/321694.321712 - Introduces Cook’s original NP-completeness result for SAT/related formulations. ↩

1Input: x 2Let M be the nondeterministic TM for L with runtime bound T=p(|x|) 3Construct variables: 4 - SymbolAt(t,i,s): symbol s at cell i at time t 5 - StateAt(t,i,q): state q at cell i at time t (if head is there) 6Add CNF clauses: 7 - Initial configuration matches x 8 - Exactly one symbol per cell per time 9 - Exactly one head position/state per time 10 - Local transition constraints from time t to t+1 according to M 11 - At time T, some accepting state appears 12Output: φ_x (the conjunction of all clauses) 13Then: x ∈ L ⇔ φ_x ∈ SAT

Knowledge Check

Question 1 of 4
Q1Single choice

Cook’s theorem is commonly used to show that SAT is: