You are on page 1of 49

CPT114/CPT104

Logic and Applications/


Introduction to Logic and Abstraction
Topic 4: Predicate Logic
Symbols and Translation
Using the Rules of Inference
Change of Quantifier Rule
Conditional and Indirect Proof
Proving Invalidity
Relational Predicates and Overlapping
Quantifiers

CPT114/CPT104 Shahida S. (2008) 2


Symbols and Translation
Predicate Logic: combines the distinctive features of
syllogistic logic and propositional logic.
The validity of this argument depends both on the
arrangement of the terms and on the arrangement of
the statements.
Example:
Proper
Noun
Malaysia is a peace and multi-racial country.
If a country is either peace or politically stable, it is rich.
Hence, Malaysia is rich.
Noun

CPT114/CPT104 Shahida S. (2008) 3


Symbols
Upper-case
letters A to Z

English predicate Symbolic Predicate


Noun
_____is a sport S___
_____is a businessman B___
_____is enjoyable E___
_____is good G___
Adjective

CPT114/CPT104 Shahida S. (2008) 4


Singular Statement
Singular statement: a statement that makes an
assertion about a specifically named person, place,
thing, or time.
Use lower-case letters of individual constants (a, b,
c, …, w) to symbolize statements.
Example:
Sport is an exercise. Es
Time is a magazine. Mt
Harry Potter is not a fiction. ~Fh
Zainal Abidin is not a politician. ~Pa a not z
Xerxes was a king. Ke e not x

CPT114/CPT104 Shahida S. (2008) 5


Compound Singular Statement
Use truth-functional operators (the dot, wedge,
horseshoe, etc.) as in propositional logic.
Example:

Neither Mimi nor Sally was a Johorean. ~(Jm Js)


Danga Bay is exciting and fun. Ed • Fd
Jacqueline Victor is either an actor or a singer. Aj Sj
Sam will pass the test only if he studies. Ps Ss
Estranged wins Juara Lagu if and only if
the jury and the fan vote the group. Je (Vj • Vf)

CPT114/CPT104 Shahida S. (2008) 6


Universal Statement
Universal Statement: Statement that makes
an assertion about every member of its
subject class.
Translated as conditionals.
Universal quantifier (x) or ( x).
Use individual variables (x, y, z) to form the
quantifier.

Statement form Boolean Interpretation


All S are P If anything is an S, then it is a P.
No S are P If anything is an S, then it is not a P.
CPT114/CPT104 Shahida S. (2008) 7
Universal Statement
Statement form Symbolic translation Verbal meaning
All S are P (x)(Sx Px) For any x, if x is an S,
then x is a P.
No S are P (x)(Sx ~Px) For any x, if x is an S,
then x is not a P.
Venn Diagrams: shading designates emptiness
All S are P No S are P

S P S P
Anything in the S circle, is also in Anything in the S circle, is not in
the P circle the P circle
CPT114/CPT104 Shahida S. (2008) 8
Examples

Statement Horse shoe Symbolic Translation


sign

All kids are playful. (x)(Kx Px)


No donkeys are horse. (x)(Dx ~Hx)

Free variable
Statement
functions
Verbal Meaning:
For all x, if x is a kid, then x is playful.
For all x, if x is a donkey, then x is not a horse.

CPT114/CPT104 Shahida S. (2008) 9


Particular Statement
Particular Statement: Statement that makes
an assertion about one or more unnamed
members of the subject class.
They are translated as conjunctions.
Existential quantifier ( x).

Statement form Boolean Interpretation


Some S are P. At least one thing is an S and it is
also a P.
Some S are not P. At least one thing is an S and it is
not a P.

CPT114/CPT104 Shahida S. (2008) 10


Particular Statement
Statement form Symbolic translation Verbal meaning
Some S are P ( x)(Sx • Px) There exists an x such that x is
an S and x is a P.

Some S are not P ( x)(Sx • ~Px) There exists an x such that x is


an S and x is not a P.
Venn Diagrams: X designates at least one existing item
Some S are P Some S are not P

X X

S P S P
Something exists that is both Something exists that is an S
an S and not a P and not a P
CPT114/CPT104 Shahida S. (2008) 11
Examples

Statement Symbolic Translation


Some books are expensive. ( x)(Bx • Ex)
Some students are not lazy. ( x)(Sx • ~Lx)
Some fruits are sweet. ( x)(Fx • Sx)
Some products are not taxable. ( x)(Px • ~Tx)

CPT114/CPT104 Shahida S. (2008) 12


Variety of Statements
There are happy family. ( x)(Fx • Hx)
Animal exists. ( x)Ax
Tigers live in these jungles. ( x)(Tx • Lx)
Only close friends were invited (x)(Ix Cx)
to the wedding ceremony.
None but fans are eligible to vote. (x)(Ex Fx)
It is not the case that every girl ~(x)(Gx Lx)
likes Barbie doll. or
( x)(Gx • ~Lx)
Duku and banana are (x)[(Dx Bx) Lx]
local fruits.
Spicy food are hot and (x)[(Sx • Fx) (Hx • Dx)]
delicious.
CPT114/CPT104 Shahida S. (2008) 13
Exercise: Symbolized Translation
Snakes are reptiles. (S, R)

If a snake is a rattler, then it is poisonous. (S, R, P)

Some poisonous snakes are rattlers. (P, S, R)

A rattler is poisonous only if it is a snake. (R, P, S)

The snake that is not poisonous is not dangerous.


(S, P, D)

CPT114/CPT104 Shahida S. (2008) 14


Exercise: Symbolized Translation
Snakes are reptiles. (S, R)
(x)(Sx Rx)
If a snake is a rattler, then it is poisonous. (S, R, P)
(x)[(Sx • Rx) Px]
Some poisonous snakes are rattlers. (P, S, R)
( x)[(Px • Sx) • Rx]
A rattler is poisonous only if it is a snake. (R, P, S)
(x)[(Rx • Px) Sx]
The snake that is not poisonous is not dangerous.
(S, P, D)
(x)[(Sx • ~Px) ~Dx]
CPT114/CPT104 Shahida S. (2008) 15
Recall: Rules of Implication I & II
MP MT HS DS
p q p q p q p q
p ~q q r ~p
q ~p p r q
Modus Ponens Modus Tollens Hypothetical Syllogism Disjunctive Syllogism

CD Conj
(p q) • (r s) p Simp Add
p r q p•q p
q s p•q p p q
Constructive Dilemma Conjunction Simplification Addition

CPT114/CPT104 Shahida S. (2008) 16


Recall: Rules of Replacement I
DM Assoc
~(p • q) (~p ~q) [p (q r)] [(p q) r]
~(p q) (~p • ~q) [p • (q • r)] [(p • q) • r]
DeMorgan’s Rule Associativity

Com Dist
(p q) (q p) [p • (q r)] [(p • q) (p • r)]
(p • q) (q • p) [p (q • r)] [(p q) • (p r)]
Commutativity Distribution

DN
p ~~p Double Negation
CPT114/CPT104 Shahida S. (2008) 17
Recall: Rules of Replacement II
Trans Exp
(p q) (~q ~p) [(p • q) r] [p (q r)]
Transposition Exportation

Impl Taut
(p q) (~p q) p (p p)
Material Implication
p (p • p)
Tautology
Equiv
(p q) [(p q) • (q p)]
(p q) [(p • q) (~p • ~q)]
Material Equivalence
CPT114/CPT104 Shahida S. (2008) 18
Using the Rules of Inference
Unlike propositional logic, predicate logic
needs another 4 additional rules.
 Universal instantiation (UI)
 Universal generalization (UG)
 Existential instantiation (EI)
 Existential generalization (EG)
They are required to:
 remove quantifiers at the beginning of a proof
sequence, and
 introduce them, when needed at the end of the
sequence.

CPT114/CPT104 Shahida S. (2008) 19


Universal Instantiation (UI)
Instantiation: an operation that delete a quantifier and
replace every variable bound by that quantifier with the
same instantial letter.
Example:
All kids are playful.
Ariff is a kid.
Hence, Ariff is playful.

1. (x)(Kx Px)
2. Ka / Pa
3. Ka Pa 1, UI
4. Pa 2,3, MP Instantiation

CPT114/CPT104 Shahida S. (2008) 20


Universal Generalization (UG)
Example:
All mothers are women.
All women are caring.
Therefore, all mothers are caring.

1. (x)(Mx Wx)
2. (x)(Wx Cx) / (x)(Mx Cx)
3. My Wy 1, UI
4. Wy Cy 2, UI
5. My Cy 3,4, HS
6. (x)(Mx Cx) 5, UG

CPT114/CPT104 Shahida S. (2008) 21


Important Notes: UI and UG
Two ways of performing UI:
 Instantiate with respect to a constant such as a or b.
 Instantiate with respect to a variable such as x or y.
The choice depends on the result intended:
 to match a singular statement on another line or
 to perform UG over some part of the statement
instantiated.
Restriction for UG:
1. Ta
2. (x)Tx 1, UG (invalid)
Aladdin is a thief => everything in the universe is a
thief (INVALID)
CPT114/CPT104 Shahida S. (2008) 22
Existential Generalization (EG)
Example:
All typists are clerks.
Jane is a typist.
Therefore, there is at least one clerk.

1. (x)(Tx Cx)
2. Tj / ( x)Cx
3. Tj Cj 1, UI x is an
4. Cj 2,3, MP individual
5. ( x)Cx 4, EG variable

CPT114/CPT104 Shahida S. (2008) 23


Important Notes: UG and EG
Generalization is an operation that consists in:
 Introducing a quantifier immediately prior to a statement, a
statement function, or another quantifier.
 Replacing one or more occurrences of a certain instantial
letter in the statement or statement function with the same
variable that appears in the quantifier.
UG: All occurrences of the instantial letter must be
replaced with the variable in the quantifier.
EG: At least one of the instantial letters must be
replaced with the variable in the quantifier.
1. Fa • Ga 1. Fa • Ga
2. ( x)(Fx • Gx) 1,EG 2. ( x)(Fx • Ga) 1,EG
1. Fx Gx 1. Fx Gx (invalid)
2. (y)(Fy Gy) 1,UG 2. (y)(Fy Gx) 1,UG
CPT114/CPT104 Shahida S. (2008) 24
Existential Instantiation (EI)
Example:
All programmers are university graduates.
Some programmers are businessmen.
Thus, some businessmen are university graduates.
1. (x)(Px Ux)
2. ( x)(Px • Bx) / ( x)(Bx • Ux)
3. Pa • Ba 2,EI
4. Pa Ua 1,UI
“a” is an
arbitrary name 5. Pa 3,Simp
introduced into 6. Ua 4,5,MP
the proof for
convenience 7. Ba • Pa 3,Com
8. Ba 7,Simp
9. Ua • Ba 6,8,Conj
10. ( x)(Bx • Ux) 9,EG
CPT114/CPT104 Shahida S. (2008) 25
Important Notes: All 4 Rules
Example of invalid or improper applications of the
instantiation and generalization rules:
1. Fy Gy
2. (x)(Fx Gy) 1,UG (invalid – every instance of y must be
replaced with x)
1. (x)Fx Ga
2. Fx Ga 1,UI (invalid – instantiation can be applied
only to whole lines)
1. (x)Fx (x)Gx
2. Fx Gx 1,UI (invalid – instantiation can be applied
only to whole lines)
1. Fc
2. ( x)Gx
3. Gc 2,EI (invalid – c appears in line 1)
CPT114/CPT104 Shahida S. (2008) 26
Important Notes: All 4 Rules
1. Fm Gm
2. (x)(Fx Gx) 1,UG (invalid – the instantial letter must be
a variable; m is a constant)
1. ( x)Fx
2. ( x)Gx
3. Fe 1,EI
4. Ge 2,EI (invalid – e appears in line 3)

1. Fs • Gs
2. ( x)Fx • Gs 1,EG (improper – generalization can be
applied only to whole lines)

1. ~(x)Fx
2. ~Fy 1,UI (invalid – lines involving negated
quantifiers cannot be instantiated)

CPT114/CPT104 Shahida S. (2008) 27


Exercise

1. (x)(Ax Bx)
2. ~Bm / ( x)~Ax

Answer
1. (x)(Ax Bx)
2. ~Bm / ( x)~Ax
3. Am Bm 1, UI
4. ~Am 2, 3, MT
5. ( x)~Ax 4, EG

CPT114/CPT104 Shahida S. (2008) 28


Another Exercise

1. (x)[Ax (Bx Cx)]


2. Ag • ~Bg / Cg

Answer
1. (x)[Ax (Bx Cx)]
2. Ag • ~Bg / Cg
3. Ag 2, Simp
4. ~Bg • Ag 2, Com
5. ~Bg 4, Simp
6. Ag (Bg Cg) 1, UI
7. Bg Cg 3,6, MP
8. Cg 5,7, DS

CPT114/CPT104 Shahida S. (2008) 29


Change of Quantifier Rule
Everything is beautiful. It is not the case that
(x)Fx something is not beautiful.
~( x)~Fx
It is not the case that Something is not beautiful.
everything is beautiful. ( x)~Fx
~(x)Fx
Something is beautiful. It is not the case that
( x)Fx everything is not beautiful.
~(x)~Fx
It is not the case that Everything is not beautiful.
something is beautiful. (x)~Fx
~( x)Fx
Note: The statements in the left column are equivalent in meaning
to the statements in the right column.
CPT114/CPT104 Shahida S. (2008) 30
Example of CQ
1. ~( x)(Px • ~Qx)
2. ~(x)(~Rx Qx) / ( x)~Px
3. (x)~(Px • ~Qx) 1,CQ
4. ( x)~(~Rx Qx) 2,CQ
5. ~(~Ra Qa) 4,EI
6. ~(Pa • ~Qa) 3,UI
7. ~~Ra • ~Qa 5,DM
8. Ra • ~Qa 7,DN
9. ~Pa ~~Qa 6,DM
10. ~Pa Qa 9,DN
11. ~Qa • Ra 8,Com
12. ~Qa 11,Simp
13. Qa ~Pa 10,Com
14. ~Pa 12,13,DS
15. ( x)~Px 14,EG
CPT114/CPT104 Shahida S. (2008) 31
Conditional Proof
Arguments having conclusions expressed in the form
of conditional statements or disjunctions (derived from
conditional statements) are immediate candidates for
conditional proof.
Example:
1. (x)(Hx Ix) / ( x)Hx ( x)Ix
2. ( x)Hx ACP
3. Ha 2,EI
4. Ha Ia 1,UI
5. Ia 3,4,MP
6. ( x)Ix 5,EG
7. ( x)Hx ( x)Ix 2-6,CP

CPT114/CPT104 Shahida S. (2008) 32


Conditional Proof (cont.)
In this example the antecedent of the conclusion is a
statement function, not a complete statement.
Only the statement function is assumed as the 1st line
in the conditional sequence.
The quantifier is added after the sequence is
discharged.
Example:
1. (x)[(Ax Bx) Cx] / (x)(Ax Cx)
2. Ax ACP Note: UG must be
used out of the scope
3. Ax Bx 2,Add of an indented
4. (Ax Bx) Cx 1,UI sequence if the
5. Cx 3,4,MP instantial variable
occurs free in the 1st
6. Ax Cx 2-5,CP line of that sequence
7. (x)(Ax Cx) 6,UG
CPT114/CPT104 Shahida S. (2008) 33
Conditional Proof (cont.)
In this proof, UG is allowed to be used within the scope
of a conditional sequence because the instantial
variable x does not occur free in the 1st line of the
sequence.
Example:
1. (x)(Rx Sx) / (x)Rx (x)Sx
2. (x)Rx ACP
3. Rx 2,UI
4. Rx Sx 1,UI Note: UG is used
within the scope of a
5. Sx 3,4,MP
conditional sequence
6. (x)Sx 5,UG because the instantial
7. (x)Rx (x)Sx 2-6,CP variable does not
occur free in the 1st
line of the sequence

CPT114/CPT104 Shahida S. (2008) 34


Indirect Proof
Begin indirect sequence by assuming negation of the statement to
be obtained.
When a contradiction is derived, the indirect sequence is
discharged by asserting the denial of the original assumption. Eg.
1. ( x)Ax ( x)Fx
2. (x)(Ax Fx) / ( x)Fx
3. ~( x)Fx AIP
4. ( x)Fx ( x)Ax 1,Com
5. ( x)Ax 3,4,DS
6. Ac 5,EI
7. Ac Fc 2,UI
8. Fc 6,7,MP
9. (x)~Fx 3,CQ
10. ~Fc 9,UI
11. Fc • ~Fc 8,10,Conj
12. ~~( x)Fx 3-11,IP
CPT114/CPT104
13. ( x)Fx Shahida S. (2008)
12,DN 35
Proving Invalidity
Two methods to prove invalidity in predicate
logic:
 Counterexample (recall Topic 1)
 Finite universe
Any argument is proved invalid if it is shown
that it is possible for it to have true premises
and a false conclusion.

CPT114/CPT104 Shahida S. (2008) 36


Counterexample Method
Find a substitution instance of a given invalid form that
has actually true premises and a false conclusion.
Example:
( x)(Ax • ~Bx)
(x)(Cx Bx) / ( x)(Cx • ~Ax)

Begin with the conclusion, “Some C are not A”.

To make the statement false, we need to find an example


of a class (for C) that is included in another class (for A).

Some animals are not mammals.


All cats are mammals.
Therefore, some cats are not animals.
CPT114/CPT104 Shahida S. (2008) 37
Important Notes
In producing such a substitution instance, the premises
must be indisputably true in the actual world, and the
conclusion indisputably false.
Statements involving the names of animal classes are
convenient for this purpose because everyone agrees
about cats, dogs, mammals, fish, and so on.
Several different substitution instances can usually be
produced to prove the argument invalid.
The counterexample method is not very well suited for
complex arguments. Hence finite universe method is
probably a better choice.

CPT114/CPT104 Shahida S. (2008) 38


Finite Universe Method
Can be used to establish the invalidity of any invalid
argument expressed in terms of a single variable.
A valid argument remains valid no matter how things in
the actual universe might be altered.
The meaning of universal and particular statements
when the universe is shrunk in size.
Eg: The universe contains only one thing named as
“Garfield”.
 Everything in the universe is naughty, hence “Garfield is
naughty”.
 Something in the universe is naughty, thus “Garfield is
naughty”.

CPT114/CPT104 Shahida S. (2008) 39


Finite Universe Method
The universal statement is equivalent to a conjunction of
singular statements.

The particular statement is equivalent to a disjunction of


singular statements.

Extending this treatment to the more typical kinds of


universal and particular statements.

CPT114/CPT104 Shahida S. (2008) 40


Example
Method for proving an argument invalid using indirect
truth table.
Firstly a universe of one is tried. If it is possible for the
premises to be true and the conclusion false in this
universe: the argument is invalid.
If not a universe of two is then tried, and so on.
(x)(Gx Hx) Ga Ha
( x)Hx / ( x)Gx Ha / Ga

For a universe having one member


“Ali”, the argument translates into:
Ga Ha / Ha // Ga Argument invalid because it is
F T T T F possible for the premises to be
true and conclusion false.
CPT114/CPT104 Shahida S. (2008) 41
Example
Given the following argument:
(x)(Jx Kx)
( x)Jx / (x)Kx

For a universe having one member “Ali”, the argument translates into:

Ja Ka / Ja // Ka
T T F T F

It is not possible for the premises to be true and conclusion false for
this universe, try a universe having 2 members.

(Ja Ka) • (Jb Kb) / Ja Jb // Ka • Kb


T T T T F T F T T F T F F
Since it is possible for the premises to be true and conclusion false for
this universe, the argument is invalid. (No contradiction)
CPT114/CPT104 Shahida S. (2008) 42
Relational Predicate & Overlapping Quantifiers
Argument involves a relation:
 All cats are animals. Hence, whoever owns a cat
owns an animal.
A quantifier overlaps another quantifier:
 If there are any birds, then if all birds are free, they
are free. There are birds in the garden. Thus, if all
birds are free, something in the garden is free.
Types of predicate:
 Monadic predicates (one-place predicates): used to
assign an attribute to individual things. E.g. Mawi is
a singer.
 Relational predicate (relation): used to establish a
connection between or among individuals. E.g.
Mawi sings Kian.
CPT114/CPT104 Shahida S. (2008) 43
Translating Relational Statements
Relational statements with named individuals
Charles is married to Diana. Mcd
The Petronas Twin Tower is taller than the Sears Tps
Tower.
Mawi won Bintang Popular award. Wmb
Relational statements involving quantifiers
Nicol knows everything. (x)Knx
Rashid knows something. ( x)Krx
Overlapping quantifiers
Everything is different from everything. (x)(y)Dxy
Something is different from something. ( x)( y)Dxy
Everything is different from something (or other). (x)( y)Dxy
Something is different from everything. ( x)(y)Dxy

CPT114/CPT104 Shahida S. (2008) 44


Example: Overlapping Quantifier
1. ( x)Ax ( x)Bx / ( y)(x)(Ax By)
2. Ax ACP
Free or unbound
variable. 3. ( x)Ax 2,EG
4. ( x)Bx 1,3,MP
x is not free in 5. Bc 4,EI
line 5 where the
name 6. Ac Bc 2-5,CP
introduced.
7. (x)(Ax Bc) 6,UG
2nd restriction
obeyed: not 8. ( y)(x)(Ax By) 7,EG
include existential
name c.
1st restriction
obeyed: out of the
conditional
sequence.

CPT114/CPT104 Shahida S. (2008) 45


Example: Relational Predicate

1. ( y)(x)Dxy / (x)( y)Dxy


2. (x)Dxm 1,EI
3. Dxm 2,UI
4. ( y)Dxy 3,EG
5. (x) ( y)Dxy 4,UG

CPT114/CPT104 Shahida S. (2008) 46


Important Notes
Example of both correct and incorrect applications of
this rule:
1. (x)( x)Pxy
2. ( x)Pyy 1,UI (invalid – the instantial variable y has
been captured by the existential quantifier)

1. (x)( y)Pxy
2. ( x)Pxy 1,UI (valid – the instantial variable x is free)

1. (x)( y)Pxy
2. ( y)Pzy 1,UI (valid – the instantial variable z is free)

CPT114/CPT104 Shahida S. (2008) 47


Important Notes (cont.)
Example of both correct and incorrect applications of
this rule:
1. ( x)Pxy
2. (x)( x)Pxx 1,UG (invalid – the new x has been
captured by the existential quantifier)

1. ( x)Pxy
2. ( x) ( x)Pxx 1, EG (invalid – the new x has been
captured by the old existential quantifier)

1. ( x)Pxy
2. ( y)( x)Pxy 1,EG (valid)

CPT114/CPT104 Shahida S. (2008) 48


Important Notes (cont.)
Example of both correct and incorrect applications of
this rule:
1. (x)( y)Lxy
2. ( x)Lxy 1,UI
3. Lxa 2,EI
4. ( x)Lxx 3,EG (invalid – the quantifier has captured
the x immediately adjacent to the L)
1. (x)( y)Lxy
2. ( x)Lxy 1,UI
3. Lxa 2,EI
4. ( x)Lxz 3,EG (valid – the x remains free)
1. (x)(y)Kxy
2. (y)Kxy 1,UI
3. Kxx 2,UI
4. (x)Kxx 3,UG (valid)
CPT114/CPT104 Shahida S. (2008) 49