You are on page 1of 4

Conversion to Clause

Consider the following statement and clausal representation. All Romans who know Marcus either hate Caesar or think that anyone who hates anyone is crazy.
x [Roman(x) knows(x, Marcus)] [hate(x, Caesar) ( y ( z hate(y,z)) thinkcrazy(x,y))]
January 03 Conversion to Clause Form 1

Conversion to Clause
Try using that in a proof.
Requires complex matching process.

If the formula were in a simpler form it would be easier to work with. It would be easier if: It were flatter (less embedding of components) The quantifiers were separated from the rest of the formula so that they did not need to be considered. Conversion to Clause Form January 03 2

Conversion to Clause
Quantifiers are and Conjunctive normal form has both of these properties. In CNF, the above statement would look like:~Roman(x) ~knows(x, Marcus) hate(x, Caesar) ~hate(y,z) thinkcrazy(x,y)

Conversion to Clause
There is an algorithm for converting from wff to cnf, therefore if we lose no generality if we employ a proof that operates only on wffs of this form. There are a number of steps to be taken as follows:-

how so?
January 03 Conversion to Clause Form 3 January 03 Conversion to Clause Form 4

Conversion to Clause
1) Eliminate , using the fact that a b is equivalent to ~a b.
x ~[Roman(x) knows(x, Marcus)] [hate(x, Caesar) ( y ~( z hate(y,z)) thinkcrazy(x,y))]

Conversion to Clause
the correspondence between quantifiers
~x P(x) = x ~P(x) ~x P(x) = x ~P(x)

2) Reduce the scope of ~


using the fact that ~(~p) = p deMorgans Laws
January 03

Applying these to the wff from step 1 yields: x [ ~Roman(x) ~knows(x, Marcus) ] [ hate(x, Caesar) ( y z ~hate(y,z) thinkcrazy(x,y) ) ]

~(a b) = ~a ~b and ~(a b) = ~a ~b


Conversion to Clause Form 5 January 03

Conversion to Clause Form

Conversion to Clause
3) Standardise variables so that each quantifier binds a unique variable.
x P(x) x Q(x) is converted to x P(x) y Q(y) Done in preparation for step 4.

Conversion to Clause
x y z [ ~Roman(x) ~knows(x, Marcus) ] [ hate(x, Caesar) (~hate(y,z) thinkcrazy(x,y) ) ]

This is called prenex normal form.


It consists of a prefix of quantifiers followed by a matrix which is quantifier free.

4) Move all quantifiers to the left of the formula, without changing the relative order. Done on the wff gives:January 03 Conversion to Clause Form 7

January 03

Conversion to Clause Form

Conversion to Clause
5) Eliminate existential quantifiers.
Existentially quantified variables assert that there is a value that can be substituted for the variable that makes the formula true. We can eliminate the quantifier by substituting for the variable a reference to a function that produces the desired value example x President(x) can be transformed into President(S1) - S1 is a function
January 03 Conversion to Clause Form 9

Conversion to Clause
if existential quantifier occur within the scope of universal quantifiers, then the value that satisfies the predicate may depend on the value of universal quantifier. Example x y fatherof(y,x) y value depends on x must generate functions with the same number of arguments as the number of universal quantifiers in whose scope the expression occurs January 03 Conversion to Clause Form 10

Conversion to Clause
This will be x fatherof(S2(x),x)

Conversion to Clause
6) Drop the prefix.
At this point, all remaining variables are universally quantified. Can now assume that any variables seen are universally quantified. Will result in:[ ~Roman(x) ~knows(x, Marcus) ] [ hate(x, Caesar) (~hate(y,z) thinkcrazy(x,y) ) ]
11 January 03 Conversion to Clause Form 12

These generated functions are Skolem functions. Sometimes, ones with no arguments are called Skolem constants. None to be replaced in this case.

January 03

Conversion to Clause Form

Conversion to Clause
Convert the matrix to a conjunction of disjuncts .
Here, not necessary, but we must still exploit the associative property of OR
a or (b or c) = (a or b) or c

Conversion to Clause
There is also a distributive property which should be mentioned.
(a and b) or c = (a or c) and (b or c) example:(winter and wearingboots) or (summer and wearingsandals) becomes (after first application) [winter or (summer and wearingsandals)] and [ wearingboots or (summer and wearingsandals)]
13 January 03 Conversion to Clause Form 14

Removing the parentheses gives:~Roman(x) ~knows(x, Marcus) hate(x, Caesar) ~hate(y,z) thinkcrazy(x,y)
January 03 Conversion to Clause Form

Conversion to Clause
Then after a second application (since there are still conjuncts joined by Ors) This gives:(winter or summer) and (winter or wearingsandals) and (wearingboots or summer) and (wearingboots or wearingsandals)

Conversion to Clause
8) Call each conjunct a separate clause.
For the wff to be true, all clauses that are generated from it must be true.

9) Standardise apart the variables in the set of clauses generated in step 8.


Rename the variables so that no two clauses make reference to the same variables.

a conjunction of disjunts
January 03 Conversion to Clause Form 15 January 03 Conversion to Clause Form 16

Conversion to Clause
This depends on the fact (x P(x) Q(x)) = x P(x) x Q(x) Since each clause is a separate conjunct and all variables are universally quantified, there need be no relationship between the variables of the two clauses.

Conversion to Clause
In general, want to keep clauses in general form as long as possible. When a variable is instantiated, we want to know the minimum number of substitutions that must be made to preserve the truth of the system.

Step 9 is important.
During resolution, it will be necessary to instantiate universally quantified variables.
January 03 Conversion to Clause Form 17

January 03

Conversion to Clause Form

18

Conversion to Clause
Applying this entire procedure to a set of wffs, we will have a set of clauses (each a disjunction of literals ) which can now be exploited by the resolution procedure to generate proofs.

January 03

Conversion to Clause Form

19

You might also like