The universal quantifier of predictate P(x) is proposition:
P(x) is true for all values of x in the universe of discourse.
We use the notation: ∀xP(x), which is read "for all x"
If the universe of discourse is finish, say {n1,n2,…,n3} then the universal quanifier is simply the conjunction of the propositions over all elements:
∀xP(x)⇔P(n1)∧P(n2)∧…∧P(nk)
Example 1:
P(x): "x must take a Discrete Mathematics course"
Q(x): "x is a Computer Science student."
Where, the university of discourse for both P(x) and Q(x) is all university students.
Let's express the following statements:
Every CS student must take a discrete math course
∀xQ(x)→P(x)
Everybody must take a discrete maths course or be a CS student
∀x(P(x)∨Q(x))
Everybody must take a discrete maths course and be a CS student
∀x(P(x)∧Q(x))
Example 2:
Formalise statement S:
S: "For every x and every y, x + y > 10"
Let P(x,y) by the statement x + y > 10, where the universe of discourse for x, y is the set of all integers.
The existential quantification of a predicate P(x)is the proposition:
"There exists a value x in the universe of discourse such that P(x) is true."
We use the notation: ∃xP(x), which reads "there exists x".
If the universe of discourse is finite, say {n1,n2,…,nk} then the existential quantifier is simply the disjunction of propositions over all the elements:
∃xP(x)⇔P(n1)∨P(n2)∨…∨P(nk)
Example 1
Let P(x,y) denote the statement "x + y = 5".
The expression E: ∃x∃yP(x,y) means:
There exists a value x and a value y in the universe of discourse such that x+y=5 is true.
For instance
If the universe of discourse is positive integers, E is True.
If the universe of discourse is negative integers, E is False.
Example 2
Let a,b,c denote fixed real numbers.
And S be the statement: "There exists a real solution to ax2+bx−c=0"
S can be expressed as ∃xP(x) where:
P(x) is ax2+bx−c=0 and the universe of discourse for x is the set of real numbers.
Let's evaluate the truth value of S:
When b2>=4ac,S is true , as P(−b∓(b2−4ac))/2a=0
When b2<4ac,S is false as there is no real number x that can satisfy the predicate.
Uniqueness quantifier
Special case of "existential quantifier".
The uniqueness quantifier of prediction P of x is the proposition:
There exists a unique value of x in the universe such that P of x is true.
We use the notation: ∃!xP(x): read as there exists a unique x.
Example:
Let P(x) denote the statement: x2=4
The expression E: ∃!xP(x) means:
There exists a unique value x in the universe of discourse such that x2=4 is true.
For instance
If the universe of discourse is positive integers, E is True (as x = 2 is the unique solution)
If the universe of discourse is integers, E is False (as x = 2 and x = -2 are both solutions)
4.107 Nested quantifiers
Nested quantifiers
To express statements with multiple variables we use nested quantifiers
∀x∀yP(x,y) - P(x, y) is true for every pair x, y
∃x∃yP(x,y) - There is a pair x, y for which P(x, y) is true.
∀x∃yP(x,y) - For every x, there is a y for whih P(x, y) i true.
∃x∀yP(x,y) - there is an x for which P(x, y) is true for every y.
Binding variables
A variable is said to be bound if it is within the scope of a quantifier.
A variable is free if it is not bound by a quantifier or particular values.
Example
Let P be a propositional function
And S the statement: ∃xP(x,y)
We can say that:
x is bound
y is free
Logical operations
Logical operations can be applied to quantified statements
Example
If P(x) denotes "x > 3" and Q(x) denotes "x squared is even" then
∃x(P(x)∨Q(x))≡T(ex.x=4)
∀x(P(x)→Q(x)≡F(ex.x=5))
Order of operations
When nested quantifiers are of the same type, the order does not matter.
With quantifiers of different types, the order does matter.
Example
∀x∀yP(x,y)≡∀y∀xP(x,y)
∃x∃yP(x,y)≡∃y∃xP(x,y)
∀x∃yP(x,y) is different from ∃y∀xP(x,y)
Precendence of quantifiers
The quantifiers ∀ and ∃ have a higher precendence than all logical operators
Example
P(x) and Q(x) denote two propositional functions.
∀xP(x)∨Q(x) is the disjunction of ∀xP(x) and Q(x) rather than ∀x(P(x) and Q(x))