TITLE: Subspace of $C_0(\mathbb R)$ contained in $L^2(\mathbb R)$
QUESTION [6 upvotes]: Let $W$ be a closed subspace of $C_0(\mathbb R)$ which is continuously contained as also a closed subspace of $L^2(\mathbb R)$. That is, there are constants $c_1$, $c_2$ such that $c_1 \|f\|_\infty \leq \|f\|_2 \leq c_2 \|f\|_\infty$ for all $f\in W$. Must $W$ be finite dimensional? What if we replace $L^2$ with $L^p$ for $p\geq 1$?

REPLY [2 votes]: We consider $X:=[-\infty,+\infty]$ with the Borel $\sigma$-algebra for the topology 
given by the metric $d(x,y):=|\arctan x-\arctan y|$ and the measure given by 
$\mu([a,b])=\arctan b-\arctan a$. For a function in $W$ we put $\widetilde f(x)=f(x)$ for $x\in\mathbb R$ and $\widetilde f(-\infty)=\widetilde f(+\infty)=0$. We can check 
for simple function that $||f||_{L^2(X)}\leq ||f||_{L^2(\mathbb R)}$, and since 
Banach space are involved we can find constants $K_1$ and $K_2$ such that 
$K_1||f||_{\infty}\leq ||f||_{L^2(X)}\leq K_2||f||_{\infty}$ for all $f\in W$. 
Now we show a theorem of Grothendieck:

Theorem. Let $(X,\mathcal A,\mu)$ a finite measure space, $1<p<\infty$ and $W\subset L^{\infty}$ a closed subspace of $L^p$. Then $W$ is finite dimensional.
Lemma. the embedding $L^2\hookrightarrow L^p$ is continuous.

Indeed, it's clear for $p<2$ since $X$ has a finite measure, and for $p\geq 2$ we write 
$\int_X |f|^pd\mu\leq ||f||_{\infty}^{p-2}||f||_{L^2}^2\leq \frac 1{K_2}||f||_{L^2}^p$.
Let $(f_1,\ldots,f_n)$ an orthonormal family of elements of $W$. Let $B$ the unit ball 
for the Euclidian norm of $\mathbb R^n$ and for $c=(c_1,\ldots,c_n)$ we put 
$f_c(x):=\sum_{k=1}^nc_kf_k(x)\in W$. We can find a sequence $\{c^{(k)}\}$ dense in $B$ and for each $k$ $X_k\subset X$ such that $||f_{c^{(k)}}||_{\infty}=
\sup_{x\in X_k}|f_{c^{(n)}}(x)|$ and $\mu(X_k)=\mu(X)$. Put $X'=\bigcap_k X_k$, then $\mu(X')=\mu(X)$ and for all $x\in X'$, $|f_{c^{(k)}}(x)|\leq ||f_{c^{(k)}}||_{\infty}$. Since $||f_{c^{(k)}}||_{\infty} \leq \frac 1{K_1}||f_{c^{(k)}}||_{L^2}\leq \frac 1{K_1}$ we have for all $x\in X'$ and all $c\in B$: $|f_{c^{(k)}}(x)|\leq \frac 1{K_1}$ and since for a fixed $x$ the map $c\mapsto |f_{c}(x)|$ is continuous 
we have for all $x\in X'$: $|f_c(x)|\leq \frac 1{K_1}$. Now take 
$$c(x):=\begin{cases}
\frac 1{\sqrt{\sum_{k=1}^nf_k(x)^2}}(f_1(x),\ldots,f_n(x))&\mbox{ if }f_k(x)\neq 0\mbox{ for some }k\\\
0&\mbox{ otherwise}.
\end{cases}$$
Then we have $f_{c(x)}(x)^2=\sum_{j=1}^nf_j(x)^2\leq \frac 1{K_1^2}$ and integrating $n\leq \frac{\mu(X)}{K_1}$.