I'm trying to prove the next:
If $C$ is a closed subset of a complete Riemannian manifold $M,$ then for each $p\in M,$ there is a point $p^{'}\in C$ that is as close to $p$ as possible.
So I'd like to prove that there is $p^{'}\in C$ such that $d(p,p^{'})=d(p,C):=\displaystyle\inf_{q\in C}d(p,q).$
I'm stuck proving this. If $C$ were bounded, the Hopf-Rinow theorem would imply the compactness of $C$ and we can get such point utilizing the sequence criteria of compactness.
However, $C$ only is closed. Then, since $(M,d)$ is metric space, then the distance from $p$ to $C$ is a continuous function. If we consider the boundary of $C,$ $d(p,C)$ attains a minimum in such set, but, what about the rest of $C?$
Is there another easier way to proof this?
Any kind of help is thanked in advanced
As suggested in the comment, one can consider the
$$ C_R = C\cap B_R(p).$$
For $R$ large enough, $C_R$ is nonempty. Since $M$ is complete, the Hopf-Rinow theorem implies that $B_R(p)$ (and thus $C_R$) is compact. Thus there is $p' \in C_R$ so that $$ d(p,p') = \inf_{s\in C_R} d(p,s).$$
Since $d(p, p')\le R$, we also have
$$ d(p,p') = \inf_{s\in C} d(p,s).$$