# Integer equals Floor iff Number between Integer and One More

## Theorem

Let $x \in \R$ be a real number.

Let $\floor x$ denote the floor of $x$.

Let $n \in \Z$ be an integer.

Then:

$\floor x = n \iff n \le x < n + 1$

## Proof

### Necessary Condition

Let $n \le x < n + 1$.

$n \le x \implies n \le \floor x$

By definition of the floor of $x$:

$\floor x \le x$

and so by hypothesis:

$\floor x < n + 1$

We have that:

$\forall m, n \in \Z: m \le n \iff m < n + 1$

and so:

$\floor x \le n$

So we have:

$n \le \floor x$

and:

$\floor x \le n$

Thus:

$n \le x < n + 1 \implies \floor x = n$

$\Box$

### Sufficient Condition

Let $\floor x = n$.

By definition of the floor of $x$:

$\floor x \le x$

and so by hypothesis:

$n \le x$

Also by definition of the floor of $x$:

$x < \floor x + 1$

and so by hypothesis:

$x < n + 1$

Thus:

$\floor x = n \implies n \le x < n + 1$.

$\Box$

Hence the result:

$\floor x = n \iff n \le x < n + 1$

$\blacksquare$
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}