TITLE: $f(x+1)=f(x)$ almost everywhere
QUESTION [8 upvotes]: Let $f:\mathbb{R}\to\mathbb{C}$ be a function such that $f(x+1)=f(x)$ almost everywhere.
I want to prove that exists a function $F$ such that $F(x+1)=F(x)$ always holds and $F(x)=f(x)$ almost everywhere.
I think the intuition here is simple: let $x_0$ be a real number, if every $x\in x_0\mathbb{Z}$ satisfies $f(x+1)=f(x)$, then we define $F(x)=f(x)$. If there are a couple exceptions, we fix them and keep going for every $x_0\in \mathbb{R}$. However I am failling to formalize this.
Let $A=\{x\in\mathbb{R} : f(x+1)\neq f(x)\}$. Since $\mathbb{R}\setminus A$ is dense, for every $x\in\mathbb{R}$ there is a sequence in $\mathbb{R}\setminus A$ that converges to $x$. Then maybe we could define $F(x)$ as
$$\lim_{n\to\infty}f(x_n).$$
I am lost.

REPLY [2 votes]: Define $F(x)=f(x\bmod 1)$ where $x\bmod 1$ is the unique element of $(x+\Bbb Z)\cap [0,1)$. Then $F(x)\ne f(x)$ only if at least one of the numbers $x+n$, $n\in \Bbb Z$ is in $A$.
Hence 
$$\{\,x\in\Bbb R\mid F(x)\ne f(x)\,\}\subseteq \bigcup_{n\in\Bbb Z}(A+n) $$
As $A$ is a nullset, so is the countable union of translated copies of it.