I've got this exercise to prove :
if $x \leq y$ then $\lfloor x \rfloor \leq \lfloor y \rfloor$
And I want to know if logically my approach is fine:
Suppose for the sake of contradiction that $x \leq y$ and $\lfloor x \rfloor \gt \lfloor y \rfloor$ then if we assume $x = y$ then $\lfloor x \rfloor = \lfloor y \rfloor$ which is contradiction.
is this legal proof logically? Do I need to look for contradiction for the second case as well (where $ x < y$) or it's enough like that?
Thanks alot !
No, this is not sufficient as written. You need to handle the other case.
A recommendation: If $x<y$ then either $x< \left \lfloor{y}\right \rfloor $ or $\left \lfloor{y}\right \rfloor \leq x< y$. This splits your second case into two sub-cases. In my opinion, this is the easiest approach to finishing off your proof.
Edit: Just to be 100% clear, I did not finish the proof here. I am just recommending what's written be your next step.
Edit 2: I changed my two cases slightly. The earlier version was not wrong, but this way is better.