Can I apply the floor function to the left- and right hand side this way?

279 Views Asked by At

I'm wondering if I can apply the floor function to both sides like below? This isn't all I want to do I just want to know if the operation is legal. Thanks! $$ a + x < b + y \to \lfloor a + x \rfloor < \lfloor b + y \rfloor $$

EDIT: To clarify I'd only like to know if the operation is allowed. What I'd actually like to is prove $$a \leq b \to \lfloor a \rfloor \leq \lfloor b\rfloor$$ but I want to know if I can come up with this proof by applying the floor function operation to both sides kind of like adding 1 to both sides makes the inequality still hold.

2

There are 2 best solutions below

1
On BEST ANSWER

If $f$ is a function, by definition, if $a=b$ then $f(a)=f(b)$. The floor function is an example of a function and so you have $a=b$ implies $\lfloor a\rfloor = \lfloor b\rfloor$.

Now... some functions will retain inequalities too. If a function is monotonic increasing that means by definition that if $a\leq b$ then $f(a)\leq f(b)$. The floor function is an example of a monotonic increasing function. That is to say, if $a\leq b$ then it is true that $\lfloor a\rfloor \leq \lfloor b\rfloor$.

Not every function is monotonic increasing however. Take for example $f(x)=x^2$. You have $-3\leq 1$ but $(-3)^2\not\leq (1)^2$.

Finally, some functions will retain strict inequalities as well. If a function is strictly monotonic increasing that means by definition that if $a<b$ then $f(a)<f(b)$. The floor function is not strictly monotonic, for example how $1.2<1.5$ but $\lfloor 1.2\rfloor \not\lt \lfloor 1.5\rfloor$ since they both result in the same value of $1$.


As for a hint on how to prove that $a\leq b\implies \lfloor a\rfloor \leq \lfloor b\rfloor$, rewrite $b$ as $a+(b-a)$ and recognize that $(b-a)\geq 0$. Further, apply the definition of the floor function as being the largest integer less than or equal to its input.

Let $x\geq 0$. Then let $c = \lfloor a\rfloor$ be the largest integer less than or equal to $a$. It follows that $c$ is an integer which is less than or equal to $a+x$, whether it is the largest one or not... and so whatever the largest integer less than or equal to $a+x$ is will be at least as large as $c$. As such we have $\lfloor a\rfloor \leq \lfloor a+x\rfloor$, showing that the floor function is monotonically increasing.

0
On

We can write, using the fractional part, that $$ \eqalign{ & a \le b\quad \Rightarrow \quad \left\{ \matrix{ \left\lfloor a \right\rfloor + \left\{ a \right\} \le \left\lfloor b \right\rfloor + \left\{ b \right\} \hfill \cr 0 \le \left\{ a \right\},\left\{ b \right\} < 1 \hfill \cr} \right. \cr & \left\{ a \right\} - \left\{ b \right\} \le \left\lfloor b \right\rfloor - \left\lfloor a \right\rfloor \cr} $$

At the same time, you can write your inequality as $$ \eqalign{ & a \le b\quad \Rightarrow \quad 0 \le b - a\quad \Rightarrow \cr & \Rightarrow \quad 0 \le \left\lfloor {b - a} \right\rfloor + \left\{ {b - a} \right\}\quad \Rightarrow \cr & \Rightarrow \quad 0 \le \left\lfloor {\left\lfloor b \right\rfloor - \left\lfloor a \right\rfloor + \left\{ b \right\} - \left\{ a \right\}} \right\rfloor + \left\{ {b - a} \right\}\quad \Rightarrow \cr & \Rightarrow \quad 0 \le \left\lfloor b \right\rfloor - \left\lfloor a \right\rfloor + \left\lfloor {\left\{ b \right\} - \left\{ a \right\}} \right\rfloor + \left\{ {b - a} \right\}\quad \Rightarrow \cr & \Rightarrow \quad 0 \le \left\lfloor b \right\rfloor - \left\lfloor a \right\rfloor - \left[ {\left\{ b \right\} < \left\{ a \right\}} \right] + \left\{ {b - a} \right\} \cr} $$ where the square brackets denote the Iverson bracket

And, apart from obvious manipulations, I do not know other ways to put it for, general $a, \, b$.