Section 1.1 left a puzzle half solved: among any five
lattice points, two have a lattice point as midpoint,
provided that five objects in four boxes always put two
in one box. That principle sounds too obvious to need
proof, but it is a statement about every finite
collection, and “finite” has no definition yet. Section
1.6 supplied the tool: a bijection pairs the elements of
two sets one for one. This section makes “the same size”
mean “there is a bijection”, defines finite sets by
pairing with , proves the pigeonhole principle and comes
back to the five points, and then proves the facts about
finite sets on which counting rests. Whether is larger than is the question of
Chapter 3.
Same size
without counting
So far we have compared functions; now we compare
sets. The everyday word is “as many as”, and we can
check it without knowing any numbers. Put two piles of
coins on a table, and take one coin from each pile at a
time, setting the two aside as a pair. If both piles run
out at the same moment, they had the same number of
coins. We know this before counting either pile, and a
child who cannot count past ten can do it with piles of
a thousand. Section 1.6 proved that the bijections are
exactly the maps with a two-sided inverse (Theorem 1.6.4),
and said that such a pairing is how this book says “the
same size”.
The pairing is a function from the first pile to the
second. Different coins are paired with different coins,
so it is injective; every coin of the second pile is
used, so it is surjective. Pairing makes sense for any
two sets, finite or not, and that is the definition.
Same size means there is a pairing.
Definition
2.5.1 (Equinumerous Sets)
Let and be sets. We say that
and are
equinumerous, and write , if
there exists a bijection . In
symbols,
In words: the definition asks for
one bijection, and it does not care
which. Injectivity says that no two elements of are paired with the
same element of ;
surjectivity says that no element of is left over. The
statement is read as a whole, “ and are equinumerous”. It
is a relation between two sets. We do not define an
object ,
“the size of ”,
standing alone, and a second-reading fold below explains
why the obvious candidate is not available. For finite
sets, the definition of a finite set below gives a meaning as a
natural number, and the two uses agree.
Here are four examples, the degenerate one first.
- The empty set. The empty function
of Proposition 1.5.2
(a) is injective and surjective, vacuously: there are no
two inputs to compare and no output to reach. So . Conversely, if , there is a function , so by Proposition 1.5.2
(b). The empty set is equinumerous with itself and with
nothing else. This case is the test case for every
statement below about sets “with elements”, at .
- Three letters and three numbers. Let be three
different letters. The function with , , sends different letters to different numbers
and reaches each of . So .
- Two intervals of different lengths. The
function , , has the inverse , since
for
, and . By Theorem 1.6.4
it is a bijection, so . Length and size are different things.
- The natural numbers and the positive
integers. The function ,
, is
a bijection. It is the Quick check near the end of this
section, where it shows that is infinite.
Quick check. Decide, from Definition 2.5.1:
(a) ? (b) ? (c) ?
Solution.
- (a) No. The set
has
the element , and a function
has no values, so it is not
surjective. (b) No. The set has one
element, so every function
sends and to it and is not
injective. (c) Yes. The set is empty, and the empty function
is a bijection.
A non-example by a minimal change.
Shrink
to . There
is no bijection . Let be any function .
If ,
then is not
injective. Otherwise and are and in some order, and
, which is
or , equals one of them. In
every case two different letters share a value. So the
clause that fails is injectivity, and it fails for
every function, which is what “not
equinumerous” requires. Surjectivity can hold: , , reaches both
numbers.
Warning. To show that two sets are
not equinumerous, one map is never
enough. The map from to is not surjective, since is not a value, and yet
by the map above. “Not equinumerous” is a
statement about all functions, , and a proof of it must deal with
an arbitrary , as
the non-example did.
Why this definition. To count a set
is to pair it with : saying “one, two, three” while
pointing at the coins is a bijection from onto the
pile. So the definition does not replace counting; it
isolates the part of counting that still makes sense
when the set is infinite. Each clause has a job. Without
injectivity, the surjection
would make a three-element set as large as a one-element
set. Without surjectivity, the inclusion
would do the same in the other direction.
The first result says that equinumerosity behaves
like equality: reflexive, symmetric and transitive.
Proposition
2.5.1 (Equinumerosity Is Reflexive, Symmetric
and Transitive)
For all sets ,
and :
- (a) ;
- (b) if , then
;
- (c) if and
, then .
Proof. (a) The identity
is injective,
since says , and surjective, since every is .
(b) Let be a bijection. By Theorem 1.6.4
it has a two-sided inverse ,
with and . Read with the roles exchanged,
these two equations say that is a two-sided inverse
of (Definition 1.6.2).
So is a
bijection ,
by Theorem 1.6.4
again.
(c) If and are bijections, then
is a bijection by Theorem 1.5.4
(c). This proves the proposition.
Clauses (a)–(c) say that equinumerosity behaves like
an equivalence relation: reflexive, symmetric and
transitive, as equality is. We do not call it one.
Chapter 4 makes “equivalence relation” precise for
relations on a set , subsets of ;
equinumerosity relates any two sets whatever, and there
is no set of all sets for it to live on (Theorem 1.2.4).
That is also why the book writes here
and keeps the symbol for later.
↺Second readingWhy
|A| is not an object
Take .
Every singleton is equinumerous
with , by
. If the
singletons formed a set , its union would be a
set by (W3) of Section 1.2, and every object would be an element of
it, since . That is a set of which every set is an
element, which Theorem 1.2.4
rules out.
Finite
sets
Counting is pairing with , so
“finite” is defined by such a pairing. Recall from
Section 2.1 that for , so that , since no has .
Definition
2.5.2 (Finite Set, Number of Elements)
Let be a set
and . We
say that
has
elements if , that is, if there
exists a bijection . The set is
finite if it has elements for
some . In that case we write .
In words: numbers the
elements of as
. Injectivity says that no
element gets two numbers; surjectivity says that every
element gets one. So a non-empty finite set is , a list without repetitions. By Proposition 2.5.1
(b), “ has elements” is the same
as , so the notation is
consistent with the relation of Definition 2.5.1.
There is a gap in the notation . It presents
as
the number of elements, but the
definition only says that some works. Could a set have
elements and also
? It cannot, and a
corollary of the pigeonhole principle below proves it.
That corollary is the well-definedness step this
definition needs. Until it is proved, read as “ has elements”.
Examples:
- The empty set has elements: , and the empty function
is a bijection. Conversely, a set with elements is empty,
since a bijection is surjective and has no values.
-
has elements, by
.
- For ,
has
elements:
maps to , because for (Lemma 2.1.1
(c)) and . It has the inverse , so it is
a bijection (Theorem 1.6.4).
- The three-letter set has elements, by the
inverse of the bijection of the second example after Definition 2.5.1.
Quick check. How many elements does
have? Give the bijection.
Solution. Five, by from
:
for ,
.
Its inverse is , which lies in for , since
by Lemma 2.1.1
(d). The two maps undo each other, so the first is a
bijection (Theorem 1.6.4).
Definition
2.5.3 (Infinite Set)
A set is
infinite if it is not finite:
for every there is no bijection
.
To prove a set infinite we must rule out every at once, and for every
every candidate
bijection. Nothing so far does that, not even for . The tool is the
pigeonhole principle, and the last theorem of this
section turns it into a usable test.
Shrinking the codomain. One small
device is used in the rest of this section and in
Chapter 3. Let be a function, and let contain
every value .
The graph of is
then a subset of , and with the codomain it is a function with the same
values (Definition 1.5.1).
We call it “ with
codomain ”. It is
injective if and only if is, since injectivity
speaks only of values. In particular, with codomain is surjective (Definition 1.7.1).
So an injective is a
bijection once its codomain is shrunk, and .
Back to the
pigeons
Section 1.1 reduced its question (Q1) to one step:
five points, each with one of four parity patterns, put
two points on one pattern. In the language of functions,
sending each point to its pattern is a map from a
five-element set to a four-element set, and the step
says that it is not injective. Chapter 1 also found one
function from a three-element set to a two-element set
that is not injective (Example (Deciding injective and surjective)
(c)), and observed without proof that none can be. Here
is the general fact, for the standard sets and .
Theorem
2.5.2 (Pigeonhole Principle)
Let
with . Then
there is no injection .
Idea (Scratch work). Induct on the
number of holes.
In the step there are holes, and we look at the last one. If no
pigeon sits in hole , all the pigeons sit in holes, and the
hypothesis applies at once. If pigeon sits there, there is
only one, by injectivity. Move pigeon to the hole of pigeon
, and send pigeon
away. That leaves
pigeons in
holes, still one
to a hole, and . The hypothesis is used at , not at , so the property we
induct on must say “for every ”.
On scrap paper, with and : three pigeons in two holes; if hole is empty, all three sit
in hole ; if
pigeon sits in
hole , move it to
pigeon ’s place
and send pigeon
away. As givens and goal, inside the step:
| ; ; injective |
a contradiction |
| Case 1:
is no value of |
with codomain
is
injective, : against |
| Case 2: |
an injection , with : |
Before reading on: self-explain the construction
of the injection
in Case 2: why are its values in , and why
is it injective?
Proof. For let be the statement
for every with , there is no injection .
We prove
for every
by Logic and Proof, Axiom 4.2.1.
Base case . Let with . Then (Lemma 2.1.1
(a)), so and the domain is non-empty, while . By Proposition 1.5.2
(b) there is no function at all, so there is no injection.
Inductive step. Let and suppose
. Let with , and
suppose, for a contradiction, that is injective. There are two
cases.
Case 1: is not a value of . For every , and , so , and
by Lemma 2.1.1
(e). So with
codomain is an injection , with . This contradicts .
Case 2: for some . Since , we
have , so
by Lemma 2.1.1
(c); and , by subtracting from . Define
by (The second line applies only when ; if , then for every
.) The map is injective: two
different inputs other than keep their different
values, and if one input is , its value is , while the other has
value . Moreover for every
: either , or
,
which happens only when .
Let . It is injective by Theorem 1.5.4
(a). For every ,
,
and is injective
with ,
so ; as in Case 1, .
So with codomain
is
an injection , with . This
contradicts ,
applied to the number .
In both cases the injection cannot exist, so holds. By Logic and Proof, Axiom 4.2.1,
holds for
every .
This proves the theorem.
The theorem is about the standard sets only, but
bijections carry it to any finite sets. Part (b) below
is its mirror image for surjections.
Corollary
2.5.3 (Pigeonhole for Finite Sets)
Let , let
have elements,
and let have
elements.
- (a) If , there is no
injection .
- (b) If , there is no
surjection .
Idea. For (a), the bijections of Definition 2.5.2
turn an injection into an injection , which Theorem 2.5.2
forbids. For (b), a surjection has a
right inverse ,
and is an
injection ,
forbidden by (a). The right inverse is built by a rule:
send to the
element of with
the smallest number among those that
sends to (a least element, Example (Method: the least element)).
Proof. Let and be bijections (Definition 2.5.2).
By Theorem 1.6.4,
has an inverse
, which is a bijection: the equations
and say that is a two-sided
inverse of (Definition 1.6.2),
so Theorem 1.6.4
applies.
(a) Suppose and is injective. Then is
injective by Theorem 1.5.4
(a), which contradicts Theorem 2.5.2.
(b) Suppose and is surjective. For let It is non-empty: since is onto, for some , and for some
, since is onto. By Theorem 2.1.3,
has a least
element. Define by . Then for every
, because
.
So : the function is a left inverse of
, and is injective by Theorem 1.6.1
(a). Now is an
injection from the -element set to the -element set , with , which
contradicts (a). This proves the corollary.
The function
in (b) is defined by a rule, “the least
element”, applied to each at once, so its
existence needs nothing beyond specification. Section
3.2 meets surjections for which no such rule is
available, and there the book adds a new principle.
↺Second readingTwo
loose ends from Chapter 1 and Logic and
Proof
Two special cases settle earlier loose ends. With
, part (a)
says that a set with elements has no different elements:
there is no injection . That is the second school
fact that Logic and Proof, Exercise (C2: A sentence with no finite model, used later)
took on trust. With ,
in (a) and ,
in (b), the
corollary gives the two observations after Example (Deciding injective and surjective)
in general.
Here is a typical use of (a). Among any three
different integers, two have an even sum. Let be a set of three
different integers, and let
send each to its
remainder on
division by (Theorem 2.2.3),
an integer with ; then by Proposition 2.1.2
(b), and by
Lemma 2.1.1
(e), so . The set has
elements, so by (a), is not injective: there
are in
with the same
remainder .
Writing
and , which is even, since
(Proposition 2.1.2
(a)). The pigeons are the integers and the holes are the
remainders; the whole skill is choosing the holes.
Example
(Method: the pigeonhole principle)
Template. (1) Choose the pigeons, a
set whose number
of elements you know, and the holes, a set with fewer. (2) Define
,
“the hole of a pigeon”, and check that its values lie in
. (3) By Corollary 2.5.3
(a), is not
injective: two different pigeons share a
hole. (4) Translate “same hole” back into the property
you want.
When to use it. The claim says
“among any
objects, two have …”, or “some value is taken twice”,
and exceeds the
number of possible values.
The usual failure. Holes for which
sharing a hole does not give the property: choose the
holes by what two pigeons should share. Pigeons that
need not be different: a list with repeats is not a set
with elements.
Claiming to know which two pigeons share a hole.
Example
(Back to the five lattice points)
Show that among any five different lattice points,
two have a lattice point as midpoint.
Solution. Let be a set of five
lattice points, so has elements. Let , which has the elements , , , (number them to ). Send to , where and are the remainders of
and on division by (Theorem 2.2.3);
as in the three-integers paragraph above, so the values
lie in . Since
, Corollary 2.5.3
(a) gives two different points in
with the same
remainders. Then
and have the same
parity (Definition 1.1.1:
remainder means
, which is
even, and remainder means , which is
odd), and so do
and , so their
midpoint is a lattice point by Example (Same pattern, lattice midpoint).
This answers (Q1) of Section 1.1: yes.
The word “different” costs nothing, since a point and
itself have that point as midpoint; and the four corners
of a unit square (Section 1.1) show that five cannot be
lowered to four.
Quick check. Choose pigeons and
holes: among any
different integers, two differ by a multiple of .
Solution. The pigeons are the different integers.
The holes are the remainders on division
by (Theorem 2.2.3),
a set with
elements. By Corollary 2.5.3
(a) two of the integers, , have the same remainder : and , so
.
The next corollary is the well-definedness promised
after Definition 2.5.2.
Corollary
2.5.4 (The Number of Elements Is Unique)
Let be a set
and .
If has elements and has elements, then .
Proof. Let and be bijections. If , then is
injective (Theorem 1.6.4,
Theorem 1.5.4
(a)), which contradicts Theorem 2.5.2.
Exchanging the roles of and rules out in the same way.
By trichotomy, .
So a finite set has exactly one number of elements,
and from now on means “the number of
elements of is
”.
Subsets and
unions of finite sets
Three facts about finite sets are used everywhere
below: the sizes of disjoint sets add, a subset is no
larger than the whole, and removing one point lowers the
size by one. The first uses nothing else from this
section, so it comes first.
Proposition
2.5.5 (Disjoint Unions)
Let , let
have elements,
let have elements, and suppose
. Then has elements.
Idea. Number with and then
carry on numbering with :
shift the numbering of up by .
Proof. Let and be bijections. Note by Lemma 2.1.1
(b). For with , we have by Lemma 2.1.1
(e), so with (Lemma 2.1.1
(d)). So we may define by
Injective. Let .
If ,
then gives . If , then
gives , so . If , then and , and
, so :
this case cannot occur, nor can its mirror image.
Surjective. Let . If , then with , and . If , then with ; put , so
,
and .
So is a
bijection, and has elements.
↺Second readingWhy
the step does not remove a point
Now subsets. The proof is an induction on the size of
the whole set, and it must be set up with care: the step
peels off one element, and the obvious way to say “peel
off one element” is the corollary after it, on removing
a point. But that corollary is proved
from this proposition. So the step
peels off by restricting the bijection directly, and
cites nothing proved later.
Proposition
2.5.6 (Subsets of Finite Sets)
Let ,
let have elements, and let . Then is finite and has elements for some . If , then .
Idea. Remove the last element from . Either it is outside
, and sits inside the smaller
set; or it is in ,
and is its part
in the smaller set plus one point, which Proposition 2.5.5
counts.
Proof. For let be the statement
for every set
with elements and
every , the set has elements for some , and if .
We prove
for every by Logic and Proof, Axiom 4.2.1.
Base case . A set with elements is empty, so
gives , which has elements; the
second clause is vacuous.
Inductive step. Let and suppose
. Let have elements, with a
bijection , and let . Put The restriction of to , with
codomain , is
injective and surjective, so has elements. Every element
of is with or (Lemma 2.1.1
(e)), so . And : if with , injectivity would give .
Case . Then , and , applied to and , shows that has
elements. In this case , since , and indeed , as
required.
Case . Then , and the union is
disjoint because . By , applied to and , the set has elements for some . The set has element (by ). By Proposition 2.5.5,
has elements.
If , then
, since otherwise ; so by ,
and .
In both cases holds. By Logic and Proof, Axiom 4.2.1,
holds for
every .
This proves the proposition.
Read contrapositively, with Corollary 2.5.4:
a subset of an -element set that itself
has elements is
the whole set. (If , its number of elements is , and by
uniqueness it is not .) That is the first
school fact that Logic and Proof, Exercise (C1: True in every finite model, used later)
took on trust.
Quick check. A set has
elements. What is , and which results say
so?
Quick check. Choose parts and
sizes: among any
different elements of , three have the same
first coordinate.
Solution. Let have elements, and let be its elements with
first coordinate ,
for ; these
are disjoint with union , and both are finite by
Proposition 2.5.6.
If both had at most elements, then Proposition 2.5.5
would give at
most elements,
contradicting Corollary 2.5.4.
So some has
elements, that is (Lemma 2.1.1
(e)), and a bijection gives three different elements , , of , all with first
coordinate .
Corollary
2.5.7 (Removing a Point)
Let ,
let have elements, and let
. Then has
elements.
Proof. Since , the set is a
proper subset of ,
so by Proposition 2.5.6
it has elements
for some . Now is a disjoint
union, and
has element, so
has elements by Proposition 2.5.5.
By Corollary 2.5.4,
, so
.
Every later induction on the number of elements uses
this corollary in the same way: its step starts from an
arbitrary set with elements, picks
some (there
is one, since ), and applies the hypothesis to , which
has elements. It
never presents the set as “ with one point added”
from the outset, which would prove the claim only for
sets that come in that form. Here is the first such
induction. Chapter 1 promised the count of subsets of a
finite set.
Proposition
2.5.8 (Counting Subsets)
Let . A
set with elements
has subsets: if
, then
.
Idea. Fix one element . Every subset either
leaves out or
contains it, and adding pairs the subsets of
the first kind with those of the second. So the count
doubles with each new element.
Proof. We use Logic and Proof, Axiom 4.2.1
on . Base
case. A set with elements is , and has element (Definition 2.3.2).
Inductive step. Let , and suppose
every set with
elements has
subsets. Let have
elements,
pick , and
put . By Corollary 2.5.7,
has elements, so has elements by the
hypothesis (here by Proposition 2.3.4
(d), so the count makes sense; likewise ). Let
the image of under , a
function .
is the disjoint union of and . Every member of
contains , and no member of does, since
; so the
union is disjoint. Both sets consist of subsets of . Conversely, let . If , then . If , then with , so .
has elements. The
map , with codomain , is surjective by the
definition of . It
is injective: for we have , so , and
can be read back from . So it is a bijection , and
composing a bijection with it (Theorem 1.5.4
(c)) shows that
has
elements.
By Proposition 2.5.5,
has
elements (Definition 2.3.2).
By Logic and Proof, Axiom 4.2.1,
the claim holds for every .
↺Second readingSubsets
and functions to {0, 1}
For any set ,
the map , with inverse , is a bijection onto the set of functions (the
correspondence of Section 1.5 between subsets and
indicator functions). Taking with elements, a set with
elements also has
exactly
functions to , and the two counting problems of Chapter 1
are one. Exercise C2 counts all functions between finite
sets.
No finite
set is equinumerous with a proper subset
For finite sets, “a proper part is smaller” is a
theorem.
Theorem
2.5.9 (A Finite Set Has No Proper Copy)
Let be a
finite set and . Then
and are not
equinumerous: there is no bijection .
Proof. Let have elements, with a
bijection . By Proposition 2.5.6,
has elements for some , since . Suppose were a
bijection. Then is a
bijection (Theorem 1.5.4
(c)), so also has
elements, and Corollary 2.5.4
gives . This
contradicts .
Contradiction at scale. The proof
never computes with . It supposes the
bijection, hands it to two theorems already proved, and
lets them disagree about the number of elements of . The claim is a
negation, “no bijection”, so this is face (i), chosen by
Example (Method: choosing direct, contrapositive or contradiction);
but the clash is between results, not between two lines.
The proofs of Theorem 2.5.2
and Corollary 2.5.4
have the same shape inside them.
Turned around, the theorem is a test for infinity:
a set that is equinumerous with a proper subset
of itself is infinite. Here is its first use.
For the even natural numbers we write the image of under .
Example
(Hilbert’s Hotel)
A hotel has one room for every natural number, and
every room is taken. A coach arrives with guests for the
odd-numbered rooms: the guest in room is asked to move to
room . Show that
this is a bijection , that is a proper subset
of , and deduce
that is
infinite.
Solution. Let ,
.
Its values lie in by definition, and
by Lemma 2.1.1
(b). It is injective, since gives , and
surjective, since every element of is for some . So .
The inclusion is proper because : if , then ; if , then (Lemma 2.1.1
(a)) and .
So for
every .
If were
finite, Theorem 2.5.9
would forbid a bijection from onto its proper
subset . So
is infinite.
Every guest still has a room, and the odd rooms are now
free.
The finite intuition “a proper part is smaller” fails
for , and it
fails exactly because is infinite. Section
3.5 proves that it fails for every
infinite set.
Warning. does not
make smaller than
when is infinite: and
. Equinumerous is not “one is a
subset of the other”, in either direction.
Warning. “Finite” does not mean
“bounded”. The set lies in
, and it is
infinite: sends to , and it is a
bijection from
onto , with inverse . That set is a proper subset
of , since and for .
Quick check. Is a
bijection ? What does that show?
Solution. Yes. Its values lie in
, since . Its inverse is , which is
defined on because for (Lemma 2.1.1
(c)); the two maps undo each other, so it is a bijection
by Theorem 1.6.4.
So is
equinumerous with its proper subset , and by Theorem 2.5.9,
is infinite, a
second time. In the hotel, every guest moves up one
room, and room is
free.
Quick check. Show that the set of
primes is infinite.
Solution. Suppose it is finite. It
is non-empty, since is prime, so it is
with (Definition 2.5.2
and the remark above), and it has a maximum (Proposition 2.3.8).
By Theorem 2.4.1
there is a prime . That prime lies in the set and exceeds its
maximum, a contradiction.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define “ is finite”, and write
its negation in symbols, with every quantifier
shown.
- (b) True or false,
with a reason: a subset of an infinite set is infinite;
a set that has an infinite subset is infinite.
- (c) How many
injections are there?
- (d) Let , where
and are finite and has more elements than
. What does the
pigeonhole principle guarantee about ?
Solution.
(a) is finite if there are
and a
bijection (Definition 2.5.2):
.
By Logic and Proof, Proposition 6.2.3,
applied to each quantifier, and De Morgan, its negation
is which is Definition 2.5.3.
(b) The first is
false: , and is finite while
is infinite (Example (Hilbert’s Hotel)).
The second is true: if were finite, every
subset of would
be finite by Proposition 2.5.6;
so a set with an infinite subset is not finite.
(c) None. By Theorem 2.5.2
with , there is no injection .
(d) That is not injective (Corollary 2.5.3
(a)): there are two different elements
of
with . It does
not say which two, and it says nothing when has at most as many
elements as .
B. Practice
Exercise
(B1: Moving the guests)
Give explicit bijections , and , and prove that each is a bijection by
writing down its inverse.
Solution. First. For : if ,
then .
Indeed
gives (Lemma 2.1.1
(a)); with ,
, so (Lemma 2.1.1
(e)); with ,
likewise.
Conversely every lies outside . So . Let ; then and . Let for
; then by Lemma 2.1.1
(d). Since and , the map is a bijection by Theorem 1.6.4.
Second. The same with in place of : , with
inverse , which lies in for by Lemma 2.1.1
(d).
Third. Let , the odd
natural numbers, and , which lies in by definition. Every
is for exactly one
: one by
the definition of , and only one since
gives . So is that , a natural number. Then
and
, so
is a bijection
. Each of
the three sets is a proper subset of equinumerous with
, which shows
again that is
infinite.
Exercise
(B2: Choosing the holes)
- (a) Prove that among
any different
integers, two have the same remainder on division by
.
- (b) Prove that among
any different
points of , three lie in one row, that is,
have the same first coordinate.
Hint: in (b), the rows are the holes; how many
points can a row take if no row takes three?
Solution.
(a) Let be a set of integers. By Theorem 2.2.3
with divisor ,
each has a
unique remainder , an integer with
;
then
by Proposition 2.1.2
(b), and
by discreteness, Proposition 2.1.2
(c), so . This defines . The set has elements (the third
example after Definition 2.5.2).
Since , Corollary 2.5.3
(a) shows that is
not injective: there are in with .
(b) Let have elements, and for let , the points of in row . These sets are
pairwise disjoint and their union is . Each is a subset of
, so it is finite
by Proposition 2.5.6;
say has elements. If every
, then by
Proposition 2.5.5,
applied twice, has
elements, and Corollary 2.5.4
forbids to have
both that number and elements. So some , that is (Lemma 2.1.1
(e)); if is a bijection, then are three different points of in row . Seven is the least
number that works: the six points with second coordinate
or put exactly two in each
row.
Exercise
(B3: Finite unions)
Let ,
and let be finite sets, that is, a family of finite sets. Prove that is finite.
Solution. For let be “for every family
of finite sets, the union is finite”. We use Logic and Proof, Axiom 4.2.1.
Base case. For the index set is , and the union of the empty family is
(Definition 1.3.4:
no lies in some
), which has
elements.
Step. Suppose , and let be a family of finite sets. Since , we have , and is finite by , applied to the
first sets; say
it has elements.
Write a disjoint union. The set is
a subset of the finite set , so it is finite
by Proposition 2.5.6;
say it has
elements. By Proposition 2.5.5,
has elements. By Logic and Proof, Axiom 4.2.1,
holds for
every .
The detour through is
needed because Proposition 2.5.5
is about disjoint sets, and and may overlap.
Exercise
(B4: Prove or disprove)
Prove each true statement and refute each false one
with a counterexample.
- (a) Among any different integers,
two differ by a multiple of .
- (b) Among any different integers, two
have an even sum.
- (c) Among any different lattice
points of space (points of ), two have a
lattice point as midpoint.
- (d) If has elements and , then some value of is taken at least times.
- (e) No function from
the set of subsets of to is injective.
- (f) Every injection
is surjective.
Solution.
(a)
False. Take . Any two
of them differ by an integer with , which is not a multiple of . Thirteen integers
would do, by the argument of the Quick check on integers.
(b)
True. The pigeons are the three
integers and the holes are the two parities (Theorem 1.1.2),
a set with
elements. Since , two of the integers have the same parity (Corollary 2.5.3
(a)), and their sum is even (Example (The parity of a sum)).
(c)
False. Take five of the eight points
with all coordinates in (Exercise C3 of Section 1.1). Two different
ones differ in some coordinate, where one has and the other ; the sum there is , so that coordinate of
the midpoint is .
(d)
False. Take and
the
integer part of , with values :
each value is taken exactly twice. Nine elements would
force some value three times, as in Exercise B2
(b).
(e)
True. The set of subsets of has elements (Proposition 2.5.8),
and , so Corollary 2.5.3
(a) applies.
(f)
True. Let be such an injection.
With its codomain shrunk to its image, is a bijection, so
has elements. It
is a subset of , so it is all of it, by the remark after Proposition 2.5.6;
that is, is
surjective.
Three are true, (b), (e) and (f), and three are
false. Each true item is the method of Example (Method: the pigeonhole principle)
with the holes named; each false one either has too few
pigeons or holes that do not give the property.
C. Going deeper
Exercise
(C1: Infinite means arbitrarily large finite
pieces)
Prove that a set is infinite if and only
if for every there is an injection . In
the direction , say
whether your proof makes infinitely many choices at
once, and why.
Solution (Hint 1). For , suppose
has elements and use the
hypothesis at one well-chosen . For , induct on
.
Solution (Hint 2). For : let be “there is an
injection ”; the base case is the empty
function.
Solution. Suppose the
condition holds and, for a contradiction, that has elements, with a
bijection . Take and an
injection . By Theorem 1.6.4,
has an
inverse , which is a bijection,
since is a
two-sided inverse of it (Definition 1.6.2,
Theorem 1.6.4).
Then
is injective (Theorem 1.5.4
(a)), which contradicts Theorem 2.5.2.
So is
infinite.
Let be infinite.
For let
be “there is
an injection ”. We use Logic and Proof, Axiom 4.2.1.
Base case. , and the empty function
(Proposition 1.5.2
(a)) is injective, vacuously.
Step. Suppose , and let be an injection. With its codomain shrunk to
its image , it is a bijection, so has elements. Since is infinite, ; and , so there
is some . Define by for
and ;
this is a function because and (Lemma 2.1.1
(e)). It is injective: two inputs are separated by
, and
differs from every with . So holds. By Logic and Proof, Axiom 4.2.1,
holds for
every .
No infinitely many choices are made. The
step uses two existence statements, and “”, and names one witness for each: one
each, inside the proof of the single
implication . Its conclusion, , is again an
existence statement, so the witnesses never leave the
step. Induction then gives for each
separately: for each some
injection exists, and different may use unrelated ones.
Gluing the steps into one injection , with a new
point picked at every stage, would require all the picks
at once, with no rule saying which point to pick. That
is a different statement; Section 3.5 proves it with the
principle of choice of Section 3.2.
Marking scheme. (10 points) - 2:
supposes has
elements and uses
the hypothesis at to contradict the pigeonhole principle (Theorem 2.5.2
or Corollary 2.5.3
(a)). - 1: sets up an
induction on with
the base case
(the empty function); a base earns the point
only if is
also covered (by the empty function). - 3: in the step,
shows that the image of the given injection has elements and is
therefore not ,
and takes a point outside it. - 2: extends the injection
by that point and checks injectivity, including the new
value against the old ones. - 2: explains that each step
makes finitely many choices inside one implication, so
no principle of choice is used, and that building one
injection on all of would be a different
statement. Fatal errors (0 for the step): picking “a new
point for every ”
to define one function and calling it induction; taking a point
outside the image without showing the image is not all
of .
Exercise
(C2: Counting products and functions)
Let , let
have elements,
and let have
elements.
- (a) Prove that has elements.
- (b) Prove that the
set of
functions
has
elements.
- (c) Check your
formula in (b) against Proposition 1.5.2
in the cases
and , .
Solution (Hint 1). Induct on , with fixed, and remove one
point from by Corollary 2.5.7.
Solution (Hint 2). For (b), a
function on is
the same as a function on together with one value at
: consider .
Solution.
(a) Fix with elements. For let be “for every set
with elements, has elements” ( by Lemma 2.1.1
(b)). Base case. If has elements, then , and ,
since a pair in it would need a first coordinate in
. It has
elements. Step. Suppose , let have elements, pick
, and put
, which has elements by Corollary 2.5.7.
Then and the union is disjoint, since first
coordinates in differ from (Definition 1.4.1).
The first set has elements by . The map ,
,
is injective by Definition 1.4.1
and surjective by Definition 1.4.2,
so
has elements. By
Proposition 2.5.5,
has
elements. By Logic and Proof, Axiom 4.2.1,
holds for
every , and was arbitrary.
(b) Fix with elements, and let be “for every set
with elements, has elements” ( by Proposition 2.3.4
(d)). Base case. , and by Proposition 1.5.2
(a),
has exactly one element, the empty function; (Definition 2.3.2),
also when .
Step. Suppose , let have elements, pick
, and let
, with elements. Define Injective: if , then
and agree on and at , hence on ,
and they have the same domain and codomain, so by Proposition 1.5.1.
Surjective: given , let
have graph , where is the graph of , and codomain . Each has exactly
one partner, its -value, because has first
coordinate ; and has exactly one, , because every pair of
has first
coordinate in . So , and . Hence
is a bijection.
By , has elements, so by (a),
applied to the sets and , the product has
elements (Definition 2.3.2).
Since is a
bijection, (Definition 2.5.1),
and . By Proposition 2.5.1
(b) and (c), , that is, has elements. By Logic and Proof, Axiom 4.2.1,
holds for
every .
(c) For : has one
element by Proposition 1.5.2
(a), and ,
even for . For
and : , so there
is no function by Proposition 1.5.2
(b), and has elements; and . Both agree with (b). With , (b)
recovers the count of the paragraph
after Proposition 2.5.8.
Marking scheme. (10 points) - 2:
sets up each induction on with fixed, and handles
(the empty
product; the empty function). - 2: in each step, takes
an arbitrary with elements, removes
one point by Corollary 2.5.7,
and applies the hypothesis to the rest. - 2: (a) splits
into two
disjoint pieces and counts by a
bijection with . -
3: (b) gives a bijection between and ,
checking injectivity (equality of functions) and
surjectivity (the extended graph is a function). - 1:
(c) checks both degenerate cases against Proposition 1.5.2.
- Direct route for (a): composing the given bijections
with a bijection , e.g. , with injectivity and
surjectivity checked (for example by Theorem 2.2.3)
and the case
or handled,
earns the 2 points of the (a) line and the (a) halves (1
point each) of the two induction lines. Fatal errors (0
for the step): “each of the elements has possible values, so
” with no
bijection or induction; a step that applies the
hypothesis to a set not shown to have elements.
R. Review
Exercise
(R1)
Decide whether each function is injective and whether
it is surjective. Justify your answers.
- (a) , .
- (b) ,
.
Solution. (a) is neither injective
nor surjective. Not surjective (Definition 1.5.4):
is not a value.
Every value is even, with by Proposition 2.1.2
(a) (Definition 1.1.1),
while is odd, and no integer is both (Theorem 1.1.2).
Not injective (Definition 1.5.3):
, and , since their first coordinates
differ (Definition 1.4.1).
The method of Example (Method: proving surjectivity)
has nothing to work with here: a witness for the value
would be a pair
with ,
and the parity argument shows there is none.
(b)
is injective and not surjective. Injective, by the
method of Example (Method: proving injectivity):
if , then and . Not surjective (Definition 1.5.4):
is not a value.
If for
some ,
then and
are two divisions of by , with remainders and in , against the
uniqueness in Theorem 2.2.3.
Exercise
(R2)
For a set and
a property
of two elements of , consider the
statements
- (a) Decide (S1) and
(S2) for :
“”, first
with , then with .
- (b) Decide (S1) and
(S2) for
and : “”.
- (c) Prove that (S1)
implies (S2) for every and .
Solution. (a) For both
hold: divides
every (), which is
(S1); and (S2) follows by (c). For , (S2)
holds with , since . (S1) fails: its negation is (Logic and Proof, Proposition 6.2.3),
and for take
, for
take , since a
positive divisor of is at most .
(b) (S2) holds: for ,
has . (S1)
fails: its negation is , and for the choice
,
an integer by Proposition 2.1.2
(a), gives .
(c) Suppose (S1), and let be a witness:
for every
().
Let . Then
, so , with witness (). As
was arbitrary,
(S2) holds ().
This is Logic and Proof, Proposition 5.6.2,
with bounded quantifiers. The converse fails, by (a) for
and by (b): one
for all is more
than one for each
.
Exercise
(R3)
Let and be valuations such that
every atom true under is true under . Prove that every
formula built from atoms with and alone (no , , or ) that is
true under is
true under .
Deduce that
is equivalent to no such formula.
Solution. By structural induction
(Logic and Proof, Theorem 4.3.1),
with :
“if
contains none of , , , and ,
then ”. Truth values are those of Logic and Proof, Definition 4.4.2.
Atoms and . For an atom
with , by the
hypothesis on and
. The formula
contains , so holds
vacuously.
Step for . contains
, so holds
vacuously.
Step for . If is or , holds vacuously.
Otherwise, if contains none of the four symbols,
neither do
and , whose
symbols are among its own, so and apply to them.
For :
gives , so , and . For :
or , so
or , and .
The consequence. Let be the all-F valuation
and the all-T
valuation; every atom true under (there is none) is true
under . Then
and . If , built with and alone, were
equivalent to , it would have the same value as under every
valuation: , hence
by the first part, against .
This consequence is a special case of Logic and Proof, Theorem 4.9.6
(b), which allows as well and looks
only at the all-T row; here the / case comes out of
the stronger statement that such formulas are monotone
in the valuation.