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

Logic 1

Uploaded by

teacheryinyinedu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Logic 1

Uploaded by

teacheryinyinedu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Discrete Mathematics (Math

151)

Department of Mathematics
College of Sciences
King Saud University

(King Saud University ) Discrete Mathematics (Math 151) 1 / 52


Chapter 1: Logic

(King Saud University ) Discrete Mathematics (Math 151) 2 / 52


Chapter1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 3 / 52


Chapter1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 4 / 52


Propositional Logic

Propositions
Our discussion begins with an introduction to the basic building blocks of
logic-propositions. A proposition is a declarative sentence that is either true or
false, but not both.

Example 1.1
All the following declarative sentences are propositions.

1 2 is a real number.
2 −5 is a positive integer.
3 2 > 4.
4 1 + 2 = 3.
Propositions 1 and 4 are true, whereas 2 and 3 are false.

(King Saud University ) Discrete Mathematics (Math 151) 5 / 52


Propositional Logic

Example 1.2
Consider the following sentences.
1 What times is it?
2 Read this carefully.
3 x + 1 = 2.
4 x + y = z.
Sentences 1 and 2 are not propositions because they are not declarative sentences.
Sentences 3 and 4 are not propositions because they are neither true nor false.
Note that each of sentences 3 and 4 can be turned into a proposition if we assign
values to the variables.

(King Saud University ) Discrete Mathematics (Math 151) 6 / 52


Propositional Logic

• We use letters to denote propositional variables (or statement variables).


The conventional letters used for propositional variables are p, q, r, s, . . .
• The truth value of a proposition is true, denoted by T, if it is a true
proposition, and the truth value of a proposition is false, denoted by F, if it is
a false proposition.
• The area of logic that deals with propositions is called the propositional
calculus or propositional logic.
• We now turn our attention to methods for producing new propositions from
those that we already have. Many mathematical statements are constructed
by combining one or more propositions. New propositions, called compound
propositions, are formed from existing propositions using logical operators.

(King Saud University ) Discrete Mathematics (Math 151) 7 / 52


Chapter1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 8 / 52


Propositional Logic

Definition 1.1
Let p be a proposition. The negation of p, denoted by ¬p (also denoted by p̄), is
the statement ”It is not the case that p.”
The proposition ¬p is read ”not p.” The truth value of the negation of p, ¬p, is
the opposite of the truth value of p.

Example 1.3
Find the negations of the following propositions:

1 2 = 3; 3 2 ≥ −2; 5 3 > 2.
2 6 ≤ 4; 4 2 < 0;

Solution: The negations are:

1 2 6= 3; 3 2 < −2; 5 3 ≤ 2.
2 6 > 4; 4 2 ≥ 0;

(King Saud University ) Discrete Mathematics (Math 151) 9 / 52


Propositional Logic

Example 1.4
Find the negations of the following propositions
1 ” −1 is an integer”.
2 ” −1 is a negative integer”.
Solution:
1 ” −1 is not an integer”.
2 ” −1 is a non negative integer”.

Truth Table
TABLE 1 Table 1 displays the truth table for the negation of a proposition p.
p ¬p This table has a row for each of the two possible truth values of a
T F proposition p. Each row shows the truth value of ¬p corresponding
F T to the truth value of p for this row.

(King Saud University ) Discrete Mathematics (Math 151) 10 / 52


Propositional Logic

Definition 1.2
Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the
proposition ”p and q.” The conjunction p ∧ q is true when both p and q are true
and is false otherwise.
Example 1.5
Find the conjunction of the propositions p and q where p is the proposition ”
2 < 5” and q is the proposition ” 2 > −6.”
Solution: The conjunction of these propositions, p ∧ q, is the proposition ” 2 < 5
and 2 > −6.”
This conjunction can be expressed more simply as ” −6 6 2 < 5.”
For this conjunction to be true, both conditions given must be true. It is false,
when one or both of these conditions are false.

(King Saud University ) Discrete Mathematics (Math 151) 11 / 52


Propositional Logic

Definition 1.3
Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the
proposition ”p or q.” The disjunction p ∨ q is false when both p and q are false
and is true otherwise.

Example 1.6
What is the disjunction of the propositions p and q where p is the proposition
”−3 ∈ R” and q is the proposition ” −3 ∈ N.”
Solution: The disjunction of p and q, p ∨ q, is the proposition ”−3 ∈ R or
−3 ∈ N”
This proposition is true.

(King Saud University ) Discrete Mathematics (Math 151) 12 / 52


Propositional Logic

Truth Table
TABLE 2 TABLE 3
p q p∧q p q p∨q
T T T T T T
T F F T F T
F T F F T T
F F F F F F

Table 2 displays the truth table of p ∧ q. Table 3 displays the truth table of p ∨ q.

(King Saud University ) Discrete Mathematics (Math 151) 13 / 52


Chapter1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 14 / 52


Propositional Logic

We will discuss several other important ways in which propositions can be


combined.
Definition 1.4
Let p and q be propositions. The conditional statement p → q is the proposition
”if p, then q.” The conditional statement p → q is false when p is true and q is
false, and true otherwise. In the conditional statement p → q, p is called the
hypothesis (or antecedent or premise) and q is called the conclusion (or
consequence).

(King Saud University ) Discrete Mathematics (Math 151) 15 / 52


Propositional Logic

Truth Table
TABLE 4
p q p→q
T T T
T F F
F T T
F F T

Table 4 displays the truth table of p → q.

(King Saud University ) Discrete Mathematics (Math 151) 16 / 52


Propositional Logic

• In the conditional statement p → q, p is called the hypothesis (or


antecedent or premise) and q is called the conclusion (or consequence).
• The statement p → q is called a conditional statement because p → q asserts
that q is true on the condition that p holds. A conditional statement is also
called an implication.
• the statement p → q is true when both p and q are true and when p is false
(no matter what truth value q has).
• Conditional statements play such an essential role in mathematical reasoning.

(King Saud University ) Discrete Mathematics (Math 151) 17 / 52


Propositional Logic

Terminology is used to express p → q.


”if p, then q” ” p implies q”
”if p, q” ”p only if q”
”p is sufficient for q” ”a sufficient condition for q is p”
”q if p” ”q whenever p”
”q when p” ”q is necessary for p”
”a necessary condition for p is q” ”q follows from p”
”q unless ¬p”

(King Saud University ) Discrete Mathematics (Math 151) 18 / 52


Propositional Logic

CONVERSE, CONTRAPOSITIVE, AND INVERSE


We can form some new conditional statements starting with a conditional
statement p → q. In particular, there are three related conditional statements that
occur so often that they have special names.
• The proposition q → p is called the converse of p → q.
• The contrapositive of p → q is the proposition ¬q → ¬p.
• The proposition ¬p → ¬q is called the inverse of p → q.
We will see that of these three conditional statements formed from p → q, only
the contrapositive always has the same truth value as p → q.

(King Saud University ) Discrete Mathematics (Math 151) 19 / 52


Propositional Logic

Example 1.7
What are the√contrapositive, the converse, and the inverse of the conditional
statement ” 2 exist whenever the real 2 is positive.”?
Solution: Because ”q whenever p” is one of the ways to express the conditional
statement p →√q, the original statement can be rewritten as ”If the real 2 is
positive, then 2 exist” √
Consequently, the contrapositive is ”If 2 does not exist, the real 2 is not
positive, then” √
The converse is ” 2 exist, then the real 2 is positive.”

The inverse is ”If the real 2 is not positive, then 2 does not exist”
Only the contrapositive is equivalent to the original statement.

(King Saud University ) Discrete Mathematics (Math 151) 20 / 52


Propositional Logic

BICONDITIONALS

Definition 1.5
Let p and q be propositions. The biconditional statement p ↔ q is the proposition
”p if and only if q”. The biconditional statement p ↔ q is true when p and q
have the same truth values, and is false otherwise. Biconditional statements are
also called bi-implications.
Note that the statement p ↔ q is true when both the conditional statements
p → q and q → p are true and is false otherwise. That is why we use the words ”if
and only if” to express this logical connective and why it is symbolically written by
combining the symbols → and ←.

(King Saud University ) Discrete Mathematics (Math 151) 21 / 52


Propositional Logic
There are some other common ways to express p ↔ q:
• ”p is necessary and sufficient for q”
• ”if p then q, and conversely”
• ”p iff q.”
The last way of expressing the biconditional statement p ↔ q uses the
abbreviation ”iff” for ”if and only if.” Note that p ↔ q has exactly the same truth
value as (p → q) ∧ (q → p) .

Truth Table
TABLE 5
p q p↔q
T T T
T F F
F T F
F F T

Table 5 displays the truth table of p ↔ q.

(King Saud University ) Discrete Mathematics (Math 151) 22 / 52


Propositional Logic

Example 1.8
Let p be the statement ”You can take the flight,” and let q be the statement
”You buy a ticket.” Then p ↔ q is the statement ”You can take the flight if and
only if you buy a ticket.”
This statement is true if p and q are either both true or both false, that is, if you
buy a ticket and can take the flight or if you do not buy a ticket and you cannot
take the flight. It is false when p and q have opposite truth values.

(King Saud University ) Discrete Mathematics (Math 151) 23 / 52


Propositional Logic

Truth Tables of Compound Propositions


• We have now introduced four important logical connectives: conjunctions,
disjunctions, conditional statements, and biconditional statements, as well as
negations.
• We can use these connectives to build up complicated compound
propositions involving any number of propositional variables.
• We can use truth tables to determine the truth values of these compound
propositions.

(King Saud University ) Discrete Mathematics (Math 151) 24 / 52


Propositional Logic

Example 1.9
Construct the truth table of the compound proposition (p ∨ ¬q) → (p ∧ q).

TABLE 7 The Truth Table of (p ∨ ¬q) → (p ∧ q)


p q ¬q p ∨ ¬q p ∧ q (p ∨ ¬q) → (p ∧ q)
T T F T T T
T F T T F F
F T F F F T
F F T T F F

(King Saud University ) Discrete Mathematics (Math 151) 25 / 52


Chapter1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 26 / 52


Propositional Equivalences

Introduction
An important type of step used in a mathematical argument is the replacement of
a statement with another statement with the same truth value.
Because of this, methods that produce propositions with the same truth value as a
given compound proposition are used extensively in the construction of
mathematical arguments.

Definition 2.1
• A compound proposition that is always true, no matter what the truth values
of the propositional variables that occur in it, is called a tautology.
• A compound proposition that is always false is called a contradiction.
• A compound proposition that is neither a tautology nor a contradiction is
called a contingency.

(King Saud University ) Discrete Mathematics (Math 151) 27 / 52


Propositional Equivalences

Example 2.1
We can construct examples of tautologies and contradictions using just one
propositional variable.
Consider the truth tables of p ∨ ¬p and p ∧ ¬p. Because p ∨ ¬p is always true, it
is a tautology. Because p ∧ ¬p is always false, it is a contradiction.

(King Saud University ) Discrete Mathematics (Math 151) 28 / 52


Chapter 1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 29 / 52


Compound propositions that have the same truth values in all possible cases are
called logically equivalent. We can also define this notion as follows.

Definition 2.2
The compound propositions p and q are called logically equivalent if p ↔ q is a
tautology.
The notation p ≡ q denotes that p and q are logically equivalent.

(King Saud University ) Discrete Mathematics (Math 151) 30 / 52


Propositional Equivalences

TABLE 1: Examples of a Tautology and a Contradiction.


TABLE 1
p ¬p p ∨ ¬p p ∧ ¬p
T F T F
F T T F

TABLE 2: De Morgan’s Laws.


TABLE 2
¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q

(King Saud University ) Discrete Mathematics (Math 151) 31 / 52


Propositional Equivalences

Example 2.2
1 Show that ¬(p ∨ q) and ¬p ∧ ¬q are logically equivalent.
2 Show that ¬(p ∧ q) and ¬p ∨ ¬q are logically equivalent.
Solution: We construct the truth table.
TABLE 3 The Truth Table
p q p ∨ q ¬(p ∨ q) ¬p ¬q ¬p ∧ ¬q p ∧ q ¬(p ∧ q) ¬p ∨ ¬q
T T T F F F F T F F
T F T F F T F F T T
F T T F T F F F T T
F F F T T T T F T T

(King Saud University ) Discrete Mathematics (Math 151) 32 / 52


Propositional Equivalences

Example 2.3
1 Show that p → q and ¬p ∨ q are logically equivalent.
2 Show that p → q and ¬q → ¬p are logically equivalent.
Solution: We construct the truth table.
TABLE 4 The Truth Table
p q ¬p ¬q ¬p ∨ q p → q ¬q → ¬p
T T F F T T T
T F F T F F F
F T T F T T T
F F T T T T T

(King Saud University ) Discrete Mathematics (Math 151) 33 / 52


Propositional Equivalences

Example 2.4
Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.
This is the distributive law of disjunction over conjunction.
Solution: We construct the truth table.
TABLE 5 The Truth Table
p q r q∧r p ∨ (q ∧ r) p ∨ q p ∨ r (p ∨ q) ∧ (p ∨ r)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F

(King Saud University ) Discrete Mathematics (Math 151) 34 / 52


Propositional Equivalences

TABLE 6 Logical Equivalences


Equivalence Name
p ∧ T ≡ p, p ∨ F ≡ p Identity laws
p ∨ T ≡ T, p ∧ F ≡ F Domination laws
p ∧ p ≡ p, p ∨ p ≡ p Idempotent laws
¬(¬p) ≡ p Double negation law
p ∧ q ≡ q ∧ p and p ∨ q ≡ q ∨ p Commutative laws
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
Associative laws
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Distributive laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
¬(p ∧ q) ≡ ¬p ∨ ¬q
De Morgan’s Laws
¬(p ∨ q) ≡ ¬p ∧ ¬q
p ∨ (p ∧ q) ≡ p
Absorption Laws
p ∧ (p ∨ q) ≡ p
p ∨ ¬p ≡ T , p ∧ ¬p ≡ F Negation laws

(King Saud University ) Discrete Mathematics (Math 151) 35 / 52


Propositional Equivalences

Table 7: Logical Equivalences


Involving Conditional Statements.
Table 8: Logical Equivalences
p → q ≡ ¬p ∨ q
p → q ≡ ¬q → ¬p
Involving Biconditional
p ∨ q ≡ ¬p → q Statements.
p ∧ q ≡ ¬(p → ¬q) p ↔ q ≡ (p → q) ∧ (q → p)
¬(p → q) ≡ p ∧ ¬q p ↔ q ≡ ¬p ↔ ¬q
(p → q) ∧ (p → r) ≡ p → (q ∧ r) p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
(p → r) ∧ (q → r) ≡ (p ∨ q) → r ¬(p ↔ q) ≡ p ↔ ¬q
(p → q) ∨ (p → r) ≡ p → (q ∨ r)
(p → r) ∨ (q → r) ≡ (p ∧ q) → r

(King Saud University ) Discrete Mathematics (Math 151) 36 / 52


Chapter 1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 37 / 52


Propositional Equivalences

Example 2.5
Show that ¬(p → q) and p ∧ ¬q are logically equivalent.
Solution: We could use a truth table to show that these compound propositions
are equivalent.
So, we will establish this equivalence by developing a series of logical equivalences,
using one of the equivalences in Table 6 at a time, starting with ¬(p → q) and
ending with p ∧ ¬q.
We have the following equivalences.
¬(p → q) ≡ ¬(¬p ∨ q) by Example 3
≡ ¬(¬p) ∧ ¬q by the second De Morgan’s law
≡ p ∧ ¬q by the double negation law

(King Saud University ) Discrete Mathematics (Math 151) 38 / 52


Propositional Equivalences

Example 2.6
Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent by developing a
series of logical equivalences.
Solution: Solution: We will use one of the equivalences in Table 6 at a time,
starting with ¬(p ∨ (¬p ∧ q)) and ending with ¬p ∧ ¬q.
We have the following equivalences.
¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬(¬p ∧ q) by the second De Morgan’s laws
≡ ¬p ∧ [¬(¬p) ∨ ¬q] by the first De Morgan’s laws
≡ ¬p ∧ (p ∨ ¬q) by the double negation law
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q) by the distributive laws
≡ F ∨ (¬p ∧ ¬q) because ¬p ∨ p ≡ F
≡ (¬p ∧ ¬q) ∨ F by the commutative laws
≡ ¬p ∧ ¬q by the identity laws
Consequently ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent.

(King Saud University ) Discrete Mathematics (Math 151) 39 / 52


Propositional Equivalences

Example 2.7
Show that (p ∧ q) → (p ∨ q) is a tautology.
Solution: To show that this statement is a tautology, we will use logical
equivalences to demonstrate that it is logically equivalent to T. (Note: This could
also be done using a truth table.)
(p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q) by conditional law
≡ (¬p ∨ ¬q) ∨ (p ∨ q) by the first De Morgan’s law
≡ (¬p ∨ p) ∨ (¬q ∨ q) by the associative and
commutative laws for disjunction
≡T ∨T
≡T

(King Saud University ) Discrete Mathematics (Math 151) 40 / 52


Chapter 1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 41 / 52


Chapter 1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 42 / 52


Predicates and Quantifiers

Statements involving variables, such as ”x > 3”, ”x = y + 3”, ”x + y = z”,

Example 3.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.

Example 3.2
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 in the statement Q(x, y).
Hence, Q(1, 2) is the statement ”1 = 2 + 3,” which is false. The statement
Q(3, 0) is the proposition ”3 = 0 + 3,” which is true.

(King Saud University ) Discrete Mathematics (Math 151) 43 / 52


Predicates and Quantifiers

Example 3.3
Let R(x, y, z) denote the statement ”x + y = z”, 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.

(King Saud University ) Discrete Mathematics (Math 151) 44 / 52


Chapter 1: Logic

1 Propositional Logic
Logic operators
Conditional Statements

2 Propositional Equivalences
Logical Equivalences
Constructing New Logical Equivalences

3 Predicates and Quantifiers


Predicates
Quantifiers

(King Saud University ) Discrete Mathematics (Math 151) 45 / 52


Predicates and Quantifiers

Definition 3.1 (THE UNIVERSAL QUANTIFIER)


The universal quantification of P(x) is the statement
”P(x) for all values of x in the domain.”
The notation ∀x P (x) denotes the universal quantification of P (x). Here ∀ is
called the universal quantifier. We read ∀x P (x) as ”for all x P (x)” or ”for
every x P (x)”. An element for which P (x) is false is called a counterexample of
∀x P (x).

Definition 3.2 (THE EXISTENTIAL QUANTIFIER)


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.

(King Saud University ) Discrete Mathematics (Math 151) 46 / 52


Predicates and Quantifiers

The statement ∀x P (x) is true when P (x) is true for every x and is false
when there is an x for which P (x) is false.
The statement ∃x P (x) is true when there is an x for which P (x) is true and
is false when P (x) is false for every x.
¬ (∃x Q(x)) ≡ ∀x ¬Q(x).
¬ (∀x P (x)) ≡ ∃x ¬P (x).

(King Saud University ) Discrete Mathematics (Math 151) 47 / 52


Predicates and Quantifiers

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

Example 3.5
Let Q(x) be the statement ”x < 2.” What is the truth value of the quantification
∀x Q(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 ∀x Q(x). Thus
∀x Q(x) is false.

(King Saud University ) Discrete Mathematics (Math 151) 48 / 52


Predicates and Quantifiers

Example 3.6
Suppose that P (x) is ”x2 > 0.” To show that the statement ∀x P (x) is false
where the universe of discourse consists of all integers, we give a counterexample.
We see that x = 0 is a counterexample because x2 = 0 when x = 0, so that x2 is
not greater than 0 when x = 0.
Looking for counterexamples to universally quantified statements is an important
activity in the study of mathematics, as we will see in subsequent sections.
When all the elements in the domain can be listed–say,x1 , x2 , ..., xn –it follows
that 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.

(King Saud University ) Discrete Mathematics (Math 151) 49 / 52


Predicates and Quantifiers

Example 3.7
What is the truth value of ∀x P (x), where P (x) is the statement ”x2 < 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 ”42 < 10,” is false, it follows that
∀x P (x) is false.

(King Saud University ) Discrete Mathematics (Math 151) 50 / 52


Predicates and Quantifiers

Example 3.8
What is the truth value of ∀x (x2 ≥ x) if the domain consists of all real numbers?
What is the truth value of this statement if the domain consists of all integers?
Solution: The universal quantification ∀x (x2 ≥ x), where the domain consists of
2
all real numbers, is false. For example, 12 6≥ 21 . Note that x2 ≥ x if and only if
x2 − x = x(x − 1) ≥ 0. Consequently, x2 ≥ x if and only if x ≤ 0 or x ≥ 1. It
follows that ∀x (x2 ≥ x) is false if the domain consists of all real numbers
(because the inequality is false for all real numbers x with 0 < x < 1). However, if
the domain consists of the integers, ∀x (x2 ≥ x) is true, because there are no
integers x with 0 < x < 1.

(King Saud University ) Discrete Mathematics (Math 151) 51 / 52


Predicates and Quantifiers

TABLE 1 De Morgan’s Laws for Quantifiers. (2 in book)


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

Example 3.9
What are the negations of the statements ∀x (x2 > x) and ∃x (x2 = 2)?
Solution: The negation of ∀x (x2 > x) is the statement ¬∀x (x2 > x), which is
equivalent to ∃x ¬(x2 > x). This can be rewritten as ∃x (x2 ≤ x).
The negation of ∃x (x2 = 2) is the statement ¬∃x (x2 = 2), which is equivalent
to ∀x ¬(x2 = 2). This can be rewritten as ∀x (x2 6= 2).

(King Saud University ) Discrete Mathematics (Math 151) 52 / 52


Predicates and Quantifiers

Example 3.10
Show that ¬∀x (P (x) → Q(x)) and ∃x (P (x) ∧ ¬Q(x)) are logically equivalent.
Solution: By De Morgan’s law for universal quantifiers, we know that
¬∀x (P (x) → Q(x)) and ∃x (¬(P (x) → Q(x))) are logically equivalent. By the
fifth logical equivalence in Table 7 in Section 1.2 (1.3 in book), we know that
¬(P (x) → Q(x)) and P (x) ∧ ¬Q(x) are logically equivalent for every x. Because
we can substitute one logically equivalent expression for another in a logical
equivalence, it follows that ¬∀x (P (x) → Q(x)) and ∃x (P (x) ∧ ¬Q(x)) are
logically equivalent.

(King Saud University ) Discrete Mathematics (Math 151) 53 / 52

You might also like