230 likes | 352 Views
Conversion to Conjunctive Normal Form. Assertion. All Romans who know Marcus either hate Caesar or think than anyone who hates anyone is crazy. All Romans wish they were Greeks. Expressed in FOPL. For the transformation, let’s simplify. Let P = roman(X) Q = know(X, marcus)
E N D
Assertion All Romans who know Marcus either hate Caesar or think than anyone who hates anyone is crazy. All Romans wish they were Greeks.
For the transformation, let’s simplify Let P = roman(X) Q = know(X, marcus) R = hate(X, caesar) S = hate(Y,Z) T = thinkcrazy(X,Y) V = wish_greek(X)
Applied to the Original Expression Now eliminate the second =>
Step 3: Standardize the quantifiers so that each binds a unique variable For Example Given: We write:
Step 4: Move all quantifiers to the left without changing their order Step 3 makes this legal
Step 5: Eliminate Existential Quantifiers: Skolemization • Type 1 Given Tells us that there is an individual assignment to X drawn from its domain under which school(X) is satisfied. .
So, invent a function that goes into the domain of X and picks out just that item that satisfies school. • Call it pick • The original expression is transformed to: school(pick()) • Where • Pick is a function with no arguments • That returns the value from the domain of X that satisfies School • We might not know how to get the value. • But we give a name to the method that we know exists
Type 2 Suppose we have Where P,Q are elements of the set of integers In English, given an integer P, there is another integer Q, such that Q > P We can’t invent a single function, because Q depends on P Instead, invent a function whose single argument is the universally quantified variable.
get(P) returns an integer > P Becomes
Our example has one instance of an existentially quantified variable within the scope of a universally quantified variable Becomes
Step 6: Drop the remaining quantifiers • Legal since everything is universally quantified
Step 7: Rewrite the expression as a conjunct of disjuncts using dist. And assoc. laws This Gives:
Step 8: Rewrite each conjunct as a separate clause that are implicitly anded
Step 9: Rename variables in clauses so that no two clauses use the same variable name This is already the case The Expression is now in conjunctive normal form.