<s>[INST] Equivalence relation with the floor function Let us consider a function $f:\ \Bbb{R}\ \longrightarrow\ \Bbb{R}$ and we define the equivalence relation $\sim$ on $\Bbb{R}$ such that: 
$$x\ \sim\ y\qquad\Leftrightarrow\qquad f(x)=f(y).$$
Note: The following $\lfloor x\rfloor$ is the floor function of $x$. It gives you the first integer smaller or equal to $x$. For example $\lfloor2.2\rfloor=2$, $\lfloor12\rfloor=12$, and $\lfloor−2.2\rfloor=−3$. 
For the function $f(x)=\lfloor x/10\rfloor$, only one of the following statement is true.
For $x=a_0+10a_1+10^2a_2+...+10^na_n$, with all $a_j\in\{0,1,2,\ldots,9\}$ and for all $c\in\{0,1,2,\ldots,9\}$:
1) $x\ \sim\ x-c$ if $a_0-c<5$,
2) $x\ \sim\ x+c$ if $a_0+c<10$.
My working:
Take $a_0=9$ and $c=2$ then the first statement is false as $9-2>5$ but if I apply to the second statement $9+2>10$ which is wrong too, so I think my method is wrong.
I am guessing the second one is true from the function $f(x)=\lfloor x/10\rfloor$, but I'm really not sure about this. Any help will be appreciated! 
Thanks.
 [/INST] It's just decimal representation.  If you subtracta a $c$ from a number do you have to carry/borrow a one or not.
to wit....
So $x = 10^na_n + 10^{n_1}a_{n-1} + ..... + 10a_1 + a_0$
$\frac x{10} = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1 + \frac {a_0}{10}$
$f(x) = \lfloor \frac x{10} \rfloor  = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1$
And $x - c  = 10^na_n + 10^{n_1}a_{n-1} + ..... + 10a_1 + (a_0-c)$
And $\frac {x-c}{10}  = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \frac {(a_0-c)}{10}$
To find the least integer depends upon the value of $\frac {(a_0-c)}{10}$.
$-9 \le a_0 -c \le 9$ and $-.9\le \frac {(a_0-c)}{10} \le .9$
If $\frac {(a_0-c)}{10} \ge 0$ then 
$\rfloor \frac {x-c}{10}\lfloor   = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \rfloor\frac {(a_0-c)}{10}\lfloor= 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 = f(x)$
If $\frac  {(a_0-c)}{10} \le 0$ then 
$\rfloor \frac {x-c}{10}\lfloor   = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \rfloor\frac {(a_0-c)}{10}\lfloor= 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 - 1= f(x)-1$
So $x$~$x-c$ if $a_0 -c \ge 0$.  But $x$ !~ $x-c$ if $a_0 - c < 0$.  So if $a_0 - c < 0 < 5$ this is not true.
....
You can do 2) the same way.
$f(x+c) = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1 + \lfloor \frac {a_0+c}{10}\rfloor = f(x) + \lfloor \frac {a_0+c}{10}\rfloor$.
And $\lfloor \frac {a_0+c}{10}\rfloor = 0$ if $a_0+c< 10$ but  $\lfloor \frac {a_0+c}{10}\rfloor = 1$ if $a_0 + c \ge 10$.
So 2) is true.
</s>