Sunteți pe pagina 1din 12

Chapter 1

LOGIC AND PROOF


To be able to understand mathematics and mathematical arguments, it is necessary
to have a solid understanding of logic and the way in which known facts can be
combined to prove new facts. In this chapter we take a careful look at the rules of
logic and the way in which mathematical arguments are constructed.
1.1 Logical statements
The study of logic is concerned with the truth of falsity of statements.
Definition 1 A statement is a sentence which can be classified as true or false

without ambiguity. The truth or falsity of the statement is known as the truth value.

For a sentence to be a statement, it is not necessary that we actually know


whether it is true or false, but it must be clear that it is one or the other.

Example 2 Consider the following sentences:

1. Every continuous function is differentiable is a statement with truth value


false.
2. x < 2 is true for some x and false for some others. If we have a particular
context in mind, then it could be a statement. Otherwise it is not.

3. Every even number greater than 2 is the sum of two primes is a statement,

whose truth value is not known...yet.

Exercise 3 Which of these sentences are statements?

1. If x is a real number, then x2 0.


2. Seven is a prime number
3. This sentence is false
Some authors also call it proposition.
8 Logic and Proof

1.2 Logical Connectives


In studying mathematical logic we shall not be concerned with the truth value of
any particular simple statement. What will be important is how the truth value of
a compound statement is determined from the truth values of its simpler parts.
To obtain such compound statements it is necessary to introduce the concept of a
connective

Definition 4 A sentential connective is a logic symbol representing an operator


that combines statements into a new statement.
Statements with connectives are called compound statements. Statements
without connectives are known as atomic statements. The sentential connectives
are not, and, or, if ...then, and if and only if. The respective operators
for these connectives are negation, conjunction, disjunction, implication and
equivalence respectively. We shall introduce each of them now

Negation : Let p stand for a given statement. Then p ( read not p ) represents
the logical opposite of p. When p is true, then p is false and viceversa. This can
be summarized in a truth table, which gives the mapping from the truth
value of the individual statements to the truth value of the resulting compound
statement. Some authors also use  for the negation connective. In this case

p p
T F .
F T

where T stands for true and F for false. Note that the truth table of a
connective is an alternative way of defining a connective, since these are defined in

terms of the truth value of the resulting compound statement, given the truth value
of its components.

Conjunction: If p and q are statements, then the statement pq ( read p and


q) is true only when both p and q are true, and is false otherwise.

p q pq
T T T
T F F .
F T F
F F F
Logical Connectives 9

For example, given p : 2 > 0 and q : 0 > 2 then the compound statement
p q : 2 > 0 and 0 > 2 is false.

(Inclusive)Disjunction : If p and q are statements, then the statement p q


( read p or q ) is true when at least one of the two statements is true, and is

false when both are false.

p q pq
T T T
T F T .
F T T
F F F

Note that the inclusive disjunction doesnt complete the list of disjunctions

used in everyday life. In fact, we also have the exclusive disjunction, which is true

when either p or q is true, but not when both are true. In logic the only use for

the connective or is for the inclusive meaning. For example, given p : 2 > 0 and

q : 0 > 2 then the compound statement pq : 2 >0 or 0 > 2 is true.

Implication : A statement of the form

If p, then q

is called an implication or a conditional statement. The if-statement

p is called the antecedent and the then-statement q is called the consequent. The

convention adopted for the truth value of the implication is that it will be called

false only when the antecedent is true and the consequent is false. If we denote the

implication if p, then q by p q, we obtain the following truth table

p q pq
T T T
T F F .
F T T
F F T

The last row of the table may seem counterintuitive. However, the usage of if

... then as a connective or as a mathematical language is quite different from that

T

of daily language. The reason for giving truth value to the last case may be not

understandable in the following mathematical expression: 3 + 1 = 7 6 1 = 2


10 Logic and Proof



Nevertheless, we can easily prove the implication is indeed true: 3 + 1 3 = 7 3 = 4

so 1 = 4. But then 6 1 = 6 4 = 2.

q.
In English there are several ways to express the same mathematical condition

p These are

if p, then q q provided that p


p implies q q whenever p
p only if q q is a necessary condition for p
q if p p is a sufficient condition for q

Equivalence: The statement p if and only if q is defined as the conjunction


of the two implications p q and q p. A statement of this form is called an
equivalence and is denoted by p q. In written form, the abbreviation iff is
used instead of if and only if. The truth table for equivalence can be obtained
by computing the truth table for the compund statement (p q) (q p)

p q p q q p p q
T T T T T
T F F T F
F T T F F
F F T T T

Thus we see that p q is true precisely when p and q have the same truth
values. Since p q is equivalent to (p q) (q p) we can use the terminology
seen above for the implication connective and say

q if p and q only if p
p is a sufficient condition for q and p is a necessary condition for q
Two compound statements p and q are said to be logically equivalent if one
is true if and only if the other is true. In other words, two compound propositions
are logically equivalent whenever they display the same truth table. In this case we
write p q.

Example 5 ((p)) is logically equivalent to p


p p (p)
T F T
F T F
Logical Connectives 11

Example 6 (p q) [(p) (q)]


is logically equivalent to

p q (p q) p q [(p) (q)]
T T F F F F
T F T F T T
F T T T F T
F F T T T T
Exercise 7 (Implication) Show that the implication symbol is not a primitive
p q
[(p) q] .
connector. In other words, show that the implication is logically equivalent

to This is actually another convenient way to interpret the implication


connector.

When two compound statements p and q are logically equivalent, their equiv-
alence is a new statement with a truth value true in all cases. Such a statement is
known as a tautology, being its definition
Definition 8 A compound proposition is said to be a tautology if it is always true
regardless of the truth value of the simple propositions from which it is constructed.
It is a contradiction if it is always false. Hence a contradiction and a tautology are
a negation of each other.

Example 9 p (p) is a tautology, while p (p) is a contradiction.


p (p) p (p) p (p)
T F T F
F T T F
Example 10 [p (p = q)] = q is a tautology
p q pq p (p q) [p (p q )] q
T T T T T
T F F F T
F T T F T
F F T F T
Lets now prove the equivalence of a compound statement that will be useful
when studying methods of proof
Example 11 (Contrapositive) p q is logically equivalent to [( ) q p
( )]

p q p q p q q
( ) p
( ) (p q ) q
[( ) p
( )]

T T T F F T T
T F F F T F T
F T T T F T T
F F T T T T T
12 Logic and Proof

Exercise 12 (De Morgans Law) Prove that (pq) is logically equivalent to [(p) (q)]
Exercise 13 Establish the logical equivalence of these compound statements

1. (p q ) [p q]
2. (p q ) (q p)

Remark 14 p q
p. Claiming the opposite is a very common mistake you should not
As you have already proven is not logically equivalent to its
converse q
make in the future.
Exercise 15 Write the negation of each statement
a) If K is closed and bounded, then K is compact.
b) If K is compact, then K is closed and bounded.
c) A continuous function is differentiable.

Exercise 16 Construct a truth table for each statement


a) [ p (q q)] p
b) (q p) (p q)
c) (p q) (q p) (commutative property)
d) (p q) (q p)
e) [p (q r)] [(p q) r] (associative property)
f) [p (q r)] [(p q) r]
g) [p (q r)] [(p q) (p r)] (distributive property)
h)[p (q r)] [(p q) (p r)]
1.3 Quantifiers
In Section 1 we saw that a mathematical sentence that involves a variable, for ex-
ample x > 3, needs to be considered in a particular context in order to become a
statement. The quantifiers help create statements by limiting the role of variables in
a mathematical sentence.

Definition 17 A is a symbol that can assume several specifications. A


variable
propositional function is a sentence which becomes a statement once we replace a
variable by one of its specifications.
Let p(x) denote a propositional function, p being the sentence and x being the
variable. Thus p (x) : x > 3 is a propositional function.
Let S denote a given set. There are two quantifiers:

You may think of a set S as a collection of objects, who are called the elements of S . When x
is an element of S we write x S and we read x is an element of S .
Quantifiers 13
Universal quantifier (for all), denoted by , with the following interpreta-
tion:

x S, p(x)]
[ means that p(x) is true provided it is true for each x in S . As
an example, if S = {4, 5}, then [ x S, p(x) : x> 3] [(4 > 3) (5 > 3)].
Sometimes the set S is implicit in the context, and can be omitted. The notation
therefore becomes more compact, leading to x, p(x).

Existential quantifier (there exists), denoted by :


x S p(x)]
[ reads There exists an x belonging to S such that p (x)
meaning that p(x) is true provided there exists at least an x in S for which
p(x) is true. As an example, if S = {1, 2, 4}, then [x S  p(x) : x > 3]
[(1 > 3) (2 > 3) (4 > 3)].

Exercise 18 Let S be a finite set (i.e. {1, 2}). Use de De Morgans law to show that
[x S  p(x)] [x S, p(x)], and [x S , p(x)] [x S, p(x)] are
tautologies.
Sometimes ! x to denote the case when a unique value
we use the symbol
exists for the variable x that makes p(x) true. The universal and the existential

quantifiers are thus seen as extensions of the logical connectives and , to deal with
infinitely many assertions, or assertions about infinitely many things, x. Moreover,
one can combine the existential quantifier with negation: means there exists no

(often written as /).

Example 19 / x > 0  (x + 1) = 0 is logically equivalent to x > 0, x + 1 = 0.


Exercise 20 Write the negation of the following statements
1. x A, f (x) > 5
2. y > 0  0 g (y ) 3
3. > 0 N  n, if n > N, then x S, | fn (x) f (x) | < (uniform
convergence)

As we saw in the last exercise, we can use both and in one statement. It
is important to clarify the following point about the order in which quantifiers are
used. While [x, y, p(x, y)] [y, x, p(x, y)] [x, y, p(x, y)], the propositions
[ y  x p(x, y)] and [x, y  p(x, y)] are not logically equivalent. In this case, in
fact, the order in which quantifiers appear affects the meaning and the truth value
of the statement. The first statement says that for at least one y, p(x, y) is true for
all x. In other words, the choice of y is independent of x. On the other hand, the
second statement establishes that for all x there exist at least one y such that p(x, y)
is true. This means that the choice of y is allowed to depend on x.


stands for such that. Another ways of saying such that are given by the symbol : or
by writing s.t..
14 Logic and Proof

As an example consider p(x, y) being given by x + 1 = y. The statement


[ y  x p(x, y)] establishes that there exists an y such that for all x, x +1 = y. This
is clearly a false statement. The second proposition, on the other hand, states that
for all x there exists an y such that x + 1 = y. Unlike the former, this statement is
true.
Exercise 21 Find a p (x, y) such that [ y  x p(x, y)] and [x, y  p(x, y )] have
the same truth value.

Exercise 22 The following statements give properties of functions that we shall en-
counter later in the course. You have to do two things. a) rewrite the defining
conditions in logical symbolism and b) write the negation of part a) using the same

symbolism.

1. A function f is odd iff for every x, f (x) = f (x).


2. A function f is even iff for every x, f (x) = f (x).

3. A function f is periodic iff there exists a k > 0 such that for every x, f (x + k ) =
f (x).

4. A function f is increasing iff for every x and for every y, if x y, then

f (x) f (y) .
5. A function f is strictly decreasing iff for every x and every y, if x y, then
f (x) > f (y ) .

6. A function f :A B is injective iff for every x and y in A, if f (x) = f (y) ,


then x = y.
7. A function f : A B is surjective iff for every y in B there exists an x in
A such that f (x) = y.

8. A function f : D R is continuous at c D iff for every > 0 there exists


a > 0 such that |f (x) f (c)| < whenever |x c| < and x D.

9. A function f is uniformly continuous on a set S iff for every > 0 there is


a > 0 such that |f (x) f (y)| < whenever x and y are in S and x y < . | |

10. The real number L is the limit of the function f : D R at the point c iff
for each > 0 there is a >0 such that |f (x) L| < whenever x D and

0 < |x c| < .
Techniques of Proof 15

1.4 Techniques of Proof


A proof is a method of establishing the truthfulness of an implication. Typically, one
has to prove proposition of the sort if H1,H2,...,Hn , then C. Propositions H1,...,Hn are
often referred to as the hypotheses of the proof, whereas proposition C is referred
to as the conclusion,or thesis. A formal proof of such a proposition consists of a
sequence of valid propositions ending with conclusion C. To be valid, a proposition in
the sequence must be either one of the hypotheses H1 , ...Hn , or an axiom, a definition,
a tautology or a previously proved proposition, or it must be derived from previous
propositions using either substitution or logical implications.
As an example, if you have to prove that given a set S , [x S, p(x)], then
you need to prove that [x S = p(x)]. Similarly, in case you have to prove that
[x S : p(x)], you just need to find an x in S such that p(x) is true.
There are several ways of proving a proposition, all of them being useful in
different situations. These methods are enumerated below.

Direct To show that p = q is true, we first assume that p is true and conclude that
q is true.

Example 23 If x > 1, then x2 > x. Here p:x>1 and q : x2 > x.The direct
proof goes as follows:

Let p:x>1 (Hypothesis);

from the axiom If a>b and c > 0, then a c > b c we have x> 1
x x > 1 x;
But by definition x x = x2 and 1 x = x;
substituting in the above expression leads to x x > 1 x x2 > x
which is the conclusion we wanted x > 1 x2 > x.

Contrapositive Associated with the implication p q there is a logically equivalent statement


q p, called the contrapositive (see example 11). Thus one way to prove
an implication is to give a direct proof of its contrapositive. In other words,
assume that q is true and conclude that p is true. Then we can conclude that
(p q ) is true.

Example 24 Consider the statement for m N , If 7m is an odd number,


then m is an odd number. The contrapositive of the statement is If m is not
an odd number, then 7m is not an odd number, or equivalently If m is an
even number, then 7m is an even number. This statement is much easier to
prove.
16 Logic and Proof

Proof. Let q : m is an even number. Then, by definition m = 2k for some

k N. But then substituting into m we have 7m = 7 (2 k ) = 2 (7k ) = 2 k which


is also even.

Exercise 25 Try the direct proof of the above statement.


Decomposition Suppose we want to prove that p q, and that p can be decomposed into
two disjoint propositions p1, p2 such that p1 p2 is a contradiction. Then p
(p1 p2) (p1 p2 ) (p1 p2 ) .
Given this choice of p1 and p2 we have

(p q) (p q) [ (p1 p2 ) q ]
[(p1 p2 ) q ] [(p1 q) (p2 q)]
[(p1 q) (p2 q )]

meaning that you only need to show that p1 q and p2 q. Note that this
method works also if you decompose p into a number of propositions bigger
than 2 as far as these propositions are mutually exclusive (which means that
every pair of them is a contradiction).

Example 26 Take the contrapositive of the example given for the direct proof
method. The contrapositive is x2 x x 1.
Proof. By definition x2 0. Then p : 0 x2 x and q : x 1. Decompose
p into p1 : x > 0 and p2 : x = 0. Then p1 p2 is always false and p
(p1 p2 ) (p1 p2 ). To show that p2 q is trivial since 0 1. To prove
p1 q, we only need to use the implication c > 0, x y xc yc . Given
that x > 0 by assumption, x2 x xx xx x 1
2

Exercise 27 Show the following statement Let x R. If |x| 1 x2 x.

Construction This approach is used when the statement includes an existential quantifier. i.e.,
the conclusion is of the form: x, p(x). To prove this, simply find (construct)
a value of x such that p(x) is true when H is true. For example, if A =
{1, 2, 3, 4, 5} and the proposition is: x A  x > 2, observe that for x = 3 we
have x > 2 and x A.
Exercise 28 Show that f (x) = x is a continuous function at every x0 R . You
have to prove that > 0 , (x0, ) > 0  |x x0| < (x0 , ) |f (x) f (x0)| <
.
Techniques of Proof 17

Contradiction Suppose we want to prove p q. This method of proof also known as re-
ductio ad absurdum consists of assuming that [p (q)] is true and deriving
a contradiction c. To show that both statements are logically equivalent, we
compare their truth tables
p q p q q (p q ) c (p q) c
T T T F F F T
T F F T T F F .
F T T F F F T
F F T T F F T
An equivalent way of making a proof by contradiction is given by the follow-
ing tautology: (p = q) [(p (q)) = (p)]. This is a particular case of the
general definition, since [(p (q)) = (p)] is equivalent to [(p (q)) = ((p) p)]
(since p was already an assumption), and given that ((p) p) c then
[(p (q)) = c] .The proof of their equivalence is left as an exercise.
Exercise 29 Show that (p = q p
) [(
(q )) = (p)] .

Example 30 We will show again that If 7m is odd, then m is odd.


Proof. Here the statements are p 7m is odd and q m is odd .
To prove the result by contradiction we will use the equivalence p q
: :

p q p , so we have to assume first that p q , that is 7m


( = )

[( ( )) = ( )] ( ( ))

is odd and m is even . Since m is even by definition we have m = 2k for some


k. Then 7m= 7(2k) = 2 (7k) = 2 j for j=7k. But this means that 7m is even
p , contradicting the assumption.
( )

Remark 31 Be very careful when writing proofs by contradiction ! A very strong


word of caution can be found in Royden All students are enjoined in the strongest
possible terms to eschew proofs by contradiction! There are two reasons for the pro-
hibition: First such proofs are very often fallacious, the contradiction on the final
page arising from an erroneous deduction on an earlier page, rather than from the
incompatibility of p with q. Second, even when correct, such a proof gives little in-
sight into the connection between p and q whereas both the direct proof and the proof
by contraposition construct a chain of argument connecting p and q.One reason why
mistakes are so much more likely in proofs by contradiction than in direct proofs is
that in a direct proof ( assuming the hypothesis is not always false) all deduction
from the hypothesis are true in those cases where the hypothesis holds. One is dealing
with true statements, and oness intuition and knowledge about what it is true help to
keep one from making erroneous statements. In proofs by contradiction, however, you
are (assuming the theorem is true) in the unreal world where any statement can be
derived, and so the falsity of a statement is no indication of an erroneous deduction.

H.L. Royden Real Analysis pg3.
18 Logic and Proof
Exercise 32 Let x be a real number. Prove that if x>0 then 1/x>0.
Induction It is used for statements of the form p(n), n {m, m + 1, m + 2, ...}. The
proof consists of two steps:

Basis of Induction Prove that for the first element in the set of interest in this case m ,
p(m) is true,

Inductive step Show p(k ) p(k + 1), for k  m. In other words, assume p(k ) is true and
prove that p(k + 1) is also true.

Exercise 33 The following tautologies are widely used in the methods of proof. Some
of them have already been seen before. a) Verify that they are indeed tautologies, b)
Interpret them and associate them with the different methods of proof
1. (p q) [(p q) (q p)]
2. (p q) [(p q) (p q)]
3. (p q) (q p)
4. p p
5. (p p) c
6. (p c) p
7. (p q) [(p q) c]
8. [ p (p q)] q
9. [q (p q)] p
10. [p (p q)] q
11. (p q) p
12. [(p q) (q r)] (p r)
13. [(p1 p2) (p2 p3) ... (pn1 pn )] (p1 pn)
14. [(p q) r] [p (q r)]
15. [(p q) (r s) (p r)] (q s)
16. [p (q r)] [(p q) r]
17. [(p q) r] [(p r) (q r)]
1.5 References
S.R Lay , Analysis with an Introduction to Proof . Chapter 1. Third Edition. Pren-
tice Hall.
A. Matozzi, Lecture Notes Econ 897 University of Pennsylvania Summer
2001.
H.L. Royden, Real Analysis . Third Edition. Prentice Hall.

S-ar putea să vă placă și