Suppose $f:\mathbb{R} \to \mathbb{R}$ has the property that for every fixed $t\in\mathbb{R}$ the function 
$$
 g\_t : x \mapsto f(x) - f(x-t)
$$
is $C^\infty(\mathbb{R})$. Does it follow that $f$ is smooth?


Edit: The answer is no in generality (see answer below), but what if we impose the condition that $f$ is measurable?


You can translate this as a question in group cohomology: The map $t \mapsto g\_t$ is a $1$-cocycle (not assumed continuous) for $\mathbb{R}$ with values in the $\mathbb{R}$-module $C^\infty(\mathbb{R})$ (with translation). Is the cohomology group $H^1(\mathbb{R}; C^\infty(\mathbb{R}))$ trivial? 


(The question is motivated by a technical point relating to distributions on groupoids, which I won't go into here.)



Non-smooth function with all differences of translates smooth?
Here's a solution for $f\in L^1\_{\mathrm{loc}}$, or even for $f$ a distribution, which avoids Fourier analysis by mollifying.


Let $\phi \in C^\infty\_c(\mathbf{R})$ be a smooth bump function of total mass $1$. Define $\tilde{f} := \phi \* f$. Then $f\in C^\infty(\mathbb{R})$. Moreover, 
$$
 (f-\tilde{f})(x) = \int (f(x) - f(x-t))\phi(t)dt = \int g\_t(x)dt.
$$
So we're done if we can prove that that last integral is convergent in $C^\infty(\mathbb{R})$. Note that a priori it is only convergent as a distribution.


Here's one way to take care of that last logical point. A Baire category argument shows that for any $k\in\mathbb{N}$, there is some non-empty interval $[a,b]$ such that the $C^k$-norms of $\{g\_t\}\_{t\in[a,b]}$ are bounded. By translation, this is true for any translate of $[a,b]$ as well, and thus for any compact interval. Arzela-Ascoli, implies that $\{g\_t\}\_{t\in[a,b]}$ is compact in $C^{k-1}(\mathbb{R})$. From this and the fact that $t\mapsto g\_t$ is weakly smooth, we can deduce that it is continuous in the $C^{k-1}$-topology, for all $k$.


