Characteristics of Floor and Ceiling Function

Theorem
Let $f: \R \to \Z$ be an integer-valued function which satisfies both of the following:
 * $(1): \quad f \left({x + 1}\right) = f \left({x}\right) + 1$
 * $(2): \quad \forall n \in \Z_{> 0}: f \left({x}\right) = f \left({f \left({n x}\right) / n}\right)$

Then either:
 * $\forall x \in \Q: f \left({x}\right) = \left \lfloor{x}\right \rfloor$

or:
 * $\forall x \in \Q: f \left({x}\right) = \left \lceil{x}\right \rceil$

Proof
From $(1)$, by induction we get
 * $\forall n \in\N: f(x+n) = f(x)+n$

and
 * $\forall n \in\N: f(x-n) = f(x)-n$

and therefore in particular
 * (3) $\forall n\in\Z: f(n) = f(0)+n$

From $(2)$, we get

Hence
 * $f(0)=0$.

Thus from $(3)$ it follows that:
 * $\forall n \in \Z: f \left({n}\right) = n$

Suppose that $f \left({\dfrac 1 2}\right) = k \le 0$.

Then:

We show that in this case, by induction
 * $f \left({\dfrac 1 {n}}\right) = 0$ for all $n\in\N$

Induction hypothesis:
 * $f \left({\dfrac 1 {n - 1} }\right) = 0$

Then from $(1)$:
 * $f \left({\dfrac n {n - 1} }\right) = f \left({\dfrac 1 {n - 1} + 1}\right) = 0 + 1 = 1$,

so

Finally, we show by induction on $m$ that even
 * $f \left({\dfrac m {n}}\right) = 0$ for $m\in\set{1,\dots,n-1}.$

Above we have shown this for $m=1$.

Let $1 \le m < n$.

Then:

Thus:
 * $f \left({\dfrac 1 2}\right) \le 0 \implies f \left({x}\right) = \left \lfloor{x}\right \rfloor$

for all rational $x$.

Suppose that $f \left({\dfrac 1 2}\right) = k > 0$.

Then the integer-valued function $g: \R \to \Z$ satisfies:
 * $g \left({x}\right) = -f \left({-x}\right)$

satisfies $(1)$ and $(2)$, and also:

Thus:
 * $f \left({\dfrac 1 2}\right) > 0 \implies f \left({x}\right) = \left \lceil{x}\right \rceil$

for all rational $x$.