Two facts about the integers of school, taken as
known, were proved in the previous volume: every integer
is even or odd, and not both (Sets and
Functions, Section 1.1, Sets and Functions, Theorem 1.1.2),
and division with remainder (Sets and
Functions, Section 3.2, Sets and Functions, Theorem 3.2.3).
The integers are now the set of classes built in Section
2.1. Is ,
the class that school calls , still odd, and could
some integer be even and odd at once? Nothing proved so
far says. This section answers by proving division with
remainder again, on the constructed : the proof is that of
Sets and Functions, Section 3.2, with each
school fact replaced by a result of this chapter.
Divisibility comes first, since uniqueness of the
remainder rests on it.
Throughout,
is the ordered ring of Theorem 2.4.2, with and
(Theorem 2.4.2 (b)), and
. Numerals , , and so on, are the natural
numbers of those names, as in Section 2.2; a sum or
product of numerals may be computed in , because the
embedding of Proposition 2.2.3
preserves and
, and a sign
is moved by Proposition 2.3.2 (c), as
in .
Divisibility on the constructed integers
The definition of divisibility needs nothing that the
ring lacks. We
restate it, and the definition of a prime, from Sets
and Functions, Section 1.1, with now the ring of
Chapter 2.
Divisibility (Sets and Functions, Definition 1.1.2).
Let .
Then
divides , written , if
there exists with . Then is a
divisor of , and is a
multiple of . We write when does not divide .
Prime (Sets and Functions, Definition 1.1.3).
An integer is
prime if and the only positive
divisors of are
and . A prime
factor of an integer is a prime with .
Divisibility is a question about existence: is
some integer
times ?
Some instances. , since . , since . Even holds, since : the
definition asks for some , and here every works. On the other
hand .
That is a statement that no has , and to prove it
we need the theorem on division with remainder
below.
The rules below are short consequences of the ring
laws and the order.
Proposition
2.5.1 (Rules for Divisibility in )
Let .
- (a) , and . If , then .
- (b) If and , then .
- (c) If and , then .
- (d) If , then and .
- (e) If , and , then .
- (f) If , and , then .
- (g) If , then or .
- (h) If , then
exactly one of , lies in .
Idea. Parts (a)–(d) are identities
in the commutative ring : write each
hypothesis as an equation and rearrange. Part (e) is the one that
needs the order. If with , the factor cannot be zero or
negative, so by discreteness it is at least , and multiplying by something at least
cannot make it
smaller (the method of Example (Method: turn the comparison into one positive element)).
Parts (f) and (g) then follow from (e), and (h) is (P2)
for the positives of .
Proof. We use the ring laws
(F1)–(F7) and (F9) of (Theorem 2.3.1) without
further mention. Parts (a)–(d) are one-line identities
and (h) restates (P2); their proofs are written out in
the fold. After it come (e), which needs the order and
discreteness, and the two parts built on it, (f) and
(g).
↺Second readingParts
(a)–(d) and (h)
(a)
by Proposition 2.3.2 (b) and
(F6), so
with . Also
by
(F7), so
with ; and
, so
with . If , then for
some , by
Proposition 2.3.2
(b).
(b) Let and with . Then by
(F5), so .
(c) Let and . Then by (F5), (F6) and (F9), and . So .
(d) Let . By Proposition 2.3.2 (c),
,
so ; and
,
so .
(e) Let . By the converse
part of Proposition 2.4.1,
applied to the ordered ring , the set satisfies (P2), so exactly one of , holds. That set
is by
Theorem 2.4.2
(b).
(e) Let with , and . We show first
that . If
, then by Proposition 2.3.2 (b),
against .
If , then
by Proposition 2.4.3 (c)
(multiplying by ), again against . So , and by discreteness (Theorem 2.4.2 (c), with
) . If , then . If , then by Proposition 2.4.3 (a), so
by Proposition 2.4.3 (c),
that is, (Proposition 2.3.2 (c),
(F7) and (F9)), and by Proposition 2.4.3 (a). In
both cases .
(f) Let with and . If , then , so by (a). If
, then in the same way.
Otherwise are non-zero, hence positive (Theorem 2.4.2 (b)), and
(e) gives
and . Since
is a total
order (Proposition 2.4.3 (i)),
it is antisymmetric, and .
(g) Let , say . Then : otherwise ,
against in
(Theorem 2.3.1). By (h),
one of , is positive; call it
. Then , by (d) if . Since (Proposition 2.4.3 (e)),
part (e) gives ; and gives by discreteness. So . If , then ; if , then by Proposition 2.3.2 (a).
This proves the proposition.
Part (f) is the antisymmetry of divisibility on , Sets and Functions, Proposition 5.1.1
of Sets and Functions, Section 5.1, now proved
on for the constructed integers. On all of
it fails: and , by (d), yet
.
Quick check. Which hypothesis of
(e) fails for , ,
and is the conclusion true there?
Solution. by (a), and
, but
is not
positive. The conclusion is false. Every integer divides , so no bound of the
form can
hold for ;
that is the reason for the hypothesis .
Division
with remainder
Now the substitute for division. Given and , we
want to write as
a multiple of
plus something small, and we want “small” to make the
answer unique. The obvious attempt subtracts from until what is left lies
in , adding instead when is negative. That is a
process; the theorem replaces it by a least element.
Theorem
2.5.2 (Division with Remainder in )
Let
and .
- (a) There are
unique with
The integers
and are the
quotient and the
remainder of on division by .
Idea. This is Sets and Functions, Theorem 3.2.3,
and the proof is that volume’s: the method of Sets and Functions, Example (Method: the least element),
with the
non-negative integers of the form , and Proposition 2.4.4 in
place of the school least-element principle. The least
one, , lies below
, or else would be a smaller
one. Uniqueness is Sets and Functions, Example (Method: existence and uniqueness):
two remainders differ by a multiple of and by less than , and Proposition 2.5.1 (e)
forbids a positive multiple of below . What is new is only
that every step is now a theorem about the constructed
.
Proof. Read the proof of Sets and Functions, Theorem 3.2.3
with these replacements:
With these, the proof of Sets and Functions,
Section 3.2 goes through step for step on the
constructed ;
the fold below writes it out.
↺Second readingThe
proof, line by line on the constructed
ℤ
- (a)
Existence. Let We show . If , take : , by (F6), Proposition 2.3.2 (b) and
( and Proposition 2.3.2 (a)).
If , take
: then by Proposition 2.3.2 (c),
(F7) and (F9). Since , discreteness (Theorem 2.4.2 (c)) gives
. If , then
by Proposition 2.3.2 (b). If
, then
by Proposition 2.4.3 (a), so
by
(O3); multiplying by reverses the inequality (Proposition 2.4.3 (d)),
so . In every case has an element.
The set is non-empty and has the lower bound , so by Proposition 2.4.4 it has
a least element .
Write
with .
Then and
.
Suppose .
Then :
if , then
by (F4);
if , then
by Proposition 2.4.3 (a).
Also , since for every (Proposition 2.3.2 (c) and
(F7)) and by (F9), so . But (Proposition 2.4.3 (a),
since ), so
by
(O3). This contradicts the choice of as least. Hence .
Uniqueness. Let with , and .
Suppose . Exchanging and changes
neither the hypotheses nor the goal, so we may suppose
.
Adding
to both sides of gives by (F1)–(F4), and by Proposition 2.3.2 (c)
with (F9) for the last step, so . Here
by Proposition 2.4.3 (a),
and , so Proposition 2.5.1 (e)
gives . But adding to gives (Proposition 2.4.3 (b)),
and ; so
,
a contradiction. Hence . Then (add to both sides of ), so
by Proposition 2.3.2 (c) and
(F9), and since , Proposition 2.4.3 (f)
gives . Hence , by (F1)–(F4).
For the
statement fails: no satisfies . Exercise
B1 handles .
Uniqueness is what turns the theorem into a test for
divisibility: if and only if the remainder of on division by is . Indeed, if
, then is a division
with remainder, and by uniqueness it is the only one;
conversely says . For instance with , so the
remainder is , and .
Quick check. Find the quotient and
the remainder of on division by .
Solution. and : , and . By uniqueness this is the only such
pair. The equation is also true, but is not a remainder,
since it fails ; the warning below says why that matters.
Warning. “The remainder” means the
with . The
equation is true, but is
not the remainder of on division by ; the remainder is . If negative
“remainders” were allowed, uniqueness would fail at
once: .
Even and
odd
Recall that an integer is
even if for some , and odd if for some (Sets and Functions, Definition 1.1.1,
as in Sets and Functions, Theorem 1.1.2),
now read on the constructed . With , the theorem
answers the opening question.
Corollary
2.5.3 (Even and Odd Integers)
- (a) Every is even or odd,
and not both. More precisely, either
for exactly
one and
is not of the
form , or
for
exactly one and
is not of the form .
- (b) If and is even, then is even.
Idea. Divide by . The remainder lies in
, by
discreteness, and it is unique, so each integer has
exactly one of the two forms. For (b), square the odd
form and read off the remainder.
Proof.
(a) Since , the
theorem with
gives unique with and . Then : if , then , so by discreteness (Theorem 2.4.2 (c)); and
if moreover , then by discreteness again, against . If and for some
,
then and
would
be two pairs as in the theorem, and contradicts its
uniqueness. The same uniqueness shows that is the only integer
with .
(b) Suppose is not even. By (a),
with
. Then
by Proposition 2.3.2 (d) and
(F5), (F6), (F9), so is odd, and by (a) it
is not even. This proves (b) by contraposition.
So is odd and not even, as school says, and now
by proof. Part (a) is Sets and Functions, Theorem 1.1.2
on the constructed , and part (b) is Logic and Proof, Theorem 2.1.3,
whose proof used (a) and the computation above as school
facts. For , (a) is also Proposition 1.3.4
(d) of Chapter 1.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Find the
quotient and the remainder on division by of , of and of .
- (b) Where is used in the
existence half of Theorem 2.5.2 (a)?
- (c) True or false,
with a reason: .
- (d) True or false,
with a reason: for all , if and , then .
Solution.
(a) , so
.
, since , so . , so . In each case , so by
uniqueness these are the quotient and remainder. Note
, not .
(b) Twice. For
, the
element of is
non-negative because , which comes from , that is, from
and
discreteness. And the contradiction “” needs , that is, .
(c) True: , so witnesses (Proposition 2.5.1
(a)).
(d) False: and (Proposition 2.5.1 (d)),
but . The
statement is true for (Proposition 2.5.1
(f)).
B. Practice
Exercise
(B1: Negative divisors)
Let
with .
Prove that there are unique with and .
Solution. Since , by Proposition 2.4.3 (a), so
.
Existence. By Theorem 2.5.2 (a) applied
to and , there are with and . Let
.
Then by Proposition 2.3.2 (c), so
.
Uniqueness. Let with . By Proposition 2.3.2 (c),
and
, so are two
divisions of by
. The uniqueness
in Theorem 2.5.2 (a) gives
and
, hence
by Proposition 2.3.2
(a).
Exercise
(B2: Three in a row)
Let .
Prove that exactly one of , , is divisible by
.
Solution. At least one. By
Theorem 2.5.2 (a), with , and by
discreteness, as in the proof of Corollary 2.5.3. If , then . If , then . If , then .
At most one. Suppose and with . By
Proposition 2.5.1 (c)
(with , ), , and is positive. By Proposition 2.5.1 (e),
,
which is false. So no two of the three are divisible by
.
(Equivalently: the remainders of , , on division by
are , and then the other two
of , and
uniqueness of remainders allows only one of them to be
.)
C. Going deeper
Exercise
(C1: Exit check: remainders of squares)
- (a) Prove that for
every ,
the remainder of on division by is or .
- (b) Deduce that no
integer whose remainder on division by is is a sum of two squares
of integers.
Name the result behind each step.
Solution.
(a) By Corollary 2.5.3 (a),
or for some . In the first
case , by the ring laws (F5), (F6)
and ,
computed in . In
the second, by Proposition 2.3.2 (d) and
the ring laws (F5), (F6), (F9). Since is a non-zero natural
number,
(Theorem 2.4.2 (b)), and
both remainders,
and , satisfy
, so
by the uniqueness in Theorem 2.5.2 (a) they
are the remainders of on division by .
(b) Let . By (a),
and
with
and
.
Then by (F1), (F2) and (F9). So ,
and by uniqueness is the remainder of on division by
. It is not , so no sum of two
squares has remainder .
Marking scheme. (10 points)
- 2: splits into the two cases , , citing Corollary 2.5.3 (a).
- 3: expands both squares and writes each in the form
,
with the identities justified by the ring laws.
- 2: checks and invokes uniqueness to conclude that is the
remainder.
- 3: for (b), adds the two forms, checks ,
and concludes by uniqueness (or by Proposition 2.5.1 (e)
applied to the difference) that the remainder is .
Fatal errors (0 for the step): calling a value
outside a remainder; concluding in (b) that the
remainder is
without checking or an equivalent divisibility
argument.
A proof that divides by instead, with four
cases ,
, earns the first 2 points for the case
split (citing Theorem 2.5.2 (a) and
discreteness) and the rest as above.
R. Review
Exercise
(R1)
Let satisfy and for every . Prove that
for every .
Solution. By Theorem 1.2.1,
with , exactly one such exists, so the question
is about a definite function. We prove by
induction on (Theorem 1.1.2).
Base. , by Definition 1.2.1
(b).
Step. Suppose . Then
. On the other side, with (Definition 1.2.1
(c)), by Definition 1.2.1
(b) applied to , then Theorem 1.2.3 (e)
for , and Theorem 1.2.3 (c)
to regroup. Finally , by (Definition 1.2.1
(c)) and Theorem 1.2.3 (d),
(e). So , and the claim holds for every .
This is Chapter 1’s move of fixing everything else
and inducting on the recursion variable, as in the proof
of Theorem 1.2.3.
Exercise
(R2)
Decide which of the following maps are injective
and which are surjective:
- (a) ;
- (b) ;
- (c) .
Solution.
(a) Bijective.
Since (Proposition 2.3.2 (a)),
equal values give , and every is the value at .
(b) Injective,
not surjective. If , then by (F9) and Proposition 2.3.2 (c);
and , since
.
So by Proposition 2.4.3 (f),
and . Not
surjective:
would make even,
but is odd, and no integer is both (Corollary 2.5.3
(a)).
(c) Neither. Not
injective: (Proposition 2.3.2 (c)),
and , since
(shown below) gives by (O2), and (O1) forbids equality. Not
surjective: for every ( for by Proposition 2.3.2 (b),
and
otherwise by Proposition 2.4.3 (e)),
while
( by Proposition 2.4.3 (e), so
by
Proposition 2.4.3 (a)).
So is not a
value.
The methods are those of Sets and Functions, Example (Method: proving injectivity)
and Sets and Functions, Example (Method: proving surjectivity):
for injectivity, start from equal values and reach equal
inputs; for surjectivity, solve for the input, or show
that a target is never reached.
Exercise
(R3)
Prove that for every : if , then .
Solution. By contraposition, as in
Logic and Proof, Theorem 2.1.3.
Suppose .
Since is a
non-zero natural number, (Theorem 2.4.2 (b)), so
division by (Theorem 2.5.2 (a)) gives
with
, so
by discreteness (Theorem 2.4.2 (c)), as in
the proof of Corollary 2.5.3; and
, since
otherwise
and . By Proposition 2.3.2 (d) and
the ring laws, In both cases , so the remainder of on division by is , and by the
divisibility test after Theorem 2.5.2. This
proves the contrapositive.