cat _posts/2026-11-09-dratify-0-1-11-deleting-the-clause-that-was-a-literal-s-only-reason-let-a-satisfiable-formula-be-called-refuted.md
dratify 0.1.11: deleting the clause that was a literal's only reason let a satisfiable formula be called refuted
The soundness campaign in dratify found a refutation of a satisfiable formula accepted on both engines: (1) (-1 2) with the proof d -1 2 0, -2 0, 0 returned ok=True. The deletion erased the clause that was the only reason for 2 and left 2 true at the root, because only clauses of at most one literal were spared — so (-2) passed as vacuously RAT and set the root conflict. A deletion is now ignored when the clause, as a set, is unit under the root assignment (exactly one literal true, the rest false), every reason clause has that shape, such a deletion counts in ignored_deletions, and once the root has conflicted every deletion is ignored because the assignment there depends on watch order (0.1.11).
Two more holes came out of the same pass. A comment ended at a form feed, because str.splitlines ends a line at nine characters besides the newline, so on p cnf 1 1, c<FF>p cnf 1 2, 1 0, c<FF>-1 0 the rest of the comment was read as text and the file parsed to (1) (-1) past strict=True — on a file minisat, cadical and kissat all call satisfiable; a line now ends at \n with one optional \r. And DRATChecker used directly still had the hole 0.1.7 closed for check_proof, because validation lived only there: DRATChecker(f).check([("a", (-1,)), ("a", ())]) got ok=True on the satisfiable formula (1), and check_step read an unknown kind as an addition, so check, check_step and the constructor now validate what they are given and check_proof validates CNF.clauses before either engine runs.
The rest is consistency rather than soundness: a clause that repeats a literal is the same clause without the repeat on both engines, failed_clause now reports a rejected step as the proof wrote it (1 1 0 gave (0,) from Python and (0, 0) from native), and CNF(1 << 32) gets one answer because the native engine is given the variables the clauses use rather than nvars (89e0644, 1601f58). cdclkit embeds this checker, which is why its 0.2.0 requires this release.