A Primer For Logic and Proof
A Primer For Logic and Proof
A Primer For Logic and Proof
Spring 20041
1
°2002
c by Jeffry L. Hirst and Holly P. Hirst. All rights reserved.
ii
Contents
Introduction v
1 Propositional Calculus 1
1.1 Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Tautologies and Contradictions . . . . . . . . . . . . . . . . . . . 8
1.3 Logical Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Contrapositives and Converses . . . . . . . . . . . . . . . . . . . 10
1.5 Analysis of Arguments . . . . . . . . . . . . . . . . . . . . . . . . 12
1.6 A Proof System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.7 The Deduction Theorem . . . . . . . . . . . . . . . . . . . . . . . 18
1.8 Generalizing L . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.9 Soundness and Completeness of L . . . . . . . . . . . . . . . . . . 22
1.10 Modifying L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.11 Assessing Propositional Calculus . . . . . . . . . . . . . . . . . . 26
2 Predicate Calculus 29
2.1 Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 Translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3 A brief interlude: Truth . . . . . . . . . . . . . . . . . . . . . . . 35
2.4 Free variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.5 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.6 Truth and Sentences . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.7 Truth and free variables . . . . . . . . . . . . . . . . . . . . . . . 42
2.8 Logical validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.9 Formulas that aren’t logically valid . . . . . . . . . . . . . . . . . 45
2.10 Some logically valid formulas . . . . . . . . . . . . . . . . . . . . 46
2.11 Free for... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.12 A proof system for predicate calculus . . . . . . . . . . . . . . . . 51
2.13 Dealing with ∀ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.14 Rule T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.15 The Deduction Theorem . . . . . . . . . . . . . . . . . . . . . . . 55
2.16 Adding ∃x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.17 Removing ∃x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.18 Proof strategies in predicate calculus . . . . . . . . . . . . . . . . 60
iii
iv CONTENTS
v
vi INTRODUCTION
Propositional Calculus
The big idea in propositional calculus is to study the structure of simple state-
ments. We will discover connections between the structure and the truth val-
ues of these statements, and devise fast methods for determining truth values.
Eventually, we will write some formal proofs of statements.
Propositions
A proposition is a statement, containing a subject and a verb like a sentence in
English. We will eventually work with mathematical statements almost exclu-
sively, but for now any statements can be used.
2 is prime.
4 + 6 = 10.
Today it is raining.
Today is Thursday and tomorrow will be sunny implies that yesterday was
rainy.
1
2 CHAPTER 1. PROPOSITIONAL CALCULUS
Propositions can be true or false. If we know what truth value to assign one
we can utilize this information. Otherwise, we check what happens when the
proposition is assumed to be true and then false by using a truth table. The
following truth tables reveal the meaning of the various connectives.
Connectives
The symbols ¬, ∧, ∨, →, and ↔ are called propositional connectives. Their
properties are best shown via truth tables.
Negation
Symbol: ¬
Interpretation: ¬a means “not a”
a ¬a
T F
F T
Notice that the proposition a has a column containing all possible truth
values, in this case simply T and F. Then the second column contains the truth
value for “not a” for each possible value of a. We can read this table as follows:
If a is true then not a is false. If a is false, then not a is true. Not too bad.
Other books use the symbols ∼ a or !a to denote ¬a. Let’s look at the other
connectives.
Conjunction
Symbol: ∧
Interpretation: a ∧ b means “a and b”
Vocabulary: a and b are the conjuncts in the compound proposition a ∧ b.
a b a∧b
T T T
T F F
F T F
F F F
1.1. BUILDING BLOCKS 3
Notice here that all possible combinations of truth values for a and b are
listed, along with the corresponding value for the connective. The quick story on
the and connective is that both propositions need to be true for the conjunction
to be true.
Disjunction
Symbol: ∨
Interpretation: a ∨ b means “a or b”
Vocabulary: a and b are the disjuncts in the compound proposition a ∨ b.
a b a∨b
T T T
T F T
F T T
F F F
Summarizing, a disjunction is true whenever at least one of the propositions
is true. This connective is sometimes called inclusive or to differentiate it from
exclusive or (which is often denoted by +). The formula a + b is interpreted as
“a or b, but not both.”
Implication
Symbol: →
Interpretation: a → b means “if a then b” (in the mathematical sense.)
Vocabulary: In the formula a → b, the proposition a is referred to as the
hypothesis (or sometimes as the premise). The proposition b is referred to as
the conclusion.
a b a→b
T T T
T F F
F T T
F F T
The truth values for implication seem pretty peculiar at first. Some people
might argue that the interpretation is distinctly different from typical English
usage. They’re probably right. However the truth values do correspond exactly
to the way that mathematicians use this symbol. The only time an implication
is false is when the hypothesis is true and the conclusion is false. False may
imply false and false may imply true, but true cannot imply false.
Mathematical texts use all of the following phrases to represent a → b:
if a then b,
a implies b,
Biconditional
Symbol: ↔
Interpretation: a ↔ b means “a if and only if b”
a b a↔b
T T T
T F F
F T F
F F T
The biconditional is true exactly when the propositions have the same truth
value. In some texts, the phase “a is a necessary and sufficient condition for b”
is used for a ↔ b.
p → (q ∨ r)
T T T T T
T T T T F
T T F T T
T F F F F
F T T T T
F T T T F
F T F T T
F T F F F
In building the preceding abbreviated truth table, we followed the order of
the parentheses. First, we wrote the columns for p, q, and r so that every
possible combination of truth values was represented. Next, we filled in the
column for the ∨ in q∨r, and finally we filled in the column for the → connective.
¬ (p → q)
F T T T
T T F F
F F T T
F F T F
(a ∨ b) ∧ c a ∨ (b ∧ c)
T T T T T T T T T T
T T T F F T T T F F
T T F T T T T F F T
T T F F F T T F F F
F T T T T F T T T T
F T T F F F F T F F
F F F F T F F F F T
F F F F F F F F F F
Note that in the last example, the two formulas have the same proposition
letters and connectives in the same order. Only the location of the parentheses
is different. However, the truth values for the main connectives do not match
in the second and fourth rows. There is a moral here. Parentheses make a
difference! You can leave out parentheses when the meaning of the statement
is clear. However, if you have any doubt, retain the parentheses.
Sometimes books will leave out more parentheses than you might like. In a
pinch, you can assume that connectives are evaluated in the following order ¬,
∧, ∨, →, ↔, with like connectives evaluated from left to right. For example, the
formula b∧a → b → c∨¬d should be parenthesized as ((b∧a) → b) → (c∨(¬d)).
6 CHAPTER 1. PROPOSITIONAL CALCULUS
Translations
Given a key listing the meanings of the propositional symbols, we can translate
symbolized statements into English sentences.
Example. Given the interpretations below, translate each of the following sen-
tences into English.
(a) Translate: (a ∨ b) → c
Solution: If Fritz likes trout or Waldo is tiny, then violins don’t melt.
(b) Translate: a ↔ c
Solution: Fritz likes trout if and only if violins don’t melt.
Alternate solution: Fritz liking trout is a necessary and sufficient
condition for the non-melting of violins.
(c) Translate: ¬(b ∧ c)
Solution: It is not the case that both Waldo is tiny and violins don’t
melt.
Alternate solution: Waldo isn’t tiny or violins melt.
Example. Translate: If Fritz is the king of France, then Bert eats trout.
Solution: Let k denote “Fritz is the king of France.” Let b denote “Bert
eats trout.” The sentence “If Fritz is the king of France, then Bert eats trout”
translates as
k → b.
values are actually assumptions based on prior experience, but they are still
pretty reasonable. In other cases, we lack sufficient information to reasonably
assign truth values. For example, the statement “Waldo has a trout in his hat”
is neither obviously true nor obviously false. In situations where we can assign
truth values to some (or all) of the proposition letters, we can often determine
the truth value of associated compound statements. The process involves look-
ing at appropriate lines in the truth table of the compound statement. Here are
some examples.
Example. Given the information below, and using common sense where appli-
cable, try to assign truth values to the following compound statements.
a means “2 = 5.” (We’ll assume this is F.)
b means “7 is an odd prime.” (We’ll assume this is T.)
c means “Waldo is the milkman’s pet trout.” (We won’t assume any truth
value here.)
(a) a ∧ b
Solution: F ∧ T is F, so a ∧ b is false.
(b) a ∨ b
Solution: F ∨ T is T, so a ∨ b is true.
(c) b ∨ c
b ∨ c
Solution: T T T So b ∨ c is true.
T T F
(d) a ↔ c
a ↔ c
Solution: F T F So a ↔ c depends on truth value of c.
F F T
Exercises.
1. Build the truth table for p ∧ q.
2. Build the truth table for p → (q ∨ r)
3. Build the truth table for ¬(p ∨ ¬p)
4. Build the truth table for p ∧ ¬p
5. Build the truth table for (p ∧ q) → p
6. Build the truth table for p → (p ∨ q)
7. Given the interpretations below, translate each of the following sentences
into English. p means “2 + 2 = 5.” q means “3 is prime.”
8 CHAPTER 1. PROPOSITIONAL CALCULUS
(a) Translate: p → q
(b) Translate: (¬p) ∨ q
(c) Translate: ¬(p ∨ q)
8. Given the interpretations below, translate each of the following sentences
into English. d means “Waldo wears a hat.” m means “All milkmen like
trout.” w means “4 + 8 = 32.” z means “2 6= 5.”
(a) Translate: d → (m ∨ w)
(b) Translate: z ↔ w
(c) Translate: z ∧ (w → z)
(d) Translate: ¬(¬d ∧ z)
9. Translate into formal symbols: Either money is green or the sky is blue.
10. Translate into formal symbols: If either 2 6= 5 or 4 + 5 = 9, then 52 6= 25.
11. Translate into formal symbols: Fritz likes chocolate bunnies and Waldo
likes umbrellas.
12. Translate into formal symbols: If 5 is not an odd integer, then 8 is prime.
13. Given the information below, and using common sense where applicable,
try to assign truth values to the following compound statements.
p means “2 6= 5.”
q means “7 is an integer multiple of 2.”
r means “Fritz is a tap-dancing investment banker.”
(a) p ∨ q
(b) p ∧ r
(c) q → r
(d) r → (q → r)
Exercises.
1. Show that a → (b → a) is a tautology.
2. Show that (a → (b → c)) → ((a → b) → (a → c)) is a tautology.
3. Show that (¬b → ¬a) → ((¬b → a) → b) is a tautology.
4. Show that p ↔ (p → ¬p) is a contradiction.
5. Show that p ∧ p is a contingency.
6. Classify each of the following formulas as a tautology, a contradiction, or a
contingency. Provide enough of the truth table for the formula to justify
your answer. (For tautologies and contradictions, you need the whole
table. For contingencies you can get by with just two cleverly selected
rows.)
10 CHAPTER 1. PROPOSITIONAL CALCULUS
(a) (p ∧ q) → p
(b) p → (p ∨ q)
(c) (p ∨ q) → (p ∧ q)
(d) p ↔ ¬p
(e) p → (¬p → (q ∧ ¬q))
(f) (p → q) ∨ (q → p)
Exercises.
1. Show that ¬p ∧ ¬q is logically equivalent to ¬(p ∨ q).
2. Show that p ∧ q is logically equivalent to ¬(¬p ∨ ¬q).
3. Show that p is logically equivalent to ¬¬p.
4. Show that p ∨ (q → (s ∧ ¬¬t)) is logically equivalent to
p ∨ (q → (s ∧ t)).
Proof. Any conditional formula will have the form P → Q. We’ll show that
this is logically equivalent to ¬Q → ¬P by checking the truth table for the
biconditional statement built from these formulas. We’re looking for all Ts in
the main connective column.
(P → Q) ↔ (¬ Q → ¬ P )
T T T T F T T F T
T F F T T F F F T
F T T T F T T T F
F T F T T F T T F
The main connective column is all Ts, so the biconditional is a tautology
and the formulas are logically equivalent.
Exercises.
1. Write the contrapositives of the following.
(a) p → q
(b) (p ∨ r) → q
(c) (a ∧ b) → (c ∨ d)
(d) If Waldo likes trout, then Elmer is a sailor.
(e) If 0 6= 1, then 4 is a prime.
(f) If tap-dancing is foolish, then I want to be a fool.
(a) p → q
(b) (p ∨ r) → q
(c) (a ∧ b) → (c ∨ d)
(d) If Waldo likes trout, then Elmer is a sailor.
(e) If 0 6= 1, then 4 is a prime.
(f) If tap-dancing is foolish, then I want to be a fool.
5. Find a formula that is logically equivalent to its converse and one that
is not. You could be imaginative and pick examples other than those in
exercises 3 and 4.
P1
P2
P3
...
Pn
Pn+1
is an argument.
We say that an argument (like the one above) is logically valid if and only if
(P1 ∧ P2 ∧ P3 ∧ ... ∧ Pn ) → Pn+1 is a tautology. Note that the conclusion of
a logically valid argument is not necessarily true. Logical validity ensures only
that if all the premises are true, then the conclusion is true.
Exercises.
1. Here are some other common argument forms. Show that they are all
logically valid.
a→b
Modus Tollens: ¬b
¬a
p→r
q→r
Constructive Dilemma:
p∨q
r
p→q
Hypothetical Syllogism: q→r
p→r
14 CHAPTER 1. PROPOSITIONAL CALCULUS
s∨t
Disjunctive Syllogism: ¬s
t
2. Is the following argument logically valid?
The chancellor knows.
If the chancellor doesn’t know, then the provost knows.
If the provost knows, then we’re in trouble.
We’re in trouble.
3. Is the following argument logically valid?
When it rains, I wear a hat.
It never rains
It never rains.
5. Is the following argument logically valid?
If today is Sunday, then tomorrow is Monday.
Today is not Sunday.
It’s cold.
If Fritz wears a parka, then its cold.
Fritz is fond of velcro.
The system L
A proof is a sequence of formulas with justifications. Each line in a proof in the
system L must be one of the following:
• an axiom of L,
• a lemma.
Axioms
There are three axioms in L:
Axiom 1: A → (B → A)
16 CHAPTER 1. PROPOSITIONAL CALCULUS
We can use any instance of an axiom in a proof. That is, A, B, and C can be
uniformly replaced by any formula we like. We’ll use A := p to denote replacing
A by the formula p. Here are three instances of Axiom 1 and the substitutions
used to create them.
p → (q → p) results from A := p and B := q.
B → (A → B) results from B := A and A := B.
A → (A → A) results from A := A and B := A.
(B → C) → (¬Q → (B → C)) results from A := B → C and B := ¬Q.
Modus Ponens
The rule of inference Modus Ponens says that if A and A → B are lines in
a proof, we can write B as a (later) line. Here A and B can represent any
formulas.
Rather than mess with a concocted example, let’s do a proof!
Lemmas
We’ve proved `L A → A. Now we can use any instance of A → A in future
proofs. In this case, we say that we’re using this theorem as a lemma. For
example,
Theorem L 2. `L (¬B → B) → B
1. ¬B → ¬B Theorem L1
A := ¬B
2. (¬B → ¬B) → ((¬B → B) → B) Axiom 3
A := B and B := B
3. ((¬B → B) → B) Modus Ponens
Lines 1 and 2
The use of lemmas is actually just a convenient shortcut. Rather than writing
the instance of Theorem L1 as the first line in the preceding proof, we could
write the five lines of the proof of Theorem L1, replacing all the uses of A in
that proof with ¬B. The justification for these lines would be unchanged from
our original proof of Theorem L1. In the resulting proof of L2, every single line
would be an axiom or a use of modus ponens. However, since we have already
written the proof of Theorem L1 once, it seems silly to recopy it. Consequently,
we use lemmas.
Theorem L 4. A → ((B → A) → C) `L A → C
1. A → ((B → A) → C) Given
2. A → (B → A) Axiom 1
3. A → C Theorem L3
A := A, B := B → A, and C := C
Exercises.
Prove the following theorems. Remember, any theorem with a lower number
may be used in the proof. (Using earlier theorems can save a lot of work.)
Theorem L 5. B `L A → B
Theorem L 6. A → (B → C), B `L A → C
Theorem L 7. A → (B → C) `L B → (A → C)
Theorem L 8. A → B, B → C `L A → C
Theorem L 9. P → R `L P → (Q → R)
1. A → (B → C) Given
2. B Given
Theorem. A → (B → C) `L (A → B) → (A → C).
1. A → (B → C) Given
3. (A → B) → (A → B) L1
20 CHAPTER 1. PROPOSITIONAL CALCULUS
Since every proof in L can be rewritten using just hypotheses, axioms and
modus ponens, the techniques used in the preceding theorem can be adapted
to any proof. This explains why the deduction theorem always works. For
a detailed proof of the deduction theorem, we should really use some form of
induction on proof length. For more on this see [?], [?], and exercise ?? on page
??.
Exercises.
Prove the following theorems. You will enjoy using the deduction theorem.
Theorem L 14. `L A → ((A → B) → B)
Theorem L 15. `L ¬A → (A → B)
Theorem L 16. `L (A → B) → (¬B → ¬A)
Theorem L 17. `L A → (¬B → ¬(A → B))
1.8 Generalizing L
Our proof system, L, is pretty powerful. It works fine on formulas involving
only ¬ and → as connectives. Unfortunately, it doesn’t handle ↔, ∧, and ∨.
We can get around this problem by using the following abbreviations.
A ∧ B abbreviates ¬(A → ¬B)
1.8. GENERALIZING L 21
1. A Given
2. B Given
3. A → (¬¬B → ¬(A → ¬B)) L17
4. ¬¬B → ¬(A → ¬B) Modus Ponens, lines 1 and 3
5. B → ¬¬B L12
6. ¬¬B Modus Ponens, lines 2 and 5
7. ¬(A → ¬B) Modus Ponens, lines 6 and 4
Exercises.
1. Use a truth table to show that A∧B is logically equivalent to ¬(A → ¬B).
2. Use a truth table to show that A ∨ B is logically equivalent to (¬A) → B.
3. Use a truth table to show that A ↔ B is logically equivalent to ¬((A →
B) → ¬(B → A)).
4. Prove the following theorems.
Theorem L 19. A ∧ B `L A
Theorem L 20. A ∧ B `L B
Theorem L 21. A `L A ∨ B
Theorem L 22. B `L A ∨ B
Theorem L 23. A ↔ B `L A → B
22 CHAPTER 1. PROPOSITIONAL CALCULUS
Theorem L 24. A ↔ B `L B → A
Theorem L 25. A → B, B → A `L A ↔ B
beginning of the proof. The first two lines have to be axioms, and all the axioms
of L are tautologies. (See exercises 1, 2, and 3 on page 9.) If the next line is
an axiom, then it is a tautology, too. The next line could be an application of
modus ponens to previous lines of the form P and P → Q, yielding Q. Since
the previous lines, namely P and P → Q, are both tautologies, Q must be a
tautology also. Proceeding in this fashion, we can prove that every line in the
proof is a tautology, including the last line, which is A. Thus, if L proves A,
then A must be a tautology.
Our next theorem is actually the converse of the Soundness theorem.
Theorem (The Completeness Theorem for L). If A is a tautology, then
`L A. Also, if (G1 ∧ G2 ∧ ... ∧ Gn ) → A is a tautology, then G1 , G2 , ..., Gn `L A.
We can use the Completeness Theorem for L to show that a formula can be
proved in L, without actually producing the proof! Actually, this happens all
the time in mathematics. Lots of theorems assert the existence of a set, or a
function, or a solution to a problem, or even a proof, without actually provid-
ing the desired object. People call these theorems “non-constructive existence
theorems.” This sort of theorem is surprisingly useful. It’s sort of like saying,
“I know there’s a vacuum cleaner in that closet, and I could find it if I really
needed it.”
Example. Use the Completeness Theorem for L to prove that L can prove
A → A (Theorem L1).
Solution: The truth table for A → A is:
A → A
T T T
F T F
A → A is a tautology, so by the Completeness Theorem, `L A → A.
This is shorter than our proof in L of Theorem L1, but in some ways less
satisfying. Often it is faster (or at least less boring) to produce the proof in L
than to write the truth table. For example, write down an instance of Axiom 1
with 10 letters in it. The truth table would contain 210 lines, but the proof in
L is just one line. In this case, it is easier to produce the proof than to apply
the Completeness Theorem to prove that the proof exists.
One way to prove the Completeness Theorem is to devise an algorithm that
converts truth tables into proofs in L. The proof in [?] which is based on [?]
uses this technique. Since such an algorithm exists, we could write a computer
program that would accept a formula as an input, determine if the formula
is a tautology, and if it is, construct and print a proof in L of the formula.
Unfortunately, the proofs supplied by the algorithm tend to be extremely long
and unintuitive. So far, we are superior to machines at providing short, elegant
proofs in L.
Suppose for a moment that `L A. By the Soundness Theorem, A is a
tautology. Thus, ¬A is a contradiction. In particular, ¬A is not a tautology.
By the contrapositive of the Soundness Theorem, L doesn’t prove ¬A. Thus, if
L proves A, then L doesn’t prove ¬A. Similarly, if L proves ¬A, then L doesn’t
24 CHAPTER 1. PROPOSITIONAL CALCULUS
prove A. Summarizing, we have that L can’t ever prove both A and ¬A. This
important property of L is called consistency, and is summarized in the following
theorem.
Exercises.
1. Use the Completeness Theorem for L to show that L can prove Theorem
L7.
2. Use the Completeness Theorem for L to show that L can prove Theorem
L13.
3. Use the Completeness Theorem for L to show that L can prove Theorem
L15.
4. Is there a proof in L of (A ∨ B) → B?
5. Is there a proof of B `L A ∨ B?
1.10 Modifying L
As noted in the previous section, L has some nice properties. How can we
modify L, retaining soundness and completeness? There are three reasonable
approaches: adding an axiom, discarding an axiom, and starting from scratch.
Adding an axiom
Suppose we add a tautology to L as a new axiom. Let’s call the new axiom
N EW . Suppose also that there is some formula A that we can prove in L,
using the new axiom. Then for some instance of N EW (call it N EW ∗ ) we have
N EW ∗ `L A. By the Deduction Theorem, `L N EW ∗ → A. Since N EW ∗
is a tautology, by the Completeness Theorem for L, `L N EW ∗ . We can put
together a short proof of `L A.
1. N EW ∗ Axiom NEW
So far, anything provable with the new axiom is provable in the original
axiom system. Also, anything provable in L must be provable in the new axiom
system. Thus, the new axiom system has exactly the same theorems as L.
What does this do for us? The new axiom system satisfies the completeness
and soundness theorems. It’s another reasonable axiom system. In reality, it’s
just L with a lemma disguised as an axiom. Big deal.
Suppose now that we add a formula that isn’t a tautology as a new axiom.
Remember that since we want to treat this new formula just like any other
axiom, we have to allow any instance of the new formula to appear as a line in a
proof. This always results in an inconsistent theory. (And inconsistent theories
don’t satisfy the Soundness Theorem.) Let’s look at a particular example.
Consider adding A → B to L as a new axiom. We can show that the resulting
theory is inconsistent: Notice that a particular instance of this new axiom is
A → ¬A (where ¬A is substituted for B. However, A → ¬A is not a tautology,
so this new theory is not sound:
A → ¬A
T F F
F T T
Let’s summarize. If we add a tautology to L, we get L. If we add a non-
tautology to L, we get garbage. It looks like adding axioms is not very profitable.
Discarding an axiom
Axiom 3 is particularly ugly. Can we throw it away? Unfortunately, the re-
sulting theory doesn’t satisfy the Completeness Theorem. Here’s another way
to descibe the situation. Axiom 3 can’t be proved from Axiom 1 and Axiom 2.
Also, since L is consistent, Axiom 1 and Axiom 2 can’t prove the negation of
Axiom 3. Logicians would say, “Axiom 3 is independent of Axiom 1 and Axiom
2.” Independence statements of this sort are often very challenging to prove.
Overall, discarding axioms yields systems that don’t satisfy the Complete-
ness Theorem. This isn’t such a hot way to modify L.
The axioms:
A → (B → A)
(A → (B → C)) → ((A → B) → (A → C))
(A ∧ B) → A
(A ∧ B) → B
A → (B → (A ∧ B))
A → (A ∨ B)
26 CHAPTER 1. PROPOSITIONAL CALCULUS
B → (A ∨ B)
(A → C) → ((B → C) → ((A ∨ B) → C))
(A → B) → ((A → ¬B) → ¬A)
¬¬A → A
Use the above axioms with Modus Ponens. The theorems of this system are
exactly the tautologies. In other words, completeness and soundness theorems
hold for this system. By using this system, we could avoid using abbreviations
to deal with conjunction and disjunction. If we wanted, we could add more
axioms to deal with biconditional or any other connectives we might like to
append.
Using the above axiom with Modus Ponens. The theorems of this system are
exactly the tautologies. Meredith’s system is very elegant with its single axiom
and single rule of inference. Unfortunately, it is not so easy to prove theorems
in this system or even to recognize instances of the axiom. For an exceptionally
challenging exercise, try proving L1 in Meredith’s system.
Exercises.
1. Show that Meredith’s axiom is a tautology
(a) A → A
(b) A → B, B → C ` A → C
(c) A → B ` ¬B → ¬A
Propositional calculus is pretty nice. We’ve managed to talk about a lot of logic
without being terribly technical. Our proof system, L, is slick. It’s consistent,
and has a deduction theorem, a soundness theorem, and a completeness theorem.
Propositional calculus is useful for analyzing lots of different sorts of ar-
guments. In particular, we can use it to understand the structure of lots of
mathematical proofs. For example, we know that mathematicians use the De-
duction Theorem every day to prove implications. Also, mathematicians follow
the format of L25 to prove biconditional statements.
1.11. ASSESSING PROPOSITIONAL CALCULUS 27
The big disadvantage of propositional calculus is that it glosses over any fine
distinctions. It’s just not very expressive. For example, suppose we want to use
propositional calculus to formalize the statement “if n > 0 then n + 1 > 0.” If
we let P denote n > 0 and Q denote n+1 > 0, then our formalization is P → Q.
This certainly shows us that the statement is an implication, but it hides the
fact that the hypothesis and the conclusion are both talking about n. In order
to overcome this limitation, we need a logical system that includes variables.
Exercises.
1. Use propositional calculus to formalize the following argument.
Socrates is a man.
All men have ugly feet.
Socrates has ugly feet.
2. Is the argument in exercise 1 valid? Should it be?
28 CHAPTER 1. PROPOSITIONAL CALCULUS
Chapter 2
Predicate Calculus
Predicates
We use capital letters, (A, B, C, etc.) to represent predicates. A predicate
letter will usually be associated with a list of at least one variable. For example,
29
30 CHAPTER 2. PREDICATE CALCULUS
might represent the statement “x < y” or the statement “x and y are kinds of
fish.”
Sometimes, we’ll use special predicate symbols like =, ≤, or >. Rather than
writing the symbol in front of the variables, we’ll put it between the variables.
Thus, we would write x = y rather than = (x, y). Writing the predicate in front
is called prefix notation. Writing it in the middle is called infix notation. No
matter which notation we use or which symbols we use, we should specify any
intended meaning of the predicate symbols.
Terms
The list after a predicate symbol can include more than just variables. Any
term can be used in the list. Terms are either variables, constants, or functions
applied to terms.
• Functions are small letters (like f , g, and h); functions take as input a list
of terms and have a unique output.
Despite the fact that functions and variables are both denoted by small
letters, it is easy to keep them straight. Functions have lists associated with
them, just like predicates. For example, f (x, y) is a function f applied to
the variables x and y. Functions can act on other terms, too. For example,
g(x, a, h(z)) is the function g applied to the variable x, the constant a, and the
function h, where h is a function applied to z.
Functions and predicates differ in one very important respect. The value
of a function is an object, while the value of a predicate is a truth value. For
example, if we want to represent “the father of x,” it makes sense to use a
function like f (x). On the other hand, if we want to say “x is a father,” we
would use a predicate symbol, like P (x). If f (Chelsea) is Bill, then P (Bill) is
true.
What sort of objects these terms represents depend upon the context, i.e.,
the universe of objects that we are examining. If we’re talking about numbers,
x would represent a number. If we’re talking about milkmen, x would represent
a milkman. A variable represents a non-specific object, like some milkman.
A constant represents a particular object, like “Waldo the milkman who lives
up the street.” A function represents an object that is somehow related to the
objects in its variable list. For example, if x represents a milkman in the universe
of milkmen, then f (x) could represent the milkman who took over x’s old route.
If w represents Waldo the milkman, then f (w) represents the milkman who took
over Waldo’s old route.
2.2. TRANSLATIONS 31
Connectives
The connectives are ∧, ∨, →, ↔, and ¬. These are the same connectives we
used in propositional calculus, and they mean exactly the same thing.
Quantifiers
We’ll use ∀ and ∃ as our quantifier symbols. Quantifier symbols must be followed
by a single variable (never a constant or a function).
∀x is read as “for all x.”
∃x is read as “there exists an x.”
We’ll build all our formulas from the sorts of symbols listed above, inserting
parentheses where we need them. If we need to represent an entire formula with
a single letter, we’ll just use a capital letter (A, B, C, etc.). If there is any
possibility confusing a whole formula with a predicate, we’ll be sure to include
extra explanation. Usually, we will use A(x, y, z) to represent a formula that
includes the variables x, y, and z.
Rather than being really technical about what constitutes a properly con-
structed formula, let’s look at some examples.
2.2 Translations
We can translate English statements into predicate calculus, and vice versa. In
either case, we must be careful to specify what the symbols represent.
(a) ∀x(x · 0 = 0)
For all real numbers x, x times 0 equals 0.
(c) ∀x∃y(x · y = 1)
For all real numbers x, there is a real number y such that x · y = 1.
Most of the translations we have done to this point involved one quantifier.
Before proceeding let’s consider the following example, which will clarify the
convention on how to interpret multiple quantifiers:
Example. Let the universe be the set of all people, and the predicate L(x, y)
stand for x loves y (and equivalently, y is loved by x). Here are all of the possible
versions with x and y quantified. Notice the careful treatment of the translation
in each case. “Loves” is not assumed to be reflexive here.
Both variables quantified with ∀:
∀x∀yL(x, y): Everyone loves everyone.
∀y∀xL(x, y): Everyone is loved by everyone.
These sentences mean the same thing, and this will be true for all interpreta-
tions, as we will prove more formally later.
Both variables quantified with ∃:
∃x∃yL(x, y): Someone loves someone.
∃y∃xL(x, y): Someone is loved by someone.
Again, these sentences mean the same thing, and this will be true for all inter-
pretations, as we will prove more formally later.
First variable quantified with ∀:
∀x∃yL(x, y): Everyone loves someone.
∀y∃xL(x, y): Everyone is loved by someone.
These sentences do not mean the same thing. In the first case a more formal
translation would be “Every person has someone that they love.” In the second
case, “Every person has someone who loves them.” The order of the variables
is important here.
First variable quantified with ∃:
∃x∀yL(x, y): Someone loves everyone.
∃y∀xL(x, y): Someone is loved by everyone.
Again, these sentences do not mean the same thing. In the first case we have
“there is someone who loves all people.” In the second case, “there is someone
who is loved by everyone.” Notice also that none of the four alternations of
quantifiers means the same thing. Order is extremely important!
natural numbers. Let s(x) be the function x2 and P (x, y) be the predicate for
x ≤ y. We can formalize the statement as:
∀x P (x, s(x)).
On the other hand, we can use the ≤ and square symbols with their usual
meanings directly and use n as our variable name:
∀n(n ≤ n2 ).
What if we needed the universe to be all real numbers rather than all natural
numbers? How could we adapt the first version to handle this? We would need
to have a new predicate for “x is a natural number.” Let N (x) stand for this:
Example. Now let’s try a more complex example: Socrates is a man. All men
have ugly feet. Socrates has ugly feet. Again, we can proceed in several ways.
Let the universe be the set of all people. Let U (x) be the predicate x has ugly
feet. Let M (x) be the predicate x is a man. Let s be the constant in the universe
representing the man Socrates. Then the three statements above translate as
follows.
M (s) ∀x(M (x) → U (x)) U (s)
Example. Let’s look at a statement that uses a function in a non-mathematical
universe. Translate: Each man has a father. There are a variety of ways proceed.
Let the universe be all men. Let f (x) be the function “ father of x.” Let S(x, y)
mean is that x same person as y. Then we can formalize the statement as
∀x∃yS(y, f (x)).
Exercises.
1. Assuming that the universe consists of all people, f (x) means “father of
x,” and B(x) means “x is the chancellor,” translate the following into
English.
(a) ∀x¬B(f (x))
(b) ∃xB(x)
(c) ∃x¬B(x)
2. Assuming that the universe consists of all people, f (x) means “father of x,”
D(x) means “x is tiny,” and w represents Waldo, translate the following
into English.
(a) ∀x(D(x))
(b) D(w)
(c) ∀x(D(f (x)) → D(x))
34 CHAPTER 2. PREDICATE CALCULUS
(d) ¬∃x(D(x))
3. Assuming that the universe is the set of natural numbers, E(x) means “x
is even,” O(x) means “x is odd,” and S(x) means “x is a multiple of 3,”
translate the following into English.
(a) ∀x(E(x) ∨ O(x))
(b) ∀x(S(x) → O(x))
(c) ∃x(S(x) ∧ ¬E(x))
(d) ∀x(O(x)) → ∀x(E(x))
4. Assume the universe is all real numbers and L(x, y) means x is less than
y. Match each formula in the first list with a translation in the second
list.
(a) ∀x∀yL(x, y)
(b) ∀y∀xL(x, y)
(c) ∃x∃yL(x, y)
(d) ∃y∃xL(x, y)
(e) ∀x∃yL(x, y)
(f) ∀y∃xL(x, y)
(g) ∃x∀yL(x, y)
(h) ∃y∀xL(x, y)
i. There is a real number that is greater than any real number.
ii. There is a real number that is less than any real number.
iii. Given any real number, we can find a greater real number.
iv. Given any real number, we can find a lesser real number.
v. If x and y are reals, then x is less than y.
vi. There are reals x and y such that x is less than y.
5. Formalize: No elbow is an ankle.
6. Assume that the universe is the set of all fish. Using the information
below, formalize each of the given statements.
• T (x) means “x is a trout”
• S(x) means “x is shiny”
• J(x) means “x jumps”
8. Formalize the four statements below, assuming that the universe is all
men.
So now we have two tasks. First, let’s look at how quantifiers act on for-
mulas. Then we’ll specify exactly what information we need to generate good
translations of formulas. That’s what is in the next two sections. Once we have
the tools we need, we’ll talk about truth.
The predicate M (x, y, f (x, z)) is included in the scope of quantifiers on the
variables x and y. The predicate G(x, y, z) is not in the scope of any quantifier.
Underlining the free variables gives us:
Exercises.
1. Underline the free occurrences of variables in the following formulas.
(a) ∀x(P (x, y) → ∃z(P (x, z)))
2.5 Models
Back in section 2, we were given information that we used to translate formulas
into English. A list of information used in translations is called a model. Our
models must include:
• a universe,
• interpretations of all predicate symbols,
• interpretations of all function symbols, and
• interpretations of all constant symbols.
There are a few rules. The interpretations of the predicate symbols must make
sense for everything in the universe. The interpretations of the function symbols
must be functions that are defined for everything in the universe and take values
in the universe. Finally, the constants must be specific elements of the universe.
There is a lot of freedom in defining a model. We can make the predicates,
functions, and constants mean pretty much whatever we like. Notice that we
don’t get to redefine the quantifiers or connectives, though. ∀x always means
“for all x”, and ∨ always means “or”. Some things never change.
Example. Construct three different models where the formula
1. Let the universe be all real numbers, let P (x, y) represent x is greater than
y, and let B(x) represent x is rational. A translation in this model is:
For all real numbers x, there is a corresponding real number y where either
x is greater than y or x is rational.
2. Let the universe be all people, let P (x, y) represent x is y’s father, and let
B(x) represent x is deceased. A translation in this model is:
For all people x, there is a corresponding person y where either x is y’s
father or x is deceased.
3. Let the universe be cans of soup, let P (x, y) represent x was canned after
y, and let B(x) represent x is too old to eat. A translation in this model
is:
For all cans of soup x, there is a corresponding can y where either x was
canned after y or x is too old to eat.
1. Let the universe be real numbers, f (x, y) denote x·y (usual multiplication),
0 denote 0, and L(x, y) denote x > y (usual inequality). A translation in
this model is:
For every real number x, we can find a real number y such that x · 0 > y.
(Note that this statement is true in this model.)
3. Let the universe be all people and suppose f (x, y) denotes the youngest
person in the set {y, the father of x}. Note that for any pair of people
chosen, the function yields a person. Let 0 denote Zeno, and let L(x, y)
denote “x was born before y was born.” A translation in this model is:
For every person x, we can find a person y such that the younger of x’s
father and Zeno was born before y was born. (This statement is true in
this model, since if x’s father is younger than Zeno we can set y to be x,
and otherwise we can let y be Einstein.)
Exercises.
∀x∃y(x = y ∨ x + 1 > y)
∀x∃y(x = y ∧ f (x) = y)
1. ∀xC(x)
“All natural numbers are multiples of 10” is false, since 9 is not a multiple
of 10.
2.6. TRUTH AND SENTENCES 41
2. ∀xL(x)
“All natural numbers are even” is false, since 3 is not even.
3. ∃x(C(x) ∧ L(x))
“There is a natural number that is both even and a multiple of 10” is true.
For example, 20 is such a number.
4. ∃x(L(x) ∧ ¬C(x))
“There is a natural number that is both even and not a multiple of 10” is
true. For example, 4 is such a number.
5. ∀x(L(x) → C(x))
“For all natural numbers, being even implies being a multiple of 10” is
false, since 4 is even but not a multiple of 10.
Exercises.
1. Let K be the model where the universe is the natural numbers, G(x, y)
means x is greater than y and h(x) represents the function x + 1. Decide if
the following sentences are true in K or false in K. Justify your answers.
(a) ∀x∀yG(x, y)
(b) ∀xG(h(x), x)
(c) ∀x∃yG(x, y)
(d) ∀y∃xG(x, y)
(e) ∀x∀y(G(x, y) → ∃z(G(x, z) ∧ G(z, y)))
2. Let K be the model where the universe is the real numbers, G(x, y) means
x is greater than y and h(x) represents the function x + 1. Decide if the
following sentences are true in K or false in K. Justify your answers.
(a) ∀x∀yG(x, y)
(b) ∀xG(h(x), x)
(c) ∀x∃yG(x, y)
(d) ∀y∃xG(x, y)
(e) ∀x∀y(G(x, y) → ∃z(G(x, z) ∧ G(z, y)))
3. Find a model M where the sentence ∀x∃yA(x, y) is true, and the sentence
∃y∀xA(x, y) is false.
4. Can you find a model M where the sentence ∀x∃yA(x, y) is false, and the
sentence ∃y∀xA(x, y) is true? Explain.
42 CHAPTER 2. PREDICATE CALCULUS
Example. Let M be the model where the universe is the real numbers, G(x, y)
means x > y, and h(x) represents the function x + 1. Classify the following
formulas as true in M , false in M , or satisfiable in M .
1. G(x, x)
This is false in the model, because there does not exist a real number that
is less than itself.
2. G(x, h(x))
This is false in the model, because there does not exist a real number that
is greater than one plus itself.
3. G(0, x)
This is satisfiable in the model, because 0 is greater than negative two
plus one, so there is a number for which the formula is true. Also, not all
real numbers work, so the formula is satisfiable but not true.
4. G(h(x), 0)
This is satisfiable in the model, because one plus one is greater than zero,
so there is a number for which the formula is true. Also, not all real
numbers work, so this formula is satisfiable but not true.
5. G(x, y)
This is satisfiable in the model, because we can find numbers x and y
where x < y. Also, not all real numbers would work, so the formula is
satisfiable but not true.
2.7. TRUTH AND FREE VARIABLES 43
Example. Let K be the model where the universe is the natural numbers
N = {0, 1, 2, ...}, G(x, y) means x > y, and h(x) represents the function x + 1.
Classify the following formulas as true in K, false in K, or satisfiable in K.
This is the same set of formulas as in the previous example; note how the truth
values are different.
1. G(x, x)
False – same as part 1 above.
2. G(x, h(x))
False – same as part 2 above.
3. G(0, x)
False – not the same as part 3 above because we are now looking at the
natural numbers, which do not include the negative numbers.
4. G(h(x), 0)
True – not the same as part 4 above because we are now looking at the
natural numbers, which do not include the negative numbers.
5. G(x, y)
Satisfiable but not true– same as part 5 above.
Exercises.
1. Consider the formula P (x, 0). Find a model where this formula is true, a
model where it is satisfiable but not true, and a model where it is false.
2. Consider the formula ∀xS(x, y). Find a model where this formula is true,
a model where it is satisfiable but not true, and a model where it is false.
3. Consider the formula ∃yR(x, y). Find a model where this formula is true,
a model where it is satisfiable but not true, and a model where it is false.
Exercises.
1. Give an example of a logically valid formula.
2. Give an example of two logically equivalent formulas.
3. Give an example of formulas A and B such that A logically implies B, but
B does not logically imply A.
0 1
46 CHAPTER 2. PREDICATE CALCULUS
Exercises.
1. Show that ∀x(A(x) ∧ B(x)) is not logically valid.
2. Show that ∀x∃yC(x, y) is not logically valid.
3. Show that ∃x(A(x) → B(x)) does not logically imply (∃xA(x)) → (∃xB(x)).
4. Show that ∀x∃yC(x, y) does not logically imply ∃zC(z, z).
5. Show that (∀xA(x)) ↔ (∀xB(x)) is not logically equivalent to ∀x(A(x) ↔
B(x)).
6. Show that the formula
∃x∀yQ(x, y) → ∃x∀yQ(x, y)
A(x) → A(x)
Similarly, A → (B → A) is a tautology, so
is an instance of a tautology.
Here is the fact that makes instances of tautologies interesting. Every in-
stance of a tautology is logically valid. Since we can easily construct instances
of tautologies, we can easily list lots of logically valid formulas. We’ve already
seen three:
∃x∀yQ(x, y) → ∃x∀yQ(x, y)
2.10. SOME LOGICALLY VALID FORMULAS 47
A(x) → A(x)
∀x∃yC(x, y) → (∀xA(x) → ∀x∃yC(x, y))
Note that the formula A(x) → A(x) has a free variable. Since we know it
is logically valid, we know it is true in every model. Now A(x) → A(x) is true
in a model M exactly when ∀x(A(x) → A(x)) is true in M . Formulas that are
true in every model are logically valid, so ∀x(A(x) → A(x)) is logically valid.
The reasoning of the preceding paragraph works for any formula and any
variable. If we know that P is a logically valid formula, then so are the formulas
∀xP , ∀yP , ∀x∀yP , and so on. We can use this rule to build logically valid
formulas that are not instances of tautologies. For example, A(x) → A(x) is an
instance of a tautology, ∀x(A(x) → A(x)) is not an instance of a tautology, but
both are logically valid.
Here’s another way to build more logically valid formulas. If a formula P
is true in a model M , then it is satisfiable in M . Since P is satisfiable in M ,
the formula ∃xP is true in M . Consequently, if P is logically valid, then so is
∃xP . As with adding universal quantifiers, this works for any formula P and
any variable x. We can combine this with our previous work to build more
complicated logically valid formulas. For example, ∀x∃y(C(x, y) → ¬¬C(x, y))
is logically valid, but not an instance of a tautology.
Summarizing, any instance of a tautology is logically valid. Any formula got-
ten by stringing quantifiers in front of a logically valid formula is logically valid.
Not every logically valid formula is an instance of a tautology. Indeed there are
logically valid formulas that simply cannot be built using the techniques of this
section.
Exercises.
1. Each of the following formulas is logically valid. Mark those that are
instances of tautologies.
(a) A(x) → (∀yB(y) → A(x))
(b) ∀x(A(x) → (∀yB(y) → A(x)))
(c) A(x) → (¬B(y) ∨ B(y))
(d) ∃x(A(x) → (¬B(y) ∨ B(y))
(e) ∃x(¬¬A(x) → (¬B(y) ∨ B(y))
(f) ∃y∃x(¬¬A(x) → (¬B(y) ∨ B(y))
2. Each of the following formulas is logically valid. Mark those that are
instances of tautologies.
(a) C(x, y) → C(x, y)
(b) ∀x∃y(C(x, y) → C(x, y))
(c) ∀x∃yC(x, y) → ∀x∃y¬¬C(x, y)
(d) ∀x∃yC(x, y) → ¬¬∀x∃yC(x, y)
48 CHAPTER 2. PREDICATE CALCULUS
∀xP (x, h(x)) – As with the last substitution, this one ”binds” a variable
that was previously free.
When working with formulas in predicate calculus, we will not allow substi-
tutions like the last two. The first two are fine. We can nail this concept down
with a single definition. It’s a little technical, but that’s what makes it precise
and useful.
We can approximate this definition as follows. It’s fine to plug in a term for
a free variable if none of the variables in the term are accidentally captured by
quantifiers.
Example. Consider the terms x, y, f (x, y), and 3. Determine which of these
terms are free for x in each formula below.
1. ∀y(A(x, y) ∨ B(z))
Terms:
(a) x is free for x in A(x) ∨ ∀z(C(z, z) ∧ A(z, y)); A(x) is not in the scope
of any quantifiers and x is always free for x in any formula anyway.
(b) y is free for x in A(x) ∨ ∀z(C(z, z) ∧ A(z, y)); A(x) is not in the scope
of any quantifiers.
(c) f (x, y) is free for x in A(x) ∨ ∀z(C(z, z) ∧ A(z, y)); A(x) is not in the
scope of any quantifiers.
(d) 3 is free for x in A(x) ∨ ∀z(C(z, z) ∧ A(z, y)); A(x) is not in the scope
of any quantifiers, and constants can never be captured by quantifiers
anyway.
Terms:
(a) x is free for x in the formula B(y) → ∀y(A(x, z) ∧ ∃xC(x, y)); the
only free occurrence of x is in the A(x, z) predicate, and x is always
free for x.
(b) y is not free for x in the formula B(y) → ∀y(A(x, z) ∧ ∃xC(x, y)); x
occurs free in the A(x, z) predicate, and y will be captured by the ∀y
quantifier.
(c) f (x, y) is not free for x in the formula B(y) → ∀y(A(x, z)∧∃xC(x, y));
x occurs free in the A(x, z) predicate, and the y in f (x, y) will be
captured by the ∀y quantifier.
(d) 3 is free for x in the formula B(y) → ∀y(A(x, z) ∧ ∃xC(x, y)); con-
stants can never be captured
4. d) ∀x∃yD(x, y, z)
Terms: There are no free occurrences of x to plug in for in this formula.
Consequently, every term is free for x in ∀x∃yD(x, y, z). This is a weird
case, but the idea is not too hard. If there is no place to plug in, then you
can plug in anything safely.
Here’s a summary of all the work done above. In the table below, an OK appears
if the term is free for x in the formula. If not, then an X appears.
x y f(x,y) 3
∀y(A(x, y) ∨ B(z)) OK X X OK
A(x) ∨ ∀z(C(z, z) ∧ A(z, y)) OK OK OK OK
B(y) → ∀y(A(x, z) ∧ ∃xC(x, y)) OK X X OK
∀x∃yD(x, y, z) OK OK OK OK
Let’s summarize some shortcuts. We can plug x in for x in any formula,
and not worry. We can plug a constant symbol in for x in any formula, and not
worry. Note that we only ever plug terms into free occurrences of variables. We
never plug terms of any sort into bounded occurrences of variables.
Exercises.
1. Use the following lists of formulas and terms to solve the exercises below.
Formulas: Terms
1. ∀y(A(x, y) ∨ B(z)) (a) x
2. A(x) ∨ ∀z(C(z, z) ∧ A(z, y)) (b) y
3. B(y) → ∀z(A(x, z) ∧ ∃xC(x, y)) (c) f (x, y)
4. ∀x∃yD(x, y, z) (d) 3
2.12. A PROOF SYSTEM FOR PREDICATE CALCULUS 51
(a) Determine which of the terms are free for y in each formula.
(b) Determine which of the terms are free for z in each formula.
2. Use the following lists of formulas and terms to solve the exercises below.
Formulas: Terms
1. ∀xA(x, y, z) (a) x
2. ∀yB(x, y) ∨ ∀zC(z, y) (b) y
3. ∀y(B(x, y) ∨ ∀zC(z, y)) (c) h(z, 3)
4. ∀y∀z(B(x, y) ∨ C(z, y)) (d) g(x, y, z)
(a) Determine which of the terms are free for x in each formula.
(b) Determine which of the terms are free for y in each formula.
(c) Determine which of the terms are free for z in each formula.
Axioms
Any formulas of predicate calculus may be substituted for A, B, and C in the
following schemes. Also, other variables may be substituted for the use of x in
Axiom 4 and Axiom 5.
Axiom 1: A → (B → A)
Rules of inference
Modus Ponens (MP): From A and A → B, deduce B.
Be careful with Axioms 4 and 5. It’s vital to pay attention to the extra
conditions on free occurrences of x. Here are two examples of common mis-
takes. First, the formula ∀x∃yB(x, y, z) → ∃yB(y, y, z) is not a correct instance
of Axiom 4 because the variable y is not free for x in ∃yB(x, y, z). Second,
the formula ∀x(∃yA(x, y) → B(x)) → (∃yA(x, y) → ∀xB(x)) is not a correct
instance of Axiom 5 because x occurs free in ∃yA(x, y).
Proofs in K look a lot like proofs in L. Here is an example of a short proof.
Exercises.
1. Build two instances for each of the axioms, showing the substitution made
in each case.
2. Are the following instances of one of the axioms? If so, show the substi-
tution made.
(a) ∀x∀yA(x, y) → (∃xB(x) → ∀yA(x, y)).
(b) ∀x∀yA(x, y) → ∀yA(y, y).
(c) ∀x∀yA(x, y) → ∀yA(x, y).
(d) ∃xB(x) → ((∀x∃yC(x, y) → A(x)) → ∃xB(x)).
In order to make efficient use of our new proof system, K, we could use some
shortcuts. When we learned to write proofs in L, progress was painful until
54 CHAPTER 2. PREDICATE CALCULUS
we learned the Deduction Theorem for L. One of the shortcuts we will learn
is a Deduction Theorem for Predicate Calculus. The next four sections consist
entirely of shortcuts and proof strategies for our new proof system.
1. ∀x∀yA(x, y) Given
2.14 Rule T
Since Axiom 1, Axiom 2, Axiom 3 and MP are all included in K, every proof
in L is also a proof in K. The following rule lets us use all the results we could
have proved in L, even if we didn’t actually do the proof.
The only use of GEN in this proof is on the variable x, which does not occur
free in the hypothesis. Thus, we can apply the deduction theorem to obtain
` ∀x(A(x) ∧ B(x)) → ∀xA(x), as desired.
In the preceding proof, we actually used the following restricted version of
the deduction theorem:
Corollary. If A ` B and A has no free variables, then ` A → B.
The restriction on applications of generalization to variables not occurring
free in the hypothesis is a vital part of the statement of the deduction theorem.
Without it, our proofs would not be sound. For example, consider the following
correct proof of x = y ` x = 0.
1. x = y Given
2. ∀y(x = y) GEN, line 1
3. ∀y(x = y) → x = 0 Axiom 4
4. x = 0 MP, lines 2 and 3
Note that the application of GEN in line 2 to the variable x, which occurs free
in x = y, precludes us from applying the deduction theorem. This is a good
thing, because if we incorrectly applied the deduction theorem, we could deduce
x = y → x = 0, which could be generalized to ∀x∀y(x = y → x = 0). This
formula is not logically valid, since in the model with the natural numbers as
its universe and the usual interpretation of = and 0, the implication 1 = 1 →
1 = 0 is false. Just one misapplication of the deduction theorem destroys the
soundness of our proof system. Always check for uses of GEN before applying
the deduction theorem.
Can every proof done using the deduction theorem be done without using
the deduction theorem? Sure! That’s essentially what the deduction theorem
says. At this point, we have enough tools to do a lot of proofs without too much
effort.
Exercises.
Prove the following in K. You may use any theorem with a lower number in
your proof.
2.16 Adding ∃x
If we have ∀xA(x), we ought to be able to prove ∃xA(x). In order to do this,
we need to be able to add ∃x to a formula. Here’s an example of how to do this
using the shortcuts we have so far.
Theorem K 11. A(x) ` ∃xA(x)
1. A(x) Given
2. ∀x¬A(x) → ¬A(x) Axiom 4
3. (∀x¬A(x) → ¬A(x)) → (A(x) → ¬∀x¬A(x)) Rule T
4. A(x) → ¬∀x¬A(x) MP, lines 2 and 3
5. ¬∀x¬A(x) MP, lines 1 and 4
6. ∃xA(x) Abbreviation of line 5
We can extract the content of the proof of Theorem K11, and create an
Add-∃x Rule that handles even more cases. We need to be careful that the
hidden use of Axiom 4 is acceptable. In the following, the clauses requiring that
A(t) is the result of replacing every free occurrence of x in A(x) with t and t is
free for x in A(x) insure that ∀x¬A(x) → ¬A(t) is a correct instance of Axiom
4. This allows us to modify the proof of K11 to obtain a proof of ∃xA(x) from
A(t). Stating the rule will save us from having to mess with contrapositives
every time we want to tack on an existential quantifier.
Add ∃x Rule: If A(t) is the result of replacing every free occurrence of x in A(x)
with t, and t is free for x in A(x), then from A(t) we may deduce ∃xA(x).
Here is an application of the Add ∃x Rule that makes use of the ability to
substitute for a term. In the following, A(y, y) is the result of replacing every
free occurrence of x in A(x, y) with y, and y is free for x in A(x, y). Thus the
Add ∃x Rule allows us to deduce ∃xA(x, y) from A(y, y).
Theorem K 12. A(y, y) ` ∀y∃xA(x, y)
1. A(y, y) Given
2. ∃xA(x, y) Add ∃x Rule, line 1
3. ∀y∃xA(x, y) GEN, line 2
58 CHAPTER 2. PREDICATE CALCULUS
Exercises.
1. Prove:
Theorem K 13. ` ∀xA(x) → ∃xA(x)
(a) Prove K14 using the deduction theorem, Axiom 4 and K13.
(b) Prove K14 using the Add ∃x Rule.
3. Prove:
Theorem K 15. ` ∀x(A(x) ∨ B(x)) → (∀xA(x) ∨ ∃xB(x))
4. Prove the following theorems. Like the proof of Theorem K11, these re-
sults use the fact that ∃xA(x) is an abbreviation for ¬∀x¬A(x). Math-
ematicians use results like these whenever they “push negations past a
quantifier.”
(a)
Theorem K 16. ¬∃xA(x) ` ∀x¬A(x)
(b)
Theorem K 17. ∀x¬A(x) ` ¬∃xA(x)
(c)
Theorem K 18. ∃x¬A(x) ` ¬∀xA(x)
(d)
Theorem K 19. ¬∀xA(x) ` ∃x¬A(x)
2.17 Removing ∃x
So far, we have strategies for adding and removing ∀x, and a rule for adding
∃x. To complete our survey of techniques for manipulating quantifiers, we need
a rule for removing ∃x.
Informally, if we have ∃xA(x), we should be able to find some element to
plug in for x. If we give that element a temporary name, we could proceed
with our proof. The best thing to use as a name is a constant symbol. If we
use a constant symbol that already appears in the proof (or appears in some
weird axioms that we plan to use later), we will be implicitly making additional
assumptions about the element. Consequently, we want to use a new constant
symbol. Here’s the rule, presented more formally.
Rule C. Consequently, correct uses of the shortcut Rule C do not mess up the
completeness and soundness theorems for our proof system. One way to prove
this is to construct an algorithm that converts proofs that use the shortcut
to proofs that do not. This sort of argument closely resembles a proof of the
deduction theorem, and is used in [?].
Exercises.
Use Rule C to prove the following:
Of course, we also can use techniques from propositional calculus like apply-
ing the deduction theorem or proving the contrapositive as a lemma. Here are
some problems that use a variety of methods.
2.18. PROOF STRATEGIES IN PREDICATE CALCULUS 61
Exercises.
Hints: You may find the following strategies useful for the preceding exercises.
K29: P ∨ Q abbreviates ¬P → Q.
Transition to Informal
Proofs
We just spent the whole last chapter talking about predicate calculus. Two of
the important theorems we discussed were the Completeness Theorem and the
Soundness Theorem. These two theorems can be summarized as follows: The
formulas that are provable in predicate calculus are exactly the logically valid
formulas.
These results indicate both the main weakness and the main strength of
predicate calculus. On the one hand, the only formulas we can prove are the
logically valid formulas, which will always be true in every model. However, most
of the interesting formulas in mathematics state properties that are peculiar to
the integers, or the reals, or to some other entertaining specific model. For
example,
∀x(P (x) ∨ ¬P (x))
is true in absolutely every model, but
P(x) := x is prime
O(x) := x is odd
In this model (a particular model), the second statement above translates to:
All prime natural numbers bigger than 2 are odd. This is a true statement, but
since it is not logically valid, we need new axioms in order to prove it.
63
64 CHAPTER 3. TRANSITION TO INFORMAL PROOFS
Exercises.
Prove the following in E.
Theorem E 2. `E x = y → (y = z → x = z) (This is often called the transitive
law of equality.)
Theorem E 3. `E (x = y ∧ x = z) → y = z (This is an axiom of Euclid:
things equal to the same thing are equal to each other.)
Theorem E 4. `E x = y → ∀z(f (z, x) = f (z, y))
Note that Theorem E4 holds regardless of the choice of f (x, z). For example,
we could replace f (x, z) by x + z, x − z, x · z, xz , z x , or any other two place
function.
66 CHAPTER 3. TRANSITION TO INFORMAL PROOFS
Axiom 8: ∀x∀y(x = y → x0 = y 0 )
Axiom 9: ∀x(0 6= x0 )
We can easily paraphrase what these axioms say. Axioms 8, 9 and 10 say
that equality acts the way we expect equality to act related to numbers and
successors. Axiom 9 says that 0 is the least counting number. Axiom 10 says
that 0 is the additive identity. Axioms 11 and 12 outline the behavior of addition,
and Axioms 13 and 14 do the same for multiplication. Axiom 15 says that we
can use induction to prove facts about the counting numbers. All in all, this
seems like a very reasonable list of properties of the natural numbers.
The language of P A is very expressive. That is, lots of properties of the
natural numbers can be written as formulas of P A. Here are some examples.
1. x is even: ∃k(x = 2 · k)
(2 is an abbreviation for 000 .)
3.2. FORMAL NUMBER THEORY 67
2. x is odd: ∃k(x = 2 · k + 1)
(1 is an abbreviation for 00 .)
3. y|x (y divides x evenly): ∃k(x = y · k) )
4. x ≤ y (x is less than or equal to y): ∃k(x + k = y)
5. x < y (x is strictly less than y): ∃k(x + k = y ∧ k 6= 0)
(k 6= 0 is an abbreviation for ¬(k = 0.)
6. x is a prime number: 1 < x ∧ ∀y(y|x → (y = 1 ∨ y = x))
(y|x is an abbreviation for ∃k(x = y · k), as shown in part 3.)
Besides being able to express a multitude of number theoretical concepts,
PA can actually prove gobs of facts about the natural numbers. Here are some
additional statements and their formalizations, each of which can be proved in
PA.
Example. Each of the following mathematical statements is presented with its
formalization in PA. Each of these properties of natural numbers can be proved
from the axioms of PA. Since GEN is included in PA, we can also prove closed
versions of these statements with universal quantifiers in the front.
1. Addition is commutative: x + y = y + x
2. Addition is associative: x + (y + z) = (x + y) + z
3. Multiplication is distributive over addition: x · (y + z) = x · y + x · z
4. Strict inequality is transitive: x < y → (y < z → x < z)
5. Inequality is preserved by addition: x ≤ y → x + z ≤ y + z
6. Strict inequality is preserved by addition: x < y → x + z < y + z
7. Inequality is preserved by multiplication: x ≤ y → x · z ≤ y · z
8. Strict inequality is preserved by nonzero multiplication:
z 6= 0 → (x < y → x · z < y · z)
9. Inequalities can be added: (w ≤ x ∧ y ≤ z) → w + y ≤ x + z
10. Inequalities can be multiplied: (w ≤ x ∧ y ≤ z) → w · y ≤ x · z
We keep asserting that statements can be proved in PA without providing the
proof. There is a reason for this. Generally speaking, the proofs are somewhat
long and complicated, though the next two examples aren’t too bad.These first
two results give a formal proof that 0 · n = 0. From Axiom 13, we know that
n · 0 = 0, but since commutativity of multiplication is not one of our axioms, we
have the prove the new statement. Indeed, this can be used as an initial step
in a proof that multiplication is commutative. (See the exercises.) Remember
that in our proofs in PA, we can use axioms of PA, and results from L, K and
E.
68 CHAPTER 3. TRANSITION TO INFORMAL PROOFS
Exercises.
1. Translate the following statements into formulas of P A. (Note that each of
these could actually be proven in P A, but that is not part of this exercise.)
3. Prove:
Theorem PA 3. ∀n(n = 0 + n)
4. Prove:
Theorem PA 4. ∀x∀y(x + y = y + x)
5. Prove:
Theorem PA 5. ∀x∀y(x · y = y · x)
0 · (n0 ) = 0 · n + 0 Axiom 14
=0·n Axiom 11
=0 Induction hypothesis
Note that Theorem PA6 has a formal proof in PA, though we will not bother
to write it up. Also, in the statement of the theorem, we use k ≤ n as an
abbreviation for ∃x(k + x = n), applying our work from part 4 of the example
on page 67.
We can use Theorem PA6 to create informal proofs in exactly the same way
that we used Axiom 15 before. We will call these proofs by induction with a
shifted starting point. If we want to prove that A(n) holds for all n ≥ k, we can
use the following three steps.
1. Base case: (n = k) Prove that A(k) holds.
3.3. MORE ABOUT INDUCTION 71
The starting point of the summation can be a value other than 0. For example,
X
5
1 1 1 1 1
= + + + .
i=2
i 2 3 4 5
Shifting the starting points and endpoints allow us to rewrite sums in various
convenient formats. For example,
X
n X
n X
n X
n−2
i=1+ i=1+2+ i = (n − 1) + n + i.
i=1 i=2 i=3 i=1
Note that for finite summations, and rearrangement of the terms yields the
same final sum.
Using our new notation, we can state a nice theorem which we will then
prove by an informal induction argument with a shifted starting point. Since
this is the first result that we will prove using strictly informal methods, we will
call it Theorem 1.
X
n
n(n + 1)
Theorem 1. For all n ≥ 1, i= .
i=1
2
Before writing the proof, we should do some scratch work. We will need
to use induction with the starting point kP = 1. In the induction step, our
n
induction hypothesis will be that n ≥ 1 and i=1 i = n(n + 1)/2. We will want
P n0 P
to prove that i=1 i = n0 (n0 + 1)/2, that is, i=1 i = (n + 1)(n + 2)/2. Now
n+1
Pn+1 Pn
i=1 i = ( i=1 i) + (n + 1), so after applying the induction hypothesis we just
need to show that n(n + 1)/2 + (n + 1) = (n + 1)(n + 2)/2. We can prove this
by rewriting the second (n + 1) on the left side of the equation as 2(n + 1)/2
to achieve a common denominator, and then adding fractions and simplifying.
Now we have all the elements of the proof. A little reorganization and we will
have a nice informal proof. We are done with the scratch work; here we go with
the proof.
Proof. We will use induction with a shifted starting point.
X1
1(1 + 1)
Base case: Note that i=1= , so the theorem holds for n = 1.
i=1
2
72 CHAPTER 3. TRANSITION TO INFORMAL PROOFS
X
n
n(n + 1)
Induction step: Suppose that 1 ≤ n, and i= . Then,
i=1
2
à n !
X
n+1 X
i= i +n+1
i=1 i=1
n(n + 1)
= +n+1 (by the induction hypothesis)
2
n(n + 1) 2(n + 1)
= +
2 2
n(n + 1) + 2(n + 1)
=
2
(n + 1)(n + 2)
= .
2
X
n
n(n + 1)
Conclusion: By induction, we have shown i= for all n ≥ 1.
i=1
2
Exercises.
1. Prove the following using informal induction arguments. You may use any
previously proved theorems of PA, the algebraic properties in the example
on page 67, and basic high school algebra facts.
P
n
Theorem 2. 2k = 2n+1 − 1
k=0
P
n
Theorem 3. 2k = n2 + n
k=1
Theorem 4. k ≥ 1 → 8|(9k − 1)
Theorem 5. n ≥ 3 → n2 ≤ 5n!
3. Find a formula in the language of PA with the free variables n and x that
formalizes the statement “x is the sum of the natural numbers less than
or equal to n.”
P
k
k2 +k+2
Non-Proof. Assume the statement is true for n = k, so i= 2 , and
i=1
consider
X
k+1 X
k
k2 + k + 2
i = (k + 1) + i = (k + 1) + .
i=1 i=1
2
Expanding out the binomials and combining terms over the common denomi-
nator gives:
X
k+1
2k + 2 + k 2 + k + 2 (k + 1)2 + (k + 1) + 2
i= =
i=1
2 2
A = S 6 {x}
B = S 6 {y}
A and B are sets of k horses, and thus by the induction hypothesis each contains
horses of one color. Now choose any z contained in A ∩ B. z and y are both
in A and are therefore the same color. z and x are both in B and are therefore
the same color as well. Thus x is the same color as y.
What is wrong here? We know that the statement is false! Somehow induc-
tion was not properly done. The error is a subtle one. We chose horses x 6= y
out of our set of horses S – that’s two horses – and then we chose another horse
z from S. That makes three horses in the smallest S possible for the induction
step to make sense. So the base case should have been two horses, which is
false! The moral of this example is: Think very carefully about the base step.
Now that we have mastered induction and seen some errors to avoid, it
is very tempting to use our new hammer on every nail we see. Induction is
not always the most direct approach to proving a theorem. In an induction
proof, if the induction hypothesis is not used in the proof of the induction step,
then induction can be avoided. The direct proof will resemble the proof of
the induction step with the base case omitted. The next exercise illustrates
this situation. Our erroneous proof of Non-theorem 2 looked like an induction
step with the base case omitted, but in that argument we used the induction
hypothesis. In the exercise, we can shorten the proof while avoiding the error.
Exercise.
1. Consider the theorem:
Theorem 10. n is odd → n2 − 1 is divisible by 4.
(a) Prove this theorem by induction. (Your induction step will not re-
quire the use of the induction hypothesis.)
(b) Prove this theorem without using induction.
1. ¬A → (B ∧ ¬B) Lemma
1. ¬(x 6= 00 ) Given
2. ¬(x 6= 00 ) → x = 00 Rule T
5. ∀x(x = 00 ) → 0 = 00 Axiom 4
7. ∀x(0 6= x0 ) Axiom 9 of PA
8. ∀x(0 6= x0 ) → 0 6= 00 Axiom 4
Proof. We will assume the negation of the theorem, giving us n2 is even and
n is not even. We expect to find a contradiction. Since n is not even, it is not
a multiple of 2, so there is a k such that n = 2 · k + 1. Thus,
n2 = n · n = (2k + 1) · (2k + 1)
= 4k 2 + 4k + 1
= 2(2k 2 + 2k) + 1
Theorem 12. At a party of more than two people, there are at least two people
who have the same number of friends at the party.
Proof. We will prove this by contradiction. Assume that there are n people at
the party and that no two people have the same number of friends at the party.
This means that we can match each person to their number of friends and list
them in order:
Since person n has n − 1 friends present, every person at the party is a friend
of person n. In particular, person 1 is a friend of person n. However, person 1
has 0 friends at the party, so person 1 is no friend of person n. Contradiction!
So there are at least two people with the same number of friends present.
78 CHAPTER 3. TRANSITION TO INFORMAL PROOFS
Besides doing party tricks, proof by contradiction can be used to prove the
next interesting theorem about prime numbers. Recall from item 6 in the ex-
ample on page 67 that n is prime if and only if both n > 1 and if k divides n
then k = 1 or k = n.
Proof. We will prove this theorem by contradiction. Assume that there are
finitely many primes, say n of them. We can list them in order:
q = p i1 · p i2 · · · p ik .
Choose any prime from the prime factorization on the right, say pi1 . Our number
pi1 divides the right side of this equation, so it must also divide the left side.
Because pi1 is a prime, it appears in the list p1 , p2 , . . . pn , and so pi1 divides
p1 · p2 · · · pn . Since pi1 divides the first term of the left side, and it divides the
entire left side, it must divide the second term on the left, so pi1 must divide
1. Thus pi1 = 1, contradicting the assumption that pi1 is a prime! Thus there
must not be a largest prime, and so there are infinitely many.
These are both worthy of proofs themselves. They are certainly not obvious
from our basic axioms or from the definitions of divisibility and prime. A math-
ematician would prove these results first, perhaps as lemmas, and then cite them
in the main proof. Let’s prove these lemmas.
Proof. Let a + b = c. Then subtracting a from both sides of this equation gives
b = c − a. Since p|a and p|c, p|(c − a). Because c − a is b, this implies that
p|b.
3.5. PROOFS BY CONTRADICTION 79
Lemma 2. Every natural number greater than 1 is either prime or has a prime
factorization.
Proof. We will prove this result by induction.
Base case: n = 2 is prime.
Induction step: Assume all numbers greater than 2 and less than k are prime
or have prime factorizations. We must show that k is either prime or has a prime
factorization. There are two cases: either k is prime or k is not prime. If k is
prime, we’ve attained our conclusion, so we’ll assume k is not prime.
By the definition of prime number, k is not prime implies that we can find
m and d each strictly between 1 and k so that k = m · d. Note that m < k and
d < k, so by the induction hypothesis, m and d are either prime or have prime
factorizations. Since m is a product of one or more primes and d is a product of
one or more primes, k = m · d is a product of two or more primes. Summarizing,
in this case k has a prime factorization, completing the proof of the induction
step, and the entire proof.
Theorem 14. If 2n − 1 is prime, then n is prime.
Proof. We’ll assume that 2n − 1 is prime and that n is not prime, and look
for a contradiction. Since n is not prime, there are factors x and y such that
n = x · y, and 1 < x, y < n.
So
2n − 1 = 2xy − 1 = (2x )y − (1)y
= (2x − 1)((2x )y−1 + (2x )y−2 + ... + 1).
Since we can factor in this way, we have found a factorization of 2n − 1, but
2 − 1 is not equal to either or 2n − 1 because x is not equal to either 1 or n.
x
Exercises.
1. Prove Theorem 15.
2. Prove the following theorems. You may wish to use proofs by contradic-
tion.
Theorem 17. If n2 is odd, then n is odd.
Theorem 18. The sum of the cubes of two consecutive natural numbers
cannot be equal to the cube of the next largest number.
Theorem 19. If m and n are odd then x2 − 2mx + 2n = 0 has no natural
number solution, x.
√
Theorem 20. If for all m, 1 < m < p implies m does not divide p, then
p is prime.
Theorem 21. There are at least two people in the world with exactly
the same number of hairs on their heads.
Existence: To show something exists, we must either cite it, (i.e., give an
example) or show that it has to occur without actually producing it. This
latter situation is called an indirect proof, and is sometimes accomplished
through a proof by contradiction: Assume that it doesn’t exist and derive
a contradiction.
Uniqueness: To show that something is unique, it is almost always easiest
to assume that there are two with the same properties and then prove
that the two are equal.
If and Only If Statements (iff or ↔ ): From propositional logic, we know
that to accomplish the proof of A ↔ B, we can prove both A → B and
B → A. The two directions might use very different approaches. It is
unusual for such a statement to be proven without dividing it into the two
cases.
Showing that two Expressions are Equal: We have seen direct proofs of
A = B. Sometimes, it is not obvious how to accomplish this. There are
other, equivalent forms of equality that may be easier to prove:
A−B =0
(A ≥ B) ∧ (B ≥ A)
A
B = 1, B 6= 0
3.6. OTHER STRATEGIES 81
Exercises.
1. Give informal proofs of the following theorems.
Theorem 34. 3 must divide the sum of any three consecutive numbers.
Alternation of Quantifiers –
Sequences
In this section we will study sequences and sequence convergence. The state-
ments in this chapter will involve the alternation of quantifiers, so let’s review
some of what we did formally.
Remember that ∀x∃y has a different meaning from ∃y∀x. In the first, we
are required to produce for each x, a corresponding y, and in the second we are
required to produce a single y that works for every x. Let’s review this idea
with an example:
Let the universe be the set of people Tom, Dick and Harry. Consider the
predicate P (x, y) = x likes y. Then all possible alternating quantifiers are:
Having this under our belts, notice the occurances of alternating quantifiers
in the basic definitions about sequences below.
83
84 CHAPTER 4. ALTERNATION OF QUANTIFIERS – SEQUENCES
han i
where n takes on every value in N, unless otherwise stated.
hni: 0, 1, 2, 3, 4, . . . , n, . . .
h2−n i: 1, 12 , 14 , 18 , . . . , 21n , . . .
h2−n i∞
1 :
1 1 1 1
2 , 4 , 8 , ..., 2n , . . .
h(−1)n i∞
0 : 1, −1, 1, −1, 1, −1, 1, . . .
hni∞
3 : 3, 4, 5, 6, . . . , n, . . .
Thus, for any given ² > 0, we have shown how to produce an N such that if
m > N then |am − L| < ².
Theorem 2. h 2n+1
n
i is bounded.
(
2−n if n is even
Theorem 3. If an = then han i converges to 0.
3−n if n is odd
¯ −N ¯
¯2 − 0¯ < ²
2−N < ²
One way to solve for N would be to take the log2 of both sides:
−N < log2 ²
N > − log2 ²
4.1. SEQUENCES, BOUNDS AND CONVERGENCE 87
Ok; so recapping, the proof should work as follows: Fix ², and let N =
− log2 ². Algebra should get us
¯ −N ¯
¯2 − 0¯ < ²
We have
¯ −m ¯
¯2 − 0¯ = 2−m .
Since m > N and N = − log2 ², we have that m > − log2 ², so:
¯ −m ¯
¯2 − 0¯ < 2log2 ² = ².
The proof for convergence of h3−n i should work the same way using an N
of − log3 ². How do we combine these to prove Theorem 2? We need to find an
N that works regardless of whether the later term is 2−m or 3−m .
So what we really need to do is to choose the larger N given ², i.e., choose
the larger of − log2 ² and − log3 ². This will guarantee that we are far enough
out on the sequence so that the terms are within ² of 0. Which if these two logs
is larger? That depends on ², and since we don’t want to make any assumptions
regarding ², we will simply let N = max{− log2 ², − log3 ²}.
Here is the proof of Theorem 3:
2
3 +1 i converges to 0.
Theorem 5. h n2n
2N 2
How should we proceed? We could try to solve N 3 +1 < ² for N in terms of
². This would be very messy:
2N 2
<²
N3 + 1
2N 2 < ² · (N 3 + 1)
2N 2 − ² · (N 3 + 1) < 0
Yuk! It’s cubic in N .
A better approach: Note that
2N 2 2N 2 2
< =
N3 + 1 N3 N
because we have made the denominator smaller by subtracting 1, and hence the
fraction is larger.
This implies that if we find an N that works for the series with general
2
term N2 then it will also work for the series with general term N2N
3 +1 . Why?
2
The inequality tells us that no matter what index we are interested in, N2N
3 +1 is
2 2
below N , so if we find the place on N where all subsequent terms are within ²
2
of L, all subsequent terms of N2N
3 +1 will also be within ² of L.
So we have a new question: What N works for h N2 i? Let’s try the algebraic
way of getting N in terms of ²:
2
−0<²
N
2
<N
²
How do we put this all together in our proof?
2
Proof. Choose an arbitrary ² > 0, and consider N = ². For the sequence
2
3 +1 i and m > N , we need to show that
h n2n
¯ ¯
¯ 2m2 ¯
¯ ¯
¯ m3 + 1 − 0¯ < ².
We have
¯ ¯
¯ 2m2 ¯ 2
¯ − 0 ¯ = 2m < 2 .
¯ m3 + 1 ¯ m3 + 1 m
Since m > N and N = 2² , we have that m > 2² , so:
¯ ¯
¯ 2m2 ¯ 2 2
¯ ¯
¯ m3 + 1 − 0¯ < m < 2 = ².
²
4.2. MORE ON CONVERGENCE AND BOUNDEDNESS 89
Exercise 4.1. Do the following sequences converge? If so, to what? Are they
bounded? If so, by what? Provide proofs for those that converge and/or are
bounded.
1
a. an = 1 + n
1+(−1)n
b. an = 2
1 1 1
c. an = 1 + 2 + 3 + ... + n
2n
d. an = 3n+1
3n+7
e. an = n
n2
f. an = n+1
n2
g. an = 2n2 +1
h. an = (−1)n 2−n
sin(n)
i. an = n
n!
j. an = 2n
k. an = 5n
4−n (where n ≥ 5)
How shall we start this one? Let the limit be A and note that eventually
(for m’s greater than some N ) |am − A| < 1, or
A − 1 < am < A + 1.
Why? We are using the definition for the specific case of ² = 1. Thus a lower
bound can be found by choosing the smallest number from the set {a1 , a2 , ..., an , A−
1} and an upper bound can be found by choosing the largest number from the
set {a1 , a2 , ..., an , A + 1}.
Proof. Suppose |an | converges to A. Choose ² = 1; then there is an N such
that m > N implies
A − 1 < am < A + 1.
Let L = min{a1 , a2 , ..., an , A − 1} and U = max{a1 , a2 , ..., an , A + 1}. Then for
all n, L < an < U .
Theorem 7. The limit of a convergent sequence is unique.
So how will we prove this? In the standard way: Assume there are 2 limits
and show that they must be equal. This is not so easy as it sounds. Here is a
proof. Notice that we are using a specific ² again.
Proof. We will prove this by contradiction. Assume han i converges to A and
also to B, and assume that A < B. Let ² = 12 (B − A). Since han i converges to
A, we know that there is an N1 such that for all m > N1 we have |am − A| < ²
or
A − ² < am < A + ².
Similarly, since han i converges to B, we know that there is an N2 such that
for all m > N2 we have |am − B| < ² or
B − ² < am < B + ².
As long as we are beyond both N1 and N2 , we have:
1 1
A + ² = A + (B − A) = B − (B − A) = B − ²
2 2
This is a contradiction, since B − ² < am < A + ².
This is not the only way to prove this theorem. Can you develop another
proof?
Theorem 8. If han i converges to A and hbn i converges to B then han + bn i
converges to A + B.
So how do we approach this? We need
|(aN + bN ) − (A + B)| < ²
or
|(aN − A) + (bn − B)| < ².
Can we say that |aN − A| < 2² and |bN − B| < 2² ? Sure! The definition says
that we have the result for all ², so we also have it for any 2² . Here is the proof:
4.3. A NOTE ON DIVERGENT SEQUENCES 91