Logic for Computer Scientists/Predicate Logic/Equivalence and Normal Forms

From testwiki
Jump to navigation Jump to search

Equivalence and Normal Forms

Equivalence of formulae is defined as in the propositional case:

Definition 6

The formulae F and G are called (semantically) equivalent, if for all interpretations ℐ for F and G, ℐ(F)=ℐ(G). We write FG.

The equivalences from the propositional case in theorem 4 equivalences hold and in addition we have the following cases for quantifiers.

Theorem 1

The following equivalences hold:

¬xF x¬F

¬xF x¬F

If x does not occur free in G:

xFG x(FG)

xFG x(FG)

xFG x(FG)

xFG x(FG)


xFxG x(FG)

xFxG x(FG)

xyF yxF

xyF yxF


Proof: We will prove only the equivalence

xFGx(FG)

with x has no free occurrence in G, as an example. Assume an interpretation ℐ=(U,π’œ) such that

ℐ(xFG)=true
iff β„(xF)=true and β„(G)=true
iff  for all dU:ℐ[x/d](F)=true and β„(G)=true
iff  for all dU:ℐ[x/d](F)=true and β„[x/d](G)=true (x = does not occur free in = G)
iff  for all dU:ℐ[x/d]((FG))=true
iff β„(x(FG))=true.


Note that the following symmetric cases do not hold:

xFxG is not equivalent to x(FG)

xFxG is not equivalent to x(FG)

The theorem for substituitivity holds as in the propositional case.


Example: Let us transform the following formulae by means of substituitivity and the equivalences from theorem 1:

(¬(xP(x,y)zQ(z))wP(f(a,w)))
((¬xP(x,y)¬zQ(z))wP(f(a,w)))
((x¬P(x,y)z¬Q(z))wP(f(a,w)))
(wP(f(a,w))(x¬P(x,y)z¬Q(z)))
w(P(f(a,w))x(¬P(x,y)z¬Q(z)))
w(x(z¬Q(z)¬P(x,y))P(f(a,w)))
w(xz(¬Q(z)¬P(x,y))P(f(a,w)))
wxz((¬Q(z)¬P(x,y))P(f(a,w)))

Definition 7

Let F be a formula, x a variable and t a term. F[x/t] is obtained from F by substituting every free occurrence of x by t.
Note, that this notion can be iterated: F[x/t1][y/t2] and that t1 may contain free occurrences of y.

Lemma 1

Let F be a formula, x a variable and t a term.

ℐ(F[x/t])=ℐ[x/ℐ(t)](F)

Lemma 2 (Bounded Renaming)

Let F=QxG be a formula, where Q{,} and y a variable without an occurrence in G, then FQyG[x/y]

Definition 8

A formula is called proper if there is no variable which occurs bound and free and after every quantifier there is a distinct variable.

Lemma 3 (Proper Formula)

For every formula F there is a formula G which is proper and equivalent to F.
Proof: Follows immediately by bounded renaming.
Example:

F=xyp(x,f(y))x(q(x,y)r(x))


has the equivalent and proper formula

G=xy(p(x,f(y)))z(q(z,u)r(z)

Definition 9

A formula is called in prenex form if it has the form Q1QnF, where Qi{,} with no occurrences of a quantifier in F

Theorem 2

For every formula there is a proper formula in prenex form, which is equivalent.
Example:

xy(p(x,g(y,f(x)))¬q(z))¬xr(x,z)


xy(p(x,g(y,f(x))¬q(z))x¬r(x,z)


xy(p(x,g(y,f(x))¬q(z))v¬r(v,z)


xyv(p(x,g(y,f(x))¬q(z))¬r(v,z)

Proof: Induction over the structure of the formula gives us the theorem for an atomic formula immediately.

  • F=¬F0: There is a G0=Q1y1QnynG with Qi{,}, which is equivalent to F0. Hence we have

    FQ1y1Qnyn¬G

where Qi={ifQi=ifQi=

  • F=F1F2 with {,}. There exists G1,G2 which are proper and in prenex form and G1F1 and G2F2. With bounded renaming we can construct
G1=Q1y1QkykG1
G2=Q1z1QlzlG2

where

{y1,,yn}{z1,,zl}=

and hence

FQ1y1QkykQ1z1Qlzl(G1G2)


In the following we call proper formulae in prenex form PP-formulae or PPF’s.

Definition 10

Let F be a PPF. While F contains a -Quantifier, do the following transformation:

F has the form

y1,ynzG

where G is a PPF and f is a n-ary function symbol, which does not occur in G.

Let F be

y1,ynG[z/f(y1,,yn)]

If there exists no more -quantifier, F is in Skolem form.

Theorem 3

Let F be a PPF. F is satisfiable iff the Skolem form of F is satisfiable.

Proof: Let F=y1ynzG; after one transformation according to the while-loop we have


F=y1ynG[z/f(y1,,yn)


where f is a new function symbol. We have to prove that this transformation is satisfiability preserving: Assume F is satisfiable. than there exists a model ℐ for F ℐ is an interpretation for F. From the model property we have for all u1,,unUℐ


ℐ[y1/u1][yn/un](G[z/f(y1,,yn)])=true


From Lemma 1 we conclude


ℐ[y1/u1][yn/un][z/v](G)=true


where v=ℐ(f(u1,,un). Hence we have, that for all u1,,unUℐ there is a vUℐ, where


ℐ[y1/u1][yn/un][z/v](G)=true


and hence we have, that ℐ(y1ynzG)=true, which means, that ℐ is a model for F.

For the opposite direction of the theorem, assume that F has a model ℐ. Then we have, that for all u1,,unUℐ, there is a vUℐ, where


ℐ[y1/u1][yn/un][z/v](G)=true


Let ℐ be an interpretation, which deviates from ℐ only, by the fact that it is defined for the function symbol f, where ℐ is not defined. We assume that fℐ(u1,,un)=v, where v is chosen according to the above equation.

Hence we have that for all u1,,unUℐ


ℐ'[y1/u1][yn/un][z/fℐ(u1,,un)](G)=true


and from Lemma 1 we conclude that for all u1,,unUℐ


ℐ'[y1/u1][yn/un](G[z/f(y1,,yn)])=true


which means, that ℐ(y1ynG[z/f(y1,,yn)])=true, and hence ℐ is a model for F.

The above results can be used to transform a Formula into a set of clauses, its clause normal form:


Template:Box


Problems

Problem 6 (Predicate)

Let F be a formula, x a variable and t a term. Then F[x/t] denotes the formula which results from F by replacing every free occurrence of x by t. Give a formal definition of this three argument function F[x/t], by induction over the structure of the formula F.

Problem 7 (Predicate)

Show the following semantic equivalences:

  1. x(p(x)(q(x)r(x)))x(p(x)q(x))x(p(x)r(x))
  2. x(p(x)(q(x)r(x)))≢x(p(x)q(x))x(p(x)r(x))


Problem 8 (Predicate)

Show the following semantic equivalences:

  1. (xp(x))q(b)x(p(x)q(b))
  2. (xr(x))(y¬r(y))(xr(x))(yr(y))


Problem 9 (Predicate)

Show that for arbitrary formulae F and G, the following holds:

  1. x(FG)≢xFxG
  2. If G=F[x/t], than GxF.


Template:BookCat