# Construction of the family of all equivalence classes

I'm trying to get better understanding of the construction of Vitali set. I understand the less formal proofs as in here, but I have problems with more formal details. I understand that the idea is to take the uncountable family of sets (which are equivalence classes for the equivalence relation $x\sim y\iff x-y\in\mathbb Q$) and use Axiom of Choice to construct a set with exactly one element from every set in the family.

What I don't understand is how you construct that uncountable family. Equivalence relation can be represented as a function $\mathbb R \times \mathbb R \rightarrow \{0, 1\}$, so in ZFC this function is a set of pairs, where first element is a pair of real numbers and second is $0$ or $1$. How do I get from that set to the family of all equivalence classes using ZFC?

The relation $\sim$ is the set $R_\sim=\{\langle x,y\rangle\in\Bbb R\times\Bbb R:x-y\in\Bbb Q\}$. If you want, you can instead consider the indicator function of this set, as you suggest in your question, but that seems an unnecessary complication. For any $x\in\Bbb R$ the $\sim$-equivalence class of $x$, which I’ll denote by $[x]$, is simply $[x]=\{y\in\Bbb R:\langle x,y\rangle\in R_\sim\}$, and the set of equivalence classes is $\{[x]:x\in\Bbb R\}$.
The definitions of $R_\sigma$ and $[x]$ are instances of the comprehension (specification) schema, and since $[x]\subseteq\Bbb R$ for each $x\in\Bbb R$, the comprehension schema and power set axiom give us the set of equivalence classes (once we have $\Bbb Q,\Bbb R$, ordered pairs, and Cartesian products, of course).