0% found this document useful (0 votes)
12 views

1.2 Predicate Logic

Predicate Logic Slide

Uploaded by

hasibshahriar04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

1.2 Predicate Logic

Predicate Logic Slide

Uploaded by

hasibshahriar04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

CSE1203:

Discrete Mathematics
1.2 Predicate Calculus

Course Teacher:
Shoeb Mohammad Shahriar
Assistant Professor, Department of CSE, AUST
1.2 Predicate Logic
• Predicates
• A predicate is a proposition with one or more variables.
• Universe of Discourse (UoD)/ Domain: Set of all possible values that can be
assigned to the variables of the predicates talked about in a given
conversation (discourse).
• Assigning values to variables is called binding variables or bound/ free
variables.
• When all the variables of a predicate are bound, then it’s a proposition.

CSE1203: Discrete Mathematics 2-2


Predicates
• Examples:
[Domain: Set of integers]
• x – 5 > 10 : P1(x), say; 1-place (unary) predicate, P1(3) : False.
• x = 2y + 3 : P2(x,y), say; 2-place (binary) predicate, P2(7, 2) : True.
• y = 3x + z : P3(x,y,z), say; 3-place (ternary) predicate, P3(1, 2, 4) : False.
[Possible Values/ outputs of any propositional functions are True or False]
• Other examples:
• [Domain: Set of all people]
• Father(x, y) : ‘ x is the father of y. ‘
• Male(x) : ‘ x is a male. ‘

CSE1203: Discrete Mathematics 2-3


Quantified Predicates (IMP)
• The values of the variables of a predicate can be specified in some way and as a
result the predicate turns into a proposition.
• Two quantifiers are most widely used to make such specifications.
i. Universal quantifier:
▪ Symbol:  x P(x) ≡ P(x1) ∧ P(x2) ∧ P(x3) ∧ . . . .
▪ Read as: “For all”/ “for each” where,
▪ Examples: the elements of the domain can be listed as
[Domain: set of integers] x1, x2, x3, . . . .
✓ P4(x) : x2 ≥ 0
x P4(x) = True A counter example is sufficient to
show the falsehood (disprove) of a
✓ P5(x) : x + 3 ≥ 5 universally quantified predicate
x P5(x) = False
CSE1203: Discrete Mathematics 2-4
Quantified Predicates
• Two quantifiers are most widely used to make such specifications.
ii. Existential quantifier:
▪ Symbol: 
▪ Read as: “For some”/ “there is/exists at least one”
▪ Examples: x P(x) ≡ P(x1) ∨ P(x2) ∨ P(x3) ∨ . . . .
[Domain: set of integers] where,
✓ P4(x) : x ≥ 0
2
the elements of the domain can be listed as
x P4(x) = True x1, x2, x3, . . . .
✓ P5(x) : x + 3 ≥ 5
x P5(x) = True An example is sufficient to prove
the truth of an existentially
quantified predicate

CSE1203: Discrete Mathematics 2-5


Negation of Quantified Predicates
¬x P(x) ≡ x ¬P(x)
[¬(P(x1) ∧ P(x2) ∧ P(x3) ∧ . . . ) ≡ ¬P(x1) ∨ ¬P(x2) ∨ ¬P(x3) ∨ . . . ] De-Morgan

¬x P(x) ≡ x ¬P(x)


[¬(P(x1) ∨ P(x2) ∨ P(x3) ∨ . . . ) ≡ ¬P(x1) ∧ ¬P(x2) ∧ ¬P(x3) ∧ . . . ] De-Morgan

¬x ¬P(x) ≡ x P(x)


¬x ¬P(x) ≡ x P(x)

CSE1203: Discrete Mathematics 2-6


Uniqueness Quantifiers
• Read as: “ There exists exactly one “
• There may be other quantifiers but not commonly used.
• “There exists exactly two”

CSE1203: Discrete Mathematics 2-7


Expressing Natural Language Sentences with
Quantified Predicates and Logical Connectives:
1) There are some odd integers that are not prime.
x ( Odd(x) ∧ ¬Prime(x) )
2) Only even prime is two.
x ((Even(x) ∧ Prime(x)) → (x=2) )
3) Not for all cases primes are odd.
¬x ( Prime(x) → Odd(x) )
x ( Prime(x) ∧ ¬Odd(x) )
¬x ( Prime(x) → Odd(x) ) ≡ x ¬( Prime(x) → Odd(x) )
≡ x ¬(¬Prime(x) v Odd(x) )
≡ x ( Prime(x) ∧ ¬Odd(x) )
CSE1203: Discrete Mathematics 2-8
Expressing Natural Language Sentences with
Quantified Predicates and Logical Connectives:
4) Every guest gets at least one gift.
x [ Guest(x) → y { Gift(y) ∧ Gets(x,y) } ]
❑ Say, L(x,y) : ‘ x likes y ‘
x y L(x,y) ≡ y x L(x,y)
For every x there exists at least one/ some y where x likes y.
There exist at least some y where every x likes y.
5) The sum of two negative numbers is negative.
x y [((x < 0) ∧ (y < 0))→ ( x + y < 0 ) ]

CSE1203: Discrete Mathematics 2-9


Expressing Natural Language Sentences with
Quantified Predicates and Logical Connectives:
6) If x is the father of y and y is the father of z, then x is the
grandfather of z.
x y z [(Father(x,y) ∧ Father(y,z))→ Grandfather(x,z) ]
7) Nobody likes everybody.
¬x y Likes(x,y) : There exist even no x who likes every y.
x y ¬Likes(x,y) : For every x there exist some y where x does not
like y.

CSE1203: Discrete Mathematics 2-10


Exercise Practice
Given,
C(x) : ‘ x is a comedian.’
F(x) : ‘ x is funny.’
Domain: All people.
[Page- 46]

a) x (C(x) → F(x)) : Everyone, who is a comedian, is funny.


b) x (C(x) ∧ F(x)) : Everyone is a comedian and is funny.
c) x (C(x) → F(x)) : some people, if they are comedians, are funny.
d) x (C(x) ∧ F(x)) : Some people are comedians and are also funny.

CSE1203: Discrete Mathematics 2-11


Exercise Practice

[Page- 48]

Given,
Domain: All people.

a) No one is perfect : x ¬Perfect(x)


b) Not everyone is perfect : ¬x Perfect(x)
CSE1203: Discrete Mathematics 2-12
Exercise Practice

[Page- 48]

Given,
Domain: All people.

c) All your friends are perfect : x ( your friend (x) → Perfect(x) )


d) At least one of your friends is perfect : x ( your friend (x) ∧ Perfect(x) )
CSE1203: Discrete Mathematics 2-13
Exercise Practice

[Page- 48]
Given,
Domain: All people.
e) Everyone is your friend and is perfect : x ( your friend (x) ∧ Perfect(x) )
f) Not everyone is your friend or someone is not perfect :
¬x your friend (x) v x ¬Perfect(x)
CSE1203: Discrete Mathematics 2-14
Assignment

“ I am a liar. ”
- whether it is a proposition or not.

Short Note: Paradox

CSE1203: Discrete Mathematics 2-15

You might also like