Chebyshev sets in finite dimension are closed and convex Prove a finite-dimensional converse to the “best approximation theorem”:
Let $K$ be a subset of a finite-dimensional Hilbert space $H$ which
satisfies the following property: for each $x \in H$ there exists a unique
point $y \in K$ such that $d(x, y) = d(x, K)$ (sets with this property are
known as Chebyshev sets). Then the set $K$ is closed and convex.
It would useful to point why this result is for finite dimensional spaces only.
 A: Proof of closedness
Assume $K$ is Chebyshev, and choose $a\in K^c$.  There is then $b \in K$ such that $d(a,b) = d(a,K)$. In particular $a\not = b$ and so $d(a,K) > 0$. Thus $a$ is an interior point of $K^c$. Since $a$ was arbitrary, $K^c$ is open and thus $K$ is closed.
Proof of convexity
In what follows, let $p: H \to H$ be the map to the unique closest point in $K$, well-defined since $K$ is Chebyshev.  We first establish that $p$ is continuous.
Let $\{a_i\}_{i\geq 1}$ be a sequence in $H$ converging to $a$, with $b_i:= p(a_i)$ and $b:= p(a)$.  Let $\epsilon >0$. By perhaps removing a finite number of points and relabeling, we may assume $a_i \in B_\epsilon(a)$ for every $i\geq 1$. By the triangle inequality,
\begin{align*}
d(a,b_i) &\leq d(a,a_i) + d(a_i,b_i) \\
 &< d(a_i, b_i) + \epsilon \\
 &\leq d(a_i, b) + \epsilon \\
 &\leq d(a_i, a) + d(a,b) + \epsilon \\
 &< d(a,b) + 2\epsilon
\end{align*}
This establishes that all the $b_i$ are contained in a suitably large ball around $a$.  The intersection of $K$ with this (closed) ball is compact and has the Bolzano-Weierstrass property (this would not be true if $H$ were not finite-dimensional).  Therefore, passing to a subsequence and relabeling if necessary, we may say that $b_i \to c$ for some $c \in K$.
By continuity of the distance function, it follows that $d(a,c) = d(a,b)$.  By the Chebyshev property it must be that $c = b$ and so $p$ is continuous.
Next, assume for a contradiction that $K$ is not convex.  There are $x,y\in K$ such that the line segment between them contains points not in $K$.  Without loss of generality we may assume there are no points of $K$ directly between $x$ and $y$ (by choosing one component of the intersection of $K^c$ and this line segment).
Let $z := (x+y)/2$.  By choice of $x,y$, we have $z\in K^c$. Note that $p(z)$ is not collinear with $\{x,y,z\}$. We get an easy contradiction if $H$ is $1$-dimensional, so from here on we assume without loss of generality that $n \geq 2$. In what follows we will also explicitly equate $H = \mathbb{R}^n$, since all finite-dimensional Hilbert spaces are isometric to Euclidean space (and the proof is only about geometric properties). The Euclidean coordinate notation will be somewhat more compact. To that end, after a simplifying coordinate transformation,
\begin{align*}
z &= e_1 = ( 1,0,\ldots,0) &\\
p(z) &= \vec{0} = ( 0,\ldots,0 ) &\\
x &= ( 1+x_1,x_2,0,\ldots,0) & (x_2 \not = 0)\\
y &= (1-x_1,-x_2,0,\ldots,0 ) &
\end{align*}
This transformation is possible since $x$ and $y$ are equidistant from $z$ and not in the affine span of $z$ and $p(z)$.
Let $A\subseteq \mathbb{R}^n$ be the set of all points at least as close to $x$ or $y$ as to $p(z)$:
$$A := \left\{w\in \mathbb{R}^n: d(w,\vec{0}) \geq \min\{d(w, x), d(w,y)\} \right\}.$$
Since $x,y\in K$, clearly $p^{-1}(\vec{0}) \cap A = \varnothing$.  Geometrically, the set $A$ is the union of two closed half-spaces bounded by hyperplanes.  The intersection of these hyperplanes is an affine subspace of codimension 2, parallel to all coordinate axes except the first two.  It's an elementary geometry problem to find the first two coordinates $(m_1,m_2)$ where these hyperplanes intersect, and then verify that the half space $\{(w_1,\ldots)\in \mathbb{R}^n: w_1\geq m_1\}$ is contained in $A$ (and hence disjoint with $p^{-1}(\vec{0})$). In simplest terms, it is guaranteed $p(w) \not = \vec{0}$ if the first coordinate of $w$ is sufficiently large.
To outline the remainder of the proof, we will derive a contradiction by first starting from a point $v\in p^{-1}(\vec{0})$, and then noticing that we may find another point in a neighborhood of $v$ that also maps to the origin under $p$ but has a larger first coordinate.  Proceeding in this way, successive points are chosen so that their first coordinates increase to a limit if and only if the points themselves form a convergent sequence, in which case by continuity of $p$ the limit of such a sequence must also map to the origin under $p$, and we may repeat the argument, again finding a point with still higher first coordinate.  In particular this shows $p^{-1}(\vec{0})$ has points with arbitrarily high first coordinate, which contradicts the conclusion of the previous paragraph.  The details of actually finding these successive points are quite technical, and constitute the remainder of the proof.
Consider the overlap of $p^{-1}(\vec{0})$ with a certain cone:
$$C := \left\{(w_1,\ldots,w_n)\in H: w_1 - 1 \geq \sum_{i=2}^n w_i^2 \right\}$$
Since $z = (1,0,\ldots,0)\in C$ (the vertex of the cone), we know $C \cap p^{-1}(\vec{0}) \not = \varnothing$.  Choose $v = (v_1,\ldots,v_n) \in C\cap p^{-1}(\vec{0})$. By the Chebyshev property $\overline{B_{|v|}(v)}\cap K = \{\vec{0}\}$.
For any $\epsilon > 0$, consider the (hyper) spherical cap $S_\epsilon(v)$ with polar angle $\pi/4$ and radius $\epsilon$, centered at $v$:
$$S_\epsilon(v) := \left\{w\in \mathbb{R}^n: d(w,v) = \epsilon, \, w_1 \geq v_1 + \frac{\epsilon}{\sqrt{2}}\right\}$$
Let $S_\epsilon^B(v)$ be the boundary of this spherical cap (45 degrees north line of latitude):
$$S_\epsilon^B(v) := \left\{w\in \mathbb{R}^n: d(w,v) = \epsilon, \, w_1 = v_1 + \frac{\epsilon}{\sqrt{2}}\right\}
$$
Fix $\epsilon_0 > 0$, choose $s\in S_{\epsilon_0}^B(v)$ and consider that $p(s)$ must be contained in the set $\overline{B_{|s|}(s)} \setminus B_{|v|}(v)$, simply because $B_{|v|}(v)$ contains no points of $K$, while $\overline{B_{|s|}(s)}$ contains $\vec{0}$ and $d(s,p(s)) \leq d(s,\vec{0})$.  The boundaries of these two balls intersect in an $(n-2)$-dimensional sphere $N_{s,v}$:
$$N_{s,v} := \left\{w\in \mathbb{R}^n: d(w,v) = |v|, d(w,s) = |s| \right\}$$
Crucially, the set $N_{s,v}$ depends only on the direction of the vector $s-v$, and not $\epsilon_0$.  Thus we can meaningfully talk about $N_{s,v}$ while shrinking $\epsilon_0$.  We should also point out that the intersection set $N_{s,v}$ is also not degenerate; both spheres touch $\vec{0}$ while $v$ and $s$ are not parallel ($v \in C$ makes an angle strictly less than $\pi/4$ with $e_1$, while $s - v$ makes an angle of exactly $\pi/4$ with $e_1$).
Let $\varphi_1: \mathbb{R}^n \to \mathbb{R}^{n-1}$ be the map omitting the first coordinate. We just mentioned $s-v$ is not parallel to $e_1$, which also implies that $\varphi_1(N_{s,v})$ is a non-degenerate ellipsoid intersecting $\varphi_1(\vec{0})$, oriented so that $\varphi_1(s-v)$ is the exterior normal vector to the ellipsoid at the origin. It's another geometry problem to show that given $\delta_s <1$ significantly small, the set $\varphi_1(B_{\delta_s}(\vec{0})\cap\overline{B_{|s|}(s)} \setminus B_{|v|}(v))$ (and hence $\varphi_1(p(s))$) is entirely exterior to this ellipsoid. By continuity of $p$, we may find $\epsilon_s$ small enough so that $p(s)\in B_{\delta_s}(\vec{0})$ (shrinking $\epsilon$ does not change the equation of this ellipse). The important detail for our purposes is that with $\epsilon_s>0$ so chosen, it's not possible for $\varphi_1(p(s))$ to be the exact opposite direction as $\varphi_1(s-v)$.
This makes sense intuitively; loosely speaking, moving away from $K$ in a certain direction can't make the closest neighbor of $K$ move in the opposite direction (when projected onto the last $n-1$ coordinates).
Now choose $\epsilon_s$ in a similar fashion for every $s \in S_\epsilon^B(v)$. The shape of $\varphi_1(N_{s,v})$ depends continuously on the angle between $s$ and $v$; by sensible choice of each $\delta_s$, we may ensure $\epsilon_s$ varies continuously with $s$ as well.  As $S_\epsilon^B(v)$ is compact, therefore $\epsilon := \min\{\epsilon_s: s\in S^B_\epsilon(v)\} > 0$.
With $\epsilon$ so chosen, we wish to show there is some $t\in S_\epsilon(v)$ (note the absence of the $B$) with $p(t) = \vec{0}$.  If this is true for some $t\in S_\epsilon^B(v)\subseteq S_\epsilon(v)$ then we're already done.  Otherwise, recall (by finding $\epsilon$) we established for all $s\in S_\epsilon^B(v)$ that $\varphi_1(p(s))$ is not a negative scalar multiple of $\varphi_1(s-v)$.  This means that $\varphi_1(S_\epsilon^B(v))$ is straight-line homotopic to the identity map of an $(n-2)$-sphere in $\mathbb{R}^{n-1}\setminus \{\vec{0}\}$.  This is not stated precisely; we really mean the composition $\varphi_1\circ f$ is homotopic to the identity, where $f:\mathbb{S}^{n-2} \to \mathbb{R}^n$ is the natural map whose image is $S_\epsilon^B(v)$.
Thus the extension of the map $\varphi_1 \circ f$ to the unit ball must have $\vec{0}$ in its image (see here for a short proof).  There is a point $q\in S_\epsilon(v)$ with $\varphi_1(p(q)) = \vec{0}\in \mathbb{R}^{n-1}$.  This means $p(q)$ is zero in every coordinate except possibly the first.  It's obvious the first coordinate can't be negative.  We also chose $\epsilon$ so that $p(q)$ must be within a unit ball of the origin (each $\delta_s$ was less than 1), and therefore the first coordinate can't be positive or it would contradict $p(z) = \vec{0}$.  Therefore $p(q) = \vec{0}$.
By construction, every point of $S_\epsilon(v)$ has larger first coordinate than $v$, in particular $q$, so we have found a point with larger first coordinate which still maps to zero. Note also that $q\in C$ since $v\in C$ and $q$ was in a spherical cap contained in $C$, hence we can replace $q$ with $v$ and repeat the process of finding $q$. The shape of the spherical cap also means any sequence of points in $p^{-1}(\vec{0})$ so generated will converge if and only the sequence of first coordinates converge, allowing us to use continuity of $p$ to bypass limits as we previously outlined.
We've shown $p^{-1}(\vec{0})$ has points with arbitrarily high first coordinate, which is enough to establish a contradiction to the earlier observation that $p^{-1}(\vec{0})$ was bounded in first coordinate.  The assumption that $K$ was not convex is therefore false.
