If $V\subset L^{p}(\mathbb{R})$ is closed, then the distance from $f$ to $V$ is the distance from $f$ to some point in $V$ This a qualifying exam question. Let $1<p<\infty$ and $V\subset L^p(\mathbb{R})$ be closed. Define
$$d(f,V) = \inf_{v\in V} \|f-v\|_p.$$
Prove there exists $v_0\in V$ such that $d(f,v)=\|f-v_0\|_p$. The hint is to consider a minimizing sequence $v_n$ and extract a weakly convergent subsequence.
Well, since $d(f,V)$ is the infimum of a set of numbers, can extract a sequence $v_n\in V$ such that $\|f-v_n\|_p$ converges to $d(f,V)$. However I am stuck at this point. Any help would be greatly appreciated.
 A: By definition of infimum, for all integer $n$, there exists a function $v_n\in V$ such that $$\tag{*}d(f,V)\leqslant \left\lVert f-v_n\right\rVert_p\lt d(f,V)+\frac 1n.$$ 
We use the following facts about weakly convergent sequences:


*

*In a reflexive Banach space, every bounded sequence admits a weakly convergent subsequence.

*For $1\lt p\lt +\infty$, $L^p(\mathbb R)$ is reflexive. 

*If $(w_k)_{k\geqslant 1}$ weakly converges in $L^p(\mathbb R)$ to some $w$, then $\lVert w\rVert_p\leqslant \liminf_{k\to +\infty}\lVert w_k\rVert_p$. 

*A convex set closed for the topology of the norm is also closed for the weak topology.


Observe that $\lVert v_n\rVert_p\leqslant \lVert f-v_n\rVert_p+\lVert f\rVert_p\leqslant d(f,V)+1+\lVert f\rVert_p$. By facts 1. and 2., we can extract a convergent subsequence, denoted $(v_{n_k})_{k\geqslant 1}$, which converges to some $v$. Let $w_k:=v_{n_k}-f$. Then $w_k\to v-f=:w$ weakly hence by 3. and (*), $\left\lVert v-f\right\rVert_p=d(f,V)$. By 4. and the fact that $v_{n_k}\in V$, we have $v\in V$.
