continuity in $L_p$ norm I was reading a textbook on Sobolev space and encountered the following claim:
Suppose $f\in L_p([0,1])$ for some $1\leq p<\infty$, meaning that $\int_0^1{|f(x)|^p dx}<\infty$. Then
$$
\lim_{h\to 0} \int_{|h|}^{1-|h|}\big|f(x+h)-f(x)\big|^p dx = 0.
$$
Can anybody gives me a hint on how to prove this? It is obvious that the claim does not hold for $p=\infty$, though.
 A: The limit is clearly true if $f$ is continuous since then $f$ is uniformly continuous ($[0,1]$ is compact). The continuous functions are dense in $L^p$ for $1 \le p < \infty$ - this is a fact whose proof you can look up in an analysis book. 
The corresponding statement for $p=\infty$ would be that $||f(\cdot+h)-f(\cdot)||_{\infty,[h,1-h]} \to 0$ as $h \to 0^+$. But consider $f(x) = 1$ on $[0,.5]$ and $f(x) = 0$ on $(.5,1]$. Then $||f(\cdot+h)-f(\cdot)||_{\infty,[h,1-h]} = 1$ for all small $h$. 
A: Outline: it is easy to check that the set $\mathscr{F}$ of $f$ for which the result holds is closed under pointwise addition and multiplication using the triangle inequality. Another use of the triangle inequality shows that $\mathscr{F}$ is closed.
One can easily show using the triangle inequality and Dominated Convergence that indicator functions of intervals are in $\mathscr{F}$. Closedness then implies that indicator functions of measurable sets are in $\mathscr{F}$. Linearity implies that linear combinations of such functions are in $\mathscr{F}$, and these are dense in $L_p([0,1])$, so the result follows.
A: In the comments, @Jack said that it suffices to show that $\lim_{h\to 0} \int_{0}^{1}\big|f(x+h)-f(x)\big|^p dx = 0.$
In case someone doesn't know why, I want to explain a bit.
Suppose we have that $\lim_{h\to 0} \int_{0}^{1}\big|f(x+h)-f(x)\big|^p dx = 0.$ (Actually this is true)
Let $\varepsilon \gt 0.$ Then $\exists \,\delta\gt0$ s.t. $\lvert \int_{0}^{1}\big|f(x+h)-f(x)\big|^p dx\rvert\lt \varepsilon$ for all $h\in(-\delta,\delta).$
Then we have that, $$\lvert \int_{\lvert h\rvert}^{1-\lvert h\rvert}\big|f(x+h)-f(x)\big|^p dx\rvert\le \lvert \int_{0}^{1}\big|f(x+h)-f(x)\big|^p dx\rvert\lt \varepsilon\text{ for all }h\in(-\delta,\delta)$$ because the integrand is nonnegative.
That's $$\lvert \int_{\lvert h\rvert}^{1-\lvert h\rvert}\big|f(x+h)-f(x)\big|^p dx\rvert\lt \varepsilon\text{ for all }h\in(-\delta,\delta)\,,$$
i.e. $$\lim_{h\to 0} \int_{|h|}^{1-|h|}\big|f(x+h)-f(x)\big|^p dx = 0.$$
