A riff on Cook-Levin

A small book about cook-levin-riff: a toy machine whose every program is a polynomial and a Boolean formula, the six-step composition that took three years to arrive, and seven independent ways of computing the same answers that all agree.

Contents

  1. 1Introduction
    1. What the book covers
    2. Why the name fits
    3. Where the numbers come from
  2. Part I: the toy
  3. 2The machine
    1. Steve's spec
    2. Four opcodes
    3. One program, input by input
    4. Counting
    5. Program numbers
  4. 3Formal languages and machines
    1. Machines that decide
    2. Turing's machine
    3. A simple example
    4. This book's machine
  5. 4Deciding in plain Python
    1. Two versions of decides
    2. Some problems as one test
    3. What the machine adds
  6. 5Programs as formal languages
    1. The analytical solution, 2023
    2. The complete calculation
    3. The theorems
    4. The rare one
    5. The common ones
  7. 6Which instructions are needed
    1. The four opcodes
    2. What it means for a player
    3. Instructions of any kind
  8. 7Nibble, the puzzle page
    1. What runs in the page
    2. Playing a puzzle
    3. The lessons
    4. The ramp
    5. Help for a newcomer
    6. The sandbox
  9. 8The Boolean view
    1. One step, four functions
    2. Six steps, everything fixed
    3. Four inputs, one verdict
  10. 9The problems, seen from outside
  11. 10One formula for the whole machine
    1. Formulas as values
    2. Six steps, every bit unknown
    3. Graph and tree
  12. 11The SAT solver
    1. CNF, the solvers' format
    2. Two questions
    3. The happy path
    4. The unhappy paths
    5. Where the book asks
  13. 12Checking a claim
    1. Naming each gate
    2. A claim is an assignment
    3. rocsat checks it
  14. 13Parts for a small computer
    1. Gates and wires
    2. The four instructions
    3. The multiplexer
    4. The hold
    5. The latches
  15. 14The machine as a circuit
    1. The parts as boxes
    2. A stepper, from its boxes
    3. A stepper as equations
    4. The stepper of the second part
  16. 15The circuit, in full
    1. Six steppers make a core
    2. Four cores decide a problem
    3. A program through it
  17. 16The circuit as equations
  18. 17From equations to CNF
    1. The library
    2. The size
    3. rocsat evaluates it
    4. By distribution
  19. 18Some history of the approach
    1. The order of the work
    2. The view the order passed over
    3. Why polynomials
  20. Part II: Cook-Levin
  21. 19How it got here
    1. The Python, 2023
    2. The composition that stalled, 2026
    3. The finish, 2026-11-25
  22. 20P and NP
    1. Problems, formal languages and algorithms
    2. Time as a function of length
    3. P, deciding fast
    4. NP, checking fast
    5. What is known
  23. 21Nibble, sized
    1. The machine, with a size
    2. Questions as sets of pairs
    3. Two formal languages in P
    4. A formal language in NP
  24. 22Nibble++
    1. The machine
    2. Searching states
    3. What half and mod2 buy
    4. The hardest
  25. 23Two theorems about Nibble++
  26. 24Shortest programs with mod2 and half
    1. Walks and splits
    2. The recursion
    3. {zero, decr, mod2}
    4. When half helps
    5. Open, and refuted
  27. 25Nibble++ meets rocsat
    1. The machine as a circuit
    2. The questions asked
    3. The search
    4. Two observations
  28. 26is_not_14 needs 28 lines
    1. The claim
    2. rocsat's proof
    3. The census's proof
    4. One method, two models
  29. 27Guided search
  30. 28P, NP and Cook-Levin
    1. SAT, as hard as all of NP
    2. Guessing, and the computation history
    3. The toy as a checker
  31. 29Six expressions, composed
    1. The program unknown
    2. Composition
    3. The question as one expression
    4. The payoff
    5. Two ways to compose
  32. 30Arithmetization
    1. One step
    2. The step's sizes
    3. The stepper as a second machine
  33. 31Why composing blew up
    1. The general ring
    2. The Boolean ring
    3. Why it is exact
  34. 32Six steps composed
    1. The sizes
    2. The proof
  35. 33The polynomials, in full
    1. What the sizes mean
    2. One step, as the Python printed it
    3. The same step, with x² = x
    4. The whole program
  36. 34The Cook-Levin machine
    1. The circuit, turned around
    2. The tableau
    3. The gates, counted
  37. 35The tableau, filled in
    1. The tableau of one program
    2. The tableau of every program
  38. 36Cook-Levin as SAT
    1. One gate, three clauses
    2. One stepper
    3. The unrolling
    4. The proof by propagation
    5. rocsat as an oracle
  39. 37Solved by hand
    1. {0} in one line
    2. The other three ops
    3. Five lines for {0, 2, 3}
  40. 38The solver's work, in full
    1. Where the files come from
    2. The checker
    3. {0, 2, 3}, the problem with one answer
    4. Five lines are too few
    5. The largest proof
    6. All 15 proofs
  41. Part III: the cross-checks
  42. 39The oracles
    1. What each one checks
    2. One program, three runners
    3. Why so many
  43. 40The Roc port
    1. The ring as operators
    2. Substitution
    3. Every point at once
    4. The speed, honestly
  44. 41What is Shale?
    1. What it is for
    2. How a script runs
    3. What it refuses
    4. The scripting language
  45. 42The VM in Shale
    1. The machine
    2. The search
    3. The ring's times
    4. The step polynomials
    5. The composition
    6. The check
    7. What the port cost
  46. 43What comes next