Distance between compact set and closed set in metric spaces

analysismetric-spaces

The accepted answer in

If $C \subset U$ is compact, $U$ open with compact closure in a metric space $M$, then there exist open $V$ st $C \subset V \subset \bar V \subset U$

states

Since $C$ is compact and $\partial U$ is closed, $d(C,\partial U)=d(x,y)$ for some $x\in C,\ y\in\partial U$. And since $C\subset U$ with $U$ open, we have
$$d_0=d(C,\partial U)=d(x,y)>0$$

But is this true for the infinite-dimensional case as well? For example (there are many related questions in the finite-dimensional setting) in the proof

$X, Y \subset \mathbb{R}^n$. Define $d(K, F) = \inf\{ d(x,y), x \in K, y \in F\}$, show that $d(a,b) = d(K,F)$ for some $a$, $b$

closed and bounded sets being compact is crucial.

Best Answer

You are right. In this case we can only find $x\in C$ for any $y\in\partial U$ such that $d(x,y)=d(C,y)$. For example, if we consider the space $\ell^2 (\mathbb{Z}_{\geq 0} )$ with $C=\{e_1 =(1,0,0,\dotsb )\} $ and $U=\{(x_1 ,x_2 ,\dotsb ,x_n ,\dotsb )\vert x_1 >0\} $, then $\partial U=\{(0,x_2 ,x_3 ,\dotsb )\} $ and let $e_i =(0,0,\dotsb ,0,1,0,\dotsb )$, we have $d(e_1 ,e_i )=\Vert e_i -e_1 \Vert\equiv\sqrt{2} $.