I have received no questions about the fourth
project, either directly or on the discussion
board. I find it hard to believe that everything is crystal clear
and that Otter is so easy to use.
To translate into CNF, connectives other than "or" are eliminated by de Morgan's laws, associativity, and distributivity. Existential quantifiers are eliminated by Skolemization, which introduces new constants and/or function symbols. For example,
forall x exists y loves(x,y)becomes
forall x loves(x,objectof(x))The Skolem term objectof(x) that replaces y has x as an argument because the scope of y is nested inside the scope of x.
The substitution that unifies the two loves literals is a set of two bindings: { y := x, z := mother(x) }forall x loves(x,mother(x))
forall y,z loves(y,z) -> likes(y,z)
After applying the substitution to both clauses, we can then conclude by resolution that
In general, a substitution S is a set of individual substitutions of the form x := g where x is a variable and g is a term. Each righthand side term may be ground (i.e. containing no variables) or not.forall x likes(x,mother(x))
Applying the substitution S is usually written using postfix notation. The equation pS = qS says that after applying S to p and to q, the results are syntactically identical. Terminology: we say that S unifies p and q, or that S is a unifying substitution for p and q.
There is a standard algorithm that given two sentences, finds their unique most general unifying substitution. Notes:
The substitution that unifies two terms can have size exponential in the size of the input terms. For example, consider unifying A = P( f(a,a) g(u,u) h(v,v) i(w,w) ) and B = P(u,v,w,x). The unifying substitution is
{ u := f(a,a)What this example shows is that the usual notation for writing down terms should be avoided. Good data structures for implementing unification and resolution are beyond the scope of this course.
v := g(f(a,a),f(a,a))
w := h( g(f(a,a),f(a,a)), g(f(a,a),f(a,a)) )
x := ... }
Definition: A control strategy is complete if its use preserves refutation-completeness, i.e. if a contradiction exists, it can be found while respecting the strategy.
If a policy allows only a finite number of possible resolutions, then theorem-proving always terminates in bounded time In this case completeness must fail because it would contradict the fact that FOL is only semi-decidable, and not decidable.
Any policy that places a fixed upper bound on the length of the clauses
that may be used in a proof only allows a finite number of resolutions,
hence is incomplete.
Unit resolution is the policy that at least one parent of each resolution step must be a unit clause, i.e. a single literal. Unit resolution is what we called unit propagation when discussing the DPLL algorithm for propositional satisfiability.
Under unit resolution the conclusion of each resolution step is shorter than its non-unit parent, so unit resolution must be incomplete. For example, it fails to derive false from these four clauses:
Input resolution is the policy that at least one parent of each resolution step must be in the original knowledge base, or part of the negated goal. The eats(jo,fish) proof from February 26 is an example of input resolution.{ P v Q ~P v Q P v ~Q ~P v ~Q }
This strategy is not complete either, but it can be efficient. It fails on the same example as unit resolution. (Just assume that any one of the four clauses is the negated goal.)
Both unit resolution and input resolution are complete when all clauses are Horn clauses. A Horn clause is a clause with at most one positive literal.
Unit preference is the heuristic of prioritizing resolutions
where one parent is a unit clause. This heuristic does not actually
eliminate any resolutions. It can be used in combination with other
strategies that do, without changing their completeness or incompleteness