Membership of Equivalence Class of m mod pi is Replicative Function

Theorem
Let $f: \R \to \R$ be the real function defined as:


 * $\forall x \in \R: f \left({x}\right) = \left[{\exists r \in \Q, \exists m \in \Z: x = r \pi + m}\right]$

where $\left[{\cdots}\right]$ is Iverson's convention.

Then $f$ is a replicative function.

Proof
Let $f \left({x}\right) = 1$.

Then:
 * $\exists r \in \Q, \exists m \in \Z: x = r \pi + m$

and:

But $r n \in Q$ and $m n \in \Z$.

So:
 * $f \left({x}\right) = 1 \implies f \left({n x}\right) = 1$

Let $n \in \Z_{>0}$.

Let $k \in \Z: 0 \le k < n$.

Then:

Thus, when $0 \le k < n$ it follows that the coefficient of $pi$ cannot be rational.

Thus:
 * $f \left({x}\right) = 1 \implies f \left({x + \dfrac k n}\right) = 0$

and so:
 * $\displaystyle \sum_{k \mathop = 0}^{n - 1} f \left({x + \frac k n}\right) = f \left({n x}\right)$

Now let $f \left({n x}\right) = 1$.

Then:
 * $r_n \pi + m_n = n x$

for some rational $r_n$ and integer $m_n$.

Thus exactly one of $m_n + k$ where $0 \le n < k$ is a multiple of $n$.

Therefore there exists exactly one $k \in \Z$ such that $0 \le n < k$ such that:
 * $f \left({x + \dfrac k n}\right) = 1$

Therefore:
 * $\displaystyle \sum_{k \mathop = 0}^{n - 1} f \left({x + \frac k n}\right) = 1 = f \left({n x}\right)$

Hence the result by definition of replicative function.