refutation method
proves unsatisfiability by deriving contradiction
works on clauses
if A and B are clauses and x a variable:
A∨x B∨¬x |
A∨B |
if a set of clauses is unsatisfiable, the empty clause can be derived by resolution
example: prove that {x, ¬x∨y, ¬y} is unsatisfiable:
x | ¬x∨y | ||||
⇓ | |||||
y | ¬y | ||||
⇓ | |||||
⊥ |
prove that {¬x∨¬y, ¬x∨y, x∨¬y, x∨y} is unsatisfiable
x∨y | ¬x∨y | |||||
⇓ | ||||||
y | x∨¬y | |||||
⇓ | ||||||
x | ¬x∨¬y | |||||
⇓ | ||||||
¬y | ||||||
⇓ | ||||||
⊥ |
same unsatisfiable set: {¬x∨¬y, ¬x∨y, x∨¬y, x∨y}
x∨y | ¬x∨y | x∨¬y | ¬x∨¬y | |||
⇓ | ⇓ | |||||
y | ¬y | |||||
⇓ | ||||||
⊥ |
still works on clauses
definition of clauses is slightly different from propositional logic
∀x1…∀xm L1 ∨ … ∨ Ln
where Li's are literals
no free variables in the clause (all quantified)
by convention: quantifiers omitted
written as: L1 ∨ … ∨ Ln
still no free variables!
quantified by ∀x1…∀xm
convention simplifies writing
omission not a consequence of semantics
A, B clauses
L1, L2 literals
A∨L1 | B∨¬L2 | |
(A∨Bδ)σ |
where:
A clause
L1, L2 literals
A∨L1∨L2 |
(A∨L1)σ |
where:
next: why δ?
why σ?
A∨L1 | B∨¬L2 | |
(A∨Bδ)σ |
why the substitution σ?
otherwise, rule could not be applied to clauses like:
indeed, Q(f(z), y) similar but not equal to Q(x, y)
idea: apply MGU [f(z)/x] to both clauses
the MGU of the two literals is [f(z)/x]
apply to both clauses:
P(x) ∨ ¬Q(f(z), y) | ⇒ | P(f(z)) ∨ ¬Q(f(z), y) |
R(z,f(b)) ∨ Q(x, y) | ⇒ | R(z,f(b)) ∨ Q(f(z), y) |
literals now exactly opposite of each other
but...
a closer look at x in the two clauses:
(implicit quantifiers made explicit):
P(x) ∨ ¬Q(f(z), y) | = | ∀x∀y∀z P(x) ∨ ¬Q(f(z), y) |
R(z,f(b)) ∨ Q(x, y) | = | ∀x∀y∀z R(z,f(b)) ∨ Q(x, y) |
to match the literals Q(…), make x=f(z) everywhere
but then, P(x) becomes P(f(z))
necessary?
rename the variables of the second clause:
P(x) ∨ ¬Q(f(z), y) | = | ∀x∀y∀z P(x) ∨ ¬Q(f(z), y) |
R(z',f(b)) ∨ Q(x', y') | = | ∀x'∀y'∀z' R(z',f(b)) ∨ Q(x', y) |
semantics is unchanged (because of implicit quantifiers)
now MGU is x'=f(z)
P(x) unchanged
first formula weaker
P true only for f(z), not for every value
not just because of MGU application:
both MGU and renaming are substitutions
P(x) ∨ ¬Q(f(z), y) | = | ∀x∀y∀z P(x) ∨ ¬Q(f(z), y) |
R(z,f(b)) ∨ Q(x, y) | = | ∀x∀y∀z R(z,f(b)) ∨ Q(x, y) |
to such formulae:
applying a substitution=produce a formula equivalent or weaker
e.g.: instead of ∀x, statement holds for x=f(z)
resolution and factorization rules correct
formula unsatisfiable ⇒ empty clause can be generated by applying them
it can be proved (completeness)
(in this course, no formal proof of completeness seen)