Trimming and renumbering LRUP (RUP-only LRAT) certificates #
A solver's RUP-only LRAT (LRUP) certificate usually adds many clauses that the empty clause does
not depend on, and numbers its clauses sparsely. Cslib.Logic.PL.CNF.trimCert keeps the steps that
the first empty-clause step depends on through the hints, found by a pass from that step back to
the first, and drops the deletions. Cslib.Logic.PL.CNF.renumberCert n numbers the clauses a
certificate adds n + 1, n + 2, … in order, after the n clauses of the formula, and maps the
hints accordingly. Both preserve acceptance by the RUP-only checker Cslib.Logic.PL.CNF.checkLRUP
(Cslib.Logic.PL.CNF.checkLRUP_trimCert, Cslib.Logic.PL.CNF.checkLRUP_renumberCert), with no
hypothesis on the certificate: a certificate may reuse the number of a deleted clause, or of a
clause of the formula, and may delete numbers it never added. RAT steps are left untouched and are
rejected by checkLRUP.
The checker looks up a hinted number in a list of numbered clauses, the most recent first, and a
deletion removes every clause with that number. So in an accepted certificate a hint names the
last clause added with that number before it, or the clause of the formula if there is none;
trimming keeps that clause, since the hint asks for it. The clauses that the dropped deletions
would have removed are never looked up, since an accepted certificate hints a deleted number only
after adding it anew. Renumbering sends each hint where its clause went, and the new numbers are
fresh. renumberCert drops deletions too: renumbered, a deletion of a number that the certificate
never added, such as n + 1, could delete a clause that the renumbered certificate adds.
Main definitions #
Cslib.Logic.PL.CNF.trimCert: the steps the first empty clause depends on, without deletions.Cslib.Logic.PL.CNF.renumberCert: the added clauses numbered after those of the formula.
Main results #
Cslib.Logic.PL.CNF.checkLRUP_trimCert: trimming preserves LRUP acceptance.Cslib.Logic.PL.CNF.checkLRUP_renumberCert: renumbering preserves LRUP acceptance.Cslib.Logic.PL.CNF.checkLRUP_renumberCert_trimCert: so does their composite, whichlrat_tautoapplies to its solver's certificates.
The steps of a certificate that its first empty clause depends on, through the hints, in
order, without the deletions. The LRUP checker accepts the result whenever it accepts the
certificate (Cslib.Logic.PL.CNF.checkLRUP_trimCert). For lrat_tauto, dropping the deletions
measured faster than keeping the solver's or deleting each clause after its last hint: the kernel
checker's trie does not get shallower when clauses are deleted, and each deletion costs a step.
Renumbers the clauses a certificate adds as n + 1, n + 2, … in order, after the n
clauses of the formula, and its hints accordingly; a hint to a number the certificate has not
added keeps that number. Deletions are dropped, and RAT steps, which checkLRUP rejects, kept
unchanged. The LRUP checker accepts the result whenever it accepts the certificate on a formula of
n clauses (Cslib.Logic.PL.CNF.checkLRUP_renumberCert).
Correctness #
Renumbering preserves LRUP acceptance: on a formula of φ.length clauses, checkLRUP
accepts the renumbered certificate whenever it accepts the certificate.
Trimming and renumbering preserve LRUP acceptance: the certificate that lrat_tauto sends
to the kernel is accepted by checkLRUP whenever its solver's certificate is.