The minimizer of a bounded continuous function over a closed set lies within the set? Let K be a closed subset of a Hilbert space X. I was trying to prove that the infimum of the distance between K and any point x in X 
$$\inf_{y \in K} ||x-y||$$
is achieved by a point in K itself. The proof in Conway's functional analysis requires K to be convex. However, if we use the hypothesis that the minimizer of a bounded continuous function over a closed set lies within the set, then the proof becomes straightforward.
I was wondering if the hypothesis is true.
 A: First, it is not necessarily true that a bounded continuous function on a closed set has a minimizer in the set.  As in my comment, consider the function $f(x)=e^{-x^2}$ defined on the real line.  This function is bounded and continuous, but never achieves its infimum of $0$.  
Now it is true in finite dimensional spaces that a continuous function on a closed and bounded set attains its minimum.  This is because bounded and closed sets are compact.  But this is not true in an infinite-dimensional Hilbert space.  Let $\ell^2$ be the Hilbert space of square-summable sequences.  Consider the unit sphere
$$
S = \{v\in \ell^2; \|v\|_{\ell^2} = 1\}.
$$
It is closed and bounded, but not compact.  Indeed, if we let $e_1, e_2,\cdots$ be an orthonormal basis for $\ell^2$, then $\|e_i-e_j\|_{\ell^2} = \sqrt{2}$ for each $i\not= j$, so the set $\{e_i\}_{i=1}^\infty$ has no limit point.  
We can take advantage of this to construct a function $f:\ell^2\to\mathbb{R}$ that is continuous and bounded but does not attain its minimum on $S$.  Indeed, define
$$
f(v) = \sum_{i=1}^\infty \frac{|v_i|^2}{i}. 
$$
Here we used the notation $v_i$ to mean the $i$-th element of the square-summable sequence $v$.  Observe that for $v\in S$, $0<f(v)\leq 1$.  Moreover the infimum is zero, since $f(e_i) = 1/i$ tends to zero as $i\to\infty$.
So what you're seeing in Conway's proof that requires $K$ to be convex is actually a common feature in these minimizing problems.  Often when you're looking for a minimizer, your first hope is that there is compactness.  In the absence of compactness, convexity or a variant of convexity can recover existence.  (Notice that in the example I used above, the sphere $S$ is not a convex set.)  
