Equivalence of Definitions of Floor Function

Theorem
The following definitions of the floor function are equivalent:

Definition 1 implies Definition 2
Let $f: \R \to \R$ be the mapping defined as the floor function by definition 1.

Then by definition:
 * $\forall x \in \R: f \left({x}\right) = \sup \left({\left\{ {m \in \Z: m \le x}\right\} }\right)$

It follows immediately that $f \left({x}\right) \in \Z$.

By definition of supremum:
 * $f \left({x}\right) \le x$

Also by definition of supremum:
 * $f \left({x}\right) + 1 \not \le x$

as $f \left({x}\right)$ is the largest integer with that property.

That is:
 * $x < f \left({x}\right) + 1$

By Supremum is Unique, $f \left({x}\right)$ is well-defined.

Thus $f \left({x}\right)$ is the unique integer such that:
 * $f \left({x}\right) \le x < f \left({x}\right) + 1$

So $f$ is the floor function by definition 2.

Definition 2 implies Definition 1
Let $g: \R \to \R$ be the mapping defined as the floor function by definition 2.

Then by definition:
 * $z = g \left({x}\right) \iff z \in \Z \land x \in \left\{ {y \in \R: z \le y < z + 1}\right\}$

Thus $g \left({x}\right)$ is an integer such that:
 * $g \left({x}\right) \le x < g \left({x}\right) + 1$

Let $n \in \Z$ such that $n \le x$.

$n > g \left({x}\right)$.

Then:
 * $n \ge g \left({x}\right) + 1$

and so from the definition of $g$ it follows that $n > x$.

By Proof by Contradiction it follows that $n \le g \left({x}\right)$.

Thus it follows by definition that $g \left({x}\right)$ is the supremum of $\left\{ {m \in \Z: m \le x}\right\}$.

Thus $f$ is the floor function by definition 1.