For $a,b \in \mathbb{R}$ define $a \sim b$ if $a - b \in \mathbb{Z}$
I don't understand how I'm suppose to prove this:
Prove that $\sim$ defines an equivalence relation on $\mathbb{Z}$
Also can you help me with finding the equivalence class of 5. In other words what I'm trying to describe is the set $[5]$ = {$y : 5 \sim y$}. And $[5]$ is just the name of the set.
Edit: Please read my comment below (an attempt to solve this problem) does it make any sense? I'm sorry if I sound really dumb I'm new to this stuff.
Every relation on a set $X$ that is defined as $x \sim y$ iff $f(x)=f(y)$ for some function $f:X\to A$, where $A$ is another set, must be an equivalence relation just because equality is an equivalence relation.
In your example, $X=A=\mathbb R$ and $f(x)=$ the fractional part of $x$.