TITLE: Show that the canonical inclusion $ L^\infty → L^1 $ is continuous but not compact. (a problem in real analysis)
QUESTION [5 upvotes]: Would you mind giving some hints (not the whole solution) to me?

Problem: Consider the space $ L^p = L^p(0, 1),$ with $ p ∈ [1, ∞].$ Show that the canonical inclusion
  $ L^\infty → L^1 $ 
  is continuous but not compact.
Is it possible to find $ p, q ∈ [1, ∞] $ with $p < q$ such that the inclusion $L^q \to L^p$ is compact?

REPLY [2 votes]: If a set $C$ is compact in $\mathbb L^p(0,1)$, then 
  $$\lim_{h\to 0}\sup_{f\in C}     \int_{(0,1)\cap (h,1-h) } \left\lvert f(x+h)-f(x)\right\rvert^p\mathrm dx=0.            $$
In order to disprove compactness, find for any $n$ a set $A_n$ such that 
$$ \int_{\left (0,1-2^{-n}\right)   } \left\lvert\mathbf 1_{A_n}  \left (x+2^{-n}  \right)-\mathbf 1_{A_n}(x)\right\rvert^p\mathrm dx\geqslant 1/2.$$
For example, choose $A_n$ as a union of $2^{n-1}$ intervals of length $2^{-n}$, with a gap of $2^{-n}$  between them.