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

Predicates

Uploaded by

Saransh Kapoor
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)
17 views

Predicates

Uploaded by

Saransh Kapoor
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/ 6

2/17/2023

Predicate Logic

Prepared by: Dr. Adeel Hashmi, MSIT


Discrete Mathematics

Predicate
• A predicate is a statement which involves variables such as “x>3”, “x+y>z”.

• We denote the statement like “x is greater than 3” by P(x) where P denotes the
predicate “greater than 3”.

• For a statement like “John is intelligent”, we identify the subject and predicate of the
statement and write in the form predicate(subject) e.g. intelligent(John).
Prepared by: Dr. Adeel Hashmi, MSIT

Statement John is intelligent


Propositional Representation p
Predicate Representation intelligent(John)

1
2/17/2023

Quantifiers
• Quantifiers are exclusively used with predicates.

• Quantification expresses the extent to which a predicate is true over a


range of elements e.g. all, some, none.

There are 2 quantifiers: universal (~ for all) and existential (~ there exists).

Prepared by: Dr. Adeel Hashmi, MSIT


• Universal quantifier is represented by ∀.

• Existential quantifier is represented by ∃.

• A quantifier is always associated with a variable e.g. ∀x, and such variables are
said to be “bound” e.g. in ∃x(x+y=1), the variable x is bound while y is free.

Example-1
Write the truth value of ∃xP(x) and give reasons for the following:

i. P(x): x>3, x∈R ii. P(x): x+3=10, x∈{1,2,3,4,5}

What will be the truth values for ∀xP(x)?

Answer
Prepared by: Dr. Adeel Hashmi, MSIT

i. True, as there exist real numbers which are greater than 3.

ii. False, as x+3≠10 for any value in the set {1,2,3,4,5}.

For ∀xP(x), both cases will be False as all real numbers are not >3 and x+3≠10 for all
numbers in the set {1,2,3,4,5}.

2
2/17/2023

Example-2
Let A={1,2,…,9,10}. Determine truth value or truth set for the following:

i. (∀x∈A)(∃y∈A)(x+y<14)

ii. (∀x∈A)(∀y∈A)(x+y<14)

iii. (∀x∈A)(x+y<14, y∈A)

Prepared by: Dr. Adeel Hashmi, MSIT


iv. (∃y∈A)(x+y<14, y∈A)

Answer

i. True; as for every x, there exists a y such that x+y<14 e.g. if x=10 then y=1 gives x+y<14

ii. False; as for every x, all values of y don’t give x+y<14 e.g. if x=10, y=10 then x+y<14 is False

iii. {1,2,3} i.e. values of y∈A for which ∀x∈A give x+y<14

iv. {1,2,3,4,5,6,7,8,9,10} i.e. values of x∈A for which ∃y∈A give x+y<14 e.g. for x=10, y=1 gives x+y<14

Example-3
Show that: i. ∃x[P(x)∧Q(x)] → [∃xP(x)]∧[∃xQ(x)] ii. ∃y∀xP(x,y) → ∀x∃yP(x,y)

Answer

i. Let P(x) stand for x is positive and Q(x) stands for x is even. So, ∃x[P(x)∧Q(x)] represents x which
is both positive and even e.g. 4. So, if ∃x[P(x)∧Q(x)] is true, we can conclude there exists an x which
is positive and there exists an x which is even.
Prepared by: Dr. Adeel Hashmi, MSIT

However [∃xP(x)]∧[∃xQ(x)] → ∃x[P(x)∧Q(x)] is not true e.g. if P(x) represents even integer and Q(x)
represents an odd integer then [∃xP(x)]∧[∃xQ(x)] is true but ∃x[P(x)∧Q(x)] is not true.

ii. Let P(x,y): x+y=0 for set of integers. ∀x∃yP(x,y) is T as for each value of x, there exists an integer
which gives 0. But ∃y∀xP(x,y) is F as there is no value of y which gives 0 with all integers. Hence,
∀x∃yP(x,y)→∃y∀xP(x,y) is not true.

However, ∃y∀xP(x,y) → ∀x∃yP(x,y) is true as in ∃y∀xP(x,y) the value of y is independent of x and in


∀x∃yP(x,y) the value of y can depend on x e.g. let P(x,y) denote x*y=0 then ∃y∀xP(x,y) is true for
y=0 and ∀x∃yP(x,y) is also true for all integers.

3
2/17/2023

DeMorgan’s law on quantifiers


Write the negations of:
(a) For all real numbers if x>5 then x2 >25”
(b) The sum of two positive real numbers is always positive.
Answer

Prepared by: Dr. Adeel Hashmi, MSIT


(a) Given, ∀x: (x>5)→(x2 >25)
First we have to remove the implication, ∀x: ¬(x>5)∨(x2 >25) ≡ ∀x: (x≤5)∨(x2 >25)
Applying negation, ∃x: (x>5) ∧ (x2 ≤25)
(b) Given, ∀x∀y: (x>0)∧(y>0)→(x+y>0)
Removing the implication, we get ∀x∀y: (x≤0)∨(y≤0)∨(x+y>0)
Applying negation, ∃x∃y: (x>0)∧(y>0)∧(x+y≤0)

Predicate Form
• All men are mortal. ∀x: man(x)→mortal(x)

• Some men are intelligent. ∃x: man(x) ∧ mortal(x)


Imp: → is not used with ∃x as P(x)→Q(x) represents Q is true whenever P is true but existential quantifier
represents Q(x) is not true for all P(x).
Prepared by: Dr. Adeel Hashmi, MSIT

• Not everyone has visited Dubai. ¬∀x: visited_dubai(x)

• No large bird lives on honey. ¬∃x: large_bird(x) ∧ lives_on_honey(x)


Note: ¬∀x represents “not all x”, ¬∃x represents “there exists no x”,

4
2/17/2023

Examples
Sentence Symbolic Form
All friends are good. ∀x:friend(x)→good(x)
At least one friend is good. ∃x:friend(x)⋀good(x)
Not everyone is perfect. ¬[∀x: perfect(x)]
∃x: ¬perfect(x)

Prepared by: Dr. Adeel Hashmi, MSIT


No one is perfect. ¬[∃x:perfect(x)]
∀x: ¬perfect(x)
Not everybody is a friend or someone is not good. ¬∀x:friend(x) ⋁ ∃y:¬good(y)
Nothing is in the correct place or in good ¬∃x:correct_place(x)⋁good_condition(x)
condition. ∀x:¬[correct_place(x)⋁good_condition(x)]

There exists a criminal who has done every crime. ∃x∀y: criminal(x) ⋀ crime(y)
∃x: criminal(x) ⋀ ∀y: crime(y)

Rules of Inference in Predicate Logic


• Universal Modus Ponens: [∀xP(x)→Q(x) ∧ P(c)] → Q(c)

• Universal Modus Tollens: [∀xP(x)→Q(x) ∧ ¬Q(c)] → ¬P(c)

• Fallacies: [∀xP(x)→Q(x) ∧ Q(c)] → P(c) , [∀xP(x)→Q(x) ∧ ¬P(c)] → ¬Q(c)


Prepared by: Dr. Adeel Hashmi, MSIT

5
2/17/2023

Question
Determine whether the following arguments are valid or valid.

Premises:

• The metro cities of India have huge traffic.

• Delhi has huge traffic.

Prepared by: Dr. Adeel Hashmi, MSIT


Conclusion: Delhi is an Indian metro city.

Answer.

[∀x: metro(x)→huge_traffic(x)] ⋀ huge_traffic(Delhi) → metro(Delhi)

This is fallacy of Affirming the Conclusion.

Hence, the conclusion is incorrect.

Prepared by: Dr. Adeel Hashmi, MSIT

You might also like