Relations, equivalence relations and partitions
Warm-upHumanOn the set , let mean that and have the same remainder on division by . List the elements of the class .
On the set , let mean that and have the same remainder on division by . List the elements of the class .
Which properties does the relation (“ is less than or equal to ”) on have? Choose all that apply.
On , let mean that and differ by at most . This relation is not an equivalence relation. Which of these is a genuine counterexample?
On the whole numbers , let mean “ and have the same last digit”. How many equivalence classes are there?
The partition of defines the relation “lies in the same block as”. How many ordered pairs does this relation contain?
Here is a “proof” that every symmetric, transitive relation is reflexive.
Let be any element. (1) Choose with . (2) By symmetry, . (3) By transitivity, from and we get .
What is wrong?
Which of these is a partition of ?
How many different equivalence relations are there on the set ? (Use Theorem 3: count the partitions instead.)
In the Lean section, cls R a x means “ belongs to the class of ”. Which statement says that any two classes are equal or disjoint?
Write is_equivalence(elements, related), where elements is a list and related(a, b) returns True or False. It should return True exactly when the relation is reflexive, symmetric and transitive on elements. Python's all(...) is handy: all(related(a, a) for a in elements) tests reflexivity. What should your function return for an empty list, and why?