we extend the rules for propositional logic
principle is the same:
break the formula into its components until contradiction can be detected by simple inspection
propositional: |
|
| |||||||
first-order: |
|
| |||||||
where t is a ground term | where c is a new constant |
∃x F |
F[c/x] |
c is a new constant
this is Skolemization
∃x F is satisfiable if and only if F[c/x] is so
the second formula is "almost" equivalent to the first
(almost=apart from c, not in the original formula)
∀x F |
F[t/x] |
∀x F means: for every object of the domain, F is true
a term t is evaluated to an object of the domain
therefore, F[t/x] is true
this is a consequence of the first formula
(note: not equivalent, just a consequence)
when expanding ∀x F to F[t/x] term t may contain all function symbols and constants, including the ones created by Skolemization
{∀x P(x), ∃x ¬P(f(x))}
place formulae in column
create a new constant c
next: expand ∀
to expand ∀x P(x), we can use any ground term t
possible choices:
we choose f(c) for the obvious reasons
expand ∀x P(x) using f(c) as the term
the branch contains ¬P(f(c)) and P(f(c))
opposite literals ⇒ the branch can be closed
all branches closed (only one exists!) ⇒ set is unsatisfiable
{∀x ¬P(x), ∃x (P(x) ∨ P(f(x)))}
which formula to expand first?
no constant in the tableau so for, so no ground term
in order to apply the rule for ∀, we would have to create one
existentially quantified formula expanded
the universal quantification expansion rule could be now applied
also the disjunction
disjunction expanded
first branch closed applying the rule for universal quantification
still an unclosed branch!
is set satisfiable?
the set contains ∀x ¬P(x)
we have P(f(c)) in the unclosed branch
the two contradict each other: P cannot be always false but at the same time true for the element of the domain f(c)
we need to apply the rule for universal quantifiers again, generating ¬P(f(c))
∀x ¬P(x) expanded again,
now on the second branch and with a different ground term
all branches closed ⇒ set is unsatisfiable
there was a choice, at this point:
expand the disjunction or the universal quantifier
make the second choice now
P(c) could be useful to closing some branch
use c as the ground term
disjunction expanded
the first branch can be closed
still an unclosed branch
∀x ¬P(x) already expanded on the second branch
(expansion done in the path from root to P(f(c))
expand universally quantified formula again
the second branch can now be closed
formula ∀x ¬P(x) was expanded twice on the same branch
necessary for closing the tableau
still a valid tableau for the set (proves unsatisfiability)
in general:
the same universally quantified formula may need to be expanded on the same branch more than once
in the previous case, the set
example that cannot be closed without multiple applications:
{P(a), ∀x (P(x) ∧ ¬P(f(x))}
tableau after expanding every formula in every branch once
not closed
closure requires expansion of the universally quantified formula a second time
{ ∀x ¬P(x,a), P(a,b), ∀x∀y (¬P(x,y) ∨ P(y.x)) }
is this the only possible tableau for this set?
how did we reach it?
∀x∀y (¬P(x,y) ∨ P(y,x)) means that P is "symmetric"
therefore, P(a,b) and ∀x ¬P(x,a) contradict each other
this information has been used when developing the tableau
what about making the wrong choice?
clearly useless
clearly = only knowing the way to prove unsatisfiability in this case
for a computer, b is a perfectly valid choice of a term: simple and mentioned in the tableau already = potentially useful
not only lacks progresses toward proving unsatisfiability
there are two branches now, instead of one
unsatisfiability is yet to be proved in both
making the wrong choices may make the problem even harder to solve
rules for conjunction, disjunction and existential quantification are deterministic
only indeterminacy is their order of application
different for universal quantification:
∀x F |
F[t/x] |
the problem is:
which term t should be used?
since the rule for universal quantification can be applied an unbounded number of times, it may lead to a forever-expanding tableau:
{∀x P(x), ¬P(f(a))}
this is a valid (but useless) tableau for the set
it can be proved that:
S unsat ⇒ a closed tableau for S exist
in the propositional case, a closed tableau is always keeping applying rules (even in a "wrong" order, such as disjunctions before conjunctions)
in the first order case, this is not always the case: as the previous example shows, it is possible to keep expanding the tableau forever even if the set is unsatisfiable
an algorithm of application of the expansion rules that produces a closed tableau if the set is unsatisfiable
as seen before, applying rules at random yields to a complete proof procedure in the propositional case
reason: keeping applying rules leads to closure eventually, if the set is unsatisfiable
in the first-order case, applying rules at random does not yield to a complete proof procedure
reason: the tableau may not close even if the set is unsatisfiable
general concept in computer science
more or less:
unfairness = avoiding doing something useful forever
in the case of tableau:
a policy of application of the rules is unfair if some tableau contains a branch where one of its formulae ∀x F is never expanded with a specific ground term t
in other words: given a term t and branch of a tableau containing ∀x F, if the policy never expand the formula with t is unfair
fairness is the opposite of unfairness
given a term t and branch of a tableau containing ∀x F, the policy at some point will expand the formula using t
unfairness means that the policy may forever "avoid" a term t while expanding ∀x F
in this case, the policy "skipped" f(a)
because of this, the tableau does not close even if the set is unsatisfiable
a proof procedure that is fair is also complete
note that fairness concerns both ∀x F and t, not just t
counterexample: {∀x P(x), ∀x ¬P(x), Q(f(a))}
if ∀x ¬P(x) is never expanded, the tableau does not close
a fair algorithm of choice of the application of the rules at some point will close all tableaux for unsatisfiable sets
still difficult to choose terms that lead to closure fast
terms that are useful are difficult to determine
solution: delay choice until usefulness of a term is clear
this is done employing unification (next page)