Documentation

CslibFrontier.Logics.Propositional.Resolution.LRAT

LRUP (RUP-only LRAT) certificates from tree-like resolution refutations #

A resolvent is a RUP clause of its two premises: from the negation of c₁.resolvent c₂ v, every literal of c₁ but (v, true) is false, so c₁ forces v, and then every literal of c₂ is false. So a tree-like derivation (Cslib.Logic.PL.CNF.Derivation) compiles to a RUP-only LRAT (LRUP) certificate with one RUP step for each resolution step, hinting the numbers of its two premises, followed by an empty-clause step hinting the conclusion, for a derivation of the empty clause (Cslib.Logic.PL.CNF.Derivation.toLRAT). The LRUP checker Cslib.Logic.PL.CNF.checkLRUP (and hence full LRAT Cslib.Logic.PL.CNF.checkLRATRat) accepts the certificate of every tree-like refutation (Cslib.Logic.PL.CNF.Derivation.checkLRUP_toLRAT).

The clauses of the formula keep their numbers 1, 2, …; a leaf names the first clause of the formula equal to it, and the resolvents are numbered from one past the last clause of the formula on, in post-order.

Main definitions #

Main results #

The steps of the certificate of a tree-like derivation, the number of its conclusion, and the next unused number.

The steps of the certificate of a tree-like derivation, numbering its resolvents from k on: nothing for a clause of the formula, and for a resolvent the steps of its premises followed by a RUP step hinting them.

The LRAT certificate of a tree-like refutation: its steps, numbering the resolvents from one past the last clause of the formula, and an empty-clause step hinting its conclusion.

The certificate of a tree-like refutation has one step for each of its leaves: a RUP step for each resolution step, and the final empty-clause step.

The checker accepts the certificate #

theorem Cslib.Logic.PL.CNF.propagateHints_resolvent {db : List (ℕ × Clause ℕ)} {i₁ i₂ v : ℕ} {c₁ c₂ : Clause ℕ} (h₁ : List.find? (fun (x : ℕ × Clause ℕ) => x.1 == i₁) db = some (i₁, c₁)) (h₂ : List.find? (fun (x : ℕ × Clause ℕ) => x.1 == i₂) db = some (i₂, c₂)) :

Unit propagation from the negation of a resolvent, hinting its two premises, succeeds: the first premise propagates v, and then every literal of the second is false.

The LRUP checker accepts the certificate of every tree-like refutation.