Suppose that $S$ is a closed subset of $\Bbb R^n $ and that $x$ is a point of $S^c$.
Prove that there exists a $y_0$ in $ S$ such that $d(x,S)=\Vert x-y_0 \Vert $.
This is how I tried and I want some feedback on my proof.
(My proof)
Case1: Suppose $S$ is a finite set, say $S=\{ y_1, y_2, \cdots , y_n\}$ and let x be given.
Let $T=\{\Vert x-y_1 \Vert ,\Vert x-y_2\Vert , \cdots ,\Vert x-yn\Vert \}$ Since T is a finite set, T has the minimum m of T.
Denote $y_i$ such that $ m=\Vert x-y_i\Vert$ by $y_0$.
Then $d(x,S)=inf\{\Vert x-y_i\Vert\ : y_i \in S\} = \Vert x-y_0 \Vert $.
Case2: Suppose S is an infinite set and let $x$ be given.
Suppose to the contrary that there is no $y_0 \in S$ sucht that $d(x,S)=\Vert x-y_0 \Vert $.
Since $d(x,S)=inf\{\Vert x-y_i\Vert\ : y_i \in S\}$, we can choose $y_k \in S$ such that $d(x,S)\lt\Vert x-y_k \Vert\lt d(x,S)+\epsilon_k$.
Let $\epsilon_k=\frac1 k$ be given. Then $d(x,S)\lt\Vert x-y_k \Vert\lt d(x,S)+\frac1 k \le d(x,S)+1$
Since $\Vert x-y_k \Vert$ is bounded, $\Vert x-y_{k_j} \Vert$ is also bounded.
Then by the Bolzano Weierstrass Theorem, $\Vert x-y_{k_j} \Vert$ has a subsequence $\Vert x-y_{k_{j_l}} \Vert$ converging to $\Vert x-y' \Vert$.
Since $\Vert x-y_{k_{j_l}} \Vert$ is a subsequence of $\Vert x-y_k \Vert$, it follows that $\Vert x-y' \Vert$ is a cluster point of $\Vert x-y_k \Vert$, thus $\Vert x-y' \Vert$ $\neq$ $\Vert x-y_0 \Vert$.
I was about to derive contradiction in case 2, but now I finally realized that there is no guarantee that there is only one cluster point so I cannot proceed further. Please give some feedback on my proof!