Let $X$ be a Riemannian manifold*, and $S$ a compact submanifold of $X$.
Assume there exists an open, dense subset $Y$ of $\,X$, such that for any element $y \in Y$, there exists a unique element in $S$ closest to $y$; i.e there is a function $\tilde s:Y \to S$ such that $$ d(y,\tilde s(y))=d_S(y)=\inf\{d(s,y)|\, \,s \in S\},$$
and $\tilde s(y)$ is the only element in $S$ satisfying the above equality.
Question:
Let $x \in X$, and let $\tilde s \in S$ be a closest element to $x$ in $S$. (such an element exists by compactness of $S$).
Is it true that there exists a sequence $y_n \in Y$, $y_n \to x$, such that $\tilde s(y_n) \to \tilde s$?
Note that I do not assume $x$ has a unique closest point on $S$. (If this were true the question would become trivial; On any subset consisting of elements which have unique closest points, the "closest point mapping" $\tilde s$ is continuous).
*(Actually, one could ask the question in a more general setting when $X$ is a metric space, and $S$ is a subset of it, but I am not sure which "strange pathologies" can arise then)
Yes
$c(t)$ is a shortest geodesic from $c(0)=s_0\in S$ to $c(1)=x$ For some $0<t_0<1$ assume that $$d(c(t_0),S)=d(c(t_0),s_1) \leq d(c(0),c(t_0)),\ s_1\in S$$
Then $$ d(x,S)\geq d(c(t_0),x) + d(c(t_0),s_1) \geq d(x,S) $$
It is a contradiction So $s_1=s_0$ If $y_n\in Y$ goes to $ c(t_0)$, then by uniqueness of $s_1$ corresponded points in $S$ wrt $y_n$ goes to $c(0)$ When $t_0$ goes to $1$, then we have $y_n$ wrt $c(t_0)$ So we can take $y_n$ converging to $x$