below is an extract of the book (at the very beginning) of "The Axiom of Choice" by Jech. I am having a hard time at understanding this introductory example, that shows how to construct a set of real numbers not Lebesgue measurable, using the axiom of choice :
The thing I'm particularly confused with is the fact that the equivalence relation is defined for $x, y$ both in $[0,1]$, but yet he seems to assign any real number to the equivalence classes. How can he define something only on $[0,1]$ and assert (but I might be wrong):
$$\mathbb{R} = \{ [y] : y \in [0,1]\} = \left\{ \{y + r : r\in \mathbb{Q}\} : y \in [0,1]\right\}$$
The last part also is not that obvious to me. Isn't it wrong to say:
$$\left\{ \{y + r : r\in \mathbb{Q}, 0\leq r \leq 1 \} : y \in [0,1]\right\} \subset [0,1]$$
Thanks for your help
EDIT
Ok I understand some things more:
$$\forall x \in \mathbb{R}, x - \lfloor x \rfloor \in [0, 1]$$
and then there exists a unique rational $r' \in [0,1]$ and a unique real $y \in [0,1]$ such that $x = y + \underbrace{r' + \lfloor x \rfloor}_{r\in\mathbb{Q}}$.
Then: $$\begin{align} \mu(\mathbb{R}) &= \mu(\bigcup\limits_{r\in\mathbb{Q}} M_r) \\ &= \sum_{r\in\mathbb{Q}} \mu(M_r) \quad\text{ (since it's a partition)} \\ &= \sum_{r\in\mathbb{Q}} \mu(M) \\ &= +\infty . \mu(M) \end{align}$$
So with the convention that $+\infty.0 = 0$, I understand the first contradiction ($\mu(M) = 0$)
but I don't understand the last inequality, I don't think we have, right?:
$$\bigcup\limits_{r\in[0,1]\cap\mathbb{Q}} M_r \subset [0,1]$$


He's not asserting that $\mathbb{R}$ is the union of the $\sim$-classes; as you say, that union would just be $[0,1]$.
Rather, he's saying $$\mathbb{R}=\bigcup_{r\in\mathbb{Q}}M_r,$$ where $$M_r=\{y+r: y\in M\}.$$ Note that $M_r$ is not in general a subset of $[0,1]$ - consider e.g. $M_{17}$.
Your second question runs into the same issue.