Prove that if $f:\mathbb R \to \mathbb R$ is a measurable function and $f(x)=f(x+1)$ almost everywhere, then there exists a measurable function $g:\mathbb R \to \mathbb R$ with $f=g$ almost everywhere and $g(x)=g(x+1)$ for every $x \in \mathbb R$
I'm trying to prove this by construction. We know that $A= \{x \in \mathbb R :f(x) \not = f(x+1) \}$ is measurable and $m(A)=0$, so I thought $g$ should be something like:
$ g(x) = \left\{ \begin{array}{ll} f(x) & \mathrm{if\ } x \notin A \\ ?? & \mathrm{if\ } x \in A \end{array} \right.$
And this way,we would get that $f=g$ almost everywhere, and $g$ would be measurable... But using this I haven't been able to find a way to make $g(x)=g(x+1)$ for every $x \in \mathbb R$
Let $E = \{x| f(x) \not= f(x+1)$; this has measure zero. Now let $Q$ be the union of all integer translates of $E$; this also has measure zero. Now define $g(x) = f(x)$ for $x\in Q$ and $0$ otherwise.