2. NP-Completeness
This chapter states and proves NP-completeness results the way the library does: problems with
explicit encodings, polynomial time on multi-tape Turing machines, verifiers, polynomial-time
reductions and the Cook–Levin theorem. It ends by proving that Clique is NP-complete, step by
step, which is the outline every new NP-completeness proof follows.
Each problem lives in its own module under Complexity.Computability.Complexity.Problems, so a
development imports the problems it uses. The first examples need only these:
import Complexity.Computability.Complexity.CookLevin.Completeness import Complexity.Computability.Complexity.Problems.Clique import Complexity.Tactic.PolyTime open Cslib.Complexity Turing.MultiTapeTM