Let $\mathcal{C} \subset \mathbb{R}^n$ be a closed set and let $E$ be the set of points in $\mathbb{R}^n$ for which there is not a unique closest element of $\mathcal{C}$. That is, if $x \in E$, then there exist $c_1,c_2 \in \mathcal{C}$ such that $c_1 \neq c_2$ and $$ d(x,\mathcal{C})=d(x,c_1)=d(x,c_2), $$ where $d(\cdot, \cdot)$ denotes the usual Euclidean distance function. Does $E$ have Lebesgue measure $0$?
If this is not true in general, is it true if I also assume that $\mathcal{C}$ is a real semi-algebraic set (i.e. $\mathcal{C}$ is the real solution set to a system of polynomial equalities and inequalities)?
Ideally I'd like a reference if $E$ does have Lebesgue measure zero in either case, but would still greatly appreciate any input.
I am thinking that the distance function should not be differential at elements of $E$. On the other hand, I recall reading somewhere that the distance function $d(\cdot, \mathcal{C})$ is almost everywhere differentiable when $\mathcal{C}$ is a (perhaps nice enough) closed set.
I eventually found the answer to this question. Corollary 18 in "The number of singular vector tuples and uniqueness of best rank one approximation of tensors" by S. Friedland and G. Ottaviani proves that almost every point has a unique best approximation. That is, the set $E$ in my question does have measure zero.
A later paper of S. Friedland and M. Stawiska gives a more detailed answer in the semialgebraic setting. In their paper "Some approximation problems in semi-algebraic geometry," Theorem 3.7 shows that if $\mathcal{C}$ is a closed real semi-algebraic set then $E$ is a nowhere dense real semi-algebraic set, hence $E$ is contained in a hypersurface of $\mathbb{R}^n$ (which is even stronger than measure zero).