0% found this document useful (0 votes)
14 views26 pages

Discrete_Structures_quantifiers (1)

The document discusses the limitations of propositional logic in expressing mathematical and natural language statements, introducing predicates and quantifiers as essential tools in predicate calculus. It explains the concepts of universal and existential quantification, providing examples to illustrate their truth values and applications in various contexts. Additionally, it covers the implications of quantifiers over finite domains and the importance of binding variables in logical expressions.

Uploaded by

neelamshaheen660
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)
14 views26 pages

Discrete_Structures_quantifiers (1)

The document discusses the limitations of propositional logic in expressing mathematical and natural language statements, introducing predicates and quantifiers as essential tools in predicate calculus. It explains the concepts of universal and existential quantification, providing examples to illustrate their truth values and applications in various contexts. Additionally, it covers the implications of quantifiers over finite domains and the importance of binding variables in logical expressions.

Uploaded by

neelamshaheen660
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/ 26

Introduction to Logics

Week 4:Predicate and Qunatifiers

Dr. Abid Kamran

Capital University of Science and Technology, Islamabad

October 18, 2024

(CUST) 1 / 26
Limitations of Propositional Logics

Propositional logic cannot adequately express the meaning of all


statements in mathematics and natural language.
For example, suppose we know that every computer connected to the
university network is functioning properly.
No rules of propositional logic allow us to conclude the truth of the
statement that MATH3 is functioning properly, where MATH3 is one
of the computers connected to the university network. Likewise, we
cannot use the rules of propositional logic to conclude from the
statement that CS2 is under attack by an intruder, that there is a
computer on the university network that is under attack by an
intruder.

(CUST) 2 / 26
Predicates

Statements involving variables, such as:


x >3
x =y +3
x +y =z
Computer x is under attack by an intruder.
Computer x is functioning properly.

Example 1: Let P(x) denote the statement x > 3. What are the truth
values of P(4) and P(2)?
Solution: We obtain the statement P(4) by setting x = 4 in the
statement x > 3. Hence, P(4), which is the statement 4 > 3, is true.
However, P(2), which is the statement 2 > 3, is false.

(CUST) 3 / 26
Examples of Propositional Truth Values

Example 2:
Let A(x) denote the statement ”Computer x is under attack by an intruder.”
Suppose that of the computers on campus, only CS2 and MATH are currently
under attack. What are the truth values of A(S1), A(CS2), and A(MATH)?
Solution: We obtain A(S1) by setting x = S1 in the statement ”Computer x is
under attack by an intruder.” Since S1 is not currently under attack, A(S1) is
false. As CS2 and MATH are under attack, A(CS2) and A(MATH) are true.

Example 3:
Let Q(x, y ) denote the statement ”x = y + 3.” What are the truth values of the
propositions Q(1, 2) and Q(3, 0)?
Solution: To obtain Q(1, 2), set x = 1 and y = 2. Thus, Q(1, 2) is the statement
1 = 2 + 3, which is false. For Q(3, 0), the statement is 3 = 0 + 3, which is true.

(CUST) 4 / 26
Example 4

Let A(c, n) denote the statement ”Computer c is connected to network


n,” where c is a variable representing a computer and n is a variable
representing a network. Suppose that the computer MATH is connected to
network CAMPUS2, but not to network CAMPUS1. What are the values
of A(MATH, CAMPUS1) and A(MATH, CAMPUS2)?

Solution: Since MATH is connected to CAMPUS2, we have


A(MATH, CAMPUS2) as true. However, because MATH is not connected
to CAMPUS1, A(MATH, CAMPUS1) is false. Therefore,
A(MATH, CAMPUS1) is false, and A(MATH, CAMPUS2) is true.

(CUST) 5 / 26
Example 5

Let R(x, y , z) denote the statement x + y = z. When values are assigned


to the variables x, y , and z, this statement has a truth value. What are
the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)?

Solution: The proposition R(1, 2, 3) is obtained by setting x = 1, y = 2,


and z = 3 in the statement R(x, y , z). We see that R(1, 2, 3) is the
statement 1 + 2 = 3, which is true. Also note that R(0, 0, 1), which is the
statement 0 + 0 = 1, is false.

In general, a statement involving the n variables x1 , x2 , . . . , xn can be


denoted by P(x1 , x2 , . . . , xn ).
A statement of the form P(x1 , x2 , . . . , xn ) is the value of the propositional
function P at the n-tuple (x1 , x2 , . . . , xn ), and P is also called an n-ary
predicate or an n-ary predicate.

(CUST) 6 / 26
Example 6

Consider the statement

if x > 0 then v := v + 1.

When this statement is encountered in a program, the value of the variable


x at that point in the execution of the program is inserted into P(x),
which is “> 0.” If P(x) is true for this value of x, the assignment
statement v : vx + 1 is executed, so the value of v is increased by 1. If
P(x) is false for this value of x, the assignment statement is not executed,
so the value of v is not changed.

(CUST) 7 / 26
Quantifiers

When the variables in a propositional function are assigned values, the


resulting statement becomes a proposition with a certain truth value.
However, there is another important way, called quantification. The area
of logic that deals with predicates and quantifications is called the
predicate calculus.
Definition: Universal Quantifier
The universal quantification of P(x) is the statement

”P(x) for all values of x in the domain.”

The notation ∀xP(x) denotes the universal quantification of P(x). Here ∀


is called the universal quantifier. We read ∀xP(x) as ”for all x P(x)” or
”for every xP(x)”. An element for which P(x) is false is called a
counterexample to ∀xP(x).

(CUST) 8 / 26
Example 8

Let P(x) be the statement ”x + 1 > x”. What is the truth value of the
quantification ∀xP(x), where the domain consists of all real numbers?
Solution: Because P(x) is true for all real numbers x, the quantification

∀xP(x)

is true.
Note: The universal quantification of P(x) is the statement ”P(x) for all
values of x in the domain.” The notation ∀xP(x) denotes the universal
quantification of P(x). Here ∀ is called the universal quantifier. An
element for which P(x) is false is called a counterexample to ∀xP(x).

(CUST) 9 / 26
Examples of Universal Quantification

Example 9:
Let Q(x) be the statement ”x < 2.” What is the truth value of the quantification
∀xQ(x), where the domain consists of all real numbers?
Solution: Q(x) is not true for every real number x, because, for instance, Q(3) is
false. That is, x = 3 is a counterexample for the statement ∀xQ(x). Thus,

∀xQ(x)

is false.

Example 10:
Suppose that P(y ) is y > 0. To show that the statement ∀y P(y ) is false, where
the universe of discourse consists of all integers, we give a counterexample. We
see that y = 0 is a counterexample because 0 > 0 is false, so 0 is not greater
than 0.

(CUST) 10 / 26
Examples of Universal Quantification in Different Contexts

Example 11:
What does the statement ∀x(N(x)) mean if N(x) is ”Computer x is connected to
the network” and the domain consists of all computers on campus?
Solution: The statement ∀x(N(x)) means that for every computer x on campus,
that computer x is connected to the network. This can be expressed in English as
”Every computer on campus is connected to the network.”

Example 12: 
What is the truth value of ∀x x 2 > x if the domain consists of all real numbers?
What is the truth value if the domain consists of all
 integers?
Solution: The universal quantification ∀x x 2 > x , where the domain consists of
all real numbers, is false. For example, x = 0: 02 > 0 is false because 0 > 0 is
false. The inequality x 2 > x holds only for x > 1 or x < 0, so ∀x x 2 > x is false
in the real number domain. 
However, if the domain consists of integers, ∀x x 2 > x is false.

(CUST) 11 / 26
Existential Quantification and Examples
Existential Quantification:
The existential quantification of P(x) is the proposition:
“There exists an element x in the domain such that P(x).”

We use the notation ∃x P(x) for the existential quantification of P(x). Here ∃ is
called the existential quantifier.

Example 13:
Let P(x) denote the statement “x > 3.” What is the truth value of the
quantification ∃x P(x), where the domain consists of all real numbers?
Solution: Because “x > 3” is sometimes true— for instance, when x = 4—the
existential quantification ∃x P(x) is true.

Example 14:
Let Q(x) denote the statement “x = x + 1.” What is the truth value of the
quantification ∃x Q(x), where the domain consists of all real numbers?
Solution: Because Q(x) is false for every real number x, the existential
quantification ∃x Q(x) is false.
(CUST) 12 / 26
Quantifiers Over Finite Domains
When the domain of a quantifier is finite, that is, when all its elements can
be listed, quantified statements can be expressed using propositional logic.
In particular, when the elements of the domain are x1 , x2 , . . . , xn , where n
is a positive integer, the universal quantification ∀x P(x) is the same as
the conjunction

P(x1 ) ∧ P(x2 ) ∧ . . . ∧ P(xn ),


because this conjunction is true if and only if P(x1 ), P(x2 ), . . . , P(xn ) are
all true.
Similarly, when the elements of the domain are x1 , x2 , . . . , xn , where n is a
positive integer, the existential quantification ∃xP(x) is the same as the
disjunction
P(x1 ) ∨ P(x2 ) ∨ · · · ∨ P(xn ),
because this disjunction is true if and only if at least one of
P(x1 ), P(x2 ), . . . , P(xn ) is true.
(CUST) 13 / 26
Example 15

What is the truth value of ∀x P(x), where P(x) is the statement x < 10
and the domain consists of the positive integers not exceeding 4?

Solution: The statement ∀x P(x) is the same as the conjunction

P(1) ∧ P(2) ∧ P(3) ∧ P(4),


because the domain consists of the integers 1, 2, 3, and 4. Because P(4),
which is the statement 4 < 10, is false, it follows that ∀x P(x) is false.

(CUST) 14 / 26
Example 16

What is the truth value of ∃xP(x), where P(x) is the statement


”x 2 > 10” and the universe of discourse consists of the positive integers
not exceeding 4?

Solution: Because the domain is {1, 2, 3, 4}, the proposition ∃xP(x) is the
same as the disjunction

P(1) ∨ P(2) ∨ P(3) ∨ P(4).

Because P(4), which is the statement ”42 > 10,” is true, it follows that
∃xP(x) is true.

(CUST) 15 / 26
Quantifiers with Restricted Domains

When the domain of discourse is restricted, the behavior of quantifiers


changes:
∀x P(x) is true if and only if P(x) is true for all x in the restricted
domain.
∃x P(x) is true if and only if P(x) is true for at least one x in the
restricted domain.
The restricted domain may be specified explicitly, such as the positive
integers not exceeding 4, or implicitly, such as the set of all people in a
certain city.

(CUST) 16 / 26
Example 17

What do the statements ∀x < 0(x 2 > 0), ∀y ̸= 0(y 3 ̸= 0), and
∃z > 0(z 2 = 2) mean, where the domain in each case consists of the real
numbers?

Solution: The statement ∀x < 0(x 2 > 0) states that for every real number
x with x < 0, x 2 > 0. That is, it states ”The square of a negative real
number is positive.” This statement is the same as ∀x(x < 0 → x 2 > 0).
The statement ∀y ̸= 0(y 3 ̸= 0) states that for every real number y with
y ̸= 0, we have y 3 ̸= 0. That is, it states ”The cube of every nonzero real
number is nonzero.” This statement is equivalent to ∀y (y ̸= 0 → y 3 ̸= 0).
Finally, the statement ∃z > 0(z 2 = 2) states that there exists a real
number z with z > 0 such that z 2 = 2. That is, it states ”There is a
positive square root of 2.” This statement is equivalent to
∃z(z > 0 ∧ z 2 = 2).

(CUST) 17 / 26
Precedence of Quantifiers
The quantifiers ∀ and ∃ have higher precedence than all logical operators
from propositional calculus. For example, ∀xP(x) ∨ Q(x) is the disjunction
of ∀xP(x) and Q(x). In other words, it means (∀xP(x)) ∨ Q(x) rather
than ∀x(P(x) ∨ Q(x)).

Binding Variables
When a quantifier is used on the variable x, we say that this occurrence of
the variable is bound. An occurrence of a variable that is not bound by a
quantifier or set equal to a particular value is said to be free. All the
variables that occur in a propositional function must be bound or set equal
to a particular value to turn it into a proposition. This can be done using
a combination of universal quantifiers, existential quantifiers, and value
assignments.
The part of a logical expression to which a quantifier is applied is called
the scope of this quantifier. Consequently, a variable is free if it is outside
the scope of all quantifiers in the formula that specify this variable.

(CUST) 18 / 26
Example 18

In the statement ∃x(x + y = 1), the variable x is bound by the existential


quantification ∃x, but the variable y is free because it is not bound by a
quantifier and no value is assigned to this variable. This illustrates that in
the statement ∃x(x + y = 1), x is bound, but y is free.
In the statement ∃x(P(x) ∧ Q(x)) ∨ ∀yR(y ), all variables are bound. The
scope of the first quantifier, ∃, is the expression P(x) ∧ Q(x), because ∃ is
applied only to P(x) ∧ Q(x) and not to the rest of the statement.
Similarly, the scope of the second quantifier, ∀y , is the expression R(y ).
That is, the existential quantifier binds the variable x in P(x) ∧ Q(x) and
the universal quantifier ∀y binds the variable y in R(y ). Observe that we
could have written our statement using two different variables x and y , as
∃x(P(x) ∧ Q(x)) ∨ ∀yR(y ), because the scopes of the two quantifiers do
not overlap.

(CUST) 19 / 26
Definition

Statements involving predicates and quantifiers are logically equivalent if


and only if they have the same truth value no matter which predicates are
substituted into those statements and which domain or discourse is used
for the variables in those propositional functions.
We use the notation ≡ to indicate that two statements P and Q involving
predicates and quantifiers are logically equivalent.

(CUST) 20 / 26
Negating Quantified Expressions
We will often want to consider the negation of a quantified expression. For
instance, consider the negation of the statement:
”Every student in your class has taken a course in calculus.”
This statement is a universal quantification, namely, ∀xP(x).
The negation of this statement is ¬∀xP(x), which is logically equivalent to
∃x¬P(x). That is, the negation of a universal quantification is an
existential quantification of the negation.
Where P(x) is the statement ”x has taken a course in calculus” and the
domain consists of the students in your class. The negation of this
statement is ”it is not the case that every student in your class has taken a
course in calculus.” This is equivalent to ”There is a student in your class
who has not taken a course in calculus.” And this is simply the existential
quantification of the negation of the original propositional function,
namely, ∃x¬P(x).
This example illustrates the following logical equivalence:
¬∀xP(x) ≡ ∃x¬P(x).
(CUST) 21 / 26
Negating Existential Quantification

Suppose we wish to negate an existential quantification. For instance,


consider the proposition ”There is a student in this class who has taken a
course in calculus.” This is the existential quantification ∃xQ(x), where
Q(x) is the statement ”x has taken a course in calculus.”
The negation of this statement is the proposition ”It is not the case that
there is a student in this class who has taken a course in calculus.” This is
equivalent to ”Every student in this class has not taken a course in
calculus,” which is just the universal quantification of the negation of the
original propositional function, or, phrased in the language of quantifiers,
∀x¬Q(x).
This example illustrates the equivalence:

¬∃xQ(x) ≡ ∀x¬Q(x).

(CUST) 22 / 26
De Morgan’s Laws for Quantifiers and Negating Quantified
Statements

De Morgan’s Laws for Quantifiers:

Negation De Morgan’s Statement When Is Negation True?


¬∀xP(x) ∃x¬P(x) For every x, P(x) is false.
¬∃xP(x) ∀x¬P(x) There is an x for which P(x) is false.

Example 19:
1. ”There is an honest politician”
Let H(x) denote ”x is honest.” This statement is represented by ∃xH(x). Its
negation is ¬∃xH(x), which is equivalent to ∀x¬H(x). The negation can be
expressed as ”Every politician is dishonest.”
2. ”All Americans eat cheeseburgers”
Let C (x) denote ”x eats cheeseburgers.” This statement is represented by
∀xC (x). Its negation is ¬∀xC (x), which is equivalent to ∃x¬C (x). The negation
can be expressed as ”Some Americans do not eat cheeseburgers.”

(CUST) 23 / 26
Negating Quantified Statements (cont’d)

Example 20: What are the negations of the statements ∀x(x 2 > x) and
∃x(x 2 = 2)?
Solution: The negation of ∀x(x 2 > x) is the statement ∃x(x 2 ≤ x),
which is equivalent to ∃x(x ≥ 1). The negation of ∃x(x 2 = 2) is the
statement ∀x(x 2 ̸= 2). The specific values of these statements depend on
the domain.
Example 22: Show that ¬(∀xP(x) → Q(x)) and ∃x(P(x) ∧ ¬Q(x)) are
logically equivalent.
Solution: By De Morgan’s law for universal quantifiers, we know that
¬(∀xP(x) → Q(x)) and ∃x(¬(P(x) → Q(x))) are logically equivalent. By
the laws of logics, we know that ∃x(¬(P(x) → Q(x))) and
∃x(P(x) ∧ ¬Q(x)) are logically equivalent. Therefore, ¬(∀xP(x) → Q(x))
and ∃x(P(x) ∧ ¬Q(x)) are logically equivalent.

(CUST) 24 / 26
Expressing Universal Statements

Example 23: Express the statement ”Every student in this class has
studied calculus” using predicates and quantifiers.
Solution: First, we rewrite the statement so that we can clearly identify
the appropriate quantifiers to use. Doing so, we obtain: ”For every
student in this class, that student has studied calculus.”
Next, we introduce a variable x so that our statement becomes: ”For
every student x in this class, x has studied calculus.”
Continuing, we introduce C (x), which is the statement ”x has studied
calculus.” Consequently, if the domain for x consists of the students in the
class, we can translate our statement as: ∀xC (x).

(CUST) 25 / 26
Expressing Existential Statements

Example 24: Express the statements ”Some student in this class has
visited Mexico” and ”Every student in this class has visited either Canada
or Mexico” using predicates and quantifiers.
Solution: The statement ”Some student in this class has visited Mexico”
means that ”There is a student in this class with the property that the
student has visited Mexico.”
We can introduce a variable x, so that our statement becomes: ”There is
a student x in this class having the property that x has visited Mexico.”
This can be expressed using the existential quantifier as: ∃x(M(x)), where
M(x) is the predicate ”x has visited Mexico.”
The statement ”Every student in this class has visited either Canada or
Mexico” can be expressed as: ∀x(C (x) ∨ M(x)), where C (x) is the
predicate ”x has visited Canada” and M(x) is the predicate ”x has visited
Mexico.”

(CUST) 26 / 26

You might also like