Scope, free variable, closed wff §In X(A) or X(A), where A is a wff : X is called the variable...

9
Scope, free variable, closed wff In X(A) or X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope of the quantifier An occurrence of a variable X in a wff B is said to be bound if the occurrence of X is in the subformula of B of the form X(A) or X(A).Otherwise the occurence is said to be free. A variable X is said to be free in B iff there is an occurrence free of X in B. A wff is closed (or a sentence) iff there are no free variables in the wff.

Transcript of Scope, free variable, closed wff §In X(A) or X(A), where A is a wff : X is called the variable...

Page 1: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Scope, free variable, closed wff

In X(A) or X(A), where A is a wff :

X is called the variable quantified over;

A is said to be (within) the scope of the quantifier An occurrence of a variable X in a wff B is said to be bound if the occurrence of X is in the subformula of B of the form X(A) or X(A).Otherwise the occurence is said to be free.A variable X is said to be free in B iff there is an occurrence free of X in B. A wff is closed (or a sentence) iff there are no free variables in the wff.

Page 2: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNF1. Eliminate implications:

A B becomes A B

2. Move inwards:• Apply De Morgan’s :

(A v B) becomes (A B)

(A B) becomes (A v B)• Apply double negation rule:

A becomes A X (A) becomes X ( A) X (A) becomes X ( A)

Page 3: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNF

3. Standardize variables. Since variables within the scope of quantifiers are like dummy variables, they can be renamed so that each quantifier has its own variable symbol

X(P(X) XQ(X)) becomes

X(P(X) YQ(Y))

Page 4: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNF4. Eliminate existential quantifiers(Skolemization):

a) the general rule for eliminating an existential quantifier from a formula is to replace each occurrence of its existentially quantified variable by a (NEW) Skolem function whose arguments are those universally quantified variables that are bound by universal quantifiers whose scope include the scope of the existential quantifier being eliminated.

b) If the existential quantifier being eliminated is not within the scope of any universal quantifiers, we use a Skolem function of no arguments, which is just a (NEW) constant.

Page 5: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNFTo eliminate all of the existential variables, we use the preceding procedure on each subformula in turn.

Examples:

(1) Eliminating W inX(P(X) v Y(( P(Y) v P(f(X, Y))) W(Q(X, W) P(W))))

to yield(1*)

X(P(X) v Y(( P(Y) v P(f(X, Y))) Q(X, h(X)) P(h(X))))

where h is a NEW Skolem function.

Page 6: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNFExamples: (2) Eliminating X in

XYZ P(X, X, Y, Z, f(a))

to yield

YZ P(newskol, newskol, Y, Z, f(a))

where newskol is a NEW Skolem constant.

Then we would have to apply this step again to eliminate z to yield:

Y P(newskol, newskol, Y, g(Y), f(a))

where g is a NEW Skolem function.

Page 7: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNFExamples: (3) Eliminating X in

Y W X Z P(W, X, X, Y, Z, f(a))

to yield

Y W Z P(W, g(Y, W), g(Y, W), Y, Z, f(a))

where g is a NEW Skolem function.

Then we would have to apply this step again to eliminate z to yield:

Y W P(W, g(Y, W), g(Y, W), Y, h(Y, W), f(a))

where h is a NEW Skolem function.

Page 8: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNFNotice that the Skolem form of a wff is not equivalent to the original wff!

Example:(4) P(sk) ||= XP(X) but XP(X) ||\= P(sk)

But we have the important theorem:

A set of formulas S is unsatisfiable

iff

the Skolem form of S is unsatisfiable

Page 9: Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.

Converting arbitrary wffs to CNFA wff is in prenex form iff it consists of a string of quantifiers (called a prefix) followed by a quantifier free formula called a matrix.

5. Convert to Prenex Form

At this stage there is no remaining existential quantifiers and each universal quantifier has its own variable symbol.

We may now move all of the universal quantifiers to the front of the wff and let the scope of each quantifier include the entirety of the wff following it. The resulting wff is in

prenex form.From (1*) X(P(X) v Y(( P(Y) v P(f(X, Y))) Q(X, h(X)) P(h(X))))

X Y(P(X) v (( P(Y) v P(f(X, Y))) Q(X, h(X)) P(h(X))))