0% found this document useful (0 votes)
30 views45 pages

CH 5 Exploring Z

Uploaded by

charifeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views45 pages

CH 5 Exploring Z

Uploaded by

charifeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER 5: EXPLORING Z

WAYNE AITKEN AND LINDA HOLT

Summer 2019 Edition

1. Introduction
In this chapter we continue the study of the ring Z. We begin with
absolute values. The absolute value function Z → N is the identity when
restricted to N. The fundamental law |ab| = |a| · |b| shows that this function
is compatible with products. Equally important is the fact that it is not
always compatible with sums.
Next we consider induction. In previous chapters we used only a limited
form of induction where the base case is zero and where we have to prove a
statement n when assuming it for n − 1. In practice we sometimes want the
base case to start at another integer (positive or negative). Also, sometimes
we want to be able to prove the case n not from the assumption that it holds
for n − 1, but under the stronger assumption that it holds for all suitable
integers less than n. These variants are developed in this chapter.1 Unlike
the earlier principle of induction, these new forms of induction will not be
the basis of new axioms, but will be proved to be valid from previous results.
A major theme of this chapter is divisibility. We consider division b/a,
but at first only in the case where a | b (and where a 6= 0). This is fol-
lowed by a more general conception of division captured by the important
Quotient-Remainder Theorem, which introduces the basic concepts of quo-
tient and remainder. We use the Quotient-Remainder Theorem to prove a
few things about least common multiples (LCMs). We also briefly discuss
the analogous idea of greatest common divisors (GCDs). We then consider
prime numbers and relatively prime pairs, and prove a few basic results
including the principle, valid for prime p, that
p | ab =⇒ p | a or p | b.
From these topics, there are three other topics that naturally follow (i) the
fact that every n > 1 is the product of primes (part of the Fundamental
Theorem of Arithmetic), (ii) the fact that the set of prime numbers is infinite,
and (iii) the fact that, for any fixed base B > 1, every integer has a unique
Copyright c 2007–2019 by Wayne Aitken and Linda Holt. The copyright holders autho-
rize individuals to make a single paper copy of this edition for personal, noncomercial use.
1We won’t consider all forms of induction. For example, transfinite induction will not
be covered in these notes. This is a type of induction concerning collections of transfinite
ordinals instead of just N or well-ordered subsets of Z.
1
2 EXPLORING Z

base B representation. QThe only difficulty P with these topics is that they
involve finite products ai and sums ai . We have yet to consider such
products and sums and justify their basic laws. These concepts also require
the concept of a finite sequence a1 , . . . , ak .
A large part of the chapter will be used to justify the basic laws for finite
sums and products, but before this is done there will be a section where
we discuss informal proofs of the three facts (i), (ii), (iii) mentioned above
(concerning primes and Q base B representations),
P and where we discuss what
properties of products ai and sums ai are required for their proofs.
In subsequent sections the necessary theory of finite sequences, finite sums,
and finite products is developed. The official proofs of (i), (ii), Qand (iii)Pare
given in later sections. Optional sections follow which discuss ai and ai
further.
Only part of the Fundamental Theorem of Arithmetic is proved in this
chapter.2

2. Absolute values in Z
Definition 1. The absolute value |a| of a ∈ Z is defined as follows.

a if a ≥ 0
|a| =
−a if a < 0
The following is an easy consequence of the definition and the fact, from
Chapter 4, that a < 0 if and only if −a > 0.
Theorem 1. If a ∈ Z then |a| ≥ 0. Furthermore, for n ∈ N,
|a| = n ⇐⇒ a = n or a = −n.
In particular (since −0 = 0), |a| = 0 if and only if a = 0.
Remark 1. Since |a| ≥ 0, the rule x 7→ |x| defines a function Z → N. If a ∈ N
then |a| = a so the restriction from Z to N of x 7→ |x| is the identity function.
Exercise 1. Use the last statement of Theorem 1 to show that |a| ≥ 1 if
and only if a 6= 0.
Next we establish that absolute value is compatible with multiplication.
Theorem 2. If a, b ∈ Z then
|ab| = |a| · |b|.
Exercise 2. Prove this theorem. Hint: if either a or b is zero, the result is
easy. Divide the remaining proof into four cases. In the cases where a < 0,
write a = −m for m ∈ N. In the cases where b < 0, write b = −n for n ∈ N.
Informal Exercise 3. Absolute value is less compatible with addition.
Give examples where |a + b| = |a| + |b| holds, and give examples where
it fails.
2The full version will be proved in a future edition; perhaps simultaneously for Z and
polynomial rings.
EXPLORING Z 3

Theorem 3. Let n ∈ N and a ∈ Z. Then |a| ≤ n if and only if −n ≤ a ≤ n.


Similarly, |a| < n if and only if −n < a < n.
Proof. Suppose |a| ≤ n. Let m = |a|. So 0 ≤ m ≤ n. By Theorem 1, either
a = m or a = −m. In the first case 0 ≤ a ≤ n. In the second case 0 ≤ −a
and −a ≤ n, which implies 0 ≥ a and a ≥ −n by results of Chapter 4. In
either case −n ≤ a ≤ n.
Now suppose −n ≤ a ≤ n. If a ≥ 0 then |a| = a so |a| ≤ n. If a < 0 then
observe that −n ≤ a implies −a ≤ n by a result of Chapter 4. Thus |a| ≤ n
in this case as well.
The proof for < is similar. 
Theorem 4. Let x, y, n ∈ Z. If 0 ≤ x < n and 0 ≤ y < n then |x − y| < n.
Proof. We have −y ≤ 0 (Chapter 4), so x + (−y) ≤ x + 0 < n + 0. Thus
x − y < n by mixed transitivity.
We also have −n < −y (Chapter 4). So 0 + (−n) < 0 + (−y) ≤ x + (−y).
Thus −n < x − y by mixed transitivity.
By Theorem 3, |x − y| < n. 

3. Induction and recursion variants


In Chapter 1, the axiom of induction was introduced. This axiom al-
lows us to prove a statement for all natural numbers provided we know the
statement is true for 0, and provided we have an argument that its truth
for n implies its truth for n + 1. Obviously this is not the only valid form
of induction. For example, one can choose to start at integers other than 0,
and adjust the conclusion accordingly. There is also a variant called “strong
induction” that is easier to use when the n and n + 1 cases are not clearly
connected. Here, in the inductive step, you get to assume that the statement
holds of all integers from the base to n − 1, and then you try to prove that
it holds for n. This allows you to use a stronger hypothesis than regular
induction, which in turn can make it easier to prove desired results.
Since these variant forms of induction were not included in the axioms,
we need to prove they are valid before we can use them. This is the purpose
of this section. We also consider a variant of the definition of recursion, a
version especially useful for defining summations and general finite products.
In Chapter 4 translation functions were used to show the following: Let S
be a nonempty subset of Z. If S has a lower bound then it has a minimum,
and if S has an upper bound than it has a maximum. We use this result to
to justify the variant forms of induction.3
Theorem 5 (Base b induction). Let b be an integer, and S a subset of Z
such that (i) b ∈ S and (ii) n ∈ S ⇒ n + 1 ∈ S for arbitrary integers n ≥ b.
Then
{x ∈ Z | x ≥ b} ⊆ S.
3Warning: “base” here is used in a different sense then at the end of this chapter where
we discuss base B representations of an integer.
4 EXPLORING Z

Proof. Consider the set E of exceptions. In other words, let E be the set of
all integers x ≥ b not in S. We wish to show that E is empty. So suppose
that E is not empty.
Observe that E has lower bound b, but b 6∈ E (by assumption (i)). So,
by the above mentioned property (from Chapter 4), E must have a min-
imum m > b. Let a = m − 1. Since a + 1 = m, we know b < a + 1.
Note b ≤ a, otherwise we would have a < b < a + 1, but we know there
are no integers strictly between a and a + 1. Also note that a cannot be
an exception since m is the minimum of E and a is less than m. In other
words, a ∈ S. By assumption, a ∈ S ⇒ a + 1 ∈ S. Thus m = a + 1 is in S,
a contradiction. 

Here is a finite version of the above:


Theorem 6. Let b and c be integers with b ≤ c, and let S be a subset of
integers such that (i) b ∈ S and (ii) n ∈ S ⇒ n + 1 ∈ S for all b ≤ n < c.
Then
{b, . . . , c} ⊆ S.
Exercise 4. Modify the proof of Theorem 5 to prove the above. Keep in
mind that you are not doing a proof by induction; you are proving that this
method of induction is valid.
Finally, one sometimes needs the following form of induction:
Theorem 7 (Strong induction). Let b ∈ Z and S ⊆ Z. Suppose b ∈ S and
{b, . . . , n − 1} ⊆ S =⇒ n ∈ S ∀ n > b.
Then
{x ∈ Z | x ≥ b} ⊆ S.
Proof. Let E be the set of all integers x ≥ b not in S. We wish to show
that E is empty. So suppose that E is not empty.
Observe that E has lower bound b. So E must have a minimum m.
Since b 6∈ E we have m > b. Since m is the minimum, {b, . . . , m − 1} ⊆ S.
By assumption, however, {b, . . . , m − 1} ⊆ S ⇒ m ∈ S. This means m ∈ S,
a contradiction. 
Remark 2. Recall that if c < b we defined {b, . . . , c} to be the empty set.
With that in mind, observe that the hypothesis in the above theorem can
be restated as
{b, . . . , n − 1} ⊆ S =⇒ n ∈ S ∀n≥b
with n ≥ b replacing n > b. If n = b this becomes ∅ ⊆ S =⇒ b ∈ S.
Since ∅ ⊆ S is always true, this is logically equivalent to b ∈ S. So there
is no reason to explicitly require b ∈ S if we require the implication for
all n ≥ b and not just n > b.
EXPLORING Z 5

In Chapter 2 we introduced the idea of recursive definitions which is


very similar to induction. (We use induction in the context of a proof, and
recursion in the context of a definition). One common version of recursion
is captured by the following theorem whose proof was given in the last
(optional) section of Chapter 2.
Theorem 8. Let S be a set, c an element of S, and g : N × S → S a
function. Then there is a unique function f : N → S satisfying the two
equations
f (0) = c

f (n + 1) = g n, f (n)
for all n ∈ N.
This theorem allows us to define a function just by giving a base case
equation, and a recursive equation defining f (n + 1) in terms of n and f (n).
The function g gives the dependency of f (n+1) on n and f (n). For example,
the factorial function f (n) = n! is the unique function satisfying the two
equations
f (0) = 1
f (n + 1) = (n + 1)f (n)
In this case g : N × N → N is the function g(n, m) = (n + 1)m. The recursive
definition leads to the two laws
0! = 1
(n + 1)! = (n + 1)n!
which we can then use to prove theorems about the factorial function.
We now give a few variants of this recursive definition theorem.
Theorem 9 (Base b recursion). Let b be an integer, and consider
I = {b, b + 1, . . .} ⊆ Z.
Let S be a set, c an element of S, and g : I × S → S a function. Then there
is a unique function f : I → S satisfying the two equations
f (b) = c

f (n + 1) = g n, f (n)
where the second equation holds for all n ∈ I.
Proof. To show uniqueness, suppose f1 and f2 both satisfy the desired con-
ditions. Let S ⊆ I the subset of n ∈ I such f1 (n) = f2 (n). Use an induction
argument (via Theorem 5) to show that S = I. Thus f1 = f2 as functions.
To show existence, shift from I to N and use Theorem 8. More precisely,
let g̃ : N × S → S be defined by the equation
g̃(k, m) = g(b + k, m).
6 EXPLORING Z

Now use Theorem 8 to define a function f˜: N → S by the equations


f˜(0) = c
 
f˜(n + 1) = g̃ n, f˜(n) .
Finally define f : I → S by
f (n) = f˜(n − b).
Observe that
f (b) = f˜(b − b) = f˜(0) = c
and
f (n + 1) = f˜(n + 1 − b)
= g̃ n − b, f˜(n − b)


= g̃ n − b, f (n)

= g n, f (n) .

A finite version of the above can also be given:
Theorem 10. Let b and d be integers such that b ≤ d, and consider
I = {b, . . . , d} ⊆ Z.
Let S be a set, c an element of S, and g : (I − {d}) × S → S a function.
Then there is a unique function f : I → S satisfying the two equations
f (b) = c

f (n + 1) = g n, f (n)
where the second equation holds for all b ≤ n < d.
Proof. To show uniqueness, suppose f1 and f2 both satisfy the desired con-
ditions. Let S ⊆ I the subset of n ∈ I such f1 (n) = f2 (n). Use an induction
argument (via Theorem 6) to show that S = I. Thus f1 = f2 as functions.
To show existence, extend the function g from the finite set I to the infinite
set I˜ = {b, b + 1, . . .} and use Theorem 9. Finally, restrict the result f˜ of
Theorem 9 to the set I.
More precisely, let g̃ : I˜ × S → S be defined by the equation
(
g(n, m) if n < d
g̃(n, m) =
m if n ≥ d.
(The definition for the case n ≥ d doesn’t matter for the proof, but the
value m is a convenient choice.) Now use Theorem 9 to define a func-
tion f˜: I˜ → S by the equations
f˜(b) = c
 
f˜(n + 1) = g̃ n, f˜(n) .
EXPLORING Z 7

Finally define f : I → S to be the restriction of f˜ to the subset I. Observe


f (b) = f˜(b) = c
and if b ≤ n < d then n, n + 1 ∈ I and
f (n + 1) = f˜(n + 1)
= g̃ n, f˜(n)


= g n, f (n) .


4. Divisibility and division


In previous chapters we have discussed addition, subtraction, multiplica-
tion, and even exponentiation. We have covered almost all of basic arith-
metic, except we have avoided the delicate topic of division. We start with
divisibility
Definition 2. Let d ∈ Z. An integer of the form cd with c ∈ Z, is called a
multiple of d. If b = cd is a multiple of d, then we also say that d divides b.
In this case we call d a divisor of b, and we write d | b.
In other words, given b, d ∈ Z, the statement d | b holds if and only if
there exists a c ∈ Z such that b = cd.
Warning. The term divides refers to a relation: it is either true or false
when applied to two integers. It does not produce a number.
The relation | is written with a vertical stroke, and should not be confused
with / (Definition 3) which produces a number. There is a relationship
between these two ideas. In fact, a|b if and only if b/a is an integer. Note
that the order is reversed! (Here we assume a 6= 0).
Exercise 5. Prove the following simple consequences of the definition.
Theorem 11. Suppose a, b ∈ Z.
(i) a | a.
(ii) 1 | a.
(iii) a | ab.
(iv) a | 0.
Exercise 6. So a | 0 for all a ∈ Z. Show, however, that 0 - a for all a 6= 0.
Exercise 7. Prove the following. Show that the divisibility relation is also
reflexive, but not symmetric.
Theorem 12. The divisibility relation is transitive: for all a, b, c ∈ Z, if a | b
and b | c then a | c.
Exercise 8. Prove the following.
Theorem 13. Suppose a, b, d ∈ Z and a 6= 0. Then d | b if and only if ad | ab.
Exercise 9. Prove the following theorem and its corollary.
8 EXPLORING Z

Theorem 14. Suppose a, b, c, u, v ∈ Z. If c | a and c | b then c | ua + vb.


Corollary 15. Suppose that c | a and c | b where a, b, c ∈ Z. Then c divides
the sum and difference of a and b.
Theorem 16. Let d, a ∈ Z. If d | a where a 6= 0, then |d| ≤ |a|.
Proof. By definition, a = cd for some c ∈ Z. Claim: c 6= 0. To see this,
observe that if c = 0 then a = 0, a contradiction.
By Exercise 1, |c| ≥ 1. Now multiply both sides of the inequality 1 ≤ |c|
by |d|. By Theorem 2, we get
|d| ≤ |c||d| = |cd| = |a|.

Exercise 10. Show that the only divisors of 1 are ±1. Show that the only
divisors of 2 are ±1 and ±2. Hint: see Theorem 1.
Exercise 11. Show that the set of divisors of a non-zero integer a is finite.
Hint: apply Theorem 3 to n = |a|. Is {−n, . . . , n} finite?
Exercise 12. Prove the following. (Treat zero cases separately).
Corollary 17. If a | b and b | a then |a| = |b|.
Remark 3. The above results hint at the fact that the sign of the integers
does not affect divisibility. The following lemma and corollaries illustrates
this. Thus it is traditional to focus on the positive divisors only.4
Lemma 18. Let a, b ∈ Z. If a | b then −a | b, a | −b, and −a | −b.
Corollary 19. Let a, b ∈ Z. Then
a | b ⇐⇒ |a| | b ⇐⇒ a | |b| ⇐⇒ |a| | |b|.
In particular a | |a| and |a| | a (since a | a).
Corollary 20. Let b ∈ Z. Then b and −b have the same divisors.
Corollary 21. Let b ∈ Z. Then d | b if and only if −d | b.
We now define division, but only in the case where a | b. The general case
must wait until we introduce the rational numbers Q.
Definition 3 (Division). Suppose a, b ∈ Z are such that a | b and a 6= 0.
Then b/a is defined to be the integer c ∈ Z such that ac = b. (This integer
exists since a | b. You will show it is unique.)
Exercise 13. For the above definition to be valid, the element c must be
unique. Show the uniqueness.
4The proofs of the next few results are left to you the reader. In general, some of the
easier results will not be proved. You the reader, should supply the proofs. It is fine to
do this in your head if the proof is simple enough.
EXPLORING Z 9

Remark 4. Division is analogous to subtraction. Subtraction, which is de-


fined in terms of addition, is only partially defined in N, but becomes totally
defined in the ring Z. Similarly division, which is defined in terms of multi-
plication, is only partially defined in Z, but becomes almost totally defined
in the field Q. Division is never totally defined: you cannot divide by zero.
It is sometimes handy to restate a definition as a theorem. Obviously for
such theorems the proof is a simple appeal to the definition, and does not
usually need to be written out. We now restate the definition of division:
Theorem 22 (Basic law of division). Suppose a, b, c ∈ Z are such that a | b
and a 6= 0. Then b/a = c if and only if b = ac.
Exercise 14. Prove the following four theorems with the basic law of divi-
sion.
Theorem 23. Let a ∈ Z be non-zero. Then a/a = 1 and 0/a = 0.
Theorem 24. Suppose a, b ∈ Z are such that a 6= 0 and a | b. Then
b = a · (b/a).
Theorem 25. Suppose a, b, c ∈ Z are non-zero integers such that a and b
divide c. Then c/a = b if and only if c/b = a.
Theorem 26. Suppose a, b ∈ Z where b 6= 0 Then ab/b = a.

5. The quotient-remainder theorem


Suppose a 6= 0 and a possibly does not divide b. Then we do not consider
a simple quotient b/a. Instead we get a both quotient and a remainder.
If a | b then the remainder is 0. These ideas are based on the following:
Theorem 27 (Quotient-remainder theorem). Let a, b ∈ Z where a 6= 0.
Then there are unique q, r ∈ Z such that
b = qa + r and 0 ≤ r < |a|.
Definition 4 (Quotient and remainder). Let b, a ∈ Z where a 6= 0. The
integers q and r above are called the quotient and remainder of dividing b
by a. Also, Rem(b, a) is defined to be the remainder when dividing b by a.
The strategy of the proof is to define q to be such that qa is the largest
multiple of a that is less than b. We need a lemma that shows that there is
a largest multiple.
Lemma 28. Suppose a, b ∈ Z are such that a 6= 0. Then there is a largest
multiple of a that is less than or equal to b.
Proof. Let S be the set of multiples of a that are less than or equal to b. By
a result of Chapter 4, if S is non-empty and has an upper bound, then it
has a maximum. Obviously b is an upper bound. So we only need to show
that S is non-empty.
10 EXPLORING Z

If b ≥ 0 then 0 ∈ S, so we are done. So assume b < 0. Since a 6= 0,


we have |a| ≥ 1 (Exercise 1). Multiplying both sides of |a| ≥ 1 by b gives
|a| · b ≤ b. Since a divides |a| we have a divides |a| · b (transitivity). In
particular, |a| · b ∈ S. 

We now prove the existence of q and r in Theorem 27.

Proof of existence. Let qa be the largest multiple of a such that qa ≤ b.


def
This exists by the previous lemma. Let r = b + (−qa). By adding qa to
both sides we get qa + r = b as desired.
We still need to show that 0 ≤ r < |a|. Since qa ≤ b, we have

qa + (−qa) ≤ b + (−qa).

In other words, 0 ≤ r. So we must only show r < |a|.


Suppose otherwise that r ≥ |a|. Then r + (−|a|) ≥ |a| + (−|a|). In other
words r − |a| ≥ 0. So

b = qa + r = qa + |a| + (r − |a|) ≥ qa + |a|.

However, qa + |a| > qa, and a divides qa + |a| by Theorem 14. This con-
tradicts the choice of qa as the maximum multiple of a less than or equal
to b. 

Proof of uniqueness. Suppose that b = qa + r = q 0 a + r0 where 0 ≤ r < |a|


and 0 ≤ r0 < |a|. Then, using laws from Chapter 4,

r − r0 = (b + (−qa)) − (b + (−q 0 a)) = (q 0 − q)a.

By Theorem 4, |r − r0 | < |a|. By Theorem 2,

|r − r0 | = |q 0 − q| · |a|.

So |q 0 − q| · |a| < |a|. This means |q 0 − q| < 1 (Chapter 2). Since |q 0 − q| is


an integer, we have |q 0 − q| = 0. So q 0 − q = 0 (Theorem 1). Thus q 0 = q.
Also, since r − r0 = (q 0 − q)a, we have r − r0 = 0. So r0 = r. 

Exercise 15. Prove the following:

Theorem 29. Let a, b ∈ Z where a 6= 0. Then

Rem(b, a) = 0 ⇐⇒ a | b.

If Rem(b, a) = 0 then b/a is the quotient (as defined in Definition 4).

Informal Exercise 16. Find the quotient and remainder of dividing 20 by


9. Find the quotient and remainder of dividing −30 by 7.
Informal Exercise 17. What is Rem(109, 7), Rem(−109, 7), Rem(−70, 7)?
EXPLORING Z 11

6. GCDs and LCMs


Definition 5. Suppose that a, b ∈ Z. Then a common divisor is an integer d
such that d | a and d | b. A common multiple is an integer m that is both a
multiple of a and a multiple of b. In other words, a | m and b | m.
Informal Exercise 18. Find all the common divisors of −8 and 12 (even
the negative divisors). Find four common multiples of −8 and 12.
Theorem 30. Let a, b be integers, not both zero. Then a and b have a
greatest common divisor. This divisor is also called the GCD of a and b,
and is written gcd(a, b).
Proof. Let S be the set of common divisors. We know that 1 ∈ S, so S is
not empty. Without loss of generality, suppose a 6= 0. By Theorem 16, all
elements x ∈ S satisfy x ≤ |a|. Thus S has an upper bound. By a result of
Chapter 4, S has a maximum. 

Informal Exercise 19. Find two positive integers a and b whose GCD is 1.
Find two distinct positive integers a and b, both greater than 1, whose GCD
is just a.
Theorem 31. Let a, b be non-zero integers. Then a and b have a least
common positive multiple. This multiple is usually called the least common
multiple, or the LCM, of a and b.
Proof. Let S be the set of positive common multiples. Since |ab| ∈ S, S is
not empty. By the well-ordering property of N, the set S has a minimum. 

Informal Exercise 20. Find two positive integers a and b whose LCM
is ab. Find two distinct positive integers a and b whose LCM is not ab.
Exercise 21. Prove the following.
Theorem 32 (Linear Combination). Let a, b, u, v ∈ Z. Every common
divisor of a and b divides ua + vb. In particular, gcd(a, b) | ua + vb.
The following is sometimes handy:
Lemma 33. Let b, a be integers where a 6= 0. Then any common divisor
of b and a also divides Rem(b, a). In particular, gcd(b, a) | Rem(b, a).
Proof. We have that b = qa+r where q is the quotient and r is the remainder.
Thus Rem(b, a) = (1)b + (−q)a. By Theorem 32, any common divisor of b
and a divides Rem(b, a). 

It is easy to see that any multiple of the LCM is a common multiple, the
following gives a converse.
Theorem 34. Let a, b be non-zero integers, and let m be the LCM. Then
any common multiple of a and b is a multiple of m.
12 EXPLORING Z

Proof. Let c be a common multiple of a and b. Observe that a is a common


divisor of c and m. Thus a is a divisor of Rem(c, m) by Lemma 33. Like-
wise, b is a divisor of Rem(c, m). Thus Rem(c, m) is a common multiple of a
and b. But Rem(c, m) < m (Quotient-Remainder theorem), and m is the
least common positive multiple. Thus Rem(c, m) = 0 which implies that c
is a multiple of m. 

7. Prime numbers and relatively prime pairs


Definition 6 (Prime number). A prime number (or a prime) is an integer p
such that (i) p > 1, and (ii) the only positive divisors of p are 1 and p.
Exercise 22. Show that 2 and 3 are prime, but that 4 is not. You may use
the facts {1, . . . , 2} = {1, 2} and {1, . . . , 3} = {1, 2, 3}. You may also use
the facts 3 = 2 + 1, 4 = 2 · 2, and 1 < 2 < 4. (These facts are all easily
provable using the results of Chapters 1 and 2). Hint: use Theorem 16.
The following is a great illustration of the usefulness of strong induction.
Regular induction is not as easy to use here since knowing that n has a
prime divisor does not help us to show that n + 1 has a prime divisor.
Theorem 35. Let n ≥ 2 be an integer. Then n has at least one prime
divisor.
Proof. Let S be the set of all integers x ≥ 2 such that x has a prime divisor.
Observe that S contains all prime numbers since p | p for all such p. In
particular 2 ∈ S. Now suppose that n > 2 and that we have established
{2, . . . , n−1} ⊆ S. If n is prime we have n ∈ S, so consider the case where n
is not prime. Then n has a positive divisor d where d 6= 1 and d 6= n. By
Theorem 16 this implies that 1 < d < n. So d ∈ S. Thus d has a prime
divisor p. Since p | d and d | n, we have p | n by transitivity. So n ∈ S.
By the principle of strong induction (Theorem 7), all integers n ≥ 2 are
in S. So any such n has a prime divisor. 
Definition 7 (Relatively prime). Let a, b ∈ Z. We say that a and b are
relatively prime if 1 is the only positive common divisor of a and b. In other
words, a and b are relatively prime if and only if gcd(a, b) = 1.
Remark 5. Observe that being prime is a property of one integer, while
being relatively prime is a property of a pair of integers.
Theorem 36. If p, q ∈ N are distinct prime numbers, then p and q are
relatively prime. More generally, if p is a prime and p - a where a ∈ Z
then p and a are relatively prime.
Exercise 23. Prove the above theorem.
Exercise 24. Show that 3 and 4 are relatively prime. Hint: 4 = 3 + 1, so
what is Rem(4, 3)?
Theorem 37. Suppose that a, b ∈ Z are non-zero and relatively prime.
Then the LCM of a and b is |ab|.
EXPLORING Z 13

Proof. Let m be the LCM of a and b. Since |ab| is a common multiple of a


and b, we have mq = |ab| for some q ∈ Z (Theorem 34). We will show
that m = |ab| by showing that q = 1.
Since a and b are non-zero, the same is true of ab. Thus |ab| is positive.
Also m is positive by definition of LCM. Thus q must be positive (the other
cases lead to contradictions). Also mq 0 = ab where q 0 = q or q 0 = −q.
Claim: q | a. To see this, write m = kb (m is a multiple of b). So
ab = q 0 m = q 0 (kb) = (q 0 k)b. By the cancellation law for multiplication
(Chapter 4), a = q 0 k. Thus q 0 | a. Hence q | a (Lemma 18).
Likewise, q | b. Thus q is a common positive divisor of a and b. Since a
and b are relatively prime, q = 1. So m = |ab|. 
Theorem 38. Suppose that a, b, c ∈ Z, and that a and b are relatively prime.
If a | c and b | c then ab | c.
Proof. If a = 0 then we must have c = 0 since c is a multiple of a. Since 0 | 0
we are done. Likewise if b = 0 then c = 0, and we are done. So we can now
assume a and b are non-zero.
By Theorem 37 the LCM of a and b is |ab|. In particular |ab| | c by
Theorem 34. The result follows from Corollary 19. 
Informal Exercise 25. Give two examples of the above theorem for specific
values of a, b, c. Now give two counter-examples if we drop the requirement
that a and b be relatively prime.
Here is an important fact about prime numbers:
Theorem 39. Let a, b ∈ Z, and p a prime. If p | ab then p | a or p | b.
Proof. If p | a we are done, so we will assume that p - a. By Theorem 36, p
and a are relatively prime. Observe that a | ab (def. of divisibility) and p | ab
(assumption), so ap | ab by Theorem 38. By Theorem 13, p | b as desired
(note a 6= 0 since p - a). 
Informal Exercise 26. Give two examples of the above theorem for specific
values of a, b, p. Now give two counter-examples if we drop the requirement
that p be prime.
Definition 8. A composite number is a positive integer n such that n = ab
for some a, b ∈ N with 1 < a < n and 1 < b < n.
Remark 6. Some sources may allow some negative integers to be classified
as composite as well, but our definition is adequate for most situations.
Theorem 40. Let n ∈ Z. Suppose n > 1. Then exactly one of the following
occurs: (i) n is prime, or (ii) n is composite.
Proof. It is clear that both cannot occur: if n = ab with 1 < a < n then a
is a divisor of n not equal to 1 or n, so n is not a prime.
Now we will show that at least one of the two cases occurs. If n is prime
we are done. Otherwise, by the negating the definition of prime, we see that
14 EXPLORING Z

there is a positive divisor a of n such that a 6= 1 and a 6= n. So 1 < a < n


(Theorem 16). Since a | n, there is a b ∈ Z such that ab = n. Since a and n
are positive, b must be as well (the other possibilities lead to contradictions).
The assumptions b = 1 or b = n lead to contradictions. Also b is a
positive divisor of n. Thus 1 < b < n (Theorem 16). Thus n is composite
as desired. 

Exercise 27. Show that, in the above proof, the assumption b = 1 leads to
a contradiction. Show that b = n also leads to a contradiction.

8. Three key theorems (informal)


The results developed in the above sections give us a powerful set of tools
to explore the integers. We will conclude the chapter by using these tools
to prove three important results: (i) every integer n ≥ 2 can be factored
into prime numbers, (ii) the set of prime numbers is an infinite set, and
(iii) given a base B > 1 every integer has a unique base B representation.
We have the tools to prove many more results about Z, but the exploration
of advanced properties of Z is in the purview of a branch of mathematics
called number theory and goes beyond the scope of this chapter.
In this section we give sketches of the proofs of the three results (i), (ii),
and (iii) mentioned above. The sketches are informal and utilize facts about
finite sums and products that have not been developed yet. In the next
few sections, we will formally develop the needed background on sequences,
summation, and products. The chapter ends with the formal proofs of the
three featured results (followed by few optional sections).
We begin with the statement that every n ≥ 2 can be written as the
product of primes. In other words,
k
Y
n= pi
i=1

for some finite sequence p1 , . . . , pk of prime numbers.


This result has a quick proof using strong induction. Let S be the set of
integers x ≥ 2 which can be written as a product of primes. Obviously all
primes are in S (use k = 1 and p1 = n). In particular, we have the base
case: 2 ∈ S since 2 is a prime. Now we wish to show n ∈ S assuming that
{2, . . . , n − 1} ⊆ S. Given such an n > 2, let p be a prime divisor of n, and
write n = pm. We know such p exists by Theorem 35. If m = 1 we are
done: n is prime. If m > 1 then m ∈ {2, . . . , n − 1}. Thus m ∈ S, and so m
is the product of primes (inductive hypothesis and definition of S):
k
Y
m= pi .
i=1
EXPLORING Z 15

So, if pk+1 is defined to be p then


k
Y k+1
Y
n= pi · p = pi
i=1 i=1

as desired. By the principle of strong induction, S contains all n ≥ 2.


The second result is that the set of prime numbers is infinite. The proof
very old: it can be found in Euclid’s Elements of Geometry. It proceeds by
contradiction: suppose the set S of primes is finite. Then we can list all the
primes in a finite sequence p1 , . . . , pk . Let
k
Y
n=1+ pi .
i=1

By Theorem 35, there is a prime p dividing n. Since p1 , . . . , pk lists all


primes, p = pj for some j. Observe that
k
Y
n−1= pi ,
i=1

so p = pj divides n − 1. Since p divides n and n − 1, it must divide the


difference. The difference is 1, a contradiction since 1 has no prime divisors.
The third result is that, given a base B > 1, every positive integer n can
be written uniquely in the form
k
X
n= di B i
i=0

where k is a non-negative integer, and where d0 , . . . , dk is a finite sequence


with each di ∈ {0, . . . , B − 1} where dk 6= 0. The sequence is called the
base B representation of n.
The proof is by strong induction. Fix B > 1 and let S be the set of all
positive integers with unique base B representation. First we observe that S
contains all integers n where 1 ≤ n < B. To see existence of the base B
expansion for n, let k = 0 and d0 = n. To see uniqueness of the base B
expansion for n, observe that k must be zero, otherwise the sum has value B
or more. Since k = 0, we must have d0 = n. In particular, we have the base
case 1 ∈ S.
Now we wish to show n ∈ S assuming that {1, . . . , n − 1} ⊆ S. By
the above argument, we can assume n ≥ B. By the Quotient-Remainder
Theorem, n = qB + r for some q and r with r ∈ {0, . . . , B − 1}. Since
1 ≤ q < n, we have q ∈ S. So
l
X
q= ei B i
i=0
16 EXPLORING Z

for unique l and unique ei ∈ {0, . . . , B − 1} with el 6= 0. Thus


l
X l
X l+1
X
n = qB + r = B ei B i + r = ei B i+1 + r = ei−1 B i + r.
i=0 i=0 i=1
Let k = l + 1, let di = ei−1 if 1 ≤ i ≤ k, and let d0 = r. This choice
gives existence. Uniqueness of the base B expansion of n can be proved by
(1) using the fact that q and r are unique (using the Quotient-Remainder
Theorem), (2) showing that r is d0 in any base B expansion, and (3) using the
fact that the base B expansion of q is unique (by the inductive hypothesis)
to show that di is unique for i > 0.
Observe that the above proofs make use of three key concepts that have P
not been developed yet: finite sequences
Q (a 1 , . . . , a k ), summations (using ),
and general finite products (using ). So before we can give formal proofs
for the above results, we need to develop these three concepts. This is the
purpose of the next three sections.

9. Sequences
Functions provide a common framework for much of mathematics, and a
surprising number of mathematical objects and concepts are actually just
functions. For example, addition is thought of as a binary operator. In other
words, addition is a function Z × Z → Z. Other binary operations, such as
multiplication and subtraction are also thought of as functions. Successor
is such a basic function that it was incorporated into our axioms. We in-
terpreted iteration as composing a function with itself a certain number of
times. In Chapter 3 we even interpreted the counting process as a bijective
function {1, . . . , n} → S.
In this section we use functions to interpret another basic concept: the
sequence. We begin with finite sequences.
Definition 9. Let S be a set. A finite sequence with values in S is a function
{m, . . . , n} → S. Here m and n are integers with m ≤ n.
Remark 7. If c is such a finite sequence, we usually write c(i) as ci . As
with other kinds of functions, we often define a sequence by giving a rule
expressed in terms of a generic element i in the domain. For instance, we
might say something like “ci = 2i + 1 ∈ N where i = 0, . . . , 5” which means
that we are defining the sequence c as the function {0, . . . , 5} → N given by
the rule i 7→ 2i + 1. The variable i used here to define our sequence can
be replaced by any other unused variable. So the above sequence could just
as well be defined as cj = 2j + 1 ∈ N where j = 0, . . . , 5. A variable (such
as i above) that can be replaced by any other undeclared variable (such as j
above) is called a bound or dummy variable.
The image of a particular i is called the ith term of the sequence, or the
ith value, and i is called the index. The domain {m, . . . , n} is called the
index set.
EXPLORING Z 17

Remark 8. We often denote a finite sequence with the notation (ci )i=m,...n ,
or just (ci ) if there is no need to describe the domain. In other words we just
indicate the generic ith term inside parentheses. For instance, the sequence
in the previous remark can be written (2i + 1)i=0,...,5 . Again, i here is a
bound or dummy variable. So

(2i + 1)i=m,...,n = (2k + 1)k=m,...,n .

There are actually a variety of ways to denote sequences. For instance, we


could write (cm , . . . , cn ) or even cm , . . . , cn . Other notation may be em-
ployed, but always keep in mind that, regardless of how we denote it, the
sequence is just a function.
We often define sequences in terms of other sequences. So the sequence
(3ai + 4)i=m,...,n denotes a sequence (ci )i=m,...,n where ci = 3ai + 4 and
where (ai ) is a previously given sequence. Similarly (3B2i+1 ) denotes a
sequence defined in terms of another sequence (Bi ). Here, only some of the
terms (the odd terms) of (Bi ) are used. The ith term of the new sequence
uses the 2i + 1st term of another sequence (Bi ).
The sequence (bi+k )i=m−k,...,n−k is not equal to (bi )i=m,...,n even though
they have the same values in the same order. The reason is that sequences
are functions, and two functions with differing domains are not equal. The
one sequence is called a shift of the other.

Now we describe infinite sequences. These are important in analysis, and


will be considered later in connection with the real numbers.

Definition 10. If n ∈ Z then let {n, n + 1, . . .} denote {x ∈ Z | x ≥ n}.

Definition 11. An infinite sequence in S is a function {n, n + 1, . . .} → S


where n ∈ Z.

Remark 9. Notational conventions described in the definition of finite se-


quences will be extended to infinite sequences in the obvious way. For ex-
ample, (ai )i=1,2,... denotes a sequence with domain or index set {1, 2, . . .}.
We can also write (ai )i≥1 or (a1 , a2 , . . .) to denote such an infinite sequence.

Informal Exercise 28. Consider the values 5, 10, 17, 26, 37. Define a se-
quence with these values. What is the domain? What is the index set? What
is the value set? Write a shifted sequence with the same values. Extend the
original sequence to an infinite sequence.

10. Summation
Informally, the expression
n
X
bi
i=m
18 EXPLORING Z

denotes the sum bm + bm+1 + . . . + bn . For example, if we have a sequence


with terms c1 , c2 , c3 , c4 ∈ Z, then
4
X
ci = c1 + c2 + c3 + c4 .
i=1

The summation notation can be used for any sequence (bi ) with values bi
in a ring or additive group U . More generally, it can be used for sequences
with values in any set U possessing a binary operation called +. The formal
definition takes the following recursive form:
Definition 12 (Summation). Let (bi ) be a finite or infinite sequence. Sup-
pose each bi ∈ Z or, more generally, each bi ∈ U where U is a set possessing
a binary operation called +. Suppose m is in the index set of (bi ) then we
define
X n
bi
i=m
recursively for all n ≥ m in the index set of (bi ) as follows:
In the base case:
m
def
X
bi = bm .
i=m
If n > m then write n = k + 1 where k ≥ m and use the following:
k+1 k
!
def
X X
bi = bi + bk+1 .
i=m i=m

This recursive definition yields elements of U .


Lemma 41. The above definition is well-defined.
Proof. Let J ⊆ Z be the index set of (bi ). We use Theorem 9 or Theorem 10
depending on whether J is infinite or finite. We describe in detail the finite
case; from this it will be clear on how the handle the infinite case.
Write J = {e, . . . , d}. Fix m where e ≤ m ≤ d. Let I = {m, . . . , d}.
Now define a function g : (I − {d}) × U → U by the rule g(k, x) = x + bk+1 .
By Theorem 10, there is a unique function f : I → U satisfying the two
equations
f (m) = bm

f (k + 1) = g k, f (k) = f (k) + bk+1
where the second equation holds for all m ≤ k < d. P
We get the desired definition if we write f (n) as ni=1 bi . 
Remark 10. The variable i in the above definition is a dummy variable and
is not an essential part of the definition. It can be replaced by any other
EXPLORING Z 19

variable not currently in use. So, for instance,


n
X n
X
bi = bu .
i=m u=m

Remark 11. It is important to allow U to be any set with an additive binary


operation. This allows us to use the summation idea for all the number
systems of the course (including N, Z, Zm , Q, R, C) without redeveloping
it for each special case. Most of the number systems are rings, but N is not,
so we do not want to restrict ourselves only to rings.
One consequence of the definition is that the summation will be an ele-
ment of U if all the terms are in U (assuming + is a binary operation on U
whichPmeans that U is closed under addition). For example, if each P bi ∈ N
then bi ∈ N. Likewise, if each bi is a positive
P integer then so is bi , and
if each bi ∈ Z is divisible by d ∈ Z then so is bi . This is because the set of
positive integers and the set of multiples of d are sets closed under addition,
and so can be chosen as U .
Exercise 29. Use the above definition to show that
X1 2
X X3
ai = a1 , ai = a1 + a2 , ai = (a1 + a2 ) + a3 ,
i=1 i=1 i=1
and
4
X 
ai = (a1 + a2 ) + a3 + a4
i=1

Theorem 42 (General distributive law). Let R be a ring.5 Let c be a


constant and let (bi ) be a sequence such that c ∈ R and each bi ∈ R. Suppose
that the domain of (bi ) contains {m, . . . , n} where m ≤ n. Then
n
X n
X
c bi = c bi .
i=m i=m

Proof. We will use the form of induction for a finite set of integers (see
Theorem 6). Let S be the set of integers k ∈ {m, . . . , n} such that
k
X k
X
c bi = c bi
i=m i=m
holds.
First we need to show that m ∈ S (base case). In this case
m
!
X
c bi = c(bm )
i=m

5Or at least assume R is a set with additive and multiplicative binary operations for
which the left distributive law holds.
20 EXPLORING Z

and
m
X
(c bi ) = (c bm )
i=m

by Definition 12 (case where n = m). Thus m ∈ S.


Now assume that k ∈ S with m ≤ k < n. We wish to show k + 1 ∈ S.
Observe that
k+1 k
! ! !
X X
c bi = c bi + bk+1 (Def. 12)
i=m i=m
k
!
X
= c bi + c bk+1 (Distr. Law)
i=m
k
!
X
= c bi + c bk+1 (Since k ∈ S)
i=m
k+1
X
= c bi (Def. 12)
i=m

Thus k + 1 ∈ S.
By Induction (Theorem 6) we have {m, . . . , n} ⊆ S. In particular n ∈ S.
The theorem follows. 

Note. If R is a non-commutative ring, then we would want a general right


distributive law. Its proof is essentially the same.

Exercise 30. Show that the usual distributive law is just the special case
of the above theorem where m = 1 and n = 2.
For R = Z, or for R any commutative ring, we have a general commutative
law. Since the proof and statement are a bit complicated, and since we do
not need it in what follows,
P this is discussed in an optional section below.
Informally it states that ai is preserved when we permute the terms of
the sequence (ai ). The following is also a type of commutative law:

Theorem 43. Let R be a ring.6 Suppose that (bi ) and (ci ) are two sequences
in R, and suppose the domains of (bi ) and (ci ) both contain {m, . . . , n}
where m ≤ n. Then
n
X n
X n
X
(bi + ci ) = bi + ci .
i=m i=m i=m

Exercise 31. Prove the above theorem.

6Or at least assume R is a set with an additive binary operation that is commutative
and associative.
EXPLORING Z 21

Theorem 44. Suppose m ≤ n where m, n ∈ Z. Then


n
X
0 = 0.
i=m

(Here the summation is in Z or in any set U with an addition operation that


possesses an additive identity 0.)

Exercise 32. Prove the above theorem.

Theorem 45. Suppose (bi ) is a sequence in Z (or in any additive abelian


group). Suppose the domain of (bi ) contains {m, . . . , n} where m ≤ n. Then
n
X n
X
− bi = (−bi )
i=m i=m

Proof. By Theorem 43 and Theorem 44


n
X n
X n
X n
 X
bi + (−bi ) = bi + (−bi ) = 0 = 0.
i=m i=m i=m i=m
P
Now add − bi to both sides. 

Theorem 46 (General associative law). Let (bi ) be a sequence in a ring R,


or more generally in a set U with an associative binary operation called +.
Suppose l, m, n ∈ Z satisfy l ≤ m − 1 and m ≤ n. If the domain of (bi )
contains {l, . . . , n}, then

n
X m−1
X n
X
bi = bi + bi .
i=l i=l i=m

Proof. We will use the form of induction of Theorem 6 designed for finite
sets of integers. Let S be the set of all integers k such that m ≤ k ≤ n and

k
X m−1
X k
X
bi = bi + bi .
i=l i=l i=m

First we need to show that m ∈ S (base case). In this case

m
X m−1
X m−1
X m
X
bi = bi + bm = bi + bi
i=l i=l i=l i=m

using Definition 12. Thus m ∈ S.


22 EXPLORING Z

Now assume that k ∈ S with m ≤ k < n. We must show k + 1 ∈ S.


Observe that
k+1 k
!
X X
bi = bi + bk+1 (Def. 12)
i=l i=l
m−1 k
!
X X
= bi + bi + bk+1 (Since k ∈ S. Ind. Hyp.)
i=l i=m
m−1 k
!
X X
= bi + bi + bk+1 (Assoc. Law)
i=l i=m
m−1
X k+1
X
= bi + bi (Def. 12).
i=l i=m
Thus k + 1 ∈ S.
By Induction (Theorem 6) we have {m, . . . , n} ⊆ S. In particular n ∈ S.
The theorem follows. 
Exercise 33. Show that the general associative law for the case where l = 1,
m = 2, and n = 4 is
 
(a1 + a2 ) + a3 + a4 = a1 + (a2 + a3 ) + a4
Exercise 34. Show that the usual associative law is given by the case
where l = 1, m = 2, n = 3.
Remark 12. As the above exercises illustrate, this theorem is called the
general associative law because it allows you to move parentheses. For in-
stance, the default placement of (outer) parentheses of a1 + a2 + a3 + a4 + a5
is (a1 + a2 + a3 + a4 ) + a5 , but the above theorem allows you to equate this
with, for instance, (a1 + a2 ) + (a3 + a4 + a5 ) or even a1 + (a2 + a3 + a4 + a5 ).
Of course, one can use this law to regroup the subgroupings as well. So, for
instance, it implies

(((a1 + a2 ) + a3 ) + a4 ) + a5 = a1 + a2 + ((a3 + a4 ) + a5 ) .
To see this, step by step, observe
5
X
(((a1 + a2 ) + a3 ) + a4 ) + a5 = ai (Def. 12)
i=1
X1 5
X
= ai + ai (Thm. 46)
i=1 i=2
2 5
!
X X
= a1 + ai + ai (Thm 46)
i=2 i=3
= a1 + (a2 + ((a3 + a4 ) + a5 )) (Def. 12)
EXPLORING Z 23

Remark 13. The general associative law allows you to move the parentheses
around, but it does not allow you to reorder the ai . For that you need
general commutative law discussed in the later (optional) Section 15.

There is one more summation law that we will need:

Theorem 47. Suppose that (bi ) is a sequence with values in a set U with
binary operation +. Suppose m, n, k ∈ Z are such that m ≤ n and such that
the domain of (bi ) contains {m, . . . , n}. Then

n
X n+k
X
bi = bi−k .
i=m i=m+k

Proof. First observe that the function i 7→ bi−k has domain containing the
Pn+k
set {m + k, . . . , n + k}, so i=m+k bi−k is defined. This is due to the fact
that m + k ≤ i ≤ n + k implies m ≤ i − k ≤ n.
The proof will use the form of induction in Theorem 6 for the finite
set {m, . . . , n}. Let S be the set of all integers l ∈ {m, . . . , n} such that

l
X l+k
X
bi = bi−k .
i=m i=m+k

First we need to show that m ∈ S (base case). In this case

m
X m+k
X
bi = bm = b(m+k)−k = bi−k
i=m i=m+k

by Definition 12. Thus m ∈ S.


Now assume that l ∈ S with m ≤ l < n. We need to show l + 1 ∈ S.
Observe that
l+1 l
!
X X
bi = bi + bl+1 (Def. 12)
i=m i=m
l+k
!
X
= bi−k + b((l+1)+k)−k (Since l ∈ S)
i=m+k
(l+1)+k
X
= bi−k (Def. 12)
i=m+k

Thus l + 1 ∈ S.
By Induction (Theorem 6) we have {m, . . . , n} ⊆ S. In particular n ∈ S.
The theorem follows. 
24 EXPLORING Z

11. General finite products


Informally, the general finite product
n
Y
bi
i=m
denotes the product bm · bm+1 · · · bn . For example, if we have a sequence
with terms b1 , b2 , b3 ∈ Z then
3
Y
bi = b1 · b2 · b3 .
i=1

The finite product can be defined for sequences (bi ) with values in any set U
that possesses a binary operation that is written multiplicatively.
The concept of a general finite product is similar to that of a finite sum
discussed in the previous section. In fact, the difference in some of the proofs
is purely notational, and the definition is identical except for notational
changes:
Definition 13 (General products). Let (bi ) be a sequence with values in a
ring U or, more generally, a set possessing a binary operation written with
multiplicative notation. Suppose m is in the index set of (bi ) then we define
n
Y
bi
i=m

recursively for all n ≥ m in the index set of (bi ) as follows:


In the base case:
m
def
Y
bi = bm .
i=m
If n > m then write n = k + 1 where k ≥ m and use the following:
k+1 k
!
def
Y Y
bi = bi · bk+1 .
i=m i=m
This recursive definition yields elements of U .
Lemma 48. The above definition is well-defined.
Proof. The proof is a notational variant of the proof of Lemma 41. 
Remark 14. As with summation, it is important to allow U to be any set
with a binary operation that is written multiplicatively. In particular, if U is
any set that is closed under a multiplication operation, then the general finite
product will have a value in U if all the terms are in U . For example, Q if all
the terms bi are positive integers, then so is the general finite product bi .
This is seen by choosing, in this example, the set U to be the set of positive
integers.
EXPLORING Z 25

Remark 15. The variable i in the above definition is a dummy variable, and
can be replaced by any variable not currently in use. So, for instance,
Yn Yn
bi = bw .
i=m w=m

Exercise 35. Suppose (ai )i=1,...,4 is a sequence in a ring R. Use the above
definition to show that
Y 1 2
Y Y3
ai = a1 , ai = a1 · a2 , ai = (a1 · a2 ) · a3 ,
i=1 i=1 i=1
and
4
Y 
ai = (a1 · a2 ) · a3 · a4
i=1

Theorem 49 (General associative law). Suppose U is a ring, or at least a


set with an associative binary operation written in multiplicative notation.
Let (bi ) be a sequence in U . Suppose l, m, n ∈ Z satisfy l ≤ m−1 and m ≤ n.
If the domain of (bi ) contains {l, . . . , n}, then
n
Y m−1
Y n
Y
bi = bi · bi .
i=l i=l i=m

Proof. Adapt the proof of Theorem 46. 


Exercise 36. Show that the usual associative law is given by the case
where l = 1, m = 2, n = 3.
Exercise 37. Describe the associative law for the case where l = 1, m = 3,
and n = 5.
Now we consider divisibility properties of general finite products. First
we prove a special case as a lemma:
Lemma 50. Suppose (aj ) is a sequence with values in a ring R and with
domain containing {m, . . . , n} where m ≤ n. Then, for some b ∈ R,
n
Y
aj = am · b.
j=m

Proof. If n = m then m
Q
j=m aj = am (Def. 13), so let b = 1.
If m < n then
Yn m
Y Yn
aj = aj · aj (Thm. 49, Gen. Assoc.)
j=m j=m j=m+1
n
Y
= am · aj (Definition 13).
j=m+1


26 EXPLORING Z

Theorem 51. Suppose (aj ) is a sequence with values in Z and with domain
containing {m, . . . , n} where m ≤ n. Then, for each i ∈ {m, . . . , n},
n
Y
ai divides aj .
j=m

Proof. The case i = m is covered by the previous lemma. So assume


that m < i ≤ n. Then
n
Y i−1
Y n
Y
aj = aj · aj (Thm. 49, Gen. Assoc.)
j=m j=m j=i
i−1
Y
= aj · (ai · b) for some b ∈ Z (Lem. 50)
j=m
i−1
Y
= (ai · b) · aj (Comm. Law)
j=m
 
i−1
Y
= ai b · aj  (Assoc. Law).
j=m

So ai divides the product. 


Theorem 52. Let R be a commutative ring.7 Suppose that (bi ) and (ci )
are two sequences in R. Suppose the domains of (bi ) and (ci ) both con-
tain {m, . . . , n} where m ≤ n. Then
n
Y n
Y n
Y
(bi ci ) = bi · ci .
i=m i=m i=m

Proof. Adapt the proof of Theorem 43. 


Theorem 53. Suppose m ≤ n where m, n ∈ Z. Then
Yn
1 = 1.
i=m
(Here the product is in a ring U or in any set U with a multiplication oper-
ation that possesses an multiplicative identity 1.)
Theorem 54. Suppose that (bi ) is a sequence with values in a set U with
binary operation written multiplicatively. Suppose m, n, k ∈ Z are such that
m ≤ n and such that the domain of (bi ) contains {m, . . . , n}. Then
n
Y n+k
Y
bi = bi−k .
i=m i=m+k
7Or at least assume R is a set with a multiplicative binary operation that is commu-
tative and associative.
EXPLORING Z 27

Proof. Adapt the proof of Theorem 47. 


We end this section with a lemma we will need later.
Lemma 55. Let (ai ) and (bi ) be sequences with values in a set U and with
respective index sets Ia and Ib containing {m, . . . , n}. Suppose ai = bi for
all i with m ≤ i ≤ n (they can differ for other i). If U has an additive
binary operation then
Xn Xn
ai = bi ,
i=m i=m
and if U has a multiplicative binary operation then
Yn Yn
ai = bi .
i=m i=m

Proof. Use the form of induction of Theorem 6 for the set {m, . . . , n}. 

12. Prime factorization


Now that we have developed the concepts of summation and general finite
products, we can return to the topics mentioned in Section 8. We begin with
prime factorizations.
Theorem 56. Let n be an integer with n ≥ 2. Then there is a sequence of
primes numbers (pi )i=1,...,k such that
k
Y
n= pi .
i=1
Proof. Let S be the set of integers n ≥ 2 with such a prime sequence.
Q that if p is a prime then p ∈ S. To see this, let p1 = p and k = 1.
Observe
then 1i=1 p1 = p by Definition 13.
We will use strong induction to show that every n with n ≥ 2 is in S.
The base case 2 ∈ S has already been shown since 2 is a prime. Now we
assume {2, . . . , n − 1} ⊆ S with the goal of showing n ∈ S.
By Theorem 35, there is a prime p with p | n. So write n = pm for
some m ∈ Z. Since n and p are positive, m cannot be zero or negative.
Thus m is positive. If m = 1 then n is a prime, and n ∈ S as observed
above.
Now suppose m > 1. Thus m ≥ 2. Since p > 1 we get mp > m,
so m < n. This means m ∈ S by the inductive hypothesis. So there
is a sequence (pi )i=1,...,k of primes with m = ki=1 pi . Define a new se-
Q
quence (p0i )i=1,...,k+1 of primes by the rule p0i = pi if 1 ≤ i ≤ k, and p0k+1 = p.
Thus, using Lemma 55 and Definition 13,
k k k+1
! !
Y Y Y
n = mp = pi · p = pi · p0k+1 =
0
p0i .
i=1 i=1 i=1
Hence n ∈ S.
28 EXPLORING Z

By the principle of strong induction (Theorem 7), S contains all n ≥ 2. 


Informal Exercise 38. Illustrate Theorem 56 for the integers 12, 20, 5,
and 84. For n = 12 find three different sequences that work.
Remark 16. The above theorem is part of what is know as the fundamental
theorem of arithmetic. The full version of this theorem also asserts that the
sequence of primes for a given n is essentially unique. More precisely, that
two sequences for the same n have the same prime values and every prime
value occurs the same number of times in both sequences. Another way to
say this is that the terms of once sequence can be obtained by permuting
the terms of the other. We will wait until a future chapter to prove the full
theorem where we prove it for both integers and for polynomials.

13. Infinitude of primes


Now we give a formal proof of Euclid’s classic theorem.
Theorem 57. Let P be the set of prime numbers. Then P is infinite.
Proof. Suppose otherwise, suppose that P is finite. Then there is a bi-
jection {1, . . . , k} → P for some k. This bijection can be thought of as a
sequence (pi ) with domain {1, . . . , k} and with values that give all the primes
(by definition of sequence, Def 9). Let
k
Y
n=1+ pj .
j=1

By Theorem 35, there is a prime p dividing n. Since p is a prime, p = pi for


some 1 ≤ i ≤ k. Observe that
k
Y
n−1= pj ,
i=j

so p = pi divides n − 1 (Theorem 51). Since p divides n and n − 1, it


must divide the difference (Corollary 15). The difference is 1. Thus p ≤ 1
(Theorem 16). This gives a contradiction. 
Informal Exercise 39. Modify the above proof as follows. Suppose P is
finite. Then P must have a maximum (Chapter 3). Let q be the maximum
prime. Let n = 1 + q!, and derive a contradiction.

14. Base B representations of integers


Let B > 1 be a fixed integer called the base. The standard in most of
the world today is B = 10 (decimal). However, B = 2 (binary), B = 8
(octal), and B = 16 (hexadecimal) are common in computer science. In
their scientific work the Babylonians used B = 60 (sexagesimal), a choice
that still survives in our use of minutes and seconds.
EXPLORING Z 29

To develop base B in general is no harder than to develop a specific base


such as 10, so we will develop the general theory.8
Remark 17. In a sense, base systems are a luxury, not a necessity. With 0
and σ we can, with enough patience, denote any natural number. Likewise,
with 0, 1 and + we can denote any natural number. For instance, ignoring
parentheses, we can denote sixteen as
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1,
but it is much more efficient to write ‘16’.
Definition 14. Let B > 1 be a fixed base. A base B representation of an
integer n > 0 is a sequence (di )i=1,...,k in Z with each 0 ≤ di < B such that
k
X
n= di B i
i=0

and such that dk 6= 0. The number di is called the i-th digit of n.


Remark 18. We often choose specific symbols (numerals) for the numbers
in the set {0, . . . , B − 1}. These symbols are often also called digits.9 We
abbreviate ki=0 di B i by listing such symbols for the di in order (decreasing
P
the index i as you go from left to right). For example, in base 8 we we can
use [7, 4, 4, 0], or simply [7440], to denote
7 · 83 + 4 · 82 + 4 · 81 + 0 · 80 .
Exercise 40. Show that a base B representation of B itself is given by
the sequence (di )i=0,...,1 where d0 = 0 and d1 = 1. In other words, we can
write B as [1, 0] or [10].
Definition 15. Let ten be 9 + 1 (recall, we have defined 9 in Chapter 1).
By the above exercise, ten can be written [10] in base ten.
Definition 16. We will use square brackets around the digits in any base
except base ten. In base ten we will usually write the digits without brackets
in the usual way. Thus, if B = 5 we write [4, 3, 1] or [431] for 4B 2 + 3B + 1,
but if B is ten, we write 4B 2 + 3B + 1 simply as 431.
In particular, 10 refers to ten. So 10 = 9 + 1. In general, however, [10]
or [1, 0] refers to B where B is the base being used.
In base ten, or in any base, we can separate digits by commas for read-
ability. Thus 20138 or 20, 138 both represent
2 · 104 + 0 · 103 + 1 · 102 + 3 · 10 + 8.
8The above discussion is informal: we have not defined 10, 16, or 60 yet.
9The word digit comes from Latin digitus meaning ‘finger’. So really the term digit
is most appropriate to base ten. We use it for other bases where we imagine an alien or
mythical being with B fingers. Homer Simpson would be be a good choice for B = 8.
30 EXPLORING Z

Definition 17. If B is not clear from context, we can write B in base 10


as a subscript following the base B representation. Thus
[24]5 = 2 · 5 + 4, [24]16 = 2 · 16 + 4
where the right-hand sides are in base 10.
Definition 18. When working in base B > 10, one needs symbols for digits
up to B. Define a = 9 + 1, b = a + 1, c = b + 1, d = c + 1, e = d + 1,
and f = e + 1. Other digits can be defined if needed.10
Informal Exercise 41. Using symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f
write 1219 in base B = 16. Write 1219 in base 4. Write 512 in base 12.
Write your answers out in summation and short form. Example:
603 = 2B 2 + 5B + b and 603 = [25b]16
in base B = 16.
The key theorem of this section is that every positive integer has a unique
base B representation. This shows that base B representation gives a way
of representing positive integers, and gives a way of determining if two such
integers are distinct. By using ‘0’ and negation ‘−’ we can denote all integers
uniquely.
Theorem 58. Let B > 1. Then every positive integer has a unique base B
representation.
Before the proof, we give a few lemmas.
Lemma 59. Suppose (di ) be a sequence of natural numbers whose domain
contains {0, . . . , k} where k ≥ 0. If dk 6= 0 and B is a positive integer then
k
X
di B i > 0.
i=0
Proof. If k = 0 the result is clear since d0 B 0 = d0 , so assume k > 0. By
Definition 12,
Xk k−1
X
di B i = di B i + dk B k .
i=0 i=0
By the results of Chapter 1, each term di B i is in N. Let U = N. By
Definition 12, k−1 i
P
i=0 di B is in U = N since + is a binary operation on N
(See Remark 11). Since dk and B k are positive by results of Chapter 2, dk B k
is positive. Thus
k
X k−1
X
di B i = di B i + dk B k ≥ 0 + dk B k > 0.
i=0 i=0

10In base 60 the custom is to use base 10 to denote the digits up to 59 instead of
making up new symbols. So [34, 2, 17]60 is the number 34 · 602 + 2 · 60 + 17. Observe that
commas must be used to separate digits to avoid confusion.
EXPLORING Z 31

Lemma 60. Let (di ) be a sequence of integers whose domain contains


{0, . . . , k} with k > 0. Let B be a positive integer. Then
k k k−1
! !
X X X
i i−1 i
di B = B di B + d0 = B di+1 B + d0 .
i=0 i=1 i=0
Pk i−1
Pk−1
If 0 ≤ d0 ≤ B −1, then d0 is the remainder and i=1 di B = i=0 di+1 B i
is the quotient when we divide ki=0 di B i by B.
P

Proof. (Sketch) Use the general assoc. law (Thm. 46) to separate d0 from
the rest of the terms. Use the general distributive law (Thm. 42) to factor
out a B. Use the theorem on shifting the sequence (Thm. 47) to justify the
equation ki=1 di B i−1 = k−1 i
P P
i=0 di+1 B . Also use basic laws of Ch. 1. For
the final statement, use the Quotient-Remainder Theorem (Thm. 27). 
Lemma 61. Suppose B and n are positive integers where n < B. Let
d0 = n. Then the sequence (di ) with domain {0} is the unique base B
representation of n.
Proof. By definition of summation (Def. 12),
0
X
di B i = d0 B 0 = d0 = n.
i=0
We conclude that (di ) is indeed a base B representation.
Suppose (d0i ) is another base B representation with domain {0, . . . , k 0 }.
When we divide n by B we have remainder r = n and quotient q = 0
since n = 0 · B + n and 0 ≤ n < B. By Lemma 60, applied to (d0i ) we
get that the remainder is d00 . Thus d00 = n = d0 . If k 0 > 0 then the
Pk0 −1 0
quotient is i=0 di+1 B i by Lemma 60, and is positive by Lemma 59. This
contradicts that the quotient is 0. So k 0 = 0. Thus (di ) and (d0i ) are the
same sequence, giving uniqueness. 
Proof of Main Theorem (Thm. 58). (Strong Induction). Let S be the set of
all positive integers with unique base B expansions. Our goal is to show S
includes all positive integers. The base case, 1 ∈ S, is covered by Lemma 61.
Now we wish to show n ∈ S assuming that {1, . . . , n − 1} ⊆ S. If n < B
then n ∈ S by Lemma 61. So we can assume n ≥ B. By the Quotient-
Remainder Theorem, n = qB + r for some q and r with r ∈ {0, . . . , B − 1}.
Claim: 1 ≤ q. Suppose otherwise. If q = 0, then n = qB + r = r,
contrarily to the assumption n ≥ B. If q < 0, then qB < 0. This gives
qB + r < r contrary to the assumption n ≥ B. Thus q ≥ 1.
Since B > 1 we get q < qB ≤ qB + r. Thus q < n. Since 1 ≤ q < n we
have q ∈ S (inductive hypothesis). So q has a unique base B representa-
tion (ei ). Thus (ei ) has domain {0, . . . , l} for some l, and
l
X
q= ei B i
i=0
32 EXPLORING Z

where el 6= 0 and 0 ≤ ei < B for all i ∈ {0, . . . , l}. This gives


n = qB + r
Xl
= B ei B i + r
i=0
l
X
= ei B i+1 + r (General Distr.)
i=0
l+1
X
= r+ ei−1 B i (Thm. 47)
i=1
k
X
= di B i . (General Assoc., see below for di )
i=0

In the last equation, we set k = l + 1, and we define (di ) by the rule d0 = r


and di = ei−1 for i ∈ {1, . . . , l + 1}. So (di ) is a sequence with do-
main {0, . . . , k}. Since el 6= 0 we have dk 6= 0. Likewise, 0 ≤ di < B.
Thus (di ) is a base B representation of n. So existence holds for n.
We need to show uniqueness. Suppose (d0i ) is another base B represen-
tation with domain {0, . . . , k 0 }. If k 0 = 0 then n = d00 , but n ≥ B, a
contradiction. So we can assume k 0 > 0. By Lemma 60, the remainder is d00 .
But d0 was defined to be the remainder. Thus d0 = d00 . By Lemma 60,
Pk0 −1 0 i
the quotient q is i=0 di+1 B . Earlier we determined that q ∈ S, and
defined (ei ) as the unique base B representation of q. So
0 −1
kX l
X
q= d0i+1 B i = ei B i .
i=0 i=0
By uniqueness (since q ∈ S), l = k0 − 1 and d0i+1
= ei for i ∈ {0, . . . , l}. This
means that k 0 = l + 1 and d0i = ei−1 for all i ∈ {1, . . . , k 0 }. But k = l + 1
and di = ei−1 for all i ∈ {1, . . . , k}. So k = k 0 and di = d0i for all i
in {1, . . . , k}. Uniqueness follows for n. We conclude that n ∈ S.
By the principle of strong induction, S contains all positive integers. The
result follows. 
Remark 19. Suppose that you have made an addition table for n + m for
all n, m ∈ {0, . . . , B − 1} (and proved the table is valid). Then you can
perform any base B addition using the laws we have proved. Likewise, if
you have made a multiplication table for n · m for all n, m ∈ {0, . . . , B − 1}
(and proved it is valid), then you can perform any base B multiplication
using the basic laws of arithmetic. The algorithms you were taught in grade
school are just a notational short-cut for the more rigorous use of the laws
of arithmetic.
For example, suppose you want to add 108 and 17 in a rigorous manner.
Suppose your table, which you suppose was derived earlier using rigorous
EXPLORING Z 33

methods from Chapter 1, shows that 8 + 7 = 15 and 1 + 1 = 2. Then,


using only results from Chapter 1 and this information from the table (and
combining several steps into some of the steps),
108 + 17 = ((1 · 102 + 0 · 101 ) + 8 · 100 ) + (1 · 10 + 7 · 100 )
= (102 + 8) + (10 + 7) = (102 + 10) + (8 + 7)
= (102 + 10) + 15 = (102 + 1 · 10) + (1 · 10 + 5)
= (102 + (1 · 10 + 1 · 10)) + 5 = (102 + (1 + 1) · 101 ) + 5
= (1 · 102 + 2 · 101 ) + 5 · 100 = 125.
Observe how we “carried the 1”. This is a simple example, but in principle
any addition and multiplication can be carried out rigorously by a careful use
of the laws from Chapter 1. One could attempt to prove (at least informally)
that the algorithms that are taught in grade school will always work, and
can always be translated to a formal proof.
Informal Exercise 42. Make an addition table for n + m for all n, m
in {0, . . . , 7} for base 8. Use the basic laws of Chapter 1 (distributive,
etc.) to find a base 8 representation of [2, 7, 3]8 + [7, 3, 1]8 . (You can use
the associative and commutative laws freely, drop parentheses, and you can
skip steps using these laws. Be sure to write [2, 7, 3]8 as 2 · 82 + 7 · 8 + 3, and
so on.)
Informal Exercise 43. Using the techniques of Chapter 1, one could easily
make an addition table for n + m for all n, m ∈ {0, . . . , 9}, and prove it to
be valid. Do not do this, but assume that someone has done this. Suppose
also that you do not yet know how to add larger numbers. Use the basic
laws of Chapter 1 to determine 1094 + 329. Do this by expanding 329
as 3 · 102 + 2 · 10 + 9, and expanding 1094 in a similar manner. (You can
use the associative and commutative laws freely, drop parentheses, and skip
steps using these laws.)
Informal Exercise 44. Using the techniques of Chapter 1, one could easily
make an multiplication table for nm for all n, m ∈ {0, . . . , 9}, and prove it to
be valid. Do not do this, but assume that someone has done this. Suppose
also that you do not yet know how to multiply larger numbers. Use the basic
laws of Chapter 1 to determine 17 · 15. Do this by expanding 17 as 1 · 10 + 7,
and expanding 15 in a similar manner. (You can use the associative and
commutative laws freely, drop parentheses, and skip steps using these laws.)
You should be able to see the connection between the above exercises and
the traditional algorithms for addition and multiplication.

15. Summation and product conventions


Informally, the general associative law allows us to move parentheses.
See Remark 12 for an illustration. This means that in situations where
this law applies, there is no real need to use parentheses, and in everyday
34 EXPLORING Z

mathematics parentheses are dropped. We will do so in future chapters, but


for definiteness let us agree to the following convention.
Definition 19. If a, b, c ∈ U whereP U is a set with a binary operation +,
then a + b + c is defined to be 3i=1 ui where (ui ) is the sequence defined
by u1 = a, u2 = b, u3 = c. As we saw above, this means a + b + c is officially
defined to be (a + b) + c.
If a, b, c ∈ U where U is a set with
Q a binary operation written multliplica-
tively, then abc is defined to be 3i=1 ui where (ui ) is the sequence defined
by u1 = a, u2 = b, u3 = c.
We extend this to more than three terms. So, a + b + c + d is 4i=1 ui for
P
the corresponding sequence (ui ). So, officially
a + b + c + d = ((a + b) + c) + d.
In essence, we are adopting a left association convention for addition and
multiplication: the two leftmost terms are bound together first. In most
situations, for example in rings such as Z, addition and multiplication are
associative, so a right association convention gives the same result, but we
choose the left association convention as our official default.
Remark 20. We will adopt a left association convention for functional com-
position as well. For example, f ◦ g ◦ h is officially (f ◦ g) ◦ h. Since function
composition is associative, so one can prove general associativity laws for
composition as well.
Earlier, we defined n! in terms of recursion. However, we can define it in
terms of our new notation. If n is a positive integer, define n! as
n
def
Y
n! = k.
k=1
You can use methods from this chapter to prove various facts about factorial
including 1! = 1, 2! = 2, and that in general (n + 1)! = (n + 1) n!. You can
also prove that 1 ≤ k ≤ n implies k | n!.
Define 0! = 1 as a special case. In general, you can consider 1 as the
product of zero terms (in Z or any ring R), and 0 as the sum of zero terms
(in Z or any additive group). This allows us to include 1 in the set of natural
numbers that can be written as the product of (zero or more) primes. In
following sections, this idea will be implemented formally in the commutative
case.
If n and m are natural numbers, nm was defined in Chapter 1. One can
prove by induction that if m ≥ 1 then
Ym
m
n = ni
i=1
where ni = n for all i ∈ {1, . . . , m}. The right-hand side makes sense even
for negative n. We will explore exponentiation further, even for negative m,
in future chapters.
EXPLORING Z 35

16. Commutative summation (optional)


Suppose U is a set with a binary operation that is written +. Often, this
operation is commutative. But when it is not, the order of the terms bi can
influence the value of the sum
Xn
bi.
i=m
As we will see in this section, if + is commutative, then the sum can be
defined without specifying a particular order for the terms. In other words,
we can take sums of terms bi where the index i ∈ I is not necessarily an
integer, and where I does not necessarily have a set order.
Definition 20. In what follows, we will use sequential notation from Sec-
tion 9 even when the index set I is not {m, . . . , n} or {n, n + 1, . . .}. The
index set I can be any convenient set, perhaps one without a fixed order.
We will consider functions b : I → U whose domain is such an index set. The
image of i ∈ I will typically be written bi instead of b(i). The image bi ∈ U
of i ∈ I will be called a term or more specifically the ith term. The func-
tion as a whole will sometimes be written (bi )i∈I (instead of just b). The
domain I is index set and the codomain U is the value set. An element of I
will be called an index.
Because we allow other sets to be index sets, we will not assume that I
is an ordered set. In spite of this, we can define
X
bi
i∈I
as long as we assume that + is commutative and associative. In other words,
the sum will be independent of the order in which we add the terms.
In this section we will assume that U is a set with an binary operation +
that is associative and commutative. We will also assume that U has an
identity element for +, which we will call 0 ∈ U . This means that we
assume 0 + x = x for all x ∈ U . For now you can think of U as being
either N or Z, but it can be any of the commutative rings introduced later
in the course.11
Before defining the sum over I, we will temporarily use a notation that
does order the terms and we employ the summation defined earlier in the
chapter.
Definition 21 (Summation on index set with ordering bijection). Let U
be a set with a binary operation +. Suppose + has an identity 0 ∈ U .
11A set U with a binary operation that is associative, and that possesses an identity for
the operation, is called a monoid. In this section we are assuming that U is a commutative
monoid. Abelian groups are commutative monoids. Observe that N is a commutative
monoid under addition but not an abelian group. Also, N is a commutative monoid under
multiplication, but this monoid will require different notation. The multiplicative notation
for the ideas of this section will be considered in the next section.
36 EXPLORING Z

Suppose (bi )i∈I has terms in U and that its index set I is finite of size n.
Let f be a bijection {1, . . . , n} → I.
If n ≥ 1 we define
X(f ) n
def
X
bi = bf (j)
i∈I j=1

where the right-hand side is as defined earlier in Section 10.


If n = 0 and I = ∅, then we consider {1, . . . , 0} to be the empty set, so
in this case f must be the identity on the empty set. In this case we define
X(f ) def
bi = 0.
i∈∅

Our goal is to show that when + is commutative and associative, we do


not need to specify f , and so can drop it from the notation. To do so we
will need a few lemmas:

Lemma 62. Let U, I and (bi )i∈I be as in the above definition. Suppose
that I = {x} has size n = 1, and let f : {1} → I be the (unique) bijection.
Then
X(f )
bi = bx .
i∈{x}

Proof. By Definition 21,


X(f ) 1
X
bi = bf (j) .
i∈{x} j=1

By Exercise 29,
1
X
bf (i) = bf (1) = bx .
i=1

Remark 21. In what follows we will sometimes sum (bi )i∈I on a subset J of
the original index set I. It should be understood from context that we are
restricting the function b : I → U to J to get the related function (bi )i∈J
which is indexed by J instead of I.

Lemma 63. Let U, I, (bi )i∈I , and f be as in the above definition. Assume
that I has size n ≥ 1, and let let x = f (n). Let f1 be the restriction of f to
a function {1, . . . , n − 1} → I − {x}. Then
 
X(f ) X(f1 )
bi =  bi  + bx
i∈I i∈I−{x}
EXPLORING Z 37

Proof. First assume n = 1, so I = {x}. By Lemma 62 and Definition 21 (for


the case n = 0)
!
X(f ) X(f1 )
bi = bx = 0 + bx = bi + bx .
i∈I i∈∅
So the result follows.
So now assume that n > 1. Then, by Definition 21 and the recursive
definition (Definition 12),
X(f ) n
X n−1
X
bi = bf (j) = bf (j) + bf (n) .
i∈I j=1 j=1
Observe that bf (n) = bx . Using Lemma 55 and Definition 21 we get
n−1
X n−1
X X(f1 )
bf (j) = bf1 (j) = bi .
j=1 j=1 i∈I−{x}

The result follows. 


Lemma 64. Let U, I, and (bi )i∈I be as in the above definition. Suppose I
has size n = 0 or n = 1. If f : {1, . . . , n} → I and g : {1, . . . , n} → I are
bijections then
X(f ) X(g)
bi = bi .
i∈I i∈I
Proof. If n = 0 then f and g must both be the identity on the empty set.
Thus f = g and the result follows from the reflexive law of equality.
If n = 1 then I = {x}, and f and g must both be the map {1} → {x}
sending 1 to x. Thus f = g and the result follows again. 
The above cover what we want to show in the cases when I has size n = 0
and n = 1. We will use a strong induction argument to show
X(f )
bi
i∈I
is independent of f for finite I in general. To do so we require the following
from Chapter 3 (with notational changes for the current situation):
Lemma 65. Suppose that I is a finite set of size n with element a ∈ I.
Then there is a bijection f : {1, . . . , n} → I with the property that f (n) = a.
Now we can prove the main lemma:
Lemma 66. Let U be a set with a binary operation + that is associative
and commutative, and suppose 0 ∈ U is the identity for +. Let (bi )i∈I have
terms in U and finite index set I of size n.
Suppose f and g are bijections {1, . . . , n} → I. Then
X(f ) X(g)
bi = bi .
i∈I i∈I
38 EXPLORING Z

Proof. By Lemma 64 we know this holds for n = 0 and n = 1, so we will


assume n ≥ 2. We will proceed by strong induction on n. More specifically,
we will fix (bi )i∈I , and assume that the equation holds for all (b0i )i∈I 0 when I 0
has size n0 strictly less than n.
To proceed, let x = f (n) and y = g(n). Let f1 be the restriction of f to
a bijection {1, . . . , n − 1} → I − {x}. Likewise, let g1 be the restriction of g
to a bijection {1, . . . , n − 1} → I − {y}. In the case where x = y we can use
the strong induction hypothesis and Lemma 63 to conclude
   
X(f ) X(f1 ) X(g1 ) X(g)
bi =  bi  + bx =  bi  + by = bi
i∈I i∈I−{x} i∈I−{y} i∈I

So assume x 6= y. Let f2 be a bijection {1, . . . , n − 1} → I − {x} such


that f2 (n − 1) = y. Let g2 be a bijection {1, . . . , n − 1} → I − {y} such
that g2 (n − 1) = x. These exist by Lemma 65. Finally, let f3 be the
restriction of f2 to a bijection {1, . . . , n − 2} → I − {x, y}, and let g3 be the
restriction of g2 to a bijection {1, . . . , n − 2} → I − {x, y}. By Lemma 63,
the strong induction hypothesis, associativity, and commutativity we get
   
X(f ) X(f1 ) X(f2 )
bi =  bi  + bx =  bi  + bx
i∈I i∈I−{x} i∈I−{x}
  
X(f3 )
=  bi  + by  + bx
i∈I−{x,y}
 
X(f3 )
=  bi  + (by + bx )
i∈I−{x,y}
 
X(g3 )
=  bi  + (bx + by )
i∈I−{x,y}
  
X(g3 )
=  bi  + bx  + by
i∈I−{x,y}
   
X(g2 ) X(g1 )
=  bi  + by =  bi  + by
i∈I−{y} i∈I−{y}
X(g)
= bi
i∈I

With this lemma, we can legitimately make the following definition. In
other words, the following definition is well-defined: it is independent of
choice of f .
EXPLORING Z 39

Definition 22 (Commutative summation on a finite index set). Let U be


a set with a binary operation + that is associative and commutative, and
that has an identity element for +. Let (bi )i∈I have terms in U and finite
index set I of size n. We define
X def X(f )
bi = bi
i∈I i∈I

where f : {1, . . . , n} → I is any given choice of bijection.


This gives us a new type of sum, but we should confirm that it agrees
with our previous definition of summation if I = {m, . . . , n}:
Lemma 67. Let U be as in the above definition. Suppose I = {m, . . . , n}
where m ≤ n and m, n ∈ Z, and suppose (bi )i∈I is a sequence with terms
in U indexed by I. Then
X n
X
bi = bi
i∈{m,...,n} i=m

where the left-hand side represents the sum defined in this section (Defini-
tion 22), and the right-hand side corresponds to the sum defined earlier in
the chapter (Definition 12).
Proof. Let N = (n − m) + 1. Consider the function
f : {1, . . . , N } → {m, . . . , n}
defined by the equation f (i) = i + (m − 1). The function f has an inverse
given by j 7→ (j − m) + 1 so f is a bijection. Thus
X X(f )
bi = bi (Definition 22)
i∈{m....,n} i∈{m....,n}
N (n−m)+1
X X
= bf (j) = bj+(m−1) (Definition 21)
j=1 j=1
(n−m)+1+(m−1)
X
= bi+(m−1)−(m−1) (Theorem 47)
i=1+(m−1)
n
X
= bi .
i=m

Finally we end with some key properties of this new sum.
Theorem 68. Let U be a set with a binary operation + that is associative
and commutative, and that has an identity element 0 ∈ U for +. Let (bi )i∈I
have terms in U and finite index set I of size n.
40 EXPLORING Z

If n = 0 and I = ∅ then
X
bi = 0.
i∈∅
If n = 1 and I = {x} then
X
bi = bx .
i∈{x}

If n ≥ 1 and x ∈ I then
 
X X
bi =  bi  + bx .
i∈I i∈I−{x}

Proof. If n = 0 and I = ∅ then let f : ∅ → ∅ be the identity. So, by


Definition 22 and Definition 21,
X X(f )
bi = bi = 0.
i∈∅ i∈∅

If n = 1 and I = {x} then let f : {1} → {x} be the map sending 1 to x. So,
by Definition 22 and Lemma 62,
X X(f )
bi = bi = bx .
i∈{x} i∈{x}

If n ≥ 1 then let f : {1, . . . , n} → I be a bijection such that f (n) = x. This


exists by Lemma 65. So, by Definition 22 and Lemma 63,
   
X X(f ) X(f1 ) X
bi = bi =  bi  + bx =  bi  + bx .
i∈I i∈I i∈I−{x} i∈I−{x}

where f1 is the restriction of f to a bijection f1 : {1, . . . , n−1} → I −{x}. 

17. Commutative products (optional)


In this section we consider the multiplicative versions of the results of the
previous section. The proofs are completely parallel to those of the previous
section, and so can be safely omitted.
Similarly to the last section, we we assume U is a set with a binary
operation, written multiplicatively, with an identity (which we write as 1).
We consider (bi )i∈I with terms in U and indexed by finite sets I. We first
define
Y(f )
bi
i∈I

P f : {1, . . . , n} → I is a bijection. The definition is similar to that


where
for in the last section. Next, the following definition can be shown to be
well-defined: the product is independent of choice of f .
EXPLORING Z 41

Definition 23 (Commutative product on a finite index set). Let U be a


set with a binary operation, written multiplicatively, that is associative and
commutative, and that has an identity element 1 ∈ U . Let (bi )i∈I have
terms in U with finite index set I of size n. We define
Y def Y(f )
bi = bi
i∈I i∈I

where f : {1, . . . , n} → I is any given choice of bijection.


This new type of product agrees with our previous definition of product
in the case where I = {m, . . . , n} ⊆ Z:
Lemma 69. Let U be as in the above definition. Suppose I = {m, . . . , n}
where m ≤ n and m, n ∈ Z, and suppose (bi )i∈I is a sequence of terms in U
indexed by I. Then
Y Yn
bi = bi
i∈{m,...,n} i=m

where the left-hand side represents the product defined in this section (Defi-
nition 23), and the right-hand side corresponds to the product defined earlier
in the chapter (Definition 13).
We end with some key properties of this new product.
Theorem 70. Let U be a set with a binary operation, written multiplica-
tively, that is associative and commutative, and that has an identity ele-
ment 1 ∈ U . Let (bi )i∈I have terms in U and finite index set I of size n.
If n = 0 and I = ∅ then
Y
bi = 1.
i∈∅
If n = 1 and I = {x} then
Y
bi = bx .
i∈{x}

If n ≥ 1 and x ∈ I then
 
Y Y
bi =  bi  · bx .
i∈I i∈I−{x}

18. General commutative laws (optional)


Now we investigate general commutative laws for sums and products. The
first version is based on, and generalizes, Theorem 46.12

12Theorem 46 was described as a general associative law, but the generalization here
can also be thought of as a kind of commutative law.
42 EXPLORING Z

Theorem 71. Let U be a set with a binary operation + that is associa-


tive and commutative, and that has an identity element 0 ∈ U . Let (bi )i∈I
have terms in U and a finite index set I of size n. Let I1 and I2 be two
disjoint subsets such that I = I1 ∪ I2 . Consider also the restriction (bi )i∈I1
and (bi )i∈I2 of the function (bi )i∈I . Then
X X X
bi = bi + bi .
i∈I i∈I1 i∈I2

Proof. Let n1 be the size of I1 and let n2 be the size of I2 . Thus I must
have size n1 + n2 (see Chapter 3). Observe that the desired equality P holds
if n1 = 0 or n2 = 0. For example, if n1 = 0 then I1 = ∅, and i∈∅ bi = 0.
In this case I2 = I. So the equation holds since 0 is an identity.
So assume n1 > 0 and n2 > 0. Next choose bijections f1 : {1, . . . , n1 } → I1
and f2 : {1, . . . , n2 } → I2 . Consider the function f : {1, . . . , n1 +n2 } → I1 ∪I2
defined by the rule
(
f1 (j) if 1 ≤ j ≤ n1
f (j) =
f2 (j − n1 ) if n1 < j ≤ n1 + n2 .
Now establish that f is injective and surjective, which is straightforward.
Observe that the sequence (bf (i) ) has domain {1, . . . , n1 + n2 }, and that
X X(f )
bi = bi (Definition 22)
i∈I1 ∪I2 i∈I1 ∪I2
nX
1 +n2

= bf (j) (Definition 21)


j=1
n1
X nX
1 +n2

= bf (j) + bf (j) (Theorem 46)


j=1 j=1+n1
n1
X nX
1 +n2

= bf1 (j) + bf2 (j−n1 ) (definition of f )


j=1 j=1+n1
Xn1 Xn2
= bf1 (j) + bf2 (j) (Theorem 47)
j=1 j=1
X(f1 ) X(f2 )
= bi + bi (Definition 21)
i∈I1 i∈I2
X X
= bi + bi (Definition 22)
i∈I1 i∈I2

Here we needed the general associative law (Theorem 46). 

The multiplicative version is proved in a similar manner:


EXPLORING Z 43

Theorem 72. Let U be a set with a binary operation, written multiplica-


tively, that is associative and commutative, and that has an identity ele-
ment 1 ∈ U . Let (bi )i∈I have terms in U and a finite index set I of size n.
Let I1 and I2 be two disjoint subsets such that I = I1 ∪ I2 . Consider also
the restriction (bi )i∈I1 and (bi )i∈I2 of the function (bi )i∈I . Then
Y Y Y
bi = bi · bi .
i∈I i∈I1 i∈I2

Recall that Theorem 43 can also be thought of as a type of commutative


law. This can be extended to the current situation. (The proof is simple,
and the idea behind it can be used to extend several results from Sections 10
and 11).
Theorem 73. Let U be a set with a binary operation + that is associa-
tive and commutative, and that has an identity element 0 ∈ U . Let (bi )i∈I
and (ci )i∈I have terms in U and share a finite index set I. Then
X X X
(bi + ci ) = bi + ci .
i∈I i∈I i∈I

Proof. The expression (bi + ci )i∈I refers to the function (di )i∈I defined by
the rule i 7→ bi + ci . So our goal is to prove
X X X
di = bi + ci
i∈I i∈I i∈I
with this (di ). First recall that 0 + 0 = 0 so the result follows if I = ∅. So
we can assume I has size n ≥ 1. Let f : {1, . . . , n} → I be a bijection. So
X X(f ) n
X
di = di = df (j) (Definition 22 and 21)
i∈I i∈I j=1
Xn n
X
= bf (j) + cf (j) (Theorem 43)
j=1 j=1
X(f ) X(f )
= bi + ci (Definition 21)
i∈I i∈I
X X
= bi + ci (Definition 22).
i∈I i∈I

The multiplicative version is proved in a similar manner:
Theorem 74. Let U be a set with a binary operation, written multiplica-
tively, that is associative and commutative, and that has an identity ele-
ment 1 ∈ U . Let (bi )i∈I and (ci )i∈I have terms in U and share a finite index
set I. Then Y Y Y
(bi · ci ) = bi · ci .
i∈I i∈I i∈I
44 EXPLORING Z

Before giving the third, and most general, version of the commutative
law, we consider a method of changing the index set:

Theorem 75. Let U be a set with a binary operation + that is associative


and commutative, and that has an identity element 0 ∈ U . Let (bi )i∈I have
terms in U and finite index set I. Suppose σ : I 0 → I is a bijection, and
consider the function (bσi )i∈I 0 . Then
X X
bσi = bi .
i∈I 0 i∈I

Proof. If I = ∅, then the existence of σ forces I 0 = ∅ and then both sums


are just 0. So we can assume that I and I 0 have size n ≥ 1.
Choose a bijection f : {1, . . . , n} → I 0 . Observe that σ ◦f : {1, . . . , n} → I
is a bijection as well. So
X X X(f )
bσi = b(σi) = b(σi) (Definition 22)
i∈I 0 i∈I 0 i∈I 0
Xn
= b(σ(f (j))) (Definition 21)
j=1
Xn
= b((σ ◦ f )(j)) (Definition of composition)
j=1
X(σ◦f ) X
= b(i) = bi (Definitions 21 and 21)
i∈I i∈I

The multiplicative version is proved in a similar manner:

Theorem 76. Let U be a set with a binary operation, written multiplica-


tively, that is associative and commutative, and that has an identity ele-
ment 1 ∈ U . Let (bi )i∈I have terms in U and finite index set I. Sup-
pose σ : I 0 → I is a bijection, and consider the function (bσi )i∈I 0 . Then
Y Y
bσi = bi .
i∈I 0 i∈I

We are especially interested in applying the above two theorems in the


case where σ is a bijection from I to itself; in other words, we are interested
in the case where I 0 = I. It is common to use the term permutation for
bijection from a finite set to itself, and this term can be used even for
infinite sets.

Definition 24. A permutation of a set S is a bijection S → S.


EXPLORING Z 45

Example 1. If σ : I → I is a permutation of I = {1, . . . , n} say, and if (ai )i∈I


is a sequence of terms in Z indexed by I, then we can use σ to produce
another sequence (aσi )i∈I with the same terms, but in a different order.13
For example, let (ai )i∈I be the sequence indexed by I = {1, 2, 3} defined
by a1 = 3, a2 = 11, and a3 = 12. Suppose σ is the permutation of I
defined by 1 7→ 2, 2 7→ 3, and 3 7→ 1. Then (aσi )i∈I is the sequence (bi )i∈I
where b1 = 11, b2 = 12, and b3 = 3. The two sequences have the same
terms, but in a different order.
The general commutative law shows that two such sequences must have
the same sum and product.
We can now state most general form of the commutative law:
Theorem 77 (General commutative law). Let (bi )i∈I have terms in U and
finite index set I. Suppose σ : I → I is a permutation of I. If U is a set with
an commutative and associative binary operation written as + and with an
additive identity, then X X
bi = bσi .
i∈I i∈I
If U is a set with an commutative and associative binary operation written
multiplicatively and with a multiplicative identity, then
Y Y
bi = bσi .
i∈I i∈I

Proof. This is really just a corollary of the previous theorems. Just consider
the case where I 0 = I. 
Example 2. If σ is defined by the rule 1 7→ 2, 2 7→ 3, 3 7→ 1, then, under the
assumptions of the above theorem, we get
b1 + b2 + b3 = b2 + b3 + b1 b1 b2 b3 = b2 b3 b1 .
If σ is defined by the rule 1 7→ 3, 2 7→ 2, 3 7→ 1. then, under the assump-
tions of the above theorem, we get
b1 + b2 + b3 = b3 + b2 + b1 b1 b2 b3 = b3 b2 b1 .
In these examples, I = {1, . . . , 3}. As you see, by choosing σ appropri-
ately, you can rearrange the terms anyway you would like.

13We will often use the symbol σ for a general permutation. This should not be confused
with the successor function defined in Chapter 1.

You might also like