Free Powerpoint Templates
Page 2
Introduction
Logic that deals with propositions is
incapable of describing most of the
statements in mathematics and
computer science.
Recall that a proposition is a
statement that is either true or false,
thus, the statement:
p: n is an odd integer.
is not a proposition because whether
p is true or false depends on the
value of n. If n = 103, p is true and
false if n = 8.
Free Powerpoint Templates
Page 3
Introduction
Most of the statements in
mathematics and computer
science use variables. Thus,
we must extend the system
of logic to include such
mathematical statements.
Free Powerpoint Templates
Page 4
Domain of Discourse
Definition:
Let P(x) be a statement
involving the variable x and let
D be a set. We call P a
propositional function (with
respect to D) if for each x in D,
P(x) is a proposition. We call D
the domain of discourse of P.
Free Powerpoint Templates
Page 5
Let P(n) be the statement
n is an odd integer
and let D be the set of positive
integers.
– P is a propositional function with
domain of discourse D since for
each n in D, P(n) is a
proposition, that is, for each n in
D, P(n) is true or false but not
both.
Domain of Discourse : Example
Free Powerpoint Templates
Page 6
– If n = 1, P(1) is true, that is,
1 is an odd integer
– If n = 2, P(2) is false, that is,
2 is an odd integer
is false.
Domain of Discourse : Example
Free Powerpoint Templates
Page 7
Propositional Function
By itself, it is neither true nor false.
However, for each x in its domain
of discourse, P(x) is a proposition
and is, therefore, either true or
false.
We can think of a propositional
function as defining a class of
propositions, one for each element
of its domain of discourse.
Free Powerpoint Templates
Page 8
Propositional Function
If for example, P is a
propositional function with
domain of discourse equal to
the set of positive integers, we
obtain the class of propositions
P(1), P(2), . . . .
in which each of P(1), P(2), . . .
is either true or false.
Free Powerpoint Templates
Page 9
Examples of Propositional Function
• n2 + 2n is an odd integer
- D = set of positive integers
• x2 - x - 6 = 0
- D = set of real numbers
Free Powerpoint Templates
Page 10
Examples of Propositional Function
• The student gets a GPA of 2.0 or
better during the second semester
of SY 2002- 2003
- D = set of students
• The actress has won a FAMAS
award.
- D = set of actresses
Free Powerpoint Templates
Page 11
Universal and Existential
Quantifiers
Most of the statements in mathematics
and computer science use terms such
as "for every" and "for some." For
example in mathematics we have the
statements:
–For every triangle T, the sum of the
angles of T is equal to 180°.
–For some triangle S, the sum of two
angles is less than 90o.
Free Powerpoint Templates
Page 12
Universal Quantifiers
Definition:
Let P be a propositional function with
domain of discourse D. The statement
for every x, P(x)
is said to be a universally quantified
statement. The symbol means "for
every." Thus the statement for every x,
P(x) may be written
x, P(x).
Free Powerpoint Templates
Page 13
Universal Quantifiers
The symbol is called a universal
quantifier. The statement for every
x, P(x) is true if P(x) is true for
every x in D. The statement for
every x, P(x) is false if P(x) is false
for at least one x in D.
Free Powerpoint Templates
Page 14
Existential Quantifiers
Definition:
The statement
for some x, P(x)
is said to be an existentially
quantified statement. The symbol
means "for some." Thus the statement
for some x, P(x) may be written
x, P(x).
Free Powerpoint Templates
Page 15
Existential Quantifiers
The symbol is called an
existential quantifier. The
statement for some x, P(x) is
true if P(x) is true for at least
one x in D. The statement for
some x, P(x) is false if P(x) is
false for every x in D.
Free Powerpoint Templates
Page 16
Remarks on definition of
Quantifiers
Free or Bound Variable
– We call the variable x in the
propositional function P(x) a free
variable.
– The idea is that x is "free" to roam over
the domain of discourse.
– We call the variable x in the universally
quantified statement
x, P(x)
or in the existentially quantified
statement
x, P(x)
a bound variable.
Free Powerpoint Templates
Page 17
Remarks on definition of
Quantifiers
– The idea is that x is "bound" by the
quantifier or .
– We previously pointed out that a
propositional function does not have a
truth value. On the other hand,
quantified statements have
corresponding truth values.
– In general, a statement with free
(unquantified) variables is not a
proposition and a statement with no
free variables (no unquantified
variables) is a proposition.
Free Powerpoint Templates
Page 18
The symbol may be read "for every,"
"for all," or "for any."
The symbol may be read "for some,"
"for at least one," or "there exists."
Sometimes, to specify the domain of
discourse D, we write a universally
quantified statement as
for every x in D, P(x)
and we write an existentially quantified
statement as
for some x in D, P(x).
Remarks on definition of
Quantifiers
Free Powerpoint Templates
Page 19
The universally quantified statement
for every x, P(x)
is false if for at least one x in the
domain of discourse, the proposition
P(x) is false. A value x in the domain
of discourse that makes P(x) false is
called a counterexample to the
statement
for every x, P(x).
Remarks on definition of
Quantifiers
Free Powerpoint Templates
Page 20
Quantifiers : Example1
The statement for every real
number x, x2 0 is a universally
quantified statement. The domain
of discourse is the set of real
numbers. The statement is true
because, for every real number
x, it is true that the square of x is
positive or zero.
Free Powerpoint Templates
Page 21
Proof:
We must verify that the statement
if x > 1, then x + 1 > 1 is true for every
real number x.
Let x be any real number whatsoever.
It is true that for any real number x, either
x 1 or x > 1.
Prove that the universally quantified statement
for every real number x, if x > 1,
then x + 1 > 1
is true.
Quantifiers : Example2
Free Powerpoint Templates
Page 22
Case1: x 1
The conditional proposition
If x > 1, then x + 1 > 1 is true
because the hypothesis x > 1
is false. (Recall that when the
hypothesis is false, the
conditional proposition is true
regardless of whether the
conclusion is true or false.)
Quantifiers : Example2
Free Powerpoint Templates
Page 23
Case 2: x > 1
x > 1 → x + 1 > 1 + 1 > 1 (API)
→ x + 1 > 1 (transitivity of >)
hence the conditional proposition
if x > 1, then x + 1 > 1 is true.
Quantifiers : Example 2
Free Powerpoint Templates
Page 24
Thus, we have shown that for every
real number x, the proposition
if x > 1, then x + 1 > 1
is true. Therefore the universally
quantified statement for every real
number x, if x > 1, then x + 1 > 1 is
true.
Quantifiers : Example 2
Free Powerpoint Templates
Page 25
The universally quantified
statement for every real number x,
x2 - 1 > 0 is false since, if x = 1,
the proposition 12 - 1 > 0 is false.
The value 1 is a counterexample
to the statement for every real
number x, x2 - 1 > 0.
Quantifiers : Example 3
Free Powerpoint Templates
Page 26
Note:
To show that the universally quantified
statement
for every x, P(x}
is false, it is sufficient to find one
value x in the domain of discourse for
which the proposition P(x} is false,
that is, it is sufficient to give a
counterexample.
Quantifiers : Example 3
Free Powerpoint Templates
Page 27
The method of disproving the statement
for every x, P(x}
is quite different from the method used to
prove that the statement is true. To prove
that
for every x, P(x}
is true, we must, in effect, examine every
value of x in the domain of discourse and
show that for every x, P(x} is true.
Quantifiers : Example 3
Free Powerpoint Templates
Page 28
The universally quantified statement
for every positive integer n,
if n is even, then n2 + n + 19 is prime
is false.
Quantifiers : Example 4
Free Powerpoint Templates
Page 29
A counterexample is obtained by
taking n = 38. The conditional
proposition if 38 is even, then 382 +
38 + 19 is prime is false because the
hypothesis 38 is even is true, but the
conclusion 382 + 38 + 19 is prime is
false. 382 + 38 + 19 is not prime
since it can be factored:
382 + 38 + 19 = 38 38 + 38 + 19
= 19(2 38 + 2 + 1) = 19 79.
Quantifiers : Example 4
Free Powerpoint Templates
Page 30
The existentially quantified statement
is true because it is possible to find at
least one real number x for which the
proposition
is true.
5
2
1
, 2
x
x
x
number
real
some
for
5
2
1
2
x
x
Quantifiers : Example 5
Free Powerpoint Templates
Page 31
For example, if x = 2, we obtain the
true proposition
It is not the case that every value of
x results in a true proposition. For
example, the proposition
is false.
5
2
1
2
2
2
5
2
1
1
1
2
Quantifiers : Example 5
Free Powerpoint Templates
Page 32
• The existentially quantified statement
for some positive integer n, if n is
prime, then n + 1, n + 2, n + 3, and
n + 4 are not prime.
is true because we can find at least one
integer n that makes this conditional
proposition true.
• For example, if n = 23, we obtain the
true proposition
if 23 is prime, then 24, 25, 26, and
27 are not prime.
Quantifiers : Example 6
Free Powerpoint Templates
Page 33
This conditional proposition is
true because both the hypothesis
“23 is prime" and the conclusion
"24, 25, 26, and 27 are not prime"
are true.
Quantifiers : Example 6
Free Powerpoint Templates
Page 34
Some values of n make the conditional
proposition
for some positive integer n, if n is
prime, then n + 1, n + 2, n + 3, and n + 4
are not prime
true (e.g., n = 23, n = 47), while others
make it false (e.g., n = 2, n = 101).
Quantifiers : Example 6
Free Powerpoint Templates
Page 35
The point is that we found one
value that makes the proposition
for some positive integer n, if n is
prime, then n + 1, n + 2, n + 3, and
n + 4 are not prime
true which makes the given
existentially quantified statement
true.
Quantifiers : Example 6
Free Powerpoint Templates
Page 36
Generalized De Morgan
Laws for Logic
Theorem:
If P is a propositional function, each
pair of propositions in (a) and (b)
has the same truth values (i.e.,
either both are true or both are
false).
)
(
,
);
(
,
)
( x
P
x
x
P
x
a
)
(
,
);
(
,
)
( x
P
x
x
P
x
b
Free Powerpoint Templates
Page 37
Generalized De Morgan
Laws for Logic
Proof of (a):
- Suppose that the proposition
is true.
- Then the proposition x, P(x) is false.
- By Definition above, the proposition
x, P(x) is false precisely when P(x) is
false for at least one x in the domain of
discourse.
)
(
, x
P
x
Free Powerpoint Templates
Page 38
Generalized De Morgan
Laws for Logic
Proof of (a):
- But if P(x) is false for at least one x in the
domain of discourse, is true for at least
one x in the domain of discourse.
- Again by definition of quantifiers, when
is true for at least one x in the domain of
discourse, the proposition x, is true. ---
Thus if the proposition is true, the
proposition x, is true.
)
(x
P
)
(x
P
)
(x
P
)
(
, x
P
x
)
(x
P
Free Powerpoint Templates
Page 39
Generalized De Morgan
Laws for Logic : Example 7
Verify that the existentially quantified statement
is false.
Solution.
We must show that is false for every real
number x. Now is false precisely when
is true. Thus, we must show that
is true for every real number x.
1
1
1
2
x
1
1
1
,
. 2
x
x
no
real
some
for
1
1
1
2
x
1
1
1
2
x
1
1
1
2
x
Free Powerpoint Templates
Page 40
Let x be any real number whatsoever.
Since 0 x2, we may add 1 to both
sides of this inequality to obtain 1 x2
+ 1. If we divide both sides of this last
inequality by x2 + 1, we obtain
1
1
1
2
x
Generalized De Morgan Laws
for Logic : Example 7
Free Powerpoint Templates
Page 41
Therefore the statement is true
for every real number x.
Thus is false for every real
number x. We have shown that the
existentially quantified statement
is false.
1
1
1
2
x
1
1
1
2
x
1
1
1
,
. 2
x
x
no
real
some
for
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 42
The example just given illustrates the use
of the Generalized de Morgan’s Law for
Logic.
In the example, it was shown that an
existentially quantified statement
for some real number x, P(x)
can be proven false by proving that a
related universally quantified statement
for every real number x, ~P(x)
is true.
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 43
A universally quantified proposition
generalizes the compound proposition
P1 P2 . . . Pn (1)
in the sense that the individual propositions
P1 , P2 , . . . , Pn
are replaced by an arbitrary family P(x),
where x is a member of the domain of
discourse, and (1) is replaced by
for every x, P(x) (2)
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 44
The proposition (1) is true if and only
if Pi is true for every i = 1, . . . , n.
The truth value of proposition (2) is
defined similarly, that is (2) is true if
and only if P(x) is true for every x in
the domain of discourse.
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 45
Similarly, an existentially quantified
proposition generalizes the compound
proposition
P1 P2 . . . Pn (3)
in the sense that the individual propositions
P1 P2 . . . Pn
are replaced by an arbitrary family P(x),
where x is a member of the domain of
discourse, and (3) is replaced by
for some x, P(x).
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 46
The preceding observations explain how the
above theorem generalizes De Morgan's laws for
logic (Law 2.5). Recall that the first De Morgan
law for logic states that the propositions
and
have the same truth values.
In the above theorem part (b),
is replaced by
and is replaced by
n
P
P
P
...
2
1
n
P
P
P
...
2
1
n
P
P
P
...
2
1 )
(
, x
P
x
n
P
P
P
...
2
1 .
)
(
, x
P
x
Generalized De Morgan
Laws for Logic : Example 7
Free Powerpoint Templates
Page 47
Statements in words often have more
than one possible interpretation.
Consider the well-known quotation
from Shakespeare
All that glitters is not gold.
One possible interpretation of this
quotation is:
Nothing that glitters is gold
(i.e., a gold object never glitters).
GDML : Example 8
Free Powerpoint Templates
Page 48
However, this is surely not what
Shakespeare intended.
The correct interpretation is:
Not all that glitters is gold or
Something that glitters is not gold.
GDML : Example 8
Free Powerpoint Templates
Page 49
If we let P(x) be the propositional
function "x glitters" and Q(x) be the
propositional function "x is gold,"
the first interpretation becomes
for all x,
and the second interpretation
becomes
for all x, )
(
)
( x
Q
x
P
)
(
)
( x
Q
x
P
GDML : Example 8
Free Powerpoint Templates
Page 50
From Chapter 2 [Law 2.4], we have
seen that
p q ~p q ~(p q) ~(~p q)
~(p q) p ~q.
Hence, the truth values of the
propositional function
for some x, and
for some x, are the
same.
)
(
)
( x
Q
x
P
)
(x
Q
x
P
GDML : Example 8
Free Powerpoint Templates
Page 51
Using the Generalized De Morgan
Laws for Logic, the truth values of
for some x, and
are the
same.
Thus an equivalent way to represent
the second interpretation is
.
)
(x
Q
x
P
)
(
)
(
, x
Q
x
P
x
all
for
)
(
)
(
, x
Q
x
P
x
all
for
GDML : Example 8
Free Powerpoint Templates
Page 52
Comparing the symbolic
representations of the two
interpretations, we see that the
ambiguity results from whether
the negation applies to Q(x) (the
first interpretation) or to the entire
statement
for all x, P(x) → Q(x)
(the second interpretation).
GDML : Example 8
Free Powerpoint Templates
Page 53
A Generalization
For positive statements, the words
"any," "all," "each," and "every"
have the same meaning.
Free Powerpoint Templates
Page 54
A Generalization
In negative statements, the situation changes.
The statements
Not all C1 is C2
Not each C1 is C2
Not every C1 is C2
are considered to have the same meaning as
Some C1 is not C2.
whereas Not any C1 is C2
means No C1 is C2 .
Free Powerpoint Templates
Page 55
Suppose that the domain of discourse
is the set of real numbers.
Consider the statement
for every x, for some y, x + y = 0.
The meaning of this statement is that
for any x whatsoever, there is at least
one y, which may depend on the choice
of x, such that x + y = 0.
We can show that the statement
for every x, for some y, x + y = 0
is true.
GDML : Example 9
Free Powerpoint Templates
Page 56
For any x, we can find at least one y,
namely y = - x, such that x + y = 0 is true.
Suppose that we revise the above
statement to read
for some y, for every x, x + y = 0.
If this statement is true, then it is possible
to select some value of y such that the
statement
for every x, x + y = 0
is true.
GDML : Example 9
Free Powerpoint Templates
Page 57
However, we can disprove this last
statement with a counterexample.
For example, we might take x = 1 – y.
We then obtain the false statement
1 – y + y = 0.
Therefore the statement
for some y, for every x, x + y = 0
is false.
GDML : Example 9
Free Powerpoint Templates
Page 58
Let P(x, y) be the statement
if x2 < y2, then x < y.
This statement has its domain of discourse
the set of real numbers.
Now, the statement
for every x, for every y, P(x, y)
is false.
A counterexample is x = 1, y = -2. In this
case, we obtain the false proposition
if 12 < (-2) 2, then 1 < -2.
GDML : Example 10
Free Powerpoint Templates
Page 59
The statement
for every x, for some y, P(x, y)
is true.
To prove this, we need to show that for
every x, the proposition
for some y, if x2 < y2, then x < y
is true by exhibiting a value of y for
which
if x2 < y2, then x < y is true.
GDML : Example 10
Free Powerpoint Templates
Page 60
Indeed, if we set y = 0, we obtain
the true proposition
if x2 < 0, then x < 0.
The conditional proposition is
true, because the hypothesis
x2 < 0 is false.
GDML : Example 10
Free Powerpoint Templates
Page 61
The statement
for every y, for some x, P(x, y)
is true.
To justify this, we show that for
every y, the proposition
for some x, if x2 < y2, then x < y
is true by exhibiting a value of x for
which
if x2 < y2, then x < y is true.
GDML : Example 10
Free Powerpoint Templates
Page 62
Indeed, if we set x = |y| + 1, we
obtain the true proposition
if (|y| + 1)2 < y2, then |y| + 1 < y.
The conditional proposition is true,
because the hypothesis is false.
GDML : Example 10
Free Powerpoint Templates
Page 63
Rule 1: Proving / Disproving
quantified statements
To prove that the universally
quantified statement
for every x, P(x)
is true, show that for every x in the
domain of discourse, the proposition
P(x) is true.
Showing that P(x) is true for a
particular value x does not prove that
for every x, P(x)
is true.
Free Powerpoint Templates
Page 64
To prove that the existentially
quantified statement
for some x, P(x)
is true, find one value of x in the
domain of discourse for which P(x)
is true.
One value suffices.
Rule 2: Proving / Disproving
quantified statements
Free Powerpoint Templates
Page 65
Rule 3 : Proving/Disproving
quantified statements
To prove that the universally
quantified statement
for every x, P(x)
is false, find one value of x (a
counterexample) in the
domain of discourse for which
P(x) is false.
Free Powerpoint Templates
Page 66
Rule 4: Proving/Disproving
quantified statements
To prove that the existentially quantified
statement
for some x, P(x)
is false, show that for every x in the domain
of discourse, the proposition P(x) is false.
Showing that P(x) is false for a particular
value of x does not prove that
for some x, P(x)
is false.
Free Powerpoint Templates
Page 69
Mathematical System
A mathematical system consists of
axioms, definitions, and undefined terms.
Axioms are assumed true.
Definitions are used to create new
concepts in terms of existing ones .
Theorem is a proposition that has been
proved to be true. Special kinds of
theorems are referred to as lemmas and
corollaries.
Free Powerpoint Templates
Page 70
Special kinds of theorems are
referred to as lemmas and
corollaries.
-- A lemma is a theorem that is
usually not too interesting in its own
right but is useful in proving another
theorem.
-- A corollary is a theorem that
follows quickly from another theorem.
Proof is an argument that establishes
the truth of a theorem.
Mathematical System
Free Powerpoint Templates
Page 71
Example 1
Euclidean geometry is an example of
a mathematical system. Among the
axioms are:
1. Given two distinct points, there is
exactly one line that contains them.
2. Given a line and a point not on the
line, there is exactly one line parallel
to the line through the point.
Free Powerpoint Templates
Page 72
The terms point and line are
undefined terms that are
implicitly defined by the
axioms that describe their
properties.
Example 1
Free Powerpoint Templates
Page 73
Among the definitions in this
system are:
Two triangles are congruent if
their vertices can be paired so
that the corresponding sides and
corresponding angles are equal.
Two angles are supplementary if
the sum of their measures is
180°.
Free Powerpoint Templates
Page 74
• If two sides of a triangle are
equal, then the angles opposite
them are equal.
• If the diagonals of a quadrilateral
bisect each other, then the
quadrilateral is a parallelogram.
Examples of theorems in this
system are:
Free Powerpoint Templates
Page 75
An example of a corollary in
Euclidean geometry is
If a triangle is equilateral, then it is
equiangular.
-- This corollary follows immediately
from the first theorem given above
for this example.
Free Powerpoint Templates
Page 77
Direct Proof
Theorems are often of the form
For all x1, x2, . . . , xn, if p(x1, x2, . . . ,xn),
then q(x1, x2, . . . , xn).
This universally quantified statement
is true provided that the conditional
proposition
if p(x1, x2, . . . , xn),
then q(x1, x2, . . ., xn) (*)
Free Powerpoint Templates
Page 78
is true for all x1, x2, . . . , xn in the
domain of discourse. To prove (*),
we assume that x1, x2, . . . , xn are
arbitrary members of the domain of
discourse. If p(x1, x2, . . . , xn) is
false, by definition of the truth
value for implication, (*) is true.
Thus, we need only consider the
case that p(x1, x2, . . . , xn) is true.
Direct Proof
Free Powerpoint Templates
Page 79
A direct proof assumes that
p(x1, x2, . . . , xn) is true and then,
using p(x1, x2, . . . , xn) as well as
other axioms, definitions, and
previously derived theorems,
shows directly that q(x1, x2, . . . ,
xn) is true.
Direct Proof
Free Powerpoint Templates
Page 80
Example
For all real numbers d, d1, d2, and x,
prove that
If d = min {d1, d2} and x d, then x d1
and x d2 .
Proof.
Assume that d, d1, d2, and x are
arbitrary real numbers. Then it suffices
to assume that
d = min { d1, d2} and x d
is true and then show that
x d1 and x d2
is also true.
Free Powerpoint Templates
Page 81
From the definition of min, it
follows that d d1 and d d2.
From x d and d d1, we may
derive x d1 from a theorem on
real numbers (Transitive Property
of Inequality). From x d and d
d2, we may derive x d2 for the
same reason. Therefore, x d1
and x d2.
Example
Free Powerpoint Templates
Page 83
Proof by contradiction
A proof by contradiction establishes
the proposition
if p(x1, x2, . . . , xn),
then q(x1, x2, . . . , xn) (*)
by assuming that the hypothesis p is
true and that the conclusion q is
false and then, using p and as well
as other axioms, definitions, and
previously derived theorems, derives
a contradiction.
Free Powerpoint Templates
Page 84
Contradiction
A contradiction is a proposition of
the form r Λ ~ r (r may be any
proposition whatever).
A proof by contradiction is
sometimes called an indirect proof
since to establish (*) using proof by
contradiction, one follows an indirect
route: derive r , then conclude that
(*) is true.
r
Free Powerpoint Templates
Page 85
The only difference between the
assumptions in a direct proof and
a proof by contradiction is the
negated conclusion.
In a direct proof the negated
conclusion is not assumed,
whereas in a proof by
contradiction the negated
conclusion is assumed.
Contradiction
Free Powerpoint Templates
Page 86
Proof by contradiction may be justified
by noting that the propositions
and
are equivalent. The equivalence is
immediate from the following truth table.
q
p
r
r
q
p
Contradiction
Free Powerpoint Templates
Page 87
p q r p ~ q r ~ r
T T T T F F T
T T F T F F T
T F T F T F F
T F F F T F F
F T T T F F T
F T F T F F T
F F T T F F T
F F F T F F T
q
p r
r
q
p
Contradiction
Free Powerpoint Templates
Page 88
Example
Prove, by contradiction, the following
statement:
For all real numbers x and y, if x + y 2,
then either x 1 or y 1.
Proof.
Suppose that the conclusion is false. Then, x
< 1 and y < 1. (Remember that negating an or
results in an and (De Morgan’s laws for logic).
From the properties of inequality in Algebra,
we may add these inequalities to obtain
x + y < 2.
Free Powerpoint Templates
Page 89
At this point, we have derived the
contradiction p , where
p: x + y 2.
Thus we conclude that the
statement is true.
Suppose that we give a proof by
contradiction of (*) in which, as in the
above example, we deduce . In effect, we
have proved.
(1.4.2)
This special case of proof by contradiction
is called proof by contrapositive.
p
q
Example
Free Powerpoint Templates
Page 91
Deductive Reasoning
In constructing a proof, we must
be sure that the arguments used
are valid. In this section we make
precise the concept of a valid
argument and explore this concept
in some detail.
Free Powerpoint Templates
Page 92
Deductive Reasoning
Consider the following sequence of propositions.
The bug is either in module 17 or in module 81.
The bug is a numerical error.
Module 81 has no numerical error. (1)
Assuming these statements are true, it is
reasonable to conclude:
The bug is in module 17. (2)
Free Powerpoint Templates
Page 93
This process of drawing a conclusion from
a sequence of proposition is called
deductive reasoning.
The given propositions, such as (1), are
called hypotheses or premises.
The proposition that follows from the
hypotheses, like (2), is called the
conclusion.
A (deductive) argument consists of
hypotheses together with a conclusion.
Many proofs in mathematics and computer
science are deductive arguments.
Deductive Reasoning
Free Powerpoint Templates
Page 94
Any argument has the form
If p1 and p2 and . . . and pn, then q. (3)
Argument (3) is said to be valid if the
conclusion follows from the hypotheses:
that is, if p1 and p2 and . . . and pn are
true, then q must also be true. This
discussion motivates the following
definition.
Deductive Reasoning
Free Powerpoint Templates
Page 95
An argument is a sequence of
propositions written
p1
p2
:
pn or
p1 and p2 , . . . , pn / q
Deductive Reasoning
Free Powerpoint Templates
Page 96
The propositions p1 and p2 , . . . ,
pn are called the hypotheses (or
premises) and the proposition q is
called the conclusion.
The argument is valid provided
that if p1 and p2 and p3. . . and pn
are all true, then q must also be
true; otherwise, the argument is
invalid (or a fallacy).
Deductive Reasoning
Free Powerpoint Templates
Page 97
In a valid argument, we sometimes
say that the conclusion follows from
the hypotheses. Notice that we are
not saying that the conclusion is
true; we are only saying that if you
grant the hypotheses, you must
also grant the conclusion. An
argument is valid because of its
form, not because of its content.
Deductive Reasoning
Free Powerpoint Templates
Page 99
Example 1
[First solution.] We construct a truth table
for all the propositions involved:
p q p q
T T T T T
T F F T F
F T T F T
F F T F F
q
p
Free Powerpoint Templates
Page 100
We observe that whenever the
hypotheses p q and p are true, the
conclusion q is also true; therefore, the
argument is valid.
[Second solution.] We can avoid writing
the truth table by directly verifying that
whenever the hypotheses are true, the
conclusion is also true.
Suppose that p q and p are true. Then q
must be true, for otherwise p q would be
false. Therefore, the argument is valid.
Example 1
Free Powerpoint Templates
Page 101
Example 2
Represent the argument
If 2 = 3, then I ate my hat.
I ate my hat.
2 = 3
symbolically and determine whether the
argument is valid.
Free Powerpoint Templates
Page 102
Solution.
If we let
p: 2 =3, q: I ate my hat.
the argument may be written
q
p
q
p
Example 2
Free Powerpoint Templates
Page 103
If the argument is valid, then
whenever and q are both
true, p must also be true. Suppose
that and q are true. This is
possible if p is false and q is true. In
this case, p is not true; thus the
argument is invalid.
q
p
q
p
Example 2
Free Powerpoint Templates
Page 104
We can also determine the
validity of the argument in this
example by examining the truth
table of Example 1. In the third
row of the table, the hypotheses
are true and the conclusion is
false; thus the argument is
invalid.
Example 2
Free Powerpoint Templates
Page 105
If arguments contain more than
two or three different simple
statement as components, it is
cumbersome and tedious to use
truth tables to test their validity. A
more convenient method of
establishing the validity of some
arguments is to construct a formal
proof of validity.
Example 2
Free Powerpoint Templates
Page 106
Formal proof of validity
A formal proof of validity for a given
argument is defined to be a sequence
of statements, each of which is either a
premise of that argument or follows
from preceding statements by an
elementary valid argument, and such
that the last statement in the sequence
is the conclusion of the argument
whose validity is being proved. This
definition must be completed and made
definite by specifying what is to count
as an elementary valid argument.
Free Powerpoint Templates
Page 107
Elementary valid argument
An elementary valid argument
is any argument that is a
substitution instance of an
elementary valid argument
form.
Free Powerpoint Templates
Page 108
Rules of Inference
The following list of argument forms
are regarded as elementary valid
argument forms and are considered
as the Rules of Inference.
1. Modus Ponens (M.P.) q
p
p
q
Free Powerpoint Templates
Page 109
2. Modus Tollens
(M.T.)
q
p
q
~
p
~
3. Hypothetical
Syllogism (H.S.)
q
p
r
q
r
p
Rules of Inference
Free Powerpoint Templates
Page 110
4. Disjunctive
Syllogism (D.S.)
q
p
p
~
q
5. Conditional Proof
r
Rules of Inference
q
p
r
q
p
Free Powerpoint Templates
Page 111
6. Proof by Cases
Rules of Inference
r
p
r
q
r
q
p
7. Destructive Dilemma (D.D.)
)
(
)
( s
r
q
p
s
q ~
~
r
p ~
~
Free Powerpoint Templates
Page 112
9. Simplification (Simp.)
q
p
p
Rules of Inference
8. Constructive Dilemma (C.D.)
)
(
)
( s
r
q
p
r
p
s
q
Free Powerpoint Templates
Page 114
These eleven Rules of Inference are
elementary valid argument forms,
whose validity is easily established by
truth tables. They can be used to
construct formal proofs of validity for a
wide range of more complicated
arguments. The names listed are
standard for the most part, and the use
of their abbreviations permits formal
proofs to be set down with a minimum of
writing.
Rules of Inference
Free Powerpoint Templates
Page 115
Example 3
Establish the validity of the following
arguments:
Either the Attorney General has imposed
a strict censorship or if Black mailed
the letter then Davis received a warning.
If our lines of communication have not
broken down completely, then if Davis
received a warning then Emory was
informed about the matter.
Free Powerpoint Templates
Page 116
If the Attorney General has imposed
a strict censorship, then our lines of
communication have broken
down completely.
Our lines of communication have not
broken down completely.
Therefore, if Black mailed the letter,
then Emory was informed about
the matter.
Example 3
Free Powerpoint Templates
Page 117
Example 3
Solution:
Symbolically, the above arguments may
be written as:
C
~
)
(
~ E
D
C
C
A
)
( D
B
A
E
B
Free Powerpoint Templates
Page 118
Example 3
where
A: Attorney General imposes a strict
censorship.
B: Black mails the letter.
C: Our lines of communication
breaks down completely.
D: Davis receives a warning.
E: Emory was informed about the
matter.
Free Powerpoint Templates
Page 119
To establish the validity of this
argument by means of a truth table
would require a table with thirty-two
rows. We can prove the given
argument valid, however, by
deducing its conclusion from its
premises by a sequence of just four
arguments whose validity has
already been established.
Example 3
Free Powerpoint Templates
Page 120
o From the third and fourth premises,
A C and ~ C, we validly infer ~ A
by Modus Tollens.
o From ~ A and the first premises, A v
(B D), we validly infer B D by
a Disjunctive Syllogism.
Example 3
Free Powerpoint Templates
Page 121
o From the second and fourth
premises, ~ C (D E)
and ~ C, we validly infer D E
by Modus Ponens.
o And finally, from these last two
conclusions (or subconclusions),
B D and D E, we validly
infer B E by a Hypothetical
Syllogism.
Example 3
Free Powerpoint Templates
Page 122
o That its conclusion can be deduced
from its premises using valid
arguments exclusively, proves the
original argument to be valid.
o Here the elementary valid argument
forms Modus Ponens (M.P.), Modus
Tollens (M.T.), Disjunctive Syllogism
(D.S.), and Hypothetical Syllogism
(H.S.) are used as Rules of Inference
by which conclusions are validly
deduced from premises.
Example 3
Free Powerpoint Templates
Page 123
o A more formal and more concise way of
writing out this proof of validity is to list
the premises and the statements
deduced from them in one column, with
“justifications” for the latter written
beside them. In each case the
“justifications” for a statement specifies
the preceding statements from which,
and the Rule of Inference by which, the
statements in question was deduced. It
is convenient to put the conclusion to
the right of the last premise, separated
from it by a slanting line which
automatically marks all of the
statements above it to be premises.
Free Powerpoint Templates
Page 124
The formal proof of validity for the given
argument can be written as follows:
1.A v (B D)
2. ~ C (D E)
3. A C
4. ~ C /B E
5. ~ A 3, 4, M.T.
6. B D 1, 5, D.S.
7. D E 2, 4, M.P.
8. B E 6, 7, H.S.
Example 3
Free Powerpoint Templates
Page 125
One matter that needs to be
emphasized here is that any
substitution instance of an
elementary valid argument form
is an elementary valid argument.
Thus the argument
~ C (D E)
~ C
D E
Example 3
Free Powerpoint Templates
Page 126
is an elementary valid argument
because it is a substitution instance
of the elementary valid argument
form Modus Ponens (M.P.). It results
from
p q
p
q
Example 3
Free Powerpoint Templates
Page 127
by substituting ~C for p and D E for
q; therefore, it is of that form even
though Modus Ponens is not the
specific form of the given argument.
Example 3
Free Powerpoint Templates
Page 128
Rule of Replacement
There are many valid truth-functional
arguments that cannot be proved valid
using only the nine Rules of Inference.
However, if we can replace any part of a
compound statement by an expression
that is logically equivalent to the part
replaced, the truth value of the resulting
statement is the same as that of the
original statement. This is sometimes
called the Rule of Replacement or the
Principle of Extensionality.
Free Powerpoint Templates
Page 129
Using this rule we can employ the
laws of logic that we have seen in
Chapter 2 to replace all or part of
a statement with a logically
equivalent statement without
changing the truth value of the
original statement.
Rule of Replacement
Free Powerpoint Templates
Page 130
Let us recall some of the
commonly used laws and
introduce a few new ones. We
also write down their names and
abbreviations for ease in writing
justifications for our proofs.
These logically equivalent
expressions can replace each
other wherever they occur. We
number them consecutively after
the first eleven rules already
stated.
Rule of Replacement
Free Powerpoint Templates
Page 131
12. De Morgan’s Laws (De M.)
~(p q) (~p ~q)
~(p q) (~p ~q)
13. Commutation (Com.)
p q q p
p q q p
Rule of Replacement
Free Powerpoint Templates
Page 132
14. Association (Assoc.)
p (q r) (p q) r
p (q r) (p q) r
15. Distribution (Dist.)
p (q r) (p q) (p r)
p (q r) (p q) (p r)
Rule of Replacement
Free Powerpoint Templates
Page 133
16. Double Negation (D.N.)
p ~~p
17. Transportation (Trans.)
p q ~q ~p
18. Material Implication (Impl.)
p q ~p q
Rule of Replacement
Free Powerpoint Templates
Page 134
19. Material Equivalence (Equiv.)
p q (p q) (q p)
p q (p q) (~p ~q)
20. Exportation (Exp.)
(p q) r p (q r)
21. Tautology (Taut.)
p p p
p p p
Rule of Replacement
Free Powerpoint Templates
Page 135
Example 4
Example 3 can also be solved using rule of
replacement for some steps as follows:
1. A v (B D)
2. ~ C (D E)
3. A C
4. ~ C /B E
5. ~ A 3, 4, M.T.
6. B D 1, 5, D.S.
7. ~~ C (D E) 2, Impl.
8. D E 7, 4, D.S.
9. B E 6, 8, H.S.
Free Powerpoint Templates
Page 137
Axioms of Peano Arithmetic
1 is a natural number
If x is a natural number, then x + 1 is also
a natural number
There is no natural number, Z, such that Z
+ 1 = 0.
Given natural numbers x and y, if x + 1 =
y + 1, then x = y.
If one can prove that if a property holds
for some natural number x then it holds
for x + 1, and if it can further be proven
that the same property holds for 1, then
the property holds for all natural numbers.
Free Powerpoint Templates
Page 138
Principle of Mathematical
Induction
Suppose that for each positive integer n
we have a statement S(n) that is either
true or false. Suppose that
S(1) is true; and (1)
if S(i) is true, for all i n, then S(n + 1)
is true. (2)
Then S(n) is true for every positive
integer n.
Condition (1) is sometimes called the
Basis Step and condition (2) is
sometimes called the Inductive Step.
Free Powerpoint Templates
Page 139
Some Remarks on the
Principle of Mathematical Induction
The axiom allows us to prove that a
certain property holds for all natural
numbers.
The idea is that, in order to prove
that a formula (or theorem) about
natural numbers is true for all
natural numbers, we first verify (by
actual substitution) that the formula
is true for the number 1.
Free Powerpoint Templates
Page 140
Then, we prove that whenever the
formula is true for a natural number
n, it must also be true for n + 1.
Since it was verified to be true for 1,
then it had to be true for 2; and
since it was true for 2, it had to be
true for 3, and so on for all natural
numbers.
Some Remarks on the
Principle of Mathematical Induction
Free Powerpoint Templates
Page 141
Principle of Mathematical
Induction: Example 1
Prove by mathematical induction that
Solution.
Let Sn denote the sum of the first n positive
integers
Sn = =1 + 2 + 3 + . . . + n.
Here, a sequence of statements is actually being
made, namely,
2
)
1
(
1
n
n
i
n
i
2
)
2
(
1
1
1
S 3
2
)
3
(
2
2
1
2
S
6
2
)
4
(
3
3
2
1
3
S
Free Powerpoint Templates
Page 142
The formula is true for the first 3 natural numbers.
Assuming that all of the equations preceding the
(n + 1)st equation are true, then, in particular, the
nth equation is true, that is,
We must show that the (n + 1)st equation
is true. Take note that
Sn+1 = 1 + 2, + . . . + n + (n + 1).
2
)
1
(
...
3
2
1
n
n
n
Sn
2
)
2
)(
1
(
1
n
n
Sn
Principle of Mathematical
Induction: Example 1
Free Powerpoint Templates
Page 143
Use mathematical induction to show that
n! 2n-1 for n = 1, 2, . . . .
Proof:
Basis Step. We must show that the inequality is
true if n = 1. This is easily accomplished,
since
1! = 1 1 = 21-1.
Inductive Step. We must show that if i ! 2i-1 for
i = 1, . . . , n, then
(n + 1)! 2n.
Principle of Mathematical
Induction: Example 2
Free Powerpoint Templates
Page 144
To show that if i ! 2i-1 for
i = 1, . . . , n, then (n + 1)! 2n
we assume that i! 2i-1 for i = 1, . . . , n. Then, in
particular, for i = n, we have n! 2n-1.
We can relate the 2 inequalities above by observing that
(n + 1)! = (n + 1)(n!).
Now
(n + 1)! = (n + 1)(n!)
(n + 1)2n-1
2 . 2n-1 since n + 1 2
= 2n.
Principle of Mathematical
Induction: Example 2
Free Powerpoint Templates
Page 145
Since we have shown that if i ! 2i-1 for
i = 1, . . . , n, then (n + 1)! 2n
therefore, n! 2n-1 for n = 1, 2, . . . . is true.
We have completed the Inductive Step.
Since the Basis Step and the Inductive Step
have been verified, the Principle of
Mathematical Induction tells us that n! 2n-1 is
true for every positive integer n.
Principle of Mathematical
Induction: Example 2
Free Powerpoint Templates
Page 146
Strong Form of Mathematical
Induction
The verification of the Inductive Step where
we assume that S (i ) is true for all i < n + 1
and then prove that S (n + 1) is true.
This formulation of mathematical induction is
called strong form of mathematical induction.
Often, as was the case in the preceding
examples, we can deduce S (n + 1)
assuming only S (n ).
indeed, the Inductive Step is often stated:
If S (n) is true, then S (n + 1) is true.
Free Powerpoint Templates
Page 147
Use induction to show that if r 1,
for n = 0, 1, . . . .
The sum on the left is called a geometric
sum. In a geometric sum, the ratio of
consecutive terms (ar i + 1/ar i = r) is constant.
Proof:
Basis Step. The Basis Step, which in this
case is obtained by setting n = 0, is
which is true.
1
)
1
(
...
1
2
1
r
r
a
ar
ar
ar
a
n
n
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 148
Inductive Step . Assume that statement is
true for n. Now,
1
1
1
2
1
1
)
1
(
...
n
n
n
n
ar
r
r
a
ar
ar
ar
ar
a
1
)
1
(
1
)
1
( 1
1
r
r
ar
r
r
a n
n
1
)
1
( 2
r
r
a n
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 149
Since the modified Basis Step and the
Inductive step have been verified, the
Principle of Mathematical Induction tells
us that
1
)
1
(
...
1
2
1
r
r
a
ar
ar
ar
a
n
n
is true for n = 0, 1, …
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 150
As an example of the use of the
geometric sum, if we take a = 1 and
r = 2 in the above expression, we
obtain the formula
.
1
2
1
2
1
2
2
...
2
2
2
1 1
1
3
2
n
n
n
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 151
The reader has surely noticed that in order
to prove the previous formulas one has to
be given the correct formulas in advance. A
reasonable question is: How does one
come up with the formulas? There are
many answers to this question. One
technique to derive a formula is to
experiment with small values and try to
discover a pattern. For example, consider
the sum 1 + 3 + . . . + (2n - 1). The
following table gives the values of this sum
for n = 1, 2, 3, 4.
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 152
n 1 + 3 + . . . + (2n –1)
1 1
2 4
3 9
4 16
Since the second column consists of squares, we conjecture
that
1 + 3 + . . . + (2n - 1) = n2
for every positive integer n.
The conjecture is correct and the formula can be proved by
mathematical induction (see Exercise Set 3.4 #1).
Principle of Mathematical
Induction: Example 3
Free Powerpoint Templates
Page 153
Use induction to show that 5n - 1 is divisible by 4 for
n = 1, 2, . . . .
Proof:
Basis Step.
If n = 1, 5n - 1 = 51 - 1 = 4, which is divisible by 4.
Note that also 4 = 50 - 1 + 4 50
If n = 2, 52 - 1 = 25 - 1 = 24, which is divisible by 4.
Also 24 = 51 - 1 + 4 51
Principle of Mathematical
Induction: Example 4
Free Powerpoint Templates
Page 154
If n = 3, 53 - 1 = 125 - 1 = 124, which is
divisible by 4.
Again 124 = 52 - 1 + 4 52
:
:
If we look at the pattern, we can say that
5 n - 1 = 5 n-1 - 1 + 4 5 n-1.
Principle of Mathematical
Induction: Example 4
Free Powerpoint Templates
Page 155
Inductive Step.
Assume that 5n - 1 is divisible by 4
and that the above formula holds. We
must show that 5n+1 - 1 is divisible by
4. To relate the (n + 1)st case to the
nth case, we write
5 n+1 - 1 = (5 n - 1) + 4 . 5 n.
Principle of Mathematical
Induction: Example 4
Free Powerpoint Templates
Page 156
By assumption, 5 n - 1 is divisible by
4 and, since 4 . 5 n is divisible by 4,
the sum
(5 n - 1) + 4. 5 n = 5 n+1 - 1
is divisible by 4. Since the Basis Step
and the Inductive Step have been
verified, the Principle of Mathematical
Induction tells us that 5n - 1 is
divisible by 4 for n = 1, 2, . . .
Principle of Mathematical
Induction: Example 4
Free Powerpoint Templates
Page 157
For any set X with n elements, the
cardinality of the power set of X has 2n
elements, that is, n((X)) = 2n. Or
if |X| = n, then |(X)| = 2n
Proof. The proof is by induction on n.
Basis Step. If n = 0, X is the empty set.
The only subset of the empty set is the
empty set itself; thus
(X) = 1 = 20 = 2n.
Thus the formula is true for n = 0.
Principle of Mathematical
Induction: Example 5
Free Powerpoint Templates
Page 158
Inductive Step. Assume that formula holds
for n. Let X be a set with X= n + 1.
Choose x X. We divide (X) into two
classes. The first class consists of those
subsets of X that include x, and the second
class consists of those subsets of X that do
not include x. If we list the subsets of X that
do not include x,
X1, X2, . . . , Xk ,
then
Principle of Mathematical
Induction: Example 5
Free Powerpoint Templates
Page 159
X1 {x}, X2 {x}, . . . , Xk {x}
is a list of the subsets of X that do
include x. Thus the number of subsets
of X that include x is equal to the
number of subsets of X that do not
include x. If Y = X – {x}, (Y) consists
precisely of those subsets of X that do
not include x. Thus (X)= 2(Y).
Since Y = n, by the inductive
assumption, (Y)= 2n.
Principle of Mathematical
Induction: Example 5
Free Powerpoint Templates
Page 160
Therefore,
(X) = 2(Y)= 2 2n = 2n+1.
Thus the formula holds for n + 1 and
the inductive step is complete. By the
Principle of Mathematical Induction,
Law 3.6.2 holds for all n 0.
Principle of Mathematical
Induction: Example 5