Intuition about combining half-open intervals into inequality with absolute value?

23 Views Asked by At

I'm think about how to use the two conditions

$$0\le r\lt n\\ 0\le r'\lt n,$$

to prove $\lvert r'-r\rvert\lt n,$ and the way I achieved this is by backwardly expand the result into

$$-n\lt(r'-r)\lt n,$$

then I know it is kind of combining

$$(r\lt n)\land(0\le r')\implies -n\lt(r'-r)\\ (r'\lt n)\land(0\le r)\implies (r'-r)\lt n.$$

Is there any other way, maybe use some theorem, to prove this?

1

There are 1 best solutions below

0
On BEST ANSWER

You have

  • $-n < -r' \leq 0$
  • $0 \leq r < n$

So, it follows $$\color{blue}{-n} \leq -n + r \color{blue}{<} -r' + r = \color{blue}{r - r'} \leq r \color{blue}{< n}$$