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 / n}\right)}\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\Z: 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:

Suppose that for $n \ne 1$:
 * $f \left({\dfrac 1 {n - 1} }\right) = 0$

Then:

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$.