Introduction to set theory and to methodology and philosophy of
mathematics and computer programming
Equivalence relations versus partitions
An overview
by Jan Plaza
c 2017 Jan Plaza
Use under the Creative Commons Attribution 4.0 International License
Version of December 6, 2017
Definition
An equivalence (relation) on X is any binary relation that is reflexive on X,
symmetric on X, and transitive on X.
Informal Example
1. Let us say that Person1 is name-related to Person2
if they have the same first name. This is an equivalence.
2. Let us say that Person1 is birthday-related to Person2
if they have birthdays on the same day of a year (not necessarily in the same year).
This is an equivalence.
3. Let us say that Person1 is language-related to Person2
if they can speak the same language.
This is not an equivalence because it is not transitive – consider this situation:
Adam: only English, Betty: English and Spanish, Charles: only Spanish.
Exercise. Check if =Z, =Z, <Z, >Z, Z, Z, 1Z2 and | are equivalence relations.
Example 1.
1. =X is an equivalence on X.
2. ≡k is an equivalence on Z (for any fixed k).
3. The empty relation ∅ is an equivalence on ∅.
4. 1X2 , the total binary relation on X, is an equivalence on X.
5. If sets X, Y are disjoint then 1X2 ∪ 1Y 2 is an equivalence on X ∪ Y .
6. { 0, 0 ,
1, 1 , 1, 2 , 2, 1 , 2, 2 ,
3, 3 , 3, 4 , 3, 5 , 4, 3 , 4, 4 , 4, 5 , 5, 3 , 5, 4 , 5, 5 }
is an equivalence on {0, 1, 2, 3, 4, 5}.
7. Let X be a set of straight lines on a plane.
The relation || (of being parallel) is an equivalence on X.
Fact
1. Let f be a function on a set X.
Consider the following relation over X: xRy iff f(x)=f(y).
This relation is an equivalence on X.
2. Let {Xi : i ∈ I} is a disjoint family of sets.
then i∈I 1Xi
2 is an equivalence on i∈I Xi .
Exercise
1. For each equivalence relation R from Example 1 above specify a function f on a
set a set X such that xRy iff f(x)=f(y).
2. For each equivalence relation R from the Example 1 above specify a disjoint
family of sets {Xi : i ∈ I} such that R = i∈I 1Xi
2 .
Definition
Let R be an equivalence on X.
1. Let a ∈ X.
The equivalence class of R determined by a is [a]R = {b ∈ X : aRb} .
2. E is an equivalence class of R if there exists a ∈ X s.t. E = [a]R .
3. Let E be an equivalence class of R.
a is a representative of the equivalence class E of R
if E = [a]R.
4. The quotient (set) of X by R is X/R = {[a]R : a ∈ X}.
Note
1. So, [a]R, or just [a], the equivalence class determined by a,
is the set of all elements which are related to a.
2. So, X/R, the quotient of X by R,
is a family of all equivalence classes of R.
Exercise. Investigate equivalence classes of each relation from Example 1 above.
Specify the set X such that the relation is an equivalence on X.
For every element of X specify the equivalence class this element determines.
How many equivalence classes are there?
Are the equivalence classes pairwise disjoint?
Do the equivalence classes form a partition of X?
Example
≡3 is an equivalence on Z.
[0] contains integers divisible by 3, i.e. those that have remainder 0 when divided by 3.
[1] contains integers that have remainder 1 when divided by 3.
[2] contains integers that have remainder 2 when divided by 3.
[3] = [0], [4] = [1], [5] = [2], etc.
Z/ ≡3 = {[0], [1], [2]}
Equivelence classes [0], [1], [2] are non-empty, pairwise disjoint and cover Z.
So, Z/ ≡3 is a partition of Z.
In general, every equivalence on X determines a similar way into a partition of X.
Equivalence R on X determines partition PR of X.
Example
Let X0 = {n ∈ Z : ∃k n = 3k}.
Let X1 = {n ∈ Z : ∃k n = 3k + 1}.
Let X2 = {n ∈ Z : ∃k n = 3k + 2}.
X0, X1, X2 are non-empty, pairwise disjoint and cover Z.
So, {X0, X1, X2} is a partition of Z.
Define a relation R over Z such that mRn iff m, n belong to the same set Xi.
So, mRn iff m, n have the same remainder when divided by 3.
So, mRn iff m ≡3 n.
So, R is ≡3.
In general, every partition of X determines a similar way an equivalence on X.
Partition P of X determines equivalence RP on X.

6.3 Equivalences versus partitions

  • 1.
    Introduction to settheory and to methodology and philosophy of mathematics and computer programming Equivalence relations versus partitions An overview by Jan Plaza c 2017 Jan Plaza Use under the Creative Commons Attribution 4.0 International License Version of December 6, 2017
  • 2.
    Definition An equivalence (relation)on X is any binary relation that is reflexive on X, symmetric on X, and transitive on X. Informal Example 1. Let us say that Person1 is name-related to Person2 if they have the same first name. This is an equivalence. 2. Let us say that Person1 is birthday-related to Person2 if they have birthdays on the same day of a year (not necessarily in the same year). This is an equivalence. 3. Let us say that Person1 is language-related to Person2 if they can speak the same language. This is not an equivalence because it is not transitive – consider this situation: Adam: only English, Betty: English and Spanish, Charles: only Spanish. Exercise. Check if =Z, =Z, <Z, >Z, Z, Z, 1Z2 and | are equivalence relations.
  • 3.
    Example 1. 1. =Xis an equivalence on X. 2. ≡k is an equivalence on Z (for any fixed k). 3. The empty relation ∅ is an equivalence on ∅. 4. 1X2 , the total binary relation on X, is an equivalence on X. 5. If sets X, Y are disjoint then 1X2 ∪ 1Y 2 is an equivalence on X ∪ Y . 6. { 0, 0 , 1, 1 , 1, 2 , 2, 1 , 2, 2 , 3, 3 , 3, 4 , 3, 5 , 4, 3 , 4, 4 , 4, 5 , 5, 3 , 5, 4 , 5, 5 } is an equivalence on {0, 1, 2, 3, 4, 5}. 7. Let X be a set of straight lines on a plane. The relation || (of being parallel) is an equivalence on X.
  • 4.
    Fact 1. Let fbe a function on a set X. Consider the following relation over X: xRy iff f(x)=f(y). This relation is an equivalence on X. 2. Let {Xi : i ∈ I} is a disjoint family of sets. then i∈I 1Xi 2 is an equivalence on i∈I Xi . Exercise 1. For each equivalence relation R from Example 1 above specify a function f on a set a set X such that xRy iff f(x)=f(y). 2. For each equivalence relation R from the Example 1 above specify a disjoint family of sets {Xi : i ∈ I} such that R = i∈I 1Xi 2 .
  • 5.
    Definition Let R bean equivalence on X. 1. Let a ∈ X. The equivalence class of R determined by a is [a]R = {b ∈ X : aRb} . 2. E is an equivalence class of R if there exists a ∈ X s.t. E = [a]R . 3. Let E be an equivalence class of R. a is a representative of the equivalence class E of R if E = [a]R. 4. The quotient (set) of X by R is X/R = {[a]R : a ∈ X}. Note 1. So, [a]R, or just [a], the equivalence class determined by a, is the set of all elements which are related to a. 2. So, X/R, the quotient of X by R, is a family of all equivalence classes of R.
  • 6.
    Exercise. Investigate equivalenceclasses of each relation from Example 1 above. Specify the set X such that the relation is an equivalence on X. For every element of X specify the equivalence class this element determines. How many equivalence classes are there? Are the equivalence classes pairwise disjoint? Do the equivalence classes form a partition of X?
  • 7.
    Example ≡3 is anequivalence on Z. [0] contains integers divisible by 3, i.e. those that have remainder 0 when divided by 3. [1] contains integers that have remainder 1 when divided by 3. [2] contains integers that have remainder 2 when divided by 3. [3] = [0], [4] = [1], [5] = [2], etc. Z/ ≡3 = {[0], [1], [2]} Equivelence classes [0], [1], [2] are non-empty, pairwise disjoint and cover Z. So, Z/ ≡3 is a partition of Z. In general, every equivalence on X determines a similar way into a partition of X. Equivalence R on X determines partition PR of X.
  • 8.
    Example Let X0 ={n ∈ Z : ∃k n = 3k}. Let X1 = {n ∈ Z : ∃k n = 3k + 1}. Let X2 = {n ∈ Z : ∃k n = 3k + 2}. X0, X1, X2 are non-empty, pairwise disjoint and cover Z. So, {X0, X1, X2} is a partition of Z. Define a relation R over Z such that mRn iff m, n belong to the same set Xi. So, mRn iff m, n have the same remainder when divided by 3. So, mRn iff m ≡3 n. So, R is ≡3. In general, every partition of X determines a similar way an equivalence on X. Partition P of X determines equivalence RP on X.