The implication graph of a formula with clauses of width two #
A clause a ∨ b says both ¬a → b and ¬b → a, and a unit clause a says ¬a → a. The
implication graph of a formula (Cslib.Logic.PL.CNF.Implies) has these arcs between literals:
an arc from ℓ to ℓ' when some clause contains ¬ℓ and ℓ' and no other literal. Every arc
is an implication that holds under a satisfying assignment, so a formula with a path from some
literal x to ¬x and one back is unsatisfiable (Cslib.Logic.PL.CNF.not_satisfiable_of_reach).
For clauses of width at most two the converse holds: a formula without the empty clause and
without such a pair of paths is satisfiable
(Cslib.Logic.PL.CNF.not_satisfiable_iff_of_width_le_two) Aspvall, Plass and
Tarjan. The proof picks a literal ℓ with no path to ¬ℓ, makes every
literal reachable from ℓ true, which is consistent and satisfies every clause it touches, and
continues with the remaining clauses, which mention fewer variables. The empty clause, which has
no arcs, is excluded separately; this proof is the library's own.
Main definitions #
Cslib.Logic.PL.CNF.Implies: the implication graph.
Main results #
Cslib.Logic.PL.CNF.Implies.negate: the implication graph is skew-symmetric.Cslib.Logic.PL.CNF.not_satisfiable_of_reach: a path from a literal to its negation and back refutes a formula.Cslib.Logic.PL.CNF.satisfiable_of_width_le_two: the converse for clauses of width at most two.Cslib.Logic.PL.CNF.not_satisfiable_iff_of_width_le_two: the characterization.
References #
The negation of a literal holds exactly when the literal does not.
The implication graph is skew-symmetric: the contrapositive of an arc is an arc.
Paths of the implication graph are skew-symmetric too.
A path from a literal to its negation and back refutes a formula.
A formula of width at most two is satisfiable when it has no empty clause and no variable
x with a path from x to ¬x and one back Aspvall, Plass and Tarjan.
A formula of width at most two is unsatisfiable exactly when it has the empty clause or a
variable x with a path from x to ¬x and one back Aspvall, Plass and
Tarjan.