Section 4.1 sorted relations by four properties:
reflexive, symmetric, antisymmetric and transitive (Definition 4.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 1.5 promised that check for functions defined on
classes; here it is, with a method for making it.
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
4.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 4.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 4.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
(Four 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 .
- (d) The empty
relation
on the empty set.
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 .
(d) 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 .
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
Part (d) 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 an example
later in this section checks. The second changes one
letter. It is still reflexive, since by ((
)0), and still transitive: if and , then by Lemma 2.1.1
(b). But it is not symmetric: , since
,
while ,
and
because every natural number is (Lemma 2.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 4.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
4.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 four relations of Example (Four equivalence relations):
under equality, ; under , for every ; under “same absolute value”, and ; 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
4.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
4.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 1.5.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 1.5.4).
The quotient map forgets everything about except which class it
lies in, and that is the point of it. Read “” as “ with equivalent
elements identified”.
Here is the theorem the clock needs. It also says
exactly when two names give the same class.
Theorem
4.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 4.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 4.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 4.2.3
for , a set of subsets of by Definition 4.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. On
the clock: because is a multiple of . 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 4.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 4.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
4.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 4.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 4.2.1
(a) and, by Definition 4.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.
A correspondence, proved both ways.
Put this in the language of Section 1.6. Write for the
set of equivalence relations on (a subset of )
and for the
set of partitions (a subset of ).
Together with Theorem 4.2.1,
the theorem gives two functions, , (a partition by Theorem 4.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 1.6.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 .
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
4.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 2.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
4.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 2.1.2
(a). (Eq3) If and with , then , and by Proposition 2.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
4.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 2.1.1
(c), since ,
so is the set of Section 2.1.
Proof. Let . By Theorem 2.2.3
there are with and . Since , (Proposition 2.1.2
(b)); since , by discreteness (Proposition 2.1.2
(c)), so . Hence . Also , so , and
by Theorem 4.2.1
(b).
For uniqueness, let with and . Then , so by Theorem 4.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 2.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 . 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 .
Two more
sources of equivalence relations
Congruence is one way to manufacture an equivalence
relation. Here is the most general way, and a second
example on the real line that later chapters return
to.
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 (Four 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 1.7.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 4.2.4.
Then, for , where the last step is Theorem 4.2.1
(b). So and
contain the
same pairs, and are equal (Definition 1.2.1).
Two instances. For on , is “same absolute
value”, and the fiber over is the class . For the map
sending each integer to its remainder on division by
(a function by
the uniqueness in Theorem 2.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.
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 2.1.2
(a). (Eq3) If and , then , by Proposition 2.1.2
(a).
The classes. . Next,
means for some , so and in the same way .
Three different classes. By Theorem 4.2.1
(b), two classes and are equal exactly
when .
A real number
with is not an integer: if it were, discreteness
(Proposition 2.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.
↺Second readingA
set with no length
With in
place of , the
relation “” is again an equivalence relation on , and choosing one
point from each of its classes is how Measure and
Integration, Chapter 1 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 1.5.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 1.5, where “write a rational number as , then send it to its
numerator ” failed
to be a function (Example (Relations that are not functions)).
Proposition
4.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 4.2.1
(b), equal classes means congruent representatives, and
a congruence unwinds to a “there exists” (Definition 4.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 2.1.2
(a). For the product, and by Proposition 2.1.2
(a). This proves both congruences.
For well-definedness, suppose and . By Theorem 4.2.1
(b), and , so and by
what was just proved, and and ,
again by Theorem 4.2.1
(b). So the class assigned to the pair of classes is the same
whichever representatives are used.
In the language of Definition 1.5.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 4.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 2.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 1.5.1
fails.
(b) Yes. If , then
for
some (Theorem 4.2.1
(b)), so with (Proposition 2.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 .
That is the method of Example (Method: checking that a definition on classes is well defined),
applied once with success and once with failure.
The check is not special to congruences. Section 2.5
met it for the number of elements of a finite set.
Example
(Same size, revisited)
Let be a set,
and for let mean (Definition 2.5.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 2.5.1
(a)–(c), read for subsets of .
(b) Every subset
of is
finite with
or elements (Proposition 2.5.6,
since
has elements; or
list the eight subsets). Two subsets with the same
number of
elements are equivalent: and give by Proposition 2.5.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 2.5.1
(b)); with , part (c) of that
proposition gives that has elements as well,
so by Corollary 2.5.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 2.5 (Corollary 2.5.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 2.5 said only that it behaves like
an equivalence relation.
Exercises
A. Check your
understanding
Exercise
(A1)
Parts (a)–(d) are about Theorem 4.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 4.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 2.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 2
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 2.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 2.3.2,
and
;
the product clause of Proposition 4.2.5,
applied to and , gives .
The remainder. By Proposition 2.3.4,
. Now , so
, and by the power fact, . Also , so . By Proposition 4.2.5,
. Since , the remainder of on division by
is (Proposition 4.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 4.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 2.1.2
(c)). The input would get two
values.
(c) Yes. If with
, then
with (Proposition 2.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 .
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 2.1.2
(c)), so , hence (else by
Proposition 2.1.2
(a)). So by Theorem 4.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.)
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 4.2.3,
so the set of classes is a partition
of . (This is Theorem 4.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 4.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 4.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 .”