Documentation

CslibFrontier.Logics.Propositional.Resolution.FromLRUP

Resolution refutations from LRUP (RUP-only LRAT) certificates #

This file translates RUP-only LRAT (LRUP) certificates without RAT steps, accepted by Cslib.Logic.PL.CNF.checkLRUP, into resolution refutations. It does not cover full LRAT certificates with RAT steps (Cslib.Logic.PL.CNF.checkLRATRat): RAT additions simulate Extended Resolution and refute PHP^{n+1}_n in polynomial size (Cook, 1976), exponentially separating full LRAT from Resolution, so no polynomial-size translation into Resolution exists for full LRAT.

A RUP step of an LRUP certificate adds a clause C with hints h₁, …, hₖ: from the negation of C, each hinted clause but the last has every literal but one false, so the remaining literal lᵢ is propagated, and the last hinted clause has every literal false. Read backwards, this is a chain of resolutions, a trivial resolution derivation in the sense of Beame, Kautz and Sabharwal [BKS04]: start from the last hinted clause, whose literals are all false, and resolve it in turn, for i = k - 1, …, 1, with the clause of hᵢ on the variable of lᵢ whenever the current clause contains the negation of lᵢ and lᵢ was not already true. Every literal of the current clause stays false under the negation of C and the literals propagated before lᵢ, so the clause reached at the end has its literals among those of C. Resolution has no weakening rule, so it derives this clause, not C itself.

The translation (Cslib.Logic.PL.CNF.lrupToProof) therefore pairs every clause of the checker's database with a line of the proof whose literals are among its own, and builds the chain for each RUP step from these lines. A line with fewer literals than its clause can only end a later chain earlier: its literals that are not false are among those of the clause, so they are the propagated literal or none. Clauses are lists, so a line may repeat a literal (resolving a ∨ b with a ∨ ¬b gives a ∨ a) where the checker's clause has it once; the checker, and the chain, read clauses only through membership, so repeated literals, and complementary literals in C (a tautology), need no special treatment. Deletions remove clauses from the database and add nothing. An empty-clause step is a chain from no assumptions, so it ends with the empty clause. RAT steps cause lrupToProof to return none, matching checkLRUP.

The chain resolves on a variable only when its literal is propagated for the first time, so the variables it resolves on are distinct and, being variables of proof lines, are variables of the formula. Starting from the clauses of the formula, a RUP-only certificate that Cslib.Logic.PL.CNF.checkLRUP accepts therefore becomes a resolution refutation whose lines are the clauses of the formula, at most one line for each hint, and at most N lines for each step, where N is the number of variables of the formula (Cslib.Logic.PL.CNF.isProof_lrupToProof). The size lower bounds for resolution then bound the size of every accepted LRUP certificate (Cslib.Logic.PL.CNF.refutableInSize_of_checkLRUP).

Main definitions #

Main results #

References #

A clause of the LRUP checker's database, with its number, paired with a line of the proof under construction whose literals are among its own.

  • id : ℕ

    The number of the clause.

  • clause : Clause ℕ

    The clause, as the checker reads it.

  • line : Clause ℕ

    The line of the proof standing for the clause.

The resolvent of d₀, which contains l, and d₁, which contains its negation, on the variable of l, the premise with the positive literal first.

The resolution chain of a RUP step, following unit propagation along the hints from the literals t assumed true, as Cslib.Logic.PL.CNF.propagateHints does, by the residual of each hinted clause (Cslib.Logic.PL.Clause.residual): the lines it adds, latest first, and the line it derives, every literal of which is false under t; none if propagation fails. After the rest of the chain derives a line from l :: t, where l is the literal the current hinted clause propagates, that line is resolved with the line of the hinted clause on the variable of l when it contains the negation of l and l is new; otherwise either it or the hinted clause's line is already false under t.

The translation on a database: the lines ls so far grow by the chain of each RUP step, and the result is reached at the first empty-clause step. RAT steps return none.

The resolution proof of an LRUP (RUP-only LRAT) certificate: the clauses of φ, each standing for itself under its number i + 1, followed by the chains of the RUP steps up to the first empty-clause step. Returns none on RAT steps (not covered by CNF.checkLRUP).

Correctness #

The resolution proof of an accepted LRUP (RUP-only LRAT) certificate is a refutation: for a certificate accepted by Cslib.Logic.PL.CNF.checkLRUP (without RAT steps), lrupToProof returns a resolution proof from φ containing the empty clause, with at most |φ| lines plus the smaller of the number of RUP/empty hints and the number of steps times the number N of variables of φ. Does not apply to full LRAT with RAT steps (Cslib.Logic.PL.CNF.checkLRATRat).

A formula with an accepted LRUP (RUP-only LRAT) certificate has a resolution refutation with at most |φ| lines plus the smaller of the number of RUP/empty hints and the number of steps times the number N of variables of φ. Applies only to CNF.checkLRUP (without RAT steps), not to full LRAT (CNF.checkLRATRat).