Predicates
Predicates
Predicate Logic
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
1
2/17/2023
Quantifiers
• Quantifiers are exclusively used with predicates.
There are 2 quantifiers: universal (~ for all) and existential (~ there exists).
• 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:
Answer
Prepared by: Dr. Adeel Hashmi, MSIT
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)
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.
3
2/17/2023
Predicate Form
• All men are mortal. ∀x: man(x)→mortal(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)
There exists a criminal who has done every crime. ∃x∀y: criminal(x) ⋀ crime(y)
∃x: criminal(x) ⋀ ∀y: crime(y)
5
2/17/2023
Question
Determine whether the following arguments are valid or valid.
Premises:
Answer.