Section 5.1 sorted relations by four properties:
reflexive, symmetric, antisymmetric and transitive (Definition 5.1.1). This
section studies the relations that have the first,
second and fourth. They are the relations that say two
things are “the same” in some respect, and each of them
cuts its set into disjoint pieces of mutually “same”
elements. We prove that the pieces always form a
partition, and that every partition arises from exactly
one such relation. Then we build the integers modulo
, and meet the
check that every definition on pieces needs: that it
does not depend on which element names the piece.
Section 2.1 promised that check for functions defined on
classes; here it is, with a method for making it. Last,
every function sorts its domain into the classes of
“same value”, its fibers, and factors through them.
Arithmetic
on a clock
On a twelve-hour clock, five hours after nine o’clock
it is two o’clock. People say “ on a clock”,
and nobody is confused. Read as a statement about
integers, it is false: . So what is it a statement about?
The clock does not distinguish from , or from or : all of them put the
hand in the same place. Two integers name the same hour
when they differ by a multiple of . The sentence “” is then about
hours, and an hour is not one integer but a whole
collection of them, . The addition
adds collections: take any integer from the first, any
from the second, add them, and see which collection the
sum lands in.
Two things have to be checked before this is
mathematics. First, “differ by a multiple of ” must behave like “is
the same as”: it must cut the integers into separate
collections, and no integer may land in two of them.
Second, the answer must not depend on the choice: if we
take for “nine”
and for “five”,
the sum must
still name two o’clock. It does, since . The first
check is the theory of equivalence relations and
partitions. The second is called
well-definedness, and it comes at the
end of the section.
Equivalence
relations
Equality has three properties that every argument
with “” uses
silently: ; if
, then ; and if and , then (Logic and Proof, Proposition 5.7.1).
They are exactly what lets us replace a thing by an
equal thing, as often as we like, in either direction.
“Same hour on the clock”, “same remainder on division by
” and “same
absolute value” all have the same three properties,
although none of them is equality. They deserve a common
name.
An equivalence relation declares things the same
in a way that behaves like equality.
Definition
5.2.1 (Equivalence Relation)
Let be a set.
An equivalence relation on is a relation
on (Definition 1.4.3) that is
reflexive, symmetric and transitive on (Definition 5.1.1):
- (Eq1) for
every , ;
- (Eq2) for
all , if , then ;
- (Eq3) for
all , if and , then .
When ,
we say that is
equivalent to (under ).
In words: (Eq1) says everything is the same as
itself. (Eq2) says “the same” has no direction: if counts as the same as
, then counts as the same as
. (Eq3) says
sameness passes along a chain: two things that are each
the same as a third are linked through it. In symbols,
(Eq1)–(Eq3) are The symbol is a letter for a
relation, like in
Section 5.1; it is written between its arguments because
it is read like .
Nothing needs checking for well-definedness: the
definition names a property of a set of pairs.
Example
(Three equivalence relations)
Check (Eq1)–(Eq3) for each relation.
- (a) Equality on any
set : if and only if
.
- (b) The relation
on a set
, which relates
every to every
.
- (c) “Same absolute
value” on :
if and
only if .
Solution.
(a) (Eq1)–(Eq3)
are the three properties of equality recalled above:
is , and
symmetry and transitivity are Logic and Proof, Proposition 5.7.1.
(b) Every pair
with lies in , so each of
(Eq1)–(Eq3) has a conclusion of the form
with ,
and that conclusion is true. This is the coarsest
sameness: everything is the same as everything.
(c) Each of
(Eq1)–(Eq3) for is the same property
for equality, applied to the numbers . For instance, (Eq3): if and
,
then by transitivity of . Here , and .
Part (c) is an instance of a pattern that returns
later in this section, with the fibers of a function:
“ when some
quantity attached to equals the same
quantity attached to ”. Any such relation
inherits (Eq1)–(Eq3) from equality.
↺Second readingThe
degenerate case and a non-example
Is the empty relation an equivalence relation on
the empty set? Each of (Eq1)–(Eq3) begins “for
every element of ”, and has none,
so all three hold vacuously. The empty relation
is an equivalence relation on .
This is the degenerate case, and it is worth keeping:
it says that the definition makes no demand on an empty
set, so the theorems below hold for without a
separate case. On a non-empty set the
empty relation is not an equivalence relation: (Eq1)
fails at any element , since .
The same set of pairs passes on one set and fails on
another, because (Eq1) speaks about every element of
.
A non-example by minimal change. On
, let mean , and let
mean .
The first is an equivalence relation, as the fold on the
reals modulo the integers, at the end of “Congruence
modulo n”, checks. The second changes one letter. It is
still reflexive, since by (( )0), and still transitive: if
and
, then
by Lemma 3.1.1
(b). But it is not symmetric: , since
,
while ,
and
because every natural number is (Lemma 3.1.1
(a)). The clause that fails is (Eq2). The relation is the order restricted to
pairs at integer distance; it has a direction, and
sameness has none.
↺Second readingWhy
these three clauses
Why these three clauses. Each clause
has a job, and each failure has a witness.
- Drop (Eq1), and an element may be the same as
nothing at all. On , the empty relation
is symmetric and transitive (Section 5.1’s warning), and
is related to
nothing; it would sit in no piece of the cutting.
- Drop (Eq2), and the pieces overlap. The relation
on is reflexive and
transitive; the set of elements below is , the set below
is , and the two share
without being
equal.
- Drop (Eq3), and sameness leaks. “” on
is reflexive
and symmetric, and is related to , to , to , and so on, while is not related to . Every integer is
linked to every other through a chain of steps of length
, though few are
related directly.
The name comes from “equal value”: equivalent
elements are equal in whatever respect the relation
measures.
Warning. An equivalence relation is
an equivalence relation on a named set.
The relation is equality on , an equivalence
relation; on it is the same set of pairs and not an
equivalence relation, since is missing and
(Eq1) fails at .
Before checking (Eq1), name the set.
The payoff is the object the clock was after: the
collection of everything that counts as the same as a
given element.
Equivalence
classes
An equivalence class is everything that counts as
the same as one element.
Definition
5.2.2 (Equivalence Class)
Let be an
equivalence relation on a set , and let . The
equivalence class of is When the relation must be named, we write
. Any
element of a class is called a
representative of it.
The class is a subset of , by specification (Definition 1.2.3). Its
definition fixes the order of the letters as ; by (Eq2) the
order does not matter, and holds exactly when .
For the three relations of Example (Three equivalence relations):
under equality, ; under , for every ; under “same absolute value”, and . (On the
empty set there are no elements and so no classes.)
Quick check. On , let
mean that
and have the same last
digit. List the classes. How many are there, and how
many elements has each?
Solution. The classes are , , …, and : ten
classes, three elements each. Each class is the class of
any of its elements; for instance .
The quick check shows the features the theorem below
proves in general: every class is non-empty, no number
is in two classes, and every number is in one. A family
of subsets with these three features has a name.
Definition
5.2.3 (Partition)
Let be a set.
A partition of is a set of subsets of , called
blocks, such that
- (P1) every block is
non-empty: for every
;
- (P2) the blocks are
pairwise disjoint: for all , if , then ;
- (P3) the blocks
cover : .
Here
is the union of the set of sets (Definition 1.3.4): the set of
points lying in some block. Since every block is a
subset of , the
union is always a subset of , and (P3) says that
every lies
in some block. With (P2), it lies in
exactly one: if and , then ,
so .
Examples: is a partition of . For a
non-empty , is a partition with
one block, and is one with a block for each point.
The even and the odd integers form a partition of with two blocks,
because every integer is even or odd and not both (Theorem 1.1.2). For , the empty
set of blocks is a partition: (P1) and (P2) are
vacuous, and .
↺Second readingNon-examples
by minimal change
Non-examples by minimal change.
covers and its sets are non-empty, but lies in both, so (P2)
fails. satisfies (P2) and (P3), and fails
(P1). Without (P1), “the block containing ” would still be unique,
but a partition could carry useless empty blocks, and
the correspondence with equivalence relations below
would break, since no class is empty.
A partition is a set of subsets of . So is the set of all
classes of an equivalence relation, and it gets its own
name.
Definition
5.2.4 (Quotient Set)
Let be an
equivalence relation on a set . The quotient
set of
by is the set
of all equivalence classes, The quotient map is ,
.
The quotient set is a set by specification inside
(Definition 1.2.3, Definition 1.3.2), and it is
often written . The quotient map is a function by Definition 2.1.1: each
has the
value , which
lies in ,
and only that value. It is surjective:
an element of is for some , and then it is
(Definition 2.2.2).
Here is the theorem the clock needs. It also says
exactly when two names give the same class.
Theorem
5.2.1 (Equivalence Classes Partition the
Set)
Let be an
equivalence relation on a set .
- (a) For every , ; in particular
every class is non-empty.
- (b) For all , if and
only if .
- (c) For all , if , then .
- (d) The quotient set
is a
partition of .
Idea. Each property of does one job.
Reflexivity puts
in its own class, which gives (a) and the covering. For
(b), a class is determined by any one of its elements:
if , then
anything the same as is the same as , by transitivity, and
the reverse needs symmetry first. For (c), a common
element of two
classes has and ; symmetry turns the first around,
transitivity joins the two, and (b) finishes. Then (d)
is (a), (c) and the covering, read against the three
clauses of Definition 5.2.3. (b) is
a double inclusion (Example (Method: two inclusions)).
Before reading on: which property of does each line
use?
Proof. (a) Let . By (Eq1), , so by Definition 5.2.2. Hence
.
(b) Suppose
. By (a),
, so
.
Suppose .
Let
, so . With , (Eq3) gives
, so . Let , so . By (Eq2)
applied to , ; with , (Eq3) gives , so . Hence by Proposition 1.2.1.
(c) Suppose , and let . Then
and . By (Eq2), ; with , (Eq3) gives
. By (b),
.
(d) We check the clauses of Definition 5.2.3 for
, a set of subsets of by Definition 5.2.4.
(P1) Every element of is for some , and is non-empty
by (a).
(P2) Let with , say and . If , then by (c), which is
false. Hence .
(P3) Every class is a subset of , so . Conversely, let . Then by (a), and
,
so . Hence by
Proposition 1.2.1.
This proves the theorem.
Part (b) is the rule we will use most. It turns a
statement about classes, , into a statement about elements, , and back. Part
(c) says that two classes are either equal or disjoint;
there is no third possibility.
↺Second readingWhen
the quotient map is injective, and what ≤
lacked
By (b), the quotient map of Definition 5.2.4 has
exactly
when . So
is injective only
when every class has a single element: two different
elements of
one class have
by
(b), so . That is what the relations of “Why these
three clauses” lacked: for , the sets and given by the
formula of Definition 5.2.2 overlap
and differ, and with , ,
the line of
(c) that fails is the one that uses (Eq2) (Exercise
A1(c)).
Warning. A class has many names. In
the quick check, , and are one set, and
nothing about that set prefers . So any argument or
definition that starts from “” and then uses itself (its size, its
sign, its last digit) must be shown not to depend on
which representative was chosen. “The smallest element
of ” makes sense
for the last-digit classes; “” as a function of
the class needs
a proof, which the section supplies for congruences
under “Operations on classes”.
Every
partition comes from one equivalence relation
The theorem turns an equivalence relation into a
partition. The reverse is just as natural: given the
blocks, call two points “the same” when they lie in a
common block.
Theorem
5.2.2 (Partitions and Equivalence Relations
Correspond)
Let be a
set.
- (a) Let be a partition of
. For , let mean that
there is a block with and . Then is an
equivalence relation on , and its classes are
the blocks: .
- (b) Let be an equivalence
relation on . Then
,
the relation of (a) for the partition , is itself.
- (c) Hence every
partition of is
the quotient set of exactly one
equivalence relation on , namely .
Idea. For (a), (Eq1) and (Eq2) are
immediate from (P3) and the symmetry of “lie in a common
block”. The real work is (Eq3): lie in one block and
in another,
and we need one block holding and . The two blocks share
, so (P2) makes
them equal. The classes are the blocks because each
point lies in exactly one block. Then (b) is Theorem 5.2.1 (b) in
disguise, and (c) puts (a) and (b) together.
Proof. (a) (Eq1) Let . By (P3), , so
for some
; this
block contains
and , so . (Eq2) If
a block contains
and , it contains
and . (Eq3) Let and . Take a
block with , and a block
with . Then , so ,
and by (P2).
Hence ,
and .
Now the classes. Let , and let be a block with (one exists by
(P3)). We show , the class taken under . Let , so : some
block contains
and . Then , so by (P2), and . Let . Then contains and , so , and .
So every class is a block: is the block
containing .
Conversely, every block is non-empty by (P1);
for any ,
the argument just given shows . Hence ,
each inclusion being one of the last two sentences.
(b) Both relations are subsets of , so we show
that they contain the same pairs (Definition 1.2.1). Let . If , then the class
contains by Theorem 5.2.1 (a) and,
by Definition 5.2.2, ; so .
Conversely, if , some class contains and , so and . By (Eq2), , and by (Eq3),
.
(c) By (a), is the quotient set
of .
Suppose for an equivalence relation . Then, by (b), is , the
relation of (a) for the partition ; that is,
is . So there is
exactly one such relation. This proves the theorem.
So the two passages undo each other. Going from to and back gives
again, by (b);
going from to
and back
gives again, by
(a). An equivalence relation and a partition are two
descriptions of one structure: the relation says which
pairs are the same, and the partition lists the piles.
This is the move classes from a relation, a relation
from classes, and we choose whichever description
makes the next step easier.
↺Second readingThe
correspondence as two inverse maps
A correspondence, proved both ways.
Put this in the language of Section 2.4. Write for the
set of equivalence relations on (a subset of )
and for the
set of partitions (a subset of ).
Together with Theorem 5.2.1, the
theorem gives two functions, , (a partition by Theorem 5.2.1), and
, (an equivalence relation by part
(a)). Part (a) says , and part
(b) says . So each is the other’s
two-sided inverse, and both are bijections (Theorem 2.4.4): the
method of Example (Method: construct and verify),
with both composites checked. To count the equivalence
relations on a finite set, count its partitions.
Quick check. How many equivalence
relations on have exactly two classes?
Solution. Seven. By the
correspondence, count partitions into two blocks. Either
one block is a singleton and the other has three
elements, and the singleton can be chosen in four ways;
or both blocks are pairs, and the pair containing is fixed by its second
element, chosen in three ways. So .
↺Second readingWhere
(P2) does its work
The transitivity step in (a) is where (P2) does its
real work (the classes part uses it again, the same
way), and it is the step that a hasty proof skips. If
the blocks were allowed to overlap, as in the cover
of , then “lie in a common set” would relate
to and to but not to .
Congruence
modulo n
Back to the clock, with any number of hours. The
divisibility notation , “there is with ”, is Definition 1.1.2.
Definition
5.2.5 (Congruence Modulo n)
Let . Integers and are congruent
modulo ,
written , if , that is, if for some .
So , since ; ,
since ; and , since is not a multiple of
(the multiples
are for , at least for and at most for , by
discreteness, Proposition 3.1.2
(c)). The symbol here always
carries its modulus, so it does not clash with the
semantic equivalence of Logic and Proof,
Chapter 4.
↺Second readingWhy
n ≥ 1
Why ? The
condition makes sense for , but it says nothing new: means , so
“congruence modulo ” is equality on . Its classes would be
the singletons , a copy of and not itself, and the count
of classes proved below would fail. Excluding keeps that count
exact.
Proposition
5.2.3 (Congruence Is an Equivalence
Relation)
For every , congruence modulo is an equivalence
relation on .
Proof. (Eq1) ,
and .
(Eq2) If
with ,
then , and by Proposition 3.1.2
(a). (Eq3) If and with , then , and by Proposition 3.1.2
(a).
The quotient set is written , “the integers
modulo ”. Its
elements are the residue classes ; the
second form holds because means , that is, . When two moduli are in play we write
for the class
of in . For example, , the integers that name two
o’clock.
How many classes are there? The clock has twelve
positions, and the division algorithm says why: each
integer has exactly one remainder among .
Proposition
5.2.4 (The Integers Modulo n)
Let . For every there is
exactly one
with in
, namely the
remainder of on
division by .
Hence and the
classes listed are pairwise different.
Here by Lemma 3.1.1
(c), since ,
so is the set of Section 3.1.
Proof. Let . By Theorem 3.2.3
there are with and . Since , (Proposition 3.1.2
(b)); since , by discreteness (Proposition 3.1.2
(c)), so . Hence . Also , so , and
by Theorem 5.2.1 (b).
For uniqueness, let with and . Then , so by Theorem 5.2.1 (b): for some . So the integer
can be written
both as and as , and both remainders and satisfy . By the
uniqueness in Theorem 3.2.3,
.
Finally, every element of is for some , hence equal to
one of ; and if with , the uniqueness just
proved, applied to , gives . This proves the proposition.
So has
exactly the twelve classes , one for
each position of the hand. (The clock face writes where we write , and .) The
uniqueness also gives a test that is often quicker than
the definition: if and only if and leave the same
remainder on division by .
↺Second readingThe
remainder test, proved
Indeed, if , then , and the one with is also the one
with ;
conversely, if both leave the remainder , then .
With , the
two classes of are the even
integers and
the odd integers : the partition of
into evens and
odds is the quotient set of congruence modulo .
↺Second readingThe
reals modulo the integers, and a set with no
length
Congruence identifies integers that differ by a
multiple of ; the
same idea on the real line, with , gives an example
that later chapters return to.
Example
(The reals modulo the integers)
On , let
mean . Show that
is an
equivalence relation. Find the classes of , of and of , and show that
these three classes are different.
Solution. An equivalence
relation. (Eq1) . (Eq2) If , then , by Proposition 3.1.2
(a). (Eq3) If and , then , by Proposition 3.1.2
(a).
The classes. . Next,
means for some , so and in the same way .
Three different classes. By Theorem 5.2.1 (b), two
classes and
are equal
exactly when . A real number with is not an
integer: if it were, discreteness (Proposition 3.1.2
(c)) applied to would give . Now lies strictly between and , so . Since
and
, Logic and Proof, Theorem 2.4.5
rules out (it would give ) and (it would give ), so ,
and ; then , and therefore
(else
would be a difference of integers), so .
Finally, in the same way
would give , and
would give , so , and , and .
Picture each class as one point of a circle of
circumference :
the real line is wound around it, and two numbers land
on the same point when they differ by an integer. Each
class has exactly one representative in : the class of
meets in , for
instance. Proving this for every class needs the integer
part of a real number, which Analysis on the Real
Line, Chapter 1 constructs; we do not use it
here.
With in
place of , the
relation “” is again an equivalence relation on , and choosing one
point from each of its classes is how Measure,
Integration, and Real Analysis, Chapter 2 builds a
set of real numbers that has no length.
Operations
on classes
Now the second check of the clock. To add hours we
want to define The right-hand side is computed from the
representatives
and . If another
pair of representatives of the same two classes gave a
different class, the “definition” would assign two
answers to one input, and Definition 2.1.1 forbids
that: a function gives each input exactly
one value. So the definition is legitimate only
if the answer does not depend on the representatives.
That property is called
well-definedness, and it was met in
Section 2.1, where “write a rational number as , then send it to its
numerator ” failed
to be a function (Example (Relations that are not functions)).
Proposition
5.2.5 (Congruence Respects Sums and
Products)
Let and . If
and , then Hence the operations and on are well
defined.
Idea (Scratch work). The rule reads representatives. So take two
representatives of each class, and , and compare
the outputs. By Theorem 5.2.1 (b), equal
classes means congruent representatives, and a
congruence unwinds to a “there exists” (Definition 5.2.5): name
the multipliers, with different names.
| ,
|
and |
| , , with |
and for some |
| the same |
sum: , done; product: changes
both factors at once, and neither given appears |
| the same |
: change one factor at a
time |
The last row closes the gap: each bracket is a given
times an integer, so . The proof writes this
forwards.
Proof. Write and with
. Then
and by Proposition 3.1.2
(a). For the product, and by Proposition 3.1.2
(a). This proves both congruences.
For well-definedness, suppose and . By Theorem 5.2.1 (b), and , so and by what was just proved,
and and , again by Theorem 5.2.1 (b). So
the class assigned to the pair of classes is the same
whichever representatives are used.
↺Second readingWell
defined means a function
In the language of Definition 2.1.1: the
addition of
is the function whose graph is the set of all
pairs with . Clause (Fn1) holds because every
element of is
a class ; clause
(Fn2) is the proposition.
The clock sentence of the opening is now a true
statement: in , the first equality by the definition of , the second because
. And
as well, as the proposition guarantees.
Example
(Method: checking that a definition on classes is well
defined)
Template. For a rule on that reads a
representative :
(1) take two representatives of one class, (Theorem 5.2.1 (b)); (2)
unwind , naming any witness; (3) show the
outputs equal in the codomain’s sense (as classes, if it
is a quotient set); (4) every class has a
representative, and its value lies in the codomain
(Fn1); (1)–(3) make the value unique (Fn2). To refute,
give one pair with different outputs.
When to use it. A definition picks
one name for something that has many: operations on
, maps out of
a quotient set, “write as ”, the size of a
finite set.
The usual failure. Checking one pair
only; proving the converse, which is injectivity (Example (Method: proving injectivity));
comparing classes as elements; an output outside the
codomain.
Quick check. Which rules define a
function: (a) , ; (b) , ?
Solution.
- (a) No: , but , and
the codomain
compares elements, not classes. (b) Yes: if with
, then
,
and (Proposition 3.1.2
(a)), so .
Well-definedness can fail, and the next example shows
a failure next to a success, with the minimal change
between them.
Example
(A rule on classes that is not a function)
Decide whether each rule defines a function: (a)
, ; (b) ,
.
Solution.
(a) No. The class
is also , since . Read
with the representative , the rule gives ; read with , it gives , since
.
And , since is not a multiple of (, and the
multiples of are
, at least , or at most ). So one input
receives two values, and (Fn2) of Definition 2.1.1
fails.
(b) Yes. If , then
for
some (Theorem 5.2.1 (b)), so
with (Proposition 3.1.2
(a)), and . The value does not depend on the
representative. What made it work is : a multiple of
is a multiple of
, while a multiple
of , such as itself, need not be a
multiple of .
The fibers
of a function
Congruence is one way to manufacture an equivalence
relation. Here is the most general way. A function sorts
its domain: put two points in one pile when the function
gives them the same value.
Example
(The fibers of a function)
Let be a function, and for let mean . Show that
is an
equivalence relation on , and describe its
classes. Then show that every equivalence relation on is of this form, for a
suitable function.
Solution. (Eq1)–(Eq3) for are the properties
of equality applied to the values , exactly
as in Example (Three equivalence relations)
(c): ;
gives
; and
, give (Logic and Proof, Proposition 5.7.1).
The class of is the preimage of the one-point set (Definition 2.5.2). Such
a preimage is called
the fiber of over . So the classes of
are the
fibers over the points of the range . A fiber over a
point outside the range is empty, and is not a class:
(P1) is what excludes it.
For the converse, let be an equivalence
relation on , and
take for the
quotient map of Definition 5.2.4. Then,
for ,
where the last step is Theorem 5.2.1 (b). So
and contain the same
pairs, and are equal (Definition 1.2.1).
For the map sending each integer to its remainder on
division by (a
function by the uniqueness in Theorem 3.2.3),
is
congruence modulo , by the remainder test
above. The example says that “the same in some respect”
always means “equal value of some function”: an
equivalence relation is the same thing as a function, up
to the names of its values.
The fibers of a function are the piles it sorts
its domain into, one pile for each value it
takes.
Proposition
5.2.6 (The Fibers of a Function)
Let be a function.
- (a) The fibers over the
points
are exactly the classes of , and they form a
partition of .
- (b) The rule
is a bijection . Hence .
Idea. For (b), every class is the
fiber over the value at its representative, and
different values have disjoint, non-empty fibers.
Proof. (a) By Example (The fibers of a function)
the classes of are the fibers
over the points of , and they partition
by Theorem 5.2.1 (d).
(b) By (a), each is sent to an
element of , and to only
one, so the rule is a function (Definition 2.1.1). It is
surjective: an element of is for some , and by (a).
It is injective: let with , and write
with . Then ,
while because . So
, and different values have
different fibers. Hence is a bijection (Definition 2.2.3), and
by Definition 4.1.1.
↺Second readingValues
and piles
So a function takes exactly as many values as it has
fibers, in the sense of equinumerosity: the values and
the piles can be paired off. The partition remembers
which points share a value, and forgets only what the
values are called.
Quick check. List the classes of
for on , and
match each class with its value.
Solution. The values are , , , , . So the classes
are
(value ), (value ) and (value ): three classes for
the three values in .
↺Second readingSame
size, revisited
The check is not special to congruences. Section 4.1
met the check of well-definedness for the number of
elements of a finite set.
Example
(Same size, revisited)
Let be a set,
and for let mean (Definition 4.1.1). (a)
Show that
is an equivalence relation on . (b) For
,
list the classes. (c) For , show that the rule sending the
class of to the
number of elements of is a well-defined
function .
Solution.
(a) (Eq1)–(Eq3)
are Proposition 4.1.1
(a)–(c), read for subsets of .
(b) Every subset
of is
finite with
or elements (Proposition 4.1.6,
since
has elements; or
list the eight subsets). Two subsets with the same
number of
elements are equivalent: and give by Proposition 4.1.1 (b)
and (c). Two with different numbers are not, by (c)
below. So the classes are , ,
and .
(c) By the method
of Example (Method: checking that a definition on classes is well defined):
let , and let have elements and have . From
we get (Proposition 4.1.1
(b)); with , part (c) of that
proposition gives that has elements as well,
so by Corollary 4.1.4. Each
class has a representative, its number lies in by part
(b) of this example, and all its representatives give
the same number.
Part (c) rests on the well-definedness step of
Section 4.1 (Corollary 4.1.4: one
set, one number) and adds a second: one class, one
number. And the relation lives on , a set: for
equinumerosity between arbitrary sets there is no set of
all sets for it to be a relation on (Theorem 1.2.4), which is why
Section 4.1 said only that it behaves like an
equivalence relation.
Proposition 5.2.6
explains this example: the subsets of were sorted
by “same number of elements”. That relation is for the function
sending each subset to
its number of elements, a function by Proposition 4.1.6
(every subset has some number of elements, at most ) and Corollary 4.1.4 (only
one). Its four fibers are , the three
singletons, the three pairs, and , and its
image is all of . Part (c) of that example, the well-defined
map from classes to numbers, is the bijection of (b)
read backwards.
Every
function factors
What does a function look like once its domain has
been sorted by value? The quotient map , (Definition 5.2.4), sends
each point to its fiber. The bijection of Proposition 5.2.6 (b)
goes from values to fibers; turn it around, and it sends
the fiber to
the value .
Finally, a value of lies in the image , and the
inclusion map ,
(Definition 2.3.1), puts
it back into the codomain. Composed, the three maps take
to , to , to . That is .
Theorem
5.2.7 (Canonical Factorization)
Let be a function, let
be the quotient map, and let
be the inclusion map. There is exactly
one function with It is given by , and
it is a bijection.
Idea. The candidate is forced:
changes no
value, so gives . The
rule reads a representative, so the first check is
well-definedness (Example (Method: checking that a definition on classes is well defined)):
gives . The same line read backwards is
injectivity. Surjectivity is the definition of , and uniqueness
holds because is
onto.
Proof. A function. Every
element of is for some , and by Definition 2.5.1; this
gives (Fn1). Let . By Theorem 5.2.1 (b), , that is,
.
So all representatives of one class give one value,
which is (Fn2), and defines a function (Definition 2.1.1).
Injective. Let , that is, . Then
,
and
by Theorem 5.2.1 (b).
Surjective. Let . By Definition 2.5.1 there
is with
, and then
.
The factorization. Both and have domain and codomain , and for every , by Definition 2.1.2. Hence
by Proposition 2.1.1.
Uniqueness. Let satisfy . Every element
of is
for some
, and where the first equality holds because sends each point to
itself. The two functions have the same domain and
codomain, so by Proposition 2.1.1. This
proves the theorem.
Read the factorization from left to right: every
function is a surjection (, onto by Definition 5.2.4),
followed by a bijection (), followed by an
injection (, which sends each
point to itself, so different points stay different).
All the identifying is done by , all the renaming by
, and all the
enlarging of the target by . The two properties
of Section 2.2 sit at the two ends. The function is injective exactly
when is, and
surjective exactly when , that is, when .
↺Second readingWhy
f and q are injective together
The function
is injective exactly when is: if is injective and , then
by
Theorem 5.2.1 (b), so
and ; if
is injective and
,
then , so by Theorem 5.2.1 (b), and
.
↺Second readingOnto
the image, not the codomain
Warning. The middle map is a
bijection onto the image, not onto the
codomain. With target , the rule is still
a well-defined injection, but it is surjective only when
is. For on , the rule maps the
classes
onto
and reaches no negative number of the codomain .
The factorization also explains a failure from
Section 2.1.
Example
(Fractions as classes)
Let , .
Describe ,
the three maps of Theorem 5.2.7, and
decide whether “send to its numerator
” passes through
.
Solution. The relation.
means , and since this holds exactly when , by the
arithmetic of fractions. It is the relation of Exercise
B1 at the end of this section, now seen as the fiber
relation of a function; that it is an equivalence
relation is immediate from Example (The fibers of a function).
The class of
is the fiber over : the pairs , all the ways of writing one half as a
fraction.
The three maps. The quotient map sends a pair to its
class, “the fraction up to rewriting”. The
map sends a
class to the rational number its pairs all name. And
is onto , since every rational
number is for
some and
;
so and . By Theorem 5.2.7, is a bijection
from the set of classes onto : a rational number
“is” a class of fractions, and nothing is lost by
identifying the two.
The numerator. Let . If
were for some
function on the
classes, then would force . But ,
since , while . So does not pass through
, and no function
on the classes sends each fraction to its numerator. Nor
does any function on : if did,
then would satisfy , since . This is the failure of Example (Relations that are not functions)
(b), located: the numerator is a function of the pair,
not of its fiber.
Solution. is surjective, and not
injective, since . is both, by Theorem 5.2.7. is injective, as
every inclusion is; here it is , so it is also
surjective.
Exercises
A. Check your
understanding
Exercise
(A1)
Parts (a)–(d) are about Theorem 5.2.1 and its
proof.
- (a) Which property
of is used to
show that every class is non-empty, and which properties
are used to show that two overlapping classes are
equal?
- (b) Run the proof of
part (c) for congruence modulo , with , and the common
element :
write each line with its numbers.
- (c) On , let mean , and define by the formula of Definition 5.2.2. Show
that and overlap without being
equal, and name the line of the proof of part (c) that
fails, with ,
.
- (d) Give the idea of
the proof of part (c) in two sentences.
- (e) How many classes
has the relation on ? List them.
- (f) To show that a
rule on is well defined,
what do you assume and what do you show?
Solution.
(a) Non-emptiness
uses only reflexivity (Eq1): puts in . Overlapping classes
are equal by symmetry (Eq2), which turns into , and
transitivity (Eq3), which joins and ; the final step,
part (b), uses (Eq2) and (Eq3) again.
(b) Since , , so
; since
, , so
. By
(Eq2),
(indeed ). By (Eq3), (indeed ). By part (b), .
(c) and . They share and differ. In the
proof of (c), take :
and hold.
The next line, “by (Eq2), ”, would need , which is false:
is not
symmetric, and that line fails.
(d) A common
element of two classes is equivalent to both
representatives, so symmetry and transitivity make the
two representatives equivalent. Equivalent
representatives have the same class, because each class
is determined by any one of its elements.
(e) Three: , and . This is the
relation of
Example (The fibers of a function)
for ,
whose values on the set are , , , one class for each
value.
(f) Assume , that is,
, for arbitrary ; show that the rule’s outputs
for and for are equal (Example (Method: checking that a definition on classes is well defined)).
B. Practice
Exercise
(B1: Fractions as classes)
- (a) On ,
let mean . Prove that is an equivalence
relation, and describe the class of .
- (b) On , let
again mean .
Determine which of (Eq1)–(Eq3) hold. Justify your
answer.
Solution.
- (a) (Eq1) . (Eq2) If , then . (Eq3) Let and
,
so and
. Multiply
the first equation by and use the second:
. So
.
Since , , and we may cancel : , that is, . The
hypothesis
on the middle pair is used here and
nowhere else.
The class of is . Since , , so (Proposition 3.1.2
(b)), and the class is : the ways of writing as a fraction.
Each class is “one rational number”; Number Systems:
From to , Chapter 3
builds as this
quotient set.
- (b) (Eq1) and (Eq2)
hold, by the same two lines as in (a), which did not use
. (Eq3)
fails: , since , and , since ; but , since . The pair is related to
every pair, so it links any two; this is exactly the
cancellation of (a) failing for .
Exercise
(B2: Computing in Z/7)
In ,
compute
and , each
written as with
. Then prove that
implies for every , and use it to
find the remainder of on division by
. Hint: .
Solution. ,
since ;
and , since .
Powers. Let , with . By Proposition 3.3.4
(d), and are integers. We
prove by induction on (Logic and Proof, Axiom 4.2.1).
Base: , and by (Eq1). Step: suppose . By Definition 3.3.2,
and
;
the product clause of Proposition 5.2.5,
applied to and , gives .
The remainder. By Proposition 3.3.4,
. Now , so
, and by the power fact, . Also , so . By Proposition 5.2.5, . Since , the remainder of on division by
is (Proposition 5.2.4), and
in
. Here is itself an
induction: ,
and .
Exercise
(B3: Which rules are well defined?)
Determine which of the following rules define a
function. Justify your answer.
- (a) , ,
for a fixed .
- (b) , .
- (c) , .
Solution. The check in each case:
take , that is, , and
decide whether the outputs agree (Example (Method: checking that a definition on classes is well defined)).
(a) Yes. If ,
the product clause of Proposition 5.2.5,
applied to twice, gives , so .
(b) No. , since
. But
, since is not a multiple of (, and the
multiples of are
, at least , or at most ; Proposition 3.1.2
(c)). The input would get two
values.
(c) Yes. If with
, then
with (Proposition 3.1.2
(a)), so . The difference from (b) is the
direction: , so a multiple of is a multiple of , not
conversely.
Exercise
(B4: Prove or disprove)
Prove or disprove: each rule defines a function.
- (a) , .
- (b) , .
- (c) On , with meaning (Example (The reals modulo the integers)),
the rule , .
- (d) On ,
with meaning (an equivalence relation by Exercise B1
(a)), the rule , from the quotient set to
itself.
- (e) With the same
relation, the rule .
- (f) With for on , the rule ,
.
- (g) With the same
relation, the rule ,
.
Solution.
(a) True. Two
representatives of each argument: and with
. Then
, so . (The method runs once per
argument.)
(b) True. If
,
then , so . (Compare B3 (b), where
failed: doubling the representative doubles the
difference.)
(c) False. ,
since . But , and :
, and no integer lies strictly
between and (Proposition 3.1.2
(c)), so , hence (else by
Proposition 3.1.2
(a)). So by Theorem 5.2.1 (b): one
class, two values.
(d) True. Let
,
so . Then
, so ; and , so
the outputs lie in .
(e) False. , since
. The outputs are and , and , so . (Reading the classes as
fractions: (d) adds , and (e) adds to numerator and
denominator, which depends on how the fraction is
written.)
(f) False. , since (Theorem 5.2.1 (b)), but
: one class, two values.
(g) True. If
,
then , so with , and two non-negative reals with equal
squares are equal (Logic and Proof, Theorem 2.4.5).
So the value does not depend on the representative: one
class, one value.
Exercise
(B5: Fibers and the factorization by hand)
- (a) For ,
,
find the fibers over , over and over . Which of them are
classes of ?
- (b) Let and
send
and to , and and to . Write down , , and of Theorem 5.2.7.
- (c) Which of the
functions , and , from , are constant on the
classes of congruence modulo ?
Solution.
(a) means , so the fiber
over is . means , so the fiber
over is . would need
, and no
real square is negative, so the fiber over is . The first two
are classes, since and lie in ; the empty fiber
is not a class, because and every class is non-empty (Theorem 5.2.1
(a)).
(b) The fibers
over the values are and , so . The image is . The
bijection is , , and sends and . The value is in the codomain but
outside the image, which is why is not
surjective.
(c) Let with
, the
general element of the class of modulo . : yes,
since . : no. , but , since
lies
strictly between
and (Proposition 3.1.2
(c)). : yes, since , with .
Exercise
(B6: Same fibers)
Let and be functions. Prove that if and
only if there is a bijection
with
for every .
Solution. Let be such a bijection,
and let . If , then . If , then ,
and because is injective. So : the two relations contain the same
pairs, and are equal (Definition 1.2.1).
Suppose ; write for both, so the two
quotient sets are one set . By Theorem 5.2.7 there are
bijections and with and . The
inverse is a bijection (Definition 2.4.2, Theorem 2.4.4), so is a bijection by
Theorem 2.2.1 (c). For
every ,
, since ; so .
C. Going deeper
Exercise
(C1: Exit check: classes partition)
Let be an
equivalence relation on a set . Prove that the
equivalence classes of form a partition of
, and that for all
, if and only if
. Write the
proof without looking at the text, naming the property
of behind each
step.
Solution. Non-empty. For
,
reflexivity gives , so , and .
Cover. Every class is a subset of by definition. Every
lies in the
class , as just
shown. So the union of all classes is .
. , so . Let . If , then and , so by transitivity:
.
By symmetry ; if , then and give by transitivity: . So
.
Disjoint or equal. Let , with a common element . Then and . By symmetry
, and by
transitivity . By the previous paragraph, . Hence two
different classes are disjoint.
The three paragraphs on non-emptiness, covering and
disjointness are the three clauses of Definition 5.2.3, so the
set of classes is a partition
of . (This is Theorem 5.2.1.)
Marking scheme. (10 points)
- 2: each class is non-empty, by reflexivity.
- 1: every element lies in some class (its own), so
the classes cover .
- 4: overlapping classes are equal: a common element
with and ; symmetry to
reverse one of them; transitivity to link and ; both inclusions (or
the equivalence ) to conclude equality.
- 2: , both directions.
- 1: the conclusion names the three conditions of a
partition.
A proof that shows “overlapping classes are equal” by
proving and back directly from the
definition earns the 4 points for that step if each use
of symmetry and transitivity is named. So does a proof
that, from
and ,
applies the direction of
twice to get , provided that equivalence was
proved independently of this step, with symmetry and
transitivity named. Fatal errors (0 for the step):
applying transitivity to and without reversing one by symmetry; showing
only and concluding .
Exercise
(C2: Find the error)
A student proves part of Theorem 5.2.2. Let be a partition of
, and let mean that and lie in a common block
of .
Claim. is transitive.
Proof. (1) Let with and . (2) Since , there is a block with and . (3) Since , and lie in a common block,
and that block is , so . (4) Hence and both lie in , and .
- (a) Is the claim
true?
- (b) Which line
fails, and which rule does it break?
- (c) Give a
counterexample to the failing step, and repair the
proof.
Solution.
(a) The claim is
true: it is the transitivity step (Eq3) in the proof of
Theorem 5.2.2
(a).
(b) Line (3)
fails. “ and lie in a common block”
is an existential statement, and to use it the proof
must name its witness by ,
with a new name. Line (3) gives the
second witness the name , already in use for the
witness of line (2): this is entry (N4) of Logic and Proof, Example (What is not allowed),
reusing one witness name for two ’s
(Logic and Proof, Definition 5.6.1).
The tell is that the proof never uses (P2), the
disjointness of the blocks; and without (P2) the claim
is false, as (c) shows.
(c) A
counterexample to the step needs blocks that overlap,
since for a partition the step’s conclusion happens to
be true. Take the cover of , which is not
a partition, with , ,
. Then with , and through ; line (3)
concludes , which is false, and the argument “proves”
, although
no set of the cover contains and .
Repair: replace (3) and (4) by “Since , there is a
block
with and
. Then , so ,
and by (P2).
Hence and
, so .”
Exercise
(C3: Equal fibers)
Let , let
be a set with
elements, and let be a function such that the
fiber
has exactly
elements for every . Prove that .
Solution. For , let be the statement:
for every , every set with elements, and every
all of whose fibers over have elements, . We prove for every by Logic and Proof, Axiom 4.2.1,
with fixed.
Base case . Here , so is a function , and
by Proposition 2.1.2 (b).
Then : for
, a
bijection would give a value in . So .
Inductive step. Suppose , and let have elements and have every fiber of elements. Put and . Every has or , and not
both, so and . By Proposition 4.1.6,
has elements for some . Let , ;
this is a function, because
for .
For , its
fiber is , since every with lies in ; so it has elements. By , . The fiber has elements by hypothesis,
so Proposition 4.1.5
gives that has elements. Since also has elements, by Corollary 4.1.4. This
proves .
The statement says that a function whose fibers all
have one size cuts into equal piles, so
the size of is
the number of piles times the pile size. With fibers of
different sizes the same induction gives the sum of the
fiber sizes.
Marking scheme. (10 points)
- 2: states the induction hypothesis with and quantified inside
it.
- 2: the base case : and .
- 3: the step: and are disjoint with union
, the fibers of
are fibers
of , and .
- 3: the conclusion by Proposition 4.1.5 and
Corollary 4.1.4.
- Alternative route, full marks: a bijection built from one bijection per fiber
(4), with injectivity and surjectivity by disjoint
fibers (3), and the count by Exercise (C2: Counting products and functions)
(a) with Corollary 4.1.4
(3).
Fatal errors (0 for the step): induction with fixed; applying to a function whose
fibers were not shown to have elements.
Exercise
(C4: Find the error)
Here is a proposed proof of the existence part of Theorem 2.3.2. “Given
, pick with , and set .
Then
for every .”
Which hypothesis of the theorem is never used? Where
does the argument fail, and which check is missing? Is
the conclusion true?
Solution. The conclusion is true:
it is Theorem 2.3.2. The
argument does not prove it.
Agreement on overlaps is never used. The failure is
in the definition of : the rule reads a
chosen index from
the set , and it defines a function only if the
value does
not depend on which such is picked. That is the
well-definedness check of Example (Method: checking that a definition on classes is well defined),
with “an index
with ” in
the role of a representative; it is exactly agreement on
overlaps. Without it, the second sentence fails too: at
a point where was picked, ,
which need not equal . Example (Piecewise definitions are gluings)
(b) at is a
case: picking the first piece gives , and then is not
,
which has the value at .
Marking scheme. (10 points)
- 3: names agreement on overlaps as the unused
hypothesis.
- 4: locates the failure either in the definition of
(the value
depends on the choice of , so a well-definedness
check is missing) or in the claim at a point
of
where another index was picked, and says that agreement
on overlaps is what is missing.
- 3: gives a concrete case where the choice matters
and
fails.
Fatal errors (0 for the step): claiming the
conclusion is false; locating the error in the cover
(every does lie
in some ).