We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 31
Nested Quantifiers
EXAMPLE 1 Assume that the domain for the variables x and y consists of all real numbers. The statement
Va¥y(x ty =y +9)
fra GE] says that x + y = y +x for all real numbers x and y. This is the commutative law for addition
fxamples Gd of real numbers. Likewise, the statement
WxSyr ty =0)
says that for every real number x there is a real number y such that x + y = 0. This states that
every real number has an additive inverse. Similarly, the statement
Va yVe(x + (y +2) = (e+ y) +2)
is the associative law for addition of real numbers. <EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
Translate into English the statement
Vx¥y((x > 0) A(y <0) > (xy <0),
where the domain for both variables consists of all real numbers.
The Order of Quantifiers
Let P(x, y) be the statement “x + y = y +.” What are the teuth values of the quantifications
vay P(x, y) and ¥yVx P(x, y) where the domain for all variables consists of all real numbers?
Let Q(x, y) denote “x + y = 0.” What are the truth values of the quantifications 3y¥xQ(x, y)
and ¥x3yQ(x, y), where the domain for all variables consists of all real numbers?EXAMPLES Let Q(x,y,z) be the statement “x + y= 2" What are the truth values of the statements
Va y3zQ(x. y,z) and 32¥x¥yQ(x, y.z), where the domain of all variables consists of all
real numbers?
TABLE 1 Quantifications of Two Variables.
Statement When Truc? When False?
vrvyP(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for
Yy¥xP (x, ¥) which P(x, y) is false.
ry P(x, y) For every x there isa y for ‘There is an x such that
which P(x, y) is true, P(x, y) is false for every y.
BxWy P(x, y) ‘There is an x for which P(x, y) For every x there is ay for
is true for every y. which P(x, y) is false.
By3yP(x,y) | There isa pair x, y for which P(x, y) is false for every
ay3x P(x, ») P(x, y) is true, pair x, y.Translating Mathematical Statements into Statements
Involving Nested Quantifiers
EXAMPLE 6 Translate the statement “The sum of two positive integers is always positive” into a logical
expression.
EXAMPLE7 Translate the statement “Every real number except zero has a multiplicative inverse.” (A mul-
tiplicative inverse of a real number x is a real number y such that xy = 1.)
Translating from Nested Quantifiers into English
EXAMPLE 9 Translate the statement
Wa(C(x) Vv 3y(C(y) A F(x. y))
into English, where C(x) is “x has a computer,” F(x, y) is “x and y are friends,” and the domain
for both x and y consists of all students in your school.EXAMPLE 10 Translate the statement
xVyve((F(X, y) A F(X, 2) A (y #2) > TF Q,2))
into English, where F(a,b) means a and b are friends and the domain for x, y, and z consists of
all students in your school.
Translating English Sentences into Logical Expressions
EXAMPLE 11 Express the statement “If a person is female and is a parent, then this person is someone's
mother” as a logical expression involving predicates, quantifiers with a domain consisting of all
people, and logical connectives.
EXAMPLE 12 _ Express the statement “Everyone has exactly one best friend” as a logical expression involving
predicates, quantifiers with a domain consisting of all people, and logical connectives.Solution: The statement “Everyone has exactly one best friend” can be expressed as “For every
person x, person x has exactly one best friend.” Introducing the universal quantifier, we see
that this statement is the same as “Wx(person x has exactly one best friend),” where the domain
consists of all people.
To say that.x has exactly one best friend means that there is a person y who is the best friend
of x, and furthermore, that for every person z, if person z is not person y, then z is not the best
friend of x. When we introduce the predicate B(x, y) to be the statement “y is the best friend
of x,” the statement that x has exactly one best friend can be represented as
3y(BOx, y) AVa((z FY) > B(x, 2))).
Consequently, our original statement can be expressed as
Vxdy(BO, y) AVe(z # y) > ABQ, z))).
[Note that we can write this statement as ¥x3!y B(x, y), where 3! is the “uniqueness quantifier”
defined in Section 1.4.] 4EXAMPLE 13 Use quantifiers to express the statement “There is a woman who has taken a flight on every
airline in the world.”
Negating Nested Quantifiers
EXAMPLE 14 Express the negation of the statement ¥x3y(xy = 1) so that no negation precedes a quantifier.
EXAMPLE 15 Use quantifiers to express the statement that “There does not exist a woman who has taken a
flight on every airline in the world.”DEFINITION 1
FRG rules of inference
An argument in propositional logic is a sequence of propositions. All but the final proposition
in the argument are called premises and the final proposition is called the conclusion. An
argument is valid if the truth of all its premises implies that the conclusion is true.
An argument form in propositional logic is a sequence of compound propositions involv-
ing propositional variables. An argument form is valid no matter which particular proposi-
tions are substituted for the propositional variables in its premises, the conclusion is true if
the premises are all true.Consider the following argument involving propositions (which, by definition, is a sequence of
propositions):
“If you have a current password, then you can log onto the network.”
“You have a current password.”
Therefore,
“You can log onto the network.”Before we discuss the validity of this particular argument, we will look at its form. Use p
to represent “You have a current password” and g to represent “You can log onto the network.”
Then, the argument has the form
pq
Pp
G
where ,", is the symbol that denotes “therefore.”
From the definition of a valid argument form we see that the argument form with premises
Pls P2y «+5 Pn and conclusion q is valid, when (pj A p2 A--- A Pn) > q isa tautology.Rules of Inference for Propositional Logic
3
74
&
EXAMPLE 1 Suppose that the conditional statement “If it snows today, then we will go skiing” and its
hypothesis, “It is snowing today,” are true. Then, by modus ponens, it follows that the conclusion
of the conditional statement, “We will go skiing,” is true. <
EXAMPLE 2 Determine whether the argument given here is valid and determine whether its conclusion must
be true because of the validity of the argument.
‘at E>}, then (vr > (3). We know that V2 > 3. Consequently,
(v2Y =2> Gy =TABLE 1 Rules of Inference.
Rule of Inference | Tautology Name
PAP> D4 Modus ponens
“4 aA a> np ‘Modus tollens
poa
“Sp
prog (PFNAG>nN)> Pon Hypothetical syllogism:
qor
por
pva (vga-n>a Disjunctive syllogism
>P po (eva) Addition
“PYG
PAG (pPag>p Simplification
oP
P (PA (Q)) > (Pag) ‘Conjunction
4
OPA
Pya (PYM ACP YN) > @vr) Resolution
spyr
arEXAMPLE 3 State which rule of inference is the basis of the following argument: “It is below freezing now.
Therefore, it is either below freezing or raining now.”
EXAMPLE 4 State which rule of inference is the basis of the following argument: “It is below freezing and
raining now. Therefore, it is below freezing now.”
EXAMPLE 5 State which rule of inference is used in the argument:
fit rains today, then we will not have a barbecue today. If we do not have a barbecue today,
then we will have a barbecue tomorrow. Therefore, if it rains today, then we will have a
barbecue tomorrow.Using Rules of Inference to Build Arguments
EXAMPLE 6 Show that the premises “It is not sunny this afternoon and it is colder than yesterday.” “We will
go swimming only if itis sunny,” “If we do not go swimming, then we will take a canoe trip,”
and “If we take a canoe trip, then we will be home by sunset” lead to the conclusion “We will
bbe home by sunset.”
EXAMPLE 7 Show that the premises “If you send me an e-mail message, then I will finish writing the
program,” “If you do not send me an e-mail message, then I will go to sleep early,” and “If I go
to sleep early, then I will wake up feeling refreshed” lead to the conclusion “If I do not finish
writing the program, then I will wake up feeling refreshed.”
EXAMPLE 9 Show that the premises (p Aq) Vr and r + s imply the conclusion p Vs.Fallacies
EXAMPLE 10 _ Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics. You learned
discrete mathematics.
‘Therefore, you did every problem in this book.
EXAMPLE 11 Let p and q be as in Example 10. If the conditional statement p — g is true, and =p is true,
is it correct to conclude that —g is true? In other words, is it correct to assume that you did not
Tearn discrete mathematics if you did not do every problem in the book, assuming that if you do
every problem in this book, then you will leam discrete mathematics?Rules of Inference for Quantified Statements
TABLE 2 Rules of Inference for Quantified Statements.
Rule of Inference Name
xP (x) ‘Universal instantiation
*. PO
P(e) for an arbitrary ¢
WP) Universal generalization
BxP(x)
SS _ Existential instantiation
P(O for some element ¢
P(o) for some element ¢
3xPix) Existential generalizationEXAMPLE 12 Show that the premises “Everyone in this discrete mathematics class has taken a course in
‘computer science” and “Marla is a student in this class” imply the conclusion “Marla has taken
a course in computer science.”
EXAMPLE 13. Show that the premises “A student in this class has not read the book,” and “Everyone in this
class passed the first exam" imply the conclusion “Someone who passed the first exam has not
read the book.”Combining Rules of Inference for Propositions
and Quantified Statements
Vx(P(x) > Q(x))
P(a), where a is a particular element in the domain
*. Q(a)
EXAMPLE 14 Assume that “For all positive integers , if n is greater than 4, then n? is less than 2” is true.
Use universal modus ponens to show that 100? < 2!%.
Wx(P(x) > Q@))
=Q(a), where a is a particular element in the domain
.,aP(a)WA introduction to Proofs
Some Terminology atheorem propositions. lemma A corollary
Understanding How Theorems Are Stated
“If.x > y, where x and y are positive real numbers, then x? > y?""
Methods of Proving Theorems
Direct Proofs
A direct proof of 2 conditional statement p > q is constructed when the first step is the
assumption that p is true; subsequent steps are constructed using rules of inference, with the
final step showing that q must also be true.Ina direct proof, we assume that p is true and use axioms,
definitions, and previously proven theorems, together with rules of inference, to show that q mustalsobe true
DEFINITION 1 The integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists,
an integer k such that n = 2k + 1. (Note that every integer is either even or odd, and no
integer is both even and odd.) Two integers have the same parity when both are even or both
are odd; they have opposite parity when one is even and the other is odd.
EXAMPLE 1 Give a direct proof of the theorem “If n is an odd integer, then n? is odd.”
EXAMPLE 2 Give a direct proof that if m and n are both perfect squares, then nm is also a perfect square.
(An integer a is a perfect square if there is an integer b such that a = b*.)Proof by Contraposition
Direct proofs lead from the premises of a theorem to the conclusion, They begin with the
premises, continue with a sequence of deductions, and end with the conclusion. However, we
will see that attempts at direct proofs often reach dead ends. We need other methods of proving
theorems of the form ¥x(P(x) > Q(x). Proofs of theorems of this type that are not direct
proofs, that is, that do not start with the premises and end with the conclusion, are called
indirect proofs.
‘An extremely useful type of indirect proof is known as proof by contraposition. Proofs
by contraposition make use of the fact that the conditional statement p — q is equivalent to its
contrapositive, -g — —p. This means that the conditional statement p + g can be proved by
showing that its contrapositive, +g > —p, is true.
EXAMPLE 3 Prove that ifn is an integer and 3n + 2is odd, then n is odd.
EXAMPLE 4 Prove that ifm = ab, where a and b are positive integers, then a < /7 orb <VACUOUS AND TRIVIAL PROOFS We can quickly prove that a conditional statement
p> ¢ is true when we know that p is false, because p > q must be true when p is false.
Consequently, if we can show that p is false, then we have a proof, called a vacuous proof, of
the conditional statement p — g. Vacuous proof’ are often used to establish special cases of
theorems that state that a conditional statement is true for all positive integers [ie., a theorem
of the kind Yr P(n), where P(n) is a propositional function]. Proof techniques for theorems of
this kind will be discussed in Section 5.1.
EXAMPLE 5 Show that the proposition P (0) is true, where P(r) is “Ifm > 1, then n? > n” and the domain
consists of all integers.We can also quickly prove a conditional statement p — q if we know that the conelusion
q is true. By showing that q is true, it follows that p > q must also be true. A proof of p > q
that uses the fact that g is true is called a trivial proof. Trivial proofs are often important when
special cases of theorems are proved (see the discussion of proof by cases in Section 1.8) and
in mathematical induction, which is a proof technique discussed in Section 5.1.
EXAMPLE 6 Let P(m) be “If a and 6 are positive integers with a > b, then a” > b";’ where the domain
consists of all nonnegative integers. Show that P(0) is true.ALITTLE PROOF STRATEGY We have described two important approaches for proving
theorems of the form ¥x(P(x) > Q(x)): direct proof and proof by contraposition. We have
also given examples that show how each is used. However, when you are presented with a
theorem of the form ¥x(P(x) + Q(x), which method should you use to attempt to prove it?
‘We will provide a few rules of thumb here; in Section 1.8 we will discuss proof strategy at greater
length. When you want to prove a statement of the form ¥x(P(x) > Q(x), first evaluate
whether a direct proof looks promising. Begin by expanding the definitions in the hypotheses.
Start to reason using these hypotheses, together with axioms and available theorems. If'a direct
proof does not seem to go anywhere, try the same thing with a proof by contraposition. Recall
that in a proof by contraposition you assume that the conclusion of the conditional statement is
false and use a direct proof to show this implies that the hypothesis must be false. We illustrate
this strategy in Examples 7 and 8. Before we present our next example, we need a definition.
DEFINITION 2 The real number r is rational if there exist integers p and q with q # 0 such that r = p/q.
A real number that is not rational is called irrational.EXAMPLE 7 Prove that the sum of two rational numbers is rational. (Note that if we include the implicit
quantifiers here, the theorem we want to prove is “For every real number r and every real
number s, if r and s are rational numbers, then r + s is rational.)
EXAMPLE 8 Prove that if n is an integer and n? is odd, then n is odd.
Proofs by Contradiction
Suppose we want to prove that a statement p is true. Furthermore, suppose that we can find
a contradiction g such that =p + q is true. Because g is false, but =p + q is true, we can
conclude that sp is false, which means that p is true. How can we find a contradiction g that
might help us prove that p is true in this way?
Because the statement r A —r is a contradiction whenever r is a proposition, we can prove
that p is true if we can show that sp — (r A —r) is true for some proposition r. Proofs of this
type are called proofs by contradiction. Because a proof by contradiction does not prove a result
directly, itis another type of indirect proof. We provide three examples of proof by contradiction,
The first is an example of an application of the pigeonhole principle, a combinatorial technique
that we will cover in depth in Section 6.2.EXAMPLE 10 Prove that 7s irrational by giving a proof by contradiction,
EXAMPLE 11 Give a proof by contradiction of the theorem “If 3n + 2 is odd, then n is odd.”
PROOFS OF EQUIVALENCE To prove a theorem that is a biconditional statement, that is,
a statement of the form p < q, we show that p > g and g — p are both true, The validity of
this approach is based on the tautology
PeODe (Pr QOAG> Pp).
EXAMPLE 12 _ Prove the theorem “Tf 7 is an integer, then 7 is odd if and only ifn? is odd.”Sometimes a theorem states that several propositions are equivalent. Such a theorem states
that propositions >), p2, p3, Pn are equivalent. This can be written as
PL P20 SF Pr
which states that all n propositions have the same truth values, and consequently, that for all i
and j with | P2) A(P2 > 3) A A (Pn > PI).
This shows that if then conditional statements pj > p2,p2 > p3.--.. Px > pi canbe shown
to be true, then the propositions py, p2.-... pn are all equivalent.EXAMPLE 13 Show that these statements about the integer n are equivalent:
nis even.
n— Lis odd.
n? is even.
COUNTEREXAMPLES In Section 1.4 we stated that to show that a statement of the form
Vx P(x) is false, we need only find a counterexample, that is, an example x for which P(x)
is false. When presented with a statement of the form ¥x P(x), which we believe to be false or
which has resisted all proof attempts, we look for a counterexample. We illustrate the use of
counterexamples in Example 14.
EXAMPLE 14 Show that the statement “Every positive integer is the sum of the squares of two integers” is
false.Mistakes in Proofs
EXAMPLE 15 What is wrong with this famous supposed “proof” that | = 2?
“Proofs” We use these steps, where a and b are two equal positive integers.
Step
a=b
2. a =ab
@-P=ab-P
. (a —b)(a + b) = bla —b)
|. at+b=b
2b=b
2=
Reason
Given
Multiply both sides of (1) by a
Subtract b? from both sides of (2)
Factor both sides of (3)
Divide both sides of (4) by a —b
Replace @ by b in (5) because a = b
and simplify
Divide both sides of (6) by bEXAMPLE 16 What is wrong with this “proof?”
“Theorem:” If n? is positive, then n is positive.
“Proof” Suppose that n? is positive. Because the conditional statement “If » is positive, then
n” is positive” is true, we can conclude that n is positive.
EXAMPLE 17 What is wrong with this “proof?”
“Theorem:” If n is not positive, then n? is not positive. (This is the contrapositive of the
“theorem” in Example 16.)
“Proof:” Suppose that n is not positive. Because the conditional statement “If n is positive, then
n? is positive” is true, we can conclude that n? is not positive.
EXAMPLE 18 Is the following argument correct? It supposedly shows that » is an even integer whenever
an even integer.
Suppose that n? is even. Then n? = 2k for some integer k. Let n = 2/ for some integer !.
This shows that n is even.