Resolution proofs #
Derivability by resolution (Cslib.Logic.PL.CNF.Derives) records only that a clause can be
derived. Proof complexity measures derivations, so this file gives them their usual line-based
form: a resolution proof from a formula φ is a sequence of clauses, each of which is a clause of
φ or the resolvent (Cslib.Logic.PL.Clause.resolvent) of two earlier clauses on a variable
occurring positively in the first and negatively in the second (Cslib.Logic.PL.CNF.IsProof).
Proofs are listed from their last line to their first, so that a proof grows by adding a line in
front. A clause is derivable exactly when it is a line of some proof
(Cslib.Logic.PL.CNF.derives_iff_exists_isProof).
A refutation is a proof with the empty clause among its lines. Its size is its number of lines,
and its width the largest width of a line, where the width of a clause
(Cslib.Logic.PL.Clause.width) is its number of distinct literals [Ben-Sasson and Wigderson]
[BSW01]. Clauses are lists, so a line may repeat a literal; repetitions do not
count towards its width.
Fixing a variable transforms proofs in both directions:
- a proof from
φbecomes a proof from the restricted formulaφ.restrict v b(Cslib.Logic.PL.CNF.IsProof.restrict). It has at most as many lines; every line of the original proof thatv = bdoes not satisfy is replaced by a line with a subset of its literals, and a line of the new proof is wider than any given bound only if the line it replaces is; - a proof from
φ.restrict v blifts to a proof fromφ(Cslib.Logic.PL.CNF.IsProof.lift) whose lines contain the lines they lift and, besides their literals, at most the literal ofvthatbfalsifies. This isCslib.Logic.PL.CNF.Derives.exists_of_restrictfor proofs, keeping track of the lines.
Proofs also compose: a proof from ψ replays on top of a proof from φ among whose lines are the
clauses of ψ (Cslib.Logic.PL.CNF.IsProof.comp).
Main definitions #
Cslib.Logic.PL.Clause.width: the number of distinct literals of a clause.Cslib.Logic.PL.CNF.IsProof: resolution proofs.Cslib.Logic.PL.CNF.RefutableInSize,Cslib.Logic.PL.CNF.RefutableInWidth: refutability by a refutation with a bounded number of lines, or with lines of bounded width.Cslib.Logic.PL.CNF.restrictBy: restricting a formula by a partial assignment.
Main results #
Cslib.Logic.PL.CNF.derives_iff_exists_isProof: derivable clauses are the lines of proofs.Cslib.Logic.PL.CNF.exists_refutableInSize_iff_not_satisfiable: resolution refutes exactly the unsatisfiable formulas.Cslib.Logic.PL.CNF.IsProof.restrict,Cslib.Logic.PL.CNF.IsProof.lift,Cslib.Logic.PL.CNF.IsProof.restrictBy: restricting and lifting proofs along a fixed variable or a partial assignment.Cslib.Logic.PL.CNF.IsProof.comp: composing proofs.
References #
Width #
The width of a clause: its number of distinct literals.
Instances For
A clause whose literals occur in another clause is at most as wide.
A clause of width zero is empty.
Proofs #
A resolution proof from φ, listed from its last line to its first: every line is a
clause of φ, or the resolvent of two lines below it on a variable occurring positively in the
first and negatively in the second.
- nil {V : Type u_1} [DecidableEq V] {φ : CNF V} : φ.IsProof []
The empty proof.
- mem {V : Type u_1} [DecidableEq V] {φ : CNF V} {ls : List (Clause V)} {c : Clause V} (h : φ.IsProof ls) (hc : c ∈ φ) : φ.IsProof (c :: ls)
A clause of
φis a new line. - resolvent {V : Type u_1} [DecidableEq V] {φ : CNF V} {ls : List (Clause V)} {c₁ c₂ : Clause V} (v : V) (h : φ.IsProof ls) (h₁ : c₁ ∈ ls) (h₂ : c₂ ∈ ls) (hv₁ : (v, true) ∈ c₁) (hv₂ : (v, false) ∈ c₂) : φ.IsProof (c₁.resolvent c₂ v :: ls)
The resolvent of two lines, on a variable occurring positively in the first and negatively in the second, is a new line.
Instances For
φ has a resolution refutation with at most s lines.
Instances For
φ has a resolution refutation all of whose lines have width at most w.
Instances For
Proofs survive adding clauses to the formula.
Resolution refutes exactly the unsatisfiable formulas, by refutations of some size.
A refutation within some width is a refutation of some size.
Restricting and lifting proofs #
Restricting a proof. A proof from φ becomes a proof from φ with v fixed to b, with
at most as many lines. Every line of the original proof that does not contain the literal (v, b)
is replaced by a line of the new proof with a subset of its literals, and for every w the new
proof has at most as many lines wider than w as the original proof has lines without (v, b)
wider than w.
Lifting a proof. A proof from φ with v fixed to b lifts to a proof from φ. Every
line of the original proof is contained in a line of the lifted proof that has, besides its
literals, at most the literal (v, !b) falsified by b, and every line of the lifted proof has,
besides the literals of a line of the original proof, at most that literal.
Composing proofs. A proof from ψ replays on top of a proof from φ among whose lines are
all clauses of ψ. The lines added are lines of the proof from ψ, and every line of the proof
from ψ is a line of the result.
Restricting proofs by partial assignments #
φ restricted by the partial assignment ρ, which fixes every variable v with
ρ v = some b to b: the clauses that ρ satisfies are dropped, and the literals of fixed
variables are removed from the others.
Instances For
The lines of a proof from a formula restricted by ρ mention only variables that ρ does not
fix.
Restricting a proof by a partial assignment. A proof from φ becomes a proof from φ
restricted by ρ. Every line of the original proof that ρ does not satisfy is replaced by a line
of the new proof with a subset of its literals, and the lines of the new proof have, in order,
subsets of the literals of distinct lines of the original proof that ρ does not satisfy. In
particular the new proof has at most as many lines with any property inherited by clauses with
more literals as the original proof has unsatisfied lines with that property.