Foundations and Proof

Foundations and Proof
Notes by Dr. Lynne H. Walling
and Dr. Steffi Zegowitz
September 2016
5
Partitioning Sets, Equivalence Relations and Congruences
5.1
Partitioning Sets and Equivalence Relations
We have the following definition of a partition.
Definition 5.1. A partition of a non-empty set X is a collection {Ai : i ∈ I} of nonempty subsets of X such that
(i) for all x ∈ X, there exists i ∈ I such that x ∈ Ai , and
(ii) for all x ∈ X and for all i, j ∈ I, if x ∈ Ai ∩ Aj , then Ai = Aj .
Example. Let X = {1, 2, 3, 4, 5, 6}. Then
{{1}, {2, 3}, {4, 5, 6}}
is a partition of X. Another partition of X is
{{1, 2, 3}, {4, 6}, {5}}.
There is a direct link between partitions of sets and equivalence relations. We have
the following definitions.
Definition 5.2. A relation ∼ on a nonempty set X is a subset R of X × X. We write
x ∼ y when (x, y) ∈ R, and we say x is related (or equivalent) to y. A relation ∼ on X is
an equivalence relation if it satisfies the following properties.
(i) Reflexive: For all x ∈ X, we have that x ∼ x.
(ii) Symmetric: For all x, y ∈ X, we have that if x ∼ y then y ∼ x.
(iii) Transitive: For all ∀ x, y, z ∈ X, we have that if x ∼ y and y ∼ z then x ∼ z.
Example. Let T be the set of all triangles in R × R. For t1 , t2 ∈ T , consider the following
relation: t1 ∼ t2 if t1 is similar to t2 . Then ∼ is an equivalence relation (check!).
Example. Let X = Z, and let R = {(x, x) : x ∈ Z }. Then for all x ∈ Z, we have that
x ∼ x. Hence, ∼ is reflexive. We claim that ∼ is an equivalence relation on Z, so we need
to continue to show that ∼ is symmetric and transitive.
So suppose that x, y ∈ Z are such that x ∼ y. Then (x, y) ∈ R, but then x = y. Hence
(y, x) = (x, x) ∈ R. It follows that y ∼ x. Hence, ∼ is symmetric. Now, suppose that
x, y, z ∈ Z are such that x ∼ y and y ∼ z. Then x = y and y = z, so x = y = z. Hence,
(x, z) = (x, x) ∈ R. It follows that x ∼ z. Hence, ∼ is transitive. Since ∼ is reflexive,
symmetric and transitive, we have that ∼ is an equivalence relation.
1
5 Partitioning Sets, Equivalence Relations and Congruences
2
Example. Define a relation ∼ on Z by x ∼ y if x < y. Then ∼ is not reflexive since, for
example, 1 ∈ Z but 1 < 1 is not a true statement. Moreover, ∼ is not symmetric since, for
example, 2, 3 ∈ Z and 2 < 3 but 3 < 2 is not a true statement. However, ∼ is transitive:
suppose that x, y, z ∈ Z such that x ∼ y and y ∼ z. Then x < y and y < z, so x < y < z.
Hence x < z, so x ∼ z.
Definition 5.3. Suppose ∼ is an equivalence relation on a (nonempty) set X. For x ∈ X,
we define the equivalence class of x, denoted by [x]∼ , by
[x]∼ = {y ∈ X : y ∼ x}.
We have the following proposition.
Proposition 5.4. Suppose ∼ is an equivalence relation on a (nonempty) set X. For any
x, y ∈ X, we have that [x]∼ 6= [y]∼ if and only if [x]∼ ∩ [y]∼ = ∅.
Proof. Take x, y ∈ X. We need to prove that
(i) if [x]∼ 6= [y]∼ then [x]∼ ∩ [y]∼ = ∅, and
(ii) if [x]∼ ∩ [y]∼ = ∅ then [x]∼ 6= [y]∼ .
To prove the above statements, we will prove their contrapositives.
C(i) If [x]∼ ∩ [y]∼ 6= ∅, then [x]∼ = [y]∼ .
C(ii) If [x]∼ = [y]∼ , then [x]∼ ∩ [y]∼ 6= ∅.
C(i) Suppose that [x]∼ ∩ [y]∼ 6= ∅. Then there exists some z ∈ [x]∼ ∩ [y]∼ . Hence, z ∈ [x]∼ ,
so z ∼ x. Similarly, z ∈ [y]∼ , so z ∼ y. Since ∼ is symmetric, we have that x ∼ z. Since
∼ is transitive, we have that x ∼ y. Now ,choose w ∈ [x]∼ . Then w ∼ x, and since x ∼ y
and ∼ is transitive, we have that w ∼ y. Hence, w ∈ [y]∼ . Since w ∈ [x]∼ is arbitrary, we
have that [x]∼ ⊆ [y]∼ . Similarly, we can show that, for any w ∈ [y]∼ , we have w ∈ [x]∼ ,
so [y]∼ ⊆ [x]∼ . Hence [x]∼ = [y]∼ . Therefore, we have proved (i) by contrapositive.
C(ii) Suppose that [x]∼ = [y]∼ . Since ∼ is reflexive, we know that x ∈ [x]∼ , so x ∼ x.
Hence, x ∈ [x]∼ = [x]∼ ∩ [y]∼ , so [x]∼ ∩ [y]∼ 6= ∅. Therefore, we have proved (ii) by
contrapositive.
We have the following theorem.
Theorem 5.5. Suppose ∼ is an equivalence relation on a (non-empty) set X. Then
Π = {[x]∼ : x ∈ X}
is a partition of X.
Proof. Take a ∈ X. Then [a] ∈ Π. Hence, every element of X is in one of the equivalence
classes in Π. Now, suppose that for a ∈ X, we have a ∈ [x]∼ and a ∈ [y]∼ where x, y ∈ X.
Then [x]∼ ∩ [y]∼ 6= ∅, and we must have that [x]∼ = [y]∼ by the proof of Proposition 5.4.
It follows that Π is a partition of X.
We have the following theorem.
Theorem 5.6. Suppose Π = {Ai : i ∈ I } is a partition of a (nonempty) set X, for some
indexing set I. For x, y ∈ X, define x ∼ y if there exists an i ∈ I such that x, y ∈ Ai .
Then ∼ is an equivalence relation on X.
5 Partitioning Sets, Equivalence Relations and Congruences
3
Proof. First, we will show that ∼ is reflexive. So take x ∈ X. Since Π is a partition of X,
there exists some i ∈ I such that x ∈ Ai . Hence, x ∼ x.
Next, we will show that ∼ is symmetric. So suppose x, y ∈ X such that x ∼ y. Then
there exists some i ∈ I such that x, y ∈ Ai . It follows that y, x ∈ Ai , so y ∼ x.
Finally, we show that ∼ is transitive. So suppose that x, y, z ∈ X are such that x ∼ y
and y ∼ z. Then there exists some i ∈ I such that x, y ∈ Ai and there exists some j ∈ I
such that y, z ∈ Aj . Hence, we have that y ∈ Ai and y ∈ Aj . Since Π is a partition, we
must have that i = j. It follows that x, z ∈ Ai , so x ∼ z. Summarising, we have that ∼ is
an equivalence relation on X.
5.2
Congruences
We now present a fundamental example of an equivalence relation on Z. We begin with a
familiar definition.
Definition 5.7. For x, y ∈ Z, we say that x divides y, denoted by x | y, if there exists
z ∈ Z such that y = xz. Similarly, we say that x does not divide y, denoted by x - y, if
for all z ∈ Z we have y 6= xz.
Definition 5.8. Let n ∈ N. For, a, b ∈ Z, we say that a is congruent to b modulo n,
denoted by the equivalence relation
a ≡ b (mod n)
if n|(a − b). We say that a and b are in the same congruence class modulo n.
The following result helps to simplify many computations modulo a positive integer n.
Theorem 5.9. Fix n ∈ N. Suppose that a, b, c, d ∈ Z are such that a ≡ c (mod n) and
b ≡ d (mod n). Then
a + b ≡ c + d (mod n)
and
ab ≡ cd (mod n).
Proof. By assumption, we have that n|a − c and n|b − d. Hence, for some x, y ∈ Z, we
have that a − c = nx and b − d = ny. It follows that
(a + b) − (c + d) = (a − c) + (b − d) = nx + ny = n(x + y).
Since x + y ∈ Z, this means that n|((a + b) − (c + d)), so a + b ≡ c + d (mod n). Further,
since a = c + nx and b = d + ny, we have that
ab = (c + nx)(d + ny) = cd + n(cy + dx + nxy)
so ab − cd = n(cy + dx + nxy). Since cy + dx + nxy is an integer, we have that n|ab − cd,
so ab ≡ cd (mod n).
Example. We want to compute 35 + 28 (mod 7). We have 32 ≡ 9 ≡ 2 (mod 7). So
34 = 32 · 32 ≡ 2 · 2 ≡ 4 (mod 7). Hence
35 ≡ 34 · 3 ≡ 12 ≡ 5 (mod 7).
Further, we have 23 ≡ 8 ≡ 1 (mod 7), so 26 ≡ 23 · 23 ≡ 1 · 1 ≡ 1 (mod 7). Hence, we have
that
28 ≡ 26 · 22 ≡ 1 · 4 ≡ 4 (mod 7).
It follows that
35 + 28 ≡ 5 + 4 ≡ 9 ≡ 2 (mod 7).
5 Partitioning Sets, Equivalence Relations and Congruences
4
Exercises
5.1. (a) List all the partitions of the set {1, 2, 3}.
(b) Determine whether each of the following relations are reflexive, symmetric,
transitive; justify your answers.
(i) Let X = { f : R → R }. Define a relation ∼ on X by f ∼ g if f (0) = g(0).
(ii) Let Y be the set of all words in Webster’s dictionary. Define a relation on
Y by v ∼ w if v, w have (at least) two letters in common.
(iii) Let Z be the collection of all subsets of Q. Define a relation on Z by A ∼ B
if A ⊆ B.
(iv) Let ∼ be the relation on R defined by a ∼ b if a 6= b.
5.2. Fix n ∈ N. We define a relation on Z as follows: For a, b ∈ Z, we write a ≡ b (mod n)
if n|(a − b). When a ≡ b (mod n), we say a is congruent to b modulo n. Show that
≡ (mod n) is an equivalence relation.
5.3. Let X be a set and ∼ a relation on X. Define
N = {x ∈ X : ¬(x ∼ x) }.
Let
B = {b ∈ X : (∀n ∈ N ), (b ∼ n) ∧ [(∀n 6∈ N ), ¬(b ∼ n)] }.
Show that B = ∅. (Suggestion: Suppose there is some b ∈ B; show that b ∈ N =⇒
b 6∈ N , and b 6∈ N =⇒ b ∈ N . Then explain why it is impossible to have b ∈ B.)
5.4. (a) Find x ∈ Z such that 0 ≤ x < 110 and x ≡ 300 (mod 110).
(b) Find x ∈ Z such that 0 ≤ x < 9 and x ≡ 25 + 56 (mod 9).
(c) Find x ∈ Z such that 0 ≤ x < 15 and x ≡ 47 (mod 15).
5.5. (a) Find x ∈ Z such that 0 ≤ x < 8 and x ≡ 2100 (mod 8).
(b) Find x ∈ Z such that 0 ≤ x < 7 and x ≡ 510 (mod 7).
(c) Find x ∈ Z such that 0 ≤ x < 11 and x ≡ 35 + 84 (mod 11).