This lemma somehow tells that a continuous function is locally monotonous. This fails to be true... Think of

for instance, at 0. It is continuous and it oscillates so the conclusion of the lemma can't be satisfied. The problem in the proof comes from the fact that there is no reason why

would be in

. (

is defined given

)

There's much simpler (and correct): notice that for any rational

, since

is

-periodic,

. In other words,

is constant on

. Let's say

. Now, let

be any real number, rational or not. It is well known that there exists a sequence

of rational numbers that converges toward

. Since

is continuous, we conclude

(the sequence

is constant, equal to

). qed.