0% found this document useful (0 votes)
96 views8 pages

A (MATH1) - A (CS1) A (CS2) A (MATH1) Computer MATH1 Is Under Attack by An Intruder

1) Predicates take the form of PP(xx) and represent logical statements involving variables. The truth of PP(xx) depends on the value assigned to the variable x. 2) Universal quantification, denoted ∀xxxx(xx), means "PP(xx) is true for all x" and is false if a single counterexample exists where PP(xx) is false. Existential quantification, denoted ∃xxxx(xx), means "There exists at least one x where PP(xx) is true." 3) When the domain is finite and enumerable, universal quantification can be expressed as a conjunction over the domain and existential quantification as a disjunction.

Uploaded by

Tamim Islam
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)
96 views8 pages

A (MATH1) - A (CS1) A (CS2) A (MATH1) Computer MATH1 Is Under Attack by An Intruder

1) Predicates take the form of PP(xx) and represent logical statements involving variables. The truth of PP(xx) depends on the value assigned to the variable x. 2) Universal quantification, denoted ∀xxxx(xx), means "PP(xx) is true for all x" and is false if a single counterexample exists where PP(xx) is false. Existential quantification, denoted ∃xxxx(xx), means "There exists at least one x where PP(xx) is true." 3) When the domain is finite and enumerable, universal quantification can be expressed as a conjunction over the domain and existential quantification as a disjunction.

Uploaded by

Tamim Islam
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/ 8

Discrete Structures Lecture 4

CMSC 2123 1.4 Predicates and Quantifiers

Introduction
In this section we will introduce a more powerful type of logic called predicate logic.
Predicates
Consider the statement: 𝑥𝑥 > 3. The statement has two parts:
1. the variable, 𝑥𝑥 and
2. the predicate, is greater than 3, > 3.
The statement "𝑥𝑥 is greater than 3”, 𝑥𝑥 > 3, can be denoted by 𝑃𝑃(𝑥𝑥). The statement 𝑃𝑃(𝑥𝑥) is said
to be the value of the propositional function 𝑃𝑃 at 𝑥𝑥. Once a value has been assigned to the
variable 𝑥𝑥, the statement 𝑃𝑃(𝑥𝑥) becomes a proposition and has a truth value.

EXAMPLE 1 Let 𝑃𝑃(𝑥𝑥) denote the statement “𝑥𝑥 > 3.” What are the truth values of 𝑃𝑃(4)
and 𝑃𝑃(2)?
Proposition Application Truth Value
𝑃𝑃(4) 𝟒𝟒 > 3 True
𝑃𝑃(2) 𝟐𝟐 > 3 False

EXAMPLE 2 Let 𝐴𝐴(𝑥𝑥) denote the statement “Computer 𝑥𝑥 is under attack by an intruder.”
Suppose that of the computers on campus, only CS2 and MATH1 are currently
under attack by intruders. What are the truth values of A(CS1), A(CS2), and
A(MATH1).
Proposition Application Truth
Value
A(CS1) Computer CS1 is under attack by an intruder. False
A(CS2) Computer CS2 is under attack by an intruder. True
A(MATH1) Computer MATH1 is under attack by an intruder. True

EXAMPLE 3 Let 𝑄𝑄(𝑥𝑥, 𝑦𝑦) denote the statement “𝑥𝑥 = 𝑦𝑦 + 3.” What are the truth values of
the propositions 𝑄𝑄(1,2) and 𝑄𝑄(3,0)?
Proposition Application Truth Value
𝑄𝑄(1,2) 1=2+3 False
𝑄𝑄(3,0) 3=0+3 True

In general, a statement involving the 𝑛𝑛 variables 𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 can be denoted by

𝑃𝑃(𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 ) .

A statement of the form 𝑃𝑃(𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 ) is the value of the propositional function 𝑃𝑃 at the 𝑛𝑛-
tuple (𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 ), and 𝑃𝑃 is also called an 𝑛𝑛-place predicate or a 𝑛𝑛-ary predicate.

EXAMPLE 6 Consider the statement


if 𝑥𝑥 > 0 then 𝑥𝑥 ≔ 𝑥𝑥 + 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 𝑃𝑃(𝑥𝑥), which is
“𝑥𝑥 > 0.” If 𝑃𝑃(𝑥𝑥) is true for this value of 𝑥𝑥, the assignment statement 𝑥𝑥 ≔ 𝑥𝑥 +
1 is executed, so the value of x is increased by 1. If 𝑃𝑃(𝑥𝑥) is false for this value
of x, the assignment statement is not executed, so the value of x is not
changed.

1
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

Quantifiers
DEFINITION 1 The universal quantification of 𝑃𝑃(𝑥𝑥) is the statement

“𝑃𝑃(𝑥𝑥) for all values of 𝑥𝑥 in the domain.”

The notation ∀𝑥𝑥𝑥𝑥(𝑥𝑥) denotes the universal quantification of 𝑃𝑃(𝑥𝑥). Here ∀ is


called the universal quantifier. We read ∀𝑥𝑥𝑥𝑥(𝑥𝑥) as “for all 𝑥𝑥 𝑃𝑃(𝑥𝑥)” or “for
every 𝑥𝑥 𝑃𝑃(𝑥𝑥).” An element for which 𝑃𝑃(𝑥𝑥) is false is called a counterexample
of ∀𝑥𝑥𝑥𝑥(𝑥𝑥).

TABLE 1 Quantifiers
Statement When True? When False?
∀𝑥𝑥𝑥𝑥(𝑥𝑥) 𝑃𝑃(𝑥𝑥) is true for every x. There is an x for which 𝑃𝑃(𝑥𝑥) is false.
∃𝑥𝑥𝑥𝑥(𝑥𝑥) There is an x for which 𝑃𝑃(𝑥𝑥) is true. 𝑃𝑃(𝑥𝑥) is false for every x.

EXAMPLE 8 Let 𝑃𝑃(𝑥𝑥) be the statement “𝑥𝑥 + 1 > 𝑥𝑥. " What is the truth value of the
quantification ∀𝑥𝑥𝑥𝑥(𝑥𝑥), where the domain consists of all real numbers.

Solution: Because 𝑃𝑃(𝑥𝑥) is true for all real numbers x, the quantification
∀𝑥𝑥𝑥𝑥(𝑥𝑥)
is true.

EXAMPLE 9 Let 𝑄𝑄(𝑥𝑥) be the statement “𝑥𝑥 > 2.” What is the truth value of the
quantification ∀𝑥𝑥𝑥𝑥(𝑥𝑥), where the domain consists of all real numbers?

Solution: 𝑄𝑄(𝑥𝑥) is not true for every real number x, because, for instance, 𝑄𝑄(1)
is false. That is, 𝑥𝑥 = 1 is a counterexample for the statement ∀𝑥𝑥𝑥𝑥(𝑥𝑥). Thus,

∀𝑥𝑥𝑥𝑥(𝑥𝑥)
is false.

When all the elements in the domain can be listed – say, 𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 - it follows that the
universal quantification ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is the same as the conjunction

𝑃𝑃(𝑥𝑥1 ) ∧ 𝑃𝑃(𝑥𝑥2 ) ∧ ⋯ ∧ 𝑃𝑃(𝑥𝑥𝑛𝑛 )

because this conjunction is true if and only if 𝑃𝑃(𝑥𝑥1 ), 𝑃𝑃(𝑥𝑥2 ), ⋯ , 𝑃𝑃(𝑥𝑥𝑛𝑛 ) are all true.

EXAMPLE 11 What is the truth value of ∀𝑥𝑥𝑥𝑥(𝑥𝑥), where 𝑃𝑃(𝑥𝑥) is the statement “𝑥𝑥 2 < 10”
and the domain consists of the positive integers not exceeding 4?

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

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

because the domain consists of the integers 1, 2, 3, and 4. Because 𝑃𝑃(4),


which is the statement “42 < 10” is false, it follows that ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is false.

2
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

DEFINITION 2 The existential quantification of 𝑃𝑃(𝑥𝑥) is the proposition

“There exists an element x in the domain such that 𝑃𝑃(𝑥𝑥).”

We use the notation ∃𝑥𝑥𝑥𝑥(𝑥𝑥) for all the existential quantification of 𝑃𝑃(𝑥𝑥). Here
∃ is called the existential quantifier.
• A domain must always be specified when a statement ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is used. Furthermore, the
meaning of ∃𝑥𝑥𝑥𝑥(𝑥𝑥) changes when the domain changes. Without specifying the domain,
the statement ∃𝑥𝑥𝑥𝑥(𝑥𝑥) has no meaning.
• Besides the words “there exists,” we can also express existential quantification in many
other ways, such as by using the words “for some,” “for at least one,” or “there is.” The
existential quantification ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is read as

“There is an x such that 𝑃𝑃(𝑥𝑥),”


“There is at least one x such that 𝑃𝑃(𝑥𝑥),”
or
“For some x 𝑃𝑃(𝑥𝑥).”

EXAMPLE 14 Let 𝑃𝑃(𝑥𝑥) be the statement “𝑥𝑥 > 3.” What is the truth value of the
quantification ∃𝑥𝑥𝑥𝑥(𝑥𝑥), where the domain consists of all real numbers?

Solution: Because “𝑥𝑥 > 3” is sometimes true – for instance, when 𝑥𝑥 = 4 𝑃𝑃(𝑥𝑥)
- the existential quantification of 𝑃𝑃(𝑥𝑥), which is ∃𝑥𝑥𝑥𝑥(𝑥𝑥), is true.

EXAMPLE 15 Let 𝑄𝑄(𝑥𝑥) be the statement “𝑥𝑥 = 𝑥𝑥 + 1.” What is the truth value of the
quantification ∃𝑥𝑥𝑥𝑥(𝑥𝑥), where the domain consists of all real numbers?

Solution: Because 𝑄𝑄(𝑥𝑥) is false for every real number x, the existential
quantification of 𝑄𝑄(𝑥𝑥), which is ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is false.

Remark: Generally, an implicit assumption is made that all domains of discourse for quantifiers
are nonempty. If the domain is empty, then ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is false whenever 𝑄𝑄(𝑥𝑥) is a propositional
function because when the domain is empty, there can be no element x in the domain for which
𝑄𝑄(𝑥𝑥) is true.

When all the elements in the domain can be listed – say, 𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 - it follows that the
existential quantification ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is the same as the disjunction

𝑃𝑃(𝑥𝑥1 ) ∨ 𝑃𝑃(𝑥𝑥2 ) ∨ ⋯ ∨ 𝑃𝑃(𝑥𝑥𝑛𝑛 )

because this disjunction is true if and only if at least one of 𝑃𝑃(𝑥𝑥1 ), 𝑃𝑃(𝑥𝑥2 ), ⋯ , 𝑃𝑃(𝑥𝑥𝑛𝑛 ) is true.

3
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

EXAMPLE 16 What is the truth value of ∃𝑥𝑥𝑥𝑥(𝑥𝑥), where 𝑃𝑃(𝑥𝑥) is the statement “𝑥𝑥 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 ∃𝑥𝑥𝑥𝑥(𝑥𝑥) is the same
as the disjunction
𝑃𝑃(1) ∨ 𝑃𝑃(2) ∨ 𝑃𝑃(3) ∨ 𝑃𝑃(4).

Because 𝑃𝑃(4), which is the statement “42 > 10,” is true, it follows that
∃𝑥𝑥𝑥𝑥(𝑥𝑥) is true.

Other Quantifiers
Name Notation Description
uniqueness quantifier ∃! The notation ∃! 𝑥𝑥𝑥𝑥(𝑥𝑥) states ”There exists a unique
x such that 𝑃𝑃(𝑥𝑥) is true.” Other phrases for
uniqueness quantification include “there is exactly
one” and “there is one and only one.”
uniqueness quantifier ∃1 ∃1 𝑥𝑥𝑥𝑥(𝑥𝑥)

Quantifiers with Restricted Domains


• A condition appears after the quantifier. The condition is an expression that a variable
must satisfy.

EXAMPLE 17 What do the statements ∀𝑥𝑥 < 0(𝑥𝑥 2 > 0), ∀𝑦𝑦 ≠ 0(𝑦𝑦 3 ≠ 0), and ∃𝑧𝑧 > 0(𝑧𝑧 2 =
2) mean, where the domain in each case consists of the real numbers?

Solution: The statement ∀𝑥𝑥 < 0(𝑥𝑥 2 > 0) states that for every real number x
with 𝑥𝑥 < 0, 𝑥𝑥 2 > 0. That is, it states “The square of a negative real number is
positive.” This statement is the same as ∀𝑥𝑥(𝑥𝑥 < 0 → 𝑥𝑥 2 > 0).

The statement ∀𝑦𝑦 ≠ 0(𝑦𝑦 3 ≠ 0) states that for every real number y with 𝑦𝑦 ≠
0, we have 𝑦𝑦 3 ≠ 0. That is, it states “The cube of every nonzero real number is
nonzero.” Note that this statement is equivalent to , ∀𝑦𝑦(𝑦𝑦 ≠ 0 → 𝑦𝑦 3 ≠ 0).

Finally, the statement ∃𝑧𝑧 > 0(𝑧𝑧 2 = 2) states that there exists a real number z
with 𝑧𝑧 > 0 such that 𝑧𝑧 2 = 2. That is, it states “There is a positive square root
of 2.” This statement is equivalent to ∃𝑧𝑧(𝑧𝑧 > 0 ∧ 𝑧𝑧 2 = 2).

Precedence of Quantifiers
The quantifiers ∀ and ∃ have higher precedence than all logical operators from propositional
calculus. For example, ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∨ 𝑄𝑄(𝑥𝑥) is the disjunction of ∀𝑥𝑥𝑥𝑥(𝑥𝑥) and 𝑄𝑄(𝑥𝑥). In other words, it
means (∀𝑥𝑥𝑥𝑥(𝑥𝑥) ) ∨ (∀𝑥𝑥𝑥𝑥(𝑥𝑥)) rather than ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∨ 𝑄𝑄(𝑥𝑥)).

4
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

Binding Variables
• An occurrence of a variable may be bound.
o An occurrence of a variable may be bound by a quantifier. For example
∀𝑥𝑥𝑥𝑥(𝑥𝑥, 𝑦𝑦) makes variable x bound and variable y free.
o An occurrence of a variable may be bound by being set to a particular value.
• An occurrence of a variable may be free.

EXAMPLE 18 In the statement ∃𝑥𝑥(𝑥𝑥 + 𝑦𝑦 = 1), the variable x is bound by the existential
quantification ∃𝑥𝑥, but the variable y is free because it is not bound by a
quantifier and no value is assigned to this variable.

Logical Equivalences Involving Quantifiers

DEFINITION 3 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 these statements and which domain of discourse is used for
the variables in these propositional functions. We use the notation 𝑆𝑆 ≡ 𝑇𝑇 to
indicate that two statements S and T involving predicates and quantifiers are
logically equivalent.

EXAMPLE 19 Show that ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) and ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) are logically equivalent
(where the same domain is used throughout).

Solution: To show that these statements are logically equivalent, we must


show that they always take the same truth value, no matter what the
predicates P and Q are, and no matter which domain of discourse is used. We
can show that ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) and ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) are logically equivalent
by doing two things. First, we show that if ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) is true, then
∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true. Second, we show that if ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true,
then ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) is true.

Assume ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) is true.


1. Let a be an element in the domain of discourse.
2. 𝑃𝑃(𝑎𝑎) ∧ 𝑄𝑄(𝑎𝑎) is true by employing the assumption.
3. 𝑃𝑃(𝑎𝑎) and 𝑄𝑄(𝑎𝑎) is true by employing the definition of ∧.
4. Because 𝑃𝑃(𝑎𝑎) is true and 𝑄𝑄(𝑎𝑎) is true for every element in the domain
we can conclude that ∀𝑥𝑥𝑥𝑥(𝑥𝑥) and ∀𝑥𝑥𝑥𝑥(𝑥𝑥) are both true.
5. This means that ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥)

Assume ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true.


1. ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true.
2. ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true.
3. Let a be an element in the domain of discourse.
4. 𝑃𝑃(𝑎𝑎) is true because ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true.
5. 𝑄𝑄(𝑎𝑎) is true because ∀𝑥𝑥𝑥𝑥(𝑥𝑥) is true.
6. For all a, 𝑃𝑃(𝑎𝑎) ∧ 𝑄𝑄(𝑎𝑎) is true.
7. It follows that ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)).
We conclude ∀𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ 𝑄𝑄(𝑥𝑥)) ≡ ∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∧ ∀𝑥𝑥𝑥𝑥(𝑥𝑥)

5
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

Negating Quantified Expressions

Consider the statement


“Every student in your class has taken a course in calculus.”
This statement is a universal quantification, namely,
∀𝑥𝑥𝑥𝑥(𝑥𝑥)
where 𝑃𝑃(𝑥𝑥) is the statement
“x has taken a course in calculus.”

The negation of the 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.”

The foregoing example illustrates the following logical equivalence.


¬∀𝑥𝑥𝑥𝑥(𝑥𝑥) ≡ ∃𝑥𝑥¬𝑃𝑃(𝑥𝑥)

TABLE 2 De Morgan’s Laws for Quantifiers


Negation Equivalent Statement When Is Negation True? When False?
¬∃𝑥𝑥𝑥𝑥(𝑥𝑥) ∀𝑥𝑥¬𝑃𝑃(𝑥𝑥) For every x, 𝑃𝑃(𝑥𝑥) is false There is an 𝑥𝑥, for
which 𝑃𝑃(𝑥𝑥) is true.
¬∀𝑥𝑥𝑥𝑥(𝑥𝑥) ∃𝑥𝑥¬𝑃𝑃(𝑥𝑥) There is an 𝑥𝑥, for which 𝑃𝑃(𝑥𝑥) is 𝑃𝑃(𝑥𝑥) is true for every
false. x.

Remark: When the domain of a predicate 𝑃𝑃(𝑥𝑥) consists of n elements, where n is a positive
integer, the rules for negating quantified statements are exactly the same as De Morgan’s laws
discussed in Section 1.2. This is why these rules are called De Morgan’s laws for quantifiers.
When the domain has n elements 𝑥𝑥1 , 𝑥𝑥2 , ⋯ , 𝑥𝑥𝑛𝑛 , it follows that ¬∀𝑥𝑥𝑥𝑥(𝑥𝑥) is the same as
¬�𝑃𝑃(𝑥𝑥1 ) ∧ 𝑃𝑃(𝑥𝑥2 ) ∧ ⋯ ∧ 𝑃𝑃(𝑥𝑥𝑛𝑛 )�, which is equivalent to ¬𝑃𝑃(𝑥𝑥1 ) ∨ ¬𝑃𝑃(𝑥𝑥2 ) ∨ ⋯ ∨ ¬𝑃𝑃(𝑥𝑥𝑛𝑛 ) by De
Morgan’s laws, and this is the same as ∃𝑥𝑥¬𝑃𝑃(𝑥𝑥). Similarly, ¬∃𝑥𝑥𝑥𝑥(𝑥𝑥) is the same as ¬( 𝑃𝑃(𝑥𝑥1 ) ∨
𝑃𝑃(𝑥𝑥2 ) ∨ ⋯ ∨ 𝑃𝑃(𝑥𝑥𝑛𝑛 )), which by De Morgan’s laws is equivalent to ¬𝑃𝑃(𝑥𝑥1 ) ∧ ¬𝑃𝑃(𝑥𝑥2 ) ∧ ⋯ ∧
¬𝑃𝑃(𝑥𝑥𝑛𝑛 ), and this is the same as ∀𝑥𝑥¬𝑃𝑃(𝑥𝑥).

EXAMPLE 20.1 What is the negation of the statement “There is an honest politician?”

Solution: Let 𝐻𝐻(𝑥𝑥) denote “x is honest.” Then the statement “There is an


honest politician” is represented by ∃𝑥𝑥𝑥𝑥(𝑥𝑥), where the domain consists of all
politicians.

The negation of this statement is ¬∃𝑥𝑥𝑥𝑥(𝑥𝑥), which is equivalent to ∀𝑥𝑥¬𝐻𝐻(𝑥𝑥).


This negation can be expressed unambiguously in English as “Every politician is
dishonest.”

6
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

EXAMPLE 21.1 What are the negations of the statements ∀𝑥𝑥(𝑥𝑥 2 > 𝑥𝑥) and ∃𝑥𝑥(𝑥𝑥 2 = 2)?

Solution: The negation of ∀𝑥𝑥(𝑥𝑥 2 > 𝑥𝑥) is the statement ¬∀𝑥𝑥(𝑥𝑥 2 > 𝑥𝑥), which is
equivalent to ∃𝑥𝑥¬(𝑥𝑥 2 > 𝑥𝑥). This can be rewritten as ∃𝑥𝑥(𝑥𝑥 2 ≤ 𝑥𝑥). The truth
values of these statements depend on the domain.

EXAMPLE 22 Show that ¬∀𝑥𝑥(𝑃𝑃(𝑥𝑥) → 𝑄𝑄(𝑥𝑥)) ≡ ∃𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ ¬𝑄𝑄(𝑥𝑥))

Solution:
Expression Justification
¬∀𝑥𝑥(𝑃𝑃(𝑥𝑥) → 𝑄𝑄(𝑥𝑥)) Initial assumption
∃𝑥𝑥(¬(𝑃𝑃(𝑥𝑥) → 𝑄𝑄(𝑥𝑥))) Table 2, row 2
∃𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ ¬𝑄𝑄(𝑥𝑥)) Section 1.2, Table 7, row 5
Expression Justification
∃𝑥𝑥(𝑃𝑃(𝑥𝑥) ∧ ¬𝑄𝑄(𝑥𝑥)) Initial assumption
∃𝑥𝑥(¬(𝑃𝑃(𝑥𝑥) → 𝑄𝑄(𝑥𝑥))) Section 1.2, Table 7, row 5
¬∀𝑥𝑥(𝑃𝑃(𝑥𝑥) → 𝑄𝑄(𝑥𝑥)) Table 2, row 2

Translating from English into Logical Expressions

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.
“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.”
We introduce 𝐶𝐶(𝑥𝑥), which is the statement “x has studied calculus.” We also
confine the domain of discourse to students in the class. Our statement can be
expressed
∀𝑥𝑥𝑥𝑥(𝑥𝑥)

If we wish to change to domain of discourse to consist of all people, we need


to express our statement as
“For every person x, if the person x is a student in this class then x has
studied calculus.”

Let 𝑆𝑆(𝑥𝑥) represent the statement “x is a person in this class.” Our statement
can be represented as
∀𝑥𝑥(𝑆𝑆(𝑥𝑥) → 𝐶𝐶(𝑥𝑥))

Caution! Our statement cannot be expressed as ∀𝑥𝑥(𝑆𝑆(𝑥𝑥) ∧ 𝐶𝐶(𝑥𝑥)) because this


statement says that all people are students in this class and have studied
calculus!

Using Quantifiers in System Specifications


• under construction

7
Discrete Structures Lecture 4
CMSC 2123 1.4 Predicates and Quantifiers

Examples from Lewis Carroll


• under construction

Logic Programming
• under construction

You might also like