Sie sind auf Seite 1von 8

Chapter 1: Propositions and Predicates

1.5

23

RULES OF INFERENCE FOR PREDICATE


CALCULUS

Before discussing the rules of inference, we note that: (i) the proposition
formulas are also the predicate formulas; (ii) the predicate formulas (w'here all
the variables are quantified) are the proposition formulas. Therefore, all the
rules of inference for the proposition formulas are also applicable to predicate
calculus wherever necessary.
For predicate formulas not involving connectives such as A(x), P(x, y). we
can get equivalences and rules of inference similar to those given in
Tables 1.11 and 1.13. For Example, corresponding to 16 in Table 1.11 we get
--, (P(x) v Q(x)) == --, (P(x)) i\ --, (Q(x)). Corresponding to RI3 in Table 1.13
P i\ Q ::::} P, we get P(x) i\ Q(x) ::::} P(x). Thus we can replace propositional
variables by predicate variables in Tables 1.11 and 1.13.
Some necessary equivalences involving the two quantifiers and valid
implications are given in Table 1.14.
TABLE 1.14

Equivalences Involving Quantifiers


Distributivity of

over

\I

3x (P

O(x)) = P

\I

O(x))

3x CP(x)

\I

3x PCI)

\I

3x O(x)

(3x O(x))

\I

Distributivity of ';I over ,A:


';Ix (P(x) " O(x)) =1x P(x)
';Ix (P /\ O(x))
--, (3x P(x))

1\

';Ix O(x)

P .\ (';Ix O(x))

';Ix --. (P(x))

--, ('dx P(x)) = 3x --, (P(x))


3x (P .\ O(x))

J',7
-

J18

_ _ ~_.

';Ix (P

= P /\ (3x O(x))
= P \I (';Ix OCr))
--------------,--

"_____

\I

O(x))

RJ lO

';Ix P(x) ==; 3x P(x)

RJll

';Ix P(x)

\I

RJ 12

3x (P(x)

1\

o.

';Ix O(x) ==; ';Ix (P(x)


O(x)) ==; 3x P(x)

1\

\I

O(x))

3x O(x)

Sometimes when we wish to derive s1Jme-co~lusion from a given set of


premises involving quantifiers. we may have to eliminate the quantifiers
before applying the rules of inference for proposition formulas. Also, when
the conclusion involves quantifiers, we may have to introduce quantifiers. The
necessary rules of inference for addition and deletion of quantifiers are given
in Table 1.15.

http://engineeringbooks.net

r
24

Theory of Computer Science


TABLE 1.15

RI 13 :

Rules of Inference for Addition and


Deletion of Quantifiers

Universal instantiation
'ix P(x)

~
c is some element of the universe.
RI ,4 :

Existential instantiation
?:.xP(x)
. P(c)

c is some element for which P(c) is true.

Rl 1s :

Universal generalization
P(x)
'ix P(x)
x should not be free in any of the given premises.

---RI., 6

- ~...~ - - -

Existential generalization
P(c)
. .=x P(x)

c is some element of the universe.

.EXAMPLE 1.22
Discuss the validity of the following argument:
All graduates are educated.
Ram is a graduate.
Therefore. Ram is educated.

Solution
Let G(x) denote 'x is a graduate'.
Let E(x) denote 'x is educated'.
Let R denote 'Ram'.
So the premises are (i) 'If.r (G(x)
'lfx (G(x)

=}

G(R)

E(R)

=}

E(x))

=}

E(x)) and (ii) G(R). The conclusion is E(R).

Premise (i)
Universal instantiation RI 13

G(R)

Premise (ii)

:. E(R)

Modus ponens RI4

Thus the conclusion is valid.

http://engineeringbooks.net

Chapter 1: Propositions and Predicates

-------------'----------'---

);J,

25

EXAMPLE 1.23
Discuss the validity of the following argument:
All graduates can read and write.
Ram can read and write.
Therefore, Ram is a graduate.

Solution
Let G(x) denote 'x is a graduate'.
Let L(x) denote 'x can read and write'.
Let R denote 'Ram'.
The premises are: 'IIx (G(x) =? L(x)) and L(R).
The conclusion is G(R).
((G(R) =? L(R)) /\ L(R)) =? G(R) is not a tautology.
So we cannot derive G(R). For example, a school boy can read and write
and he is not a graduate.

EXAMPLE 1.24
Discuss the validity of the following argument:
All educated persons are well behaved.
Ram is educated.
No well-behaved person is quarrelsome.
Therefore. Ram is not quarrelsome.

Solution
Let the
Let
Let
Let

universe of discourse be the set of all educated persons.


PCx) denote 'x is well-behaved'.
y denote Ram'.
Q(x) denote 'x is quarrelsome'.

So the premises are:


(i) 'II.Y PCx).

(ii) y is a particular element of the universe of discourse.


(iii) 'IIx (P(x) =? -, Q(x)).
To obtain the conclusion. we have the following arguments:
1. 'IIx P(x)

2.
3.
4.
5.
6.

PC\')
'IIx (P(x) =? -, Q(x))
PCy) =? -, QC:y)

pry)
-, Q(y)

Premise (i)
Universal instantiation RI 13
Premise (iii)
Universal instantiation RI 13
Line 2
Modus ponens RIc;

-, Q(y) means that 'Ram is not quarrelsome'. Thus the argument is valid.

http://engineeringbooks.net

26

1.6

Theory of Computer Science

SUPPLEMENTARY

EXAMPLES

EXAMPLE 1.25
Write the following sentences in symbolic form:
(a) This book is interesting but the exercises are difficult.
(b) This book is interesting but the subject is difficult.
(c) This book is not interesting. the exercises are difficult but the subject
is not difficult.
(d) If this book is interesting and the exercises are not difficult then the
subject is not difficult.
(e) This book is interesting means that the subject is not difficult, and
conversely.
(f) The subject is not difficult but this book is interesting and the
exercises are difficult.
(g) The subject is not difficult but the exercises are difficult.
(h) Either the book is interesting or the subject is difficult.

Solution
Let P denote 'This book is interesting'.
Let Q denote 'The exercises are difficult'.
Let R denote 'The subject is difficult'.
Then:
(a) P /\ Q

(b) P /\ R
(c) -,P /\ Q /\ ,R
(d) (P /\ -, Q)

=:} -,

(e) P <=:> -, R
(f) (-,R) /\ (P /\ Q)

-,R /\ Q
(h) -, P v R

(g)

EXAMPLE 1.26
Construct the truth table for

ex

= (-, P

<=:> -, Q) <=:> Q <=:> R

Solution
The truth table is constructed as shown in Table 1.16.

http://engineeringbooks.net

Chapter 1: Propositions and Predicates


TABLE 1.16

27

!ml

Truth Table of Example 1.26

Q<=;R

-,P

-,Q

-,P<=;-,Q

ex

T
T
T
T
F
F
F
F

T
T
F
F
T
T
F
F

T
F
T
F
T
F
T
F

T
F
F
T
T
F
F
T

F
F
F
F
T
T
T
T

F
F
T
T
F
F
T
T

T
T
F
F
F
F
T
T

T
F
T
F
F
T
F
T

EXAM PLE 1.27


Prove that: ex

= P

:::::} (Q v R))

!\ (---,

Q)) :::::} (P :::::} R) is a tautology.

Solution

f3 = (P :::::} (Q v R)) !\ (---, Q)


The truth table is constructed as shown m Table 1.17. From the truth
table, we conclude that ex is a tautology.

Let

TABLE 1.17

Truth Table of Example 1.27

-,Q

QvR

P => (Q v R)

f3

P=>R

ex

T
T
T
T
F
F
F
F

T
T
F
F
T
T
F
F

T
F
T
F
T
F
T
F

F
F
T
T
F
F
T
T

T
T
T
F
T
T
T
F

T
T
T
F
T
T
T
T

F
F
T
F
F
F
T
T

T
F
T
F
T
T
T
T

T
T
T
T
T
T
T
T

EXAMPLE 1.28
State the converse, opposite and contrapositive to the following statements:
(a) If a triangle is isoceles, then two of its sides are equal.
(b) If there is no unemployment in India, then the Indians won't go to
the USA for employment.

Solution
If P :::::} Q is a statement, then its converse, opposite and contrapositive
st~tements are, Q :::::} P, ---, P :::::} ---, Q and ---, Q :::::} ---, P, respectively.
(a) Converse-If two of the sides of a triangle are equal, then the triangle
is isoceles.

http://engineeringbooks.net

28

Theory of Computer Science

Opposite-If the triangle is not isoceles, then two of its sides are not
equal.
Contrapositive-If two of the sides of a triangle are not equal, then
.the triangle is not isoceles.
(b) Converse-If the Indians won't go to the USA for employment, then
there is no unemployment in India.
Opposite-If there is unemployment in India. then the Indians will go
to the USA for employment.
(c) Contrapositive-If the Indians go to the USA for employment, then
there is unemployment in India.

EXAMPLE 1.29
Show that:
(-, P /\ (-, Q /\ R)) v (Q /\ R) v (P /\ R) :::> R

Solution
(-, P /\ (-, Q /\ R) v (Q /\ R) v (P /\ R)
-, Q) /\ R) v (Q /\ R) v (P /\ R) by using the associative law
Q) /\ R) v (Q /\ R) v (P /\ R) by using the DeMorgan's law
Q) /\ R) v (Q v P) /\ R)
by using the distributive law
Q) v (P v Q) /\ R
by using the commutative

-,

:::>
P /\
:::> (-, (P v
:::> h (P v
:::> (-, (P v

and distributive laws


by using Is
by using 19

EXAMPLE 1.30
Using identities, prove that:
Q v (P /\ -, Q)

(-,

P /\ -, Q) is a tautology

Solution
Q v (P /\ -, Q)

V (-,

:::> Q v P) /\ (Q

P /\ -, Q)
---,

Q) v (-, P

1\ -,

Q) by using the distributive law

:::> Q v P) /\ T) v (-, P /\ -, Q)

by using Is

:::> (Q v P) v ---, (P v Q)

by using the DeMorgan' slaw


and 19

:::> (P

by using the commutative


law

Q)

-,

(P v Q)

:::>T

by using Is

Hence the given fonnula is a tautology.

http://engineeringbooks.net

-~------~-~~-

Chapter 1: Propositions and Predicates

);!

29

EXAMPLE 1.31
Test the validity of the following argument:
If I get the notes and study well, then I will get first class.
I didn't get first class.
So either I didn't get the notes or I didn't study well.

Solution
Let
Let
Let
Let

P denote
Q denote
R denote
S denote

'1 get the notes'.


'I study well'.
'1 will get first class.'
'I didn't get first class.'

The given premises are:


(i) P ;\ Q
(ii) -, R

=:}

The conclusion is -, P v -, Q.
l.P;\Q=:}R

2. -, R
3. -, (P ;\ Q)
4. -,P v-,Q

Premise (i)
Premi se (ii)
Lines I, 2 and modus tollens.
DeMorgan's law

Thus the argument is valid.

EXAMPLE 1.32
Explain (a) the conditional proof rule and (b) the indirect proof.

Solution
(a) If we want to prove A =:} B, then we take A as a premise and construct
a proof of B. This is called the conditional proof rule. It is denoted
by CPo
(b) To prove a formula 0:, we construct a proof of -, 0: =:} F. In
particular. to prove A =:} B. we construct a proof of A ;\ -, B =:} F.

EXAMPLE 1.33
Test the validity of the following argument:
Babies are illogical.
Nobody is despised who can manage a crocodile.
Illogical persons are despised.
Therefore babies cannot manage crocodiles.

http://engineeringbooks.net

30

Theory of Computer Science

Solution
Let
Let
Let
Let

B(x) denote 'x is a baby'.


lex) denote 'x is illogical'.

D(x) denote 'x is despised'.


C(x) denote 'x can manage crocodiles'.

Then the premises are:


(i) Vx (B(x) ::::} I(x))
(ii) Vx (C(x) ::::} ,D(x))
(iii) Vx (l(x) ::::} D(x))
The conclusion is Vx (B(x) ::::} , C(x)).
1. Vx (B(x) ::::} I(x))
2. Vx (C(x) ::::} ,D(x))
3. Vx (l(x) ::::} D(x))
4. B(x) ::::} I(x)
5. C(x) ::::} ,D(x)
6. I(x) ::::} D(x)

Premise (i)
Premise (ii)
Premise (iii)
1, Universal instantiation
2, Universal instantiation
3, Universal instantiation
Premise of conclusion
4,7 Modus pollens
6,8 Modus pollens
5,9 Modus tollens
7,10 Conditional proof
11, Universal generalization.

7. B(x)
8. I(x)
9. D(x)
10. ,C(x)
11. B(x) ::::} , C(x)
12. Vx (B(x) ::::} ,C(x))

Hence the conclusion is valid.

EXAMPLE 1.34
Give an indirect proof of
(, Q, P ::::} Q, P v S) ::::} S

Solution
We have to prove S. So we include (iv) ,S as a premise.
1. P v S
2. ,S

3. P
4. P ::::} Q

5.
6.
7.
8.

Q
,Q
Q /\ ,Q

Premise (iii)
Premise (iv)
1,2, Disjunctive syllogism
Premise (ii)
3,4, Modus ponens
Premise (i)
5.6, Conjuction
18

We get a contradiction. Hence (, Q, P ::::} Q, P v S) ::::} S.

http://engineeringbooks.net

Das könnte Ihnen auch gefallen