Let $\lfloor x \rfloor$ be the floor function and $\mathbb{N} = \{1, 2, 3, \dots\}$. Claim: The following is an equivalence relation:
Let $R \subseteq \mathbb{N} \times \mathbb{N}$ such that $x, y \in \mathbb{N}$: $$xRy \iff [x]_1 = [y]_1$$ where $$\begin{align*} [x]_k = \text{k-th digit of } x = \left\lfloor \frac{x}{10^{\#x -k}} \right \rfloor - \left \lfloor \frac{x}{10^{\#x -k +1}} \right \rfloor \end{align*}$$ with $k \in \mathbb{N}$ such that $k \le \#x$ (reading digits from left to right, e.g., $[1245]_3 = 4$), and $$\#x = \text{number of digits of }x = \lfloor \log_{10}(x) \rfloor + 1$$.
Proof:
Reflexivity: $xRx \iff [x]_1 = [x]_1$, which is true for all $x \in \mathbb{N}$.
Symmetry:
$$\begin{split} xRy &\iff [x]_1 = [y]_1\\ &\iff \left \lfloor \frac{x}{10^{\#x-1}} \right \rfloor - \left \lfloor \frac{x}{10^{\#x}} \right \rfloor = \left \lfloor \frac{y}{10^{\#y-1}} \right \rfloor - \left \lfloor \frac{y}{10^{\#y}} \right \rfloor\\ &\iff \left \lfloor \frac{y}{10^{\#y-1}} \right \rfloor - \left \lfloor \frac{y}{10^{\#y}} \right \rfloor = \left \lfloor \frac{x}{10^{\#x-1}} \right \rfloor - \left \lfloor \frac{x}{10^{\#x}} \right \rfloor\\ &\iff [y]_1 = [x]_1\\ &\iff yRx \end{split}$$
- Transitivity: If $xRy$ and $yRz$, then $[x]_1 = [y]_1$ and $[y]_1 = [z]_1 \Longrightarrow [x]_1 = [y]_1 = [z]_1 \Longrightarrow [x]_1=[z]_1$. Hence, $xRz$.
Q.E.D.
Question:
Is this proof correct? For me, it looks legit.