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