Skip to content
DAH

DRAT and LRAT proof certificates and checkers

Clausal proof formats and checkers (DRAT-trim, verified LRAT checkers) that let anyone verify a SAT solver's UNSAT answer without trusting the solver.

On this page16 sections
Why other work relies on it

Every computer-assisted proof by SAT (Boolean Pythagorean triples, Schur number five, the empty hexagon) and the certified tracks of SAT competitions rely on these formats; without them an UNSAT answer is only as trustworthy as the solver binary.

Files that let anyone check, with a small program, that a SAT solver's 'impossible' answer is right.

  1. 1Solver learns facts while searching
  2. 2Each fact is logged in a proof file
  3. 3Small checker replays the proof
  4. 4Verified checker removes trust in the solver

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 CC, the checker temporarily assumes that every part of CC 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, CC 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.

Go deeper

The full technical text.

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.

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.

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.
  • 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.

Words on this page (10)
Words on this page
SAT solver
A program that decides whether a set of true-or-false rules can all be satisfied at once.
CNF
A formula written as an AND of clauses, each clause an OR of variables or their negations.
unit propagation
A forced step: if a rule has only one undecided switch left and all others are wrong, that switch must be set the remaining way.
clause learning
Recording a new rule that explains a dead end so the solver never repeats it.
proof certificate
A file that lets a separate program verify a claimed answer.
formally verified checker
A checker whose own correctness has been proved by a proof assistant such as ACL2 or CakeML.
clause
An 'or' of variables or their negations, such as (x1 or not x2); a CNF formula is an 'and' of clauses.
RUP and RAT
Two tests that a single proof step is safe: RUP checks it by unit propagation; RAT also allows steps that cannot destroy satisfiability.
DRAT and LRAT
File formats for unsatisfiability proofs; LRAT adds hints naming the earlier clauses each step uses, so checking needs no search.
Schur number
The largest n such that 1..n can be split into k groups with no x + y = z inside a group.
New to this? Read first (3)
New to this? Read first

Understanding map

map of the whole wiki →

What to read before DRAT and LRAT proof certificates and checkers (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.

  1. Start with
  2. Step 2
  3. Step 3
  4. Step 4
  5. Then

Open problems & questions

Progress timeline

  1. Apr 1, 2021
    cake_lpr

    Tan, Heule and Myreen published a CakeML-verified checker for propagation-redundancy proofs; month given as the conference month (TACAS 2021).

    source
  2. Nov 1, 2017
    S(5) = 160
    Related to: Schur number S(6): improve 536 ≤ S(6), or determine S(6)

    Heule proved S(5) = 160 with a two-petabyte certified proof.

    source
  3. Nov 1, 2017
    Schur Number Five

    Heule showed S(5) = 160 with a proof of about two petabytes, validated by a formally verified checker; month from the arXiv identifier.

    source
  4. Aug 1, 2017
    Verified LRAT checking in ACL2

    Cruz-Filipe et al. introduced LRAT-style hints and a checker with a mechanised correctness proof; month given as the conference month (CADE 2017).

    source
  5. Jul 1, 2014
    DRAT-trim

    Wetzler, Heule and Hunt presented DRAT-trim with backward checking and core extraction; month given as the conference month (SAT 2014).

    source
  6. Jan 1, 2000
    S(6) ≥ 536
    Related to: Schur number S(6): improve 536 ≤ S(6), or determine S(6)

    Fredricksen and Sweet gave symmetric sum-free partitions with S(6) ≥ 536 and S(7) ≥ 1680; year only.

    source