# distance between a convex set and a point

Let's look at the following famous theorem:

Let $\mathcal H$ be a Hilbert space and let $C< \mathcal H$ be a (proper) closed CONVEX set. If $x_0\in\mathcal H\setminus C$ and $\eta:=d(x_0, C)=\displaystyle\inf_{c\in C}\left\lVert x_0- c\right\rVert$, then there exists a unique pont $\hat c\in C$ such that $\eta=\left\lVert x_0- \hat c\right\rVert$. (The norm is induced by the doct product in $\mathcal H$)

In the proof of the existence of such point $\hat c$ is used the fact that $C$ is convex.

I'd like an example such that $C$ is not convex and the point $\hat c$ doesn't exist, but I have problems to find it.

This example clearly can't be found in a finite dimensional Hilbert space because in this case we can drop the hypotesis of convexity.

Let $\mathcal{H}=\ell^2$ and define $x_i\in\ell^2$ by $$x_i(n) = \begin{cases} 1+\frac{1}{n+1} & n=i \\ 0 & n\neq i\end{cases}.$$ Now consider $C = \{x_i|i\in\mathbb{N}\}$, which is not convex, but is closed as it is discrete.
Finally take $0\in\mathcal{H}\backslash C$ and note that $$\inf_{c\in C}\|0-c\| = \inf_{i\in\mathbb{N}}\|x_i\| = \inf_{i\in\mathbb{N}} \left(1+\frac{1}{i+1}\right)=1.$$ It should be clear that this infimum is never reached.