Resolution #
The resolvent of clauses c₁ and c₂ on a variable v drops the positive literal of v from
c₁ and the negative literal of v from c₂ and joins what remains (Clause.resolvent). A clause
is derivable from a formula φ by resolution if it is a clause of φ or the resolvent of two
derivable clauses on a variable occurring positively in the first and negatively in the second
(CNF.Derives). Resolution is sound: an assignment satisfying both parents satisfies the
resolvent, so a formula from which the empty clause is derivable is unsatisfiable
(CNF.Derives.not_satisfiable). It is also refutation complete, the ground resolution theorem
of [Rob65]: the empty clause is derivable from every unsatisfiable formula
(CNF.derives_nil_of_not_satisfiable).
Completeness goes by induction on the number of variables, splitting on a variable as in the
procedure of [DP60]. Fixing a variable v of an unsatisfiable formula to either value
(CNF.restrict) leaves two unsatisfiable formulas without v, from which the empty clause is
derivable. Replaying such a derivation on the original formula derives a clause all of whose
literals are the literal of v falsified by the fixed value (CNF.Derives.exists_of_restrict).
Either one of the two clauses obtained this way is empty, or they resolve on v to the empty
clause.
Clauses are lists, so derivability depends on the order and repetition of literals; there is no weakening rule.
Main definitions #
Cslib.Logic.PL.Clause.resolvent: the resolvent of two clauses on a variable.Cslib.Logic.PL.CNF.Derives: derivability by resolution.Cslib.Logic.PL.CNF.restrict: a formula with one variable fixed.
Main results #
Cslib.Logic.PL.CNF.Derives.not_satisfiable: soundness of resolution refutations.Cslib.Logic.PL.CNF.derives_nil_iff_not_satisfiable: resolution refutes exactly the unsatisfiable formulas.
References #
The resolution rule #
The resolvent of c₁ and c₂ on v: the literals of c₁ other than v and those of c₂
other than ¬v.
Instances For
The resolvent has at most as many literals as its parents together.
Derivations and soundness #
The clauses derivable from φ by resolution: the clauses of φ, and the resolvents of
derivable clauses.
- mem {V : Type u_1} [DecidableEq V] {φ : CNF V} {c : Clause V} (hc : c ∈ φ) : φ.Derives c
A clause of
φis derivable. - resolvent {V : Type u_1} [DecidableEq V] {φ : CNF V} {c₁ c₂ : Clause V} (v : V) (h₁ : φ.Derives c₁) (h₂ : φ.Derives c₂) (hv₁ : (v, true) ∈ c₁) (hv₂ : (v, false) ∈ c₂) : φ.Derives (c₁.resolvent c₂ v)
The resolvent of two derivable clauses on a variable occurring positively in the first and negatively in the second is derivable.
Instances For
A derivable clause is true under every assignment satisfying the formula.
Soundness of resolution: a formula from which the empty clause is derivable is unsatisfiable.
Derivations survive adding clauses.
Completeness #
φ with the variable v fixed to b: the clauses satisfied by v = b are dropped, and the
literal of v falsified by v = b is removed from the others.
Instances For
If σ satisfies the restricted formula, then σ with v set to b satisfies the formula.
Fixing a variable of an unsatisfiable formula leaves an unsatisfiable formula.
Lifting a derivation: a clause derivable from φ with v fixed to b is contained in a
clause derivable from φ that may also contain the literal of v falsified by b.
Refutation completeness of resolution: the empty clause is derivable from every unsatisfiable formula.
Resolution refutes exactly the unsatisfiable formulas.