CNF as polynomial equations #
A clause is represented by a polynomial that vanishes when the clause holds. The variables
of the polynomial are literals, interpreted at their truth values by
Cslib.Logic.PL.Literal.toPolyAssignment: for a Boolean assignment σ, the positive coordinate
(v, true) receives σ v and the negative coordinate (v, false) its complement, viewed as
0 or 1 in a commutative semiring. Over a ring these values are a and 1 - a.
Cslib.Logic.PL.Clause.toPoly multiplies the variables for the negations of the clause's
literals. Thus x ∨ ¬y becomes X (x, false) * X (y, true), with value (1 - a x) * a y
over a ring. At the literal truth values of any fixed Boolean assignment, the polynomial is
0 for a satisfied clause and 1 otherwise. With nontrivial coefficients, a CNF is therefore
satisfied exactly when all its clause polynomials vanish at that same assignment. This
correspondence is pointwise at those Boolean and complementary coordinates; the encoding
constructs only the clause polynomials.
This is the twin-variable clause encoding used in polynomial calculus resolution (PCR)
[AlekhnovichBenSassonRazborovWigderson2002, §4.1, p. 1197]. Here the coordinates record literal
truth values and clause polynomials multiply their complements. The Boolean and complementarity
axioms of PCR are not adjoined; Literal.toPolyAssignment supplies their intended values directly.
Main definitions #
Cslib.Logic.PL.Literal.toPolyAssignment: lift a Boolean assignment to literal truth values.Cslib.Logic.PL.Clause.toPoly: the product of variables for complementary literals.
Main results #
Cslib.Logic.PL.Clause.eval_toPoly: the clause polynomial evaluates to0for a satisfied clause and1for a falsified clause.Cslib.Logic.PL.Clause.eval_eq_true_iff_eval_toPoly_eq_zero: clause satisfaction is equivalent to vanishing at the corresponding assignment.Cslib.Logic.PL.CNF.eval_eq_true_iff_forall_eval_toPoly_eq_zero: CNF satisfaction is equivalent to the vanishing of all clause polynomials at that same assignment.
References #
Extend a Boolean assignment to the truth values of both polarities, interpreted as 0 or 1.
The positive coordinate receives the original bit and the negative coordinate its complement.
The polynomial of a clause: multiply the variables for the complements of its literals. Repeated literals contribute repeated factors.
The positive coordinate is the original Boolean bit, interpreted in the coefficient semiring.
The negative coordinate is the complementary Boolean bit.
The empty clause has polynomial 1, expressing its falsity.
Adding a literal multiplies by its complementary variable.
On a Boolean assignment, the clause polynomial is 0 if the clause holds and 1 otherwise.
A fixed Boolean assignment satisfies a clause exactly when its polynomial evaluates to zero at the corresponding literal truth values.
A fixed Boolean assignment satisfies a CNF exactly when all its clause polynomials vanish at the same Boolean and complementary coordinates.