Skip to content
DARC
■ Change #21 · wiki.edited

DRAT and LRAT proof certificates and checkers: Normalize Markdown to canonical form

by DARC wiki2026-10-22 20:30:58 UTCOpen the page →
body
## Why certificates
− A SAT solver that answers *satisfiable* returns an assignment that anyone can check in linear time. An *unsatisfiable* answer is different: a bug in a solver with millions of lines of heuristics and inprocessing can produce a wrong "no". A **proof certificate** is a file, written by the solver while it runs, that a separate and much simpler program can check. This turns "trust the solver" into "trust a small checker", and the small checker can itself be formally verified.
+ A SAT solver that answers _satisfiable_ returns an assignment that anyone can check in linear time. An _unsatisfiable_ answer is different: a bug in a solver with millions of lines of heuristics and inprocessing can produce a wrong "no". A **proof certificate** is a file, written by the solver while it runs, that a separate and much simpler program can check. This turns "trust the solver" into "trust a small checker", and the small checker can itself be formally verified.
## DRAT
A DRAT proof (Deletion Resolution Asymmetric Tautology) is a list of clause additions and deletions, ending in the empty clause. Every added clause must be redundant with respect to the formula so far. The basic test is **RUP** (reverse unit propagation): assume the negation of the new clause, run unit propagation on the current clauses, and a conflict must follow. Learned clauses of a CDCL solver are RUP by construction, so a solver emits a DRAT proof by logging each learned clause, at small cost. The **RAT** check is a more general redundancy test that also covers clauses that are not implied, such as those introduced by bounded variable addition or blocked-clause techniques, so modern inprocessing stays loggable. Deletion lines keep the checker's database small.
− **DRAT-trim** (Wetzler, Heule and Hunt, SAT 2014) is the reference checker. It checks backwards, so that only the clauses that actually contribute to the empty clause (the *core*) are verified, and it can emit a trimmed proof. Its reference implementation is the `drat-trim` repository.
+ **DRAT-trim** (Wetzler, Heule and Hunt, SAT 2014) is the reference checker. It checks backwards, so that only the clauses that actually contribute to the empty clause (the _core_) are verified, and it can emit a trimmed proof. Its reference implementation is the `drat-trim` repository.
## LRAT
An LRAT proof adds **hints**: for every added clause, the identifiers of the clauses that its unit propagation uses. The checker then needs no search at all, it only follows the hints. This makes checking fast and, more importantly, simple enough to verify formally. Cruz-Filipe, Heule, Hunt, Kaufmann and Schneider-Kamp (CADE 2017) gave a checker with a machine-checked correctness proof in the ACL2 theorem prover, and Tan, Heule and Myreen (TACAS 2021) built `cake_lpr`, a checker verified in CakeML for a close LRAT-style format. A typical pipeline is: solver writes DRAT, `drat-trim` trims and annotates it into LRAT, a verified checker accepts the LRAT file.
## What it has been used for
− - *Schur Number Five* (Heule, AAAI 2018): S(5) = 160, with a proof of about two petabytes that was validated by a formally verified checker. Reading the formula and proof is the entire trust base.
− - *Boolean Pythagorean triples* (Heule, Kullmann, Marek, SAT 2016) used the same certificate chain on a cube-and-conquer run.
− - *The empty hexagon number* (Subercaseaux et al., ITP 2024) connects a SAT proof to a Lean statement.
+ - _Schur Number Five_ (Heule, AAAI 2018): S(5) = 160, with a proof of about two petabytes that was validated by a formally verified checker. Reading the formula and proof is the entire trust base.
+ - _Boolean Pythagorean triples_ (Heule, Kullmann, Marek, SAT 2016) used the same certificate chain on a cube-and-conquer run.
+ - _The empty hexagon number_ (Subercaseaux et al., ITP 2024) connects a SAT proof to a Lean statement.
- SAT competitions require certificates for results; see the competition entry.
## Limits
− Certificates prove only that the CNF formula is unsatisfiable. Whether the formula really encodes the mathematical question is a separate trust step (the *encoding*), which is why papers publish both the generator and the formula. Proof sizes can reach terabytes and petabytes, so checking cost and storage, not only solving cost, bound what can be settled. Extensions for symmetry breaking and for pseudo-Boolean reasoning are active research.
+ Certificates prove only that the CNF formula is unsatisfiable. Whether the formula really encodes the mathematical question is a separate trust step (the _encoding_), which is why papers publish both the generator and the formula. Proof sizes can reach terabytes and petabytes, so checking cost and storage, not only solving cost, bound what can be settled. Extensions for symmetry breaking and for pseudo-Boolean reasoning are active research.
explainer.student
− **What goes wrong without it.** A SAT solver answers whether a logical formula can be made true. You can picture the formula as a Python expression such as `(x1 or not x2) and (x2 or x3) and (not x1 or not x3)`, with thousands to millions of variables. If the solver says *satisfiable*, it prints values for every variable and you can check them by evaluating the expression once. If it says *unsatisfiable*, there is nothing to plug in. Modern solvers are tens of thousands of lines of heuristics, and a single bug can produce a wrong "no". For mathematical results proved by SAT, that is not acceptable.
+ **What goes wrong without it.** A SAT solver answers whether a logical formula can be made true. You can picture the formula as a Python expression such as `(x1 or not x2) and (x2 or x3) and (not x1 or not x3)`, with thousands to millions of variables. If the solver says _satisfiable_, it prints values for every variable and you can check them by evaluating the expression once. If it says _unsatisfiable_, there is nothing to plug in. Modern solvers are tens of thousands of lines of heuristics, and a single bug can produce a wrong "no". For mathematical results proved by SAT, that is not acceptable.
**The idea.** The solver writes a **proof certificate** while it runs: a log of every new clause (an "or" of variables or their negations) that it learned, ending with the empty clause, which is false by definition. A separate, much simpler checker replays the log. Each step must be easy to verify on its own, much like checking each line of a long derivation in a calculus solution rather than redoing the whole problem.
− **How a step is checked (RUP).** To check a learned clause $C$, the checker temporarily assumes that every part of $C$ is false. It then runs *unit propagation*: whenever a clause has all but one part false, the last part is forced to be true. If this chain of forced values reaches a contradiction, $C$ follows from the clauses already accepted. Learned clauses in conflict-driven (CDCL) solvers pass this test by construction, so logging them costs little. The more general RAT test also admits clauses that are not strictly implied but cannot break satisfiability, which covers advanced simplification steps.
+ **How a step is checked (RUP).** To check a learned clause $C$, the checker temporarily assumes that every part of $C$ is false. It then runs _unit propagation_: whenever a clause has all but one part false, the last part is forced to be true. If this chain of forced values reaches a contradiction, $C$ follows from the clauses already accepted. Learned clauses in conflict-driven (CDCL) solvers pass this test by construction, so logging them costs little. The more general RAT test also admits clauses that are not strictly implied but cannot break satisfiability, which covers advanced simplification steps.
**DRAT and LRAT.** A DRAT file lists additions and deletions; the checker drat-trim works backwards from the empty clause and only checks the clauses actually used. An LRAT file also records, for every step, which earlier clauses the propagation used, so the checker does no searching at all. That makes the checker small enough to be proved correct itself: verified LRAT checkers exist in the ACL2 and CakeML theorem provers.
**Example of use.** Heule's 2017 proof that the Schur number S(5) is 160 produced about two petabytes of proof, all checked by a verified checker. The trust then rests on the formula and the short checker, not on the solver.
**Limits.** A certificate proves that this formula has no solution. Whether the formula correctly encodes the mathematical question is a separate step, which is why authors publish the program that generates the formula.
hash e4242d5b0afb18042b81f3b36ff8a3441410c82031de6ded993a7b0e40d07653
previous 9fb1ca66e8973aa0e9c5102e753ec068a7aa69ef26745f3030efb1f32fc7f81b