I am trying to write down and prove a precise characterization of the equivalence classes of the relation on $\mathbb{R}$ defined by $x \sim y$ if and only if $x - y \in \mathbb{Z}$.
What I've done so far is shown that any $x \in \mathbb{R}$ can be written in the form $$ x = \lfloor x \rfloor + \left(x -\lfloor x \rfloor\right), $$ where, by definition of the floor function, we have $\lfloor x \rfloor \leq x < \lfloor x \rfloor + 1$, in which case $0 \leq x - \lfloor x \rfloor < 1$. So I can identify the equivalence classes in which $x$ lives by $x - \lfloor x \rfloor$, i.e., by an element in $[0,1)$. I believe I need to then show three things:
Every $x$ falls into an equivalence class.
The equivalence class into which $x$ falls is unique.
If $x,y$ are in the same equivalence class, then $x \sim y$.
If $x \sim y$, then $x$ and $y$ are in the same equivalence class.
I believe the first bullet follows from the existence of the floor function and the fact that I can write any $x \in \mathbb{R}$ in the form $x = \lfloor x \rfloor + \left(x -\lfloor x \rfloor\right)$. The second bullet is true because the floor of a real number is unique.
I'm less sure on the third and fourth bullets, which say: $x \sim y$ if and only if $x$ and $y$ live in the same such class. I'm not 100% sure if this verification is necessary, because I am taking for granted the fact that an equivalence relation partitions the set. I thought it necessary to show this in order to verify that $[0,1)$ is in fact the set of equivalence classes. So my fear is that $x$ and $y$ may be related to each other and lie in some unique equivalence class, but I may have improperly described what that unique class is.
My attempt at showing this: suppose $x$ and $y$ are in the same class. So $x - \lfloor x \rfloor = y - \lfloor y \rfloor$ (is this a jump in logic?) by the above construction. Rearranging, we get $x - y = \lfloor x \rfloor - \lfloor y \rfloor$. The right-hand side is a difference of integers and thus an integer, so $x - y$ is an integer, so $x \sim y$.
I'm far less sure on the converse direction. So conversely, suppose that $x \sim y$. Then $x - y = t \in \mathbb{Z}$. Write $x = \lfloor x \rfloor + (x - \lfloor x \rfloor)$ and $y = \lfloor y \rfloor + (y - \lfloor y \rfloor)$. I believe I want to show that $x - \lfloor x \rfloor = y - \lfloor y \rfloor$. So \begin{align*} (x - \lfloor x \rfloor) - (y - \lfloor y \rfloor) &= (x-y) + (\lfloor y \rfloor - \lfloor x \rfloor) \\ &= t + (\lfloor y \rfloor - \lfloor x \rfloor). \end{align*} I should be able to convert this to $0$, but I'm not sure if I'm proceeding correctly by replacing $x - y$ with $t$. Another option is to start with $x - y$, use the decomposition into a sum of the floor and fractional component, and then rearrange. That didn't end up working for me either.