Let $M$ be a compact Riemannian manifold and $\Sigma\subset M$ a closed submanifold. Given $x\in M$ we define the *distance function to* $\Sigma$ by $$d\_\Sigma(x):=\inf\{d(x,y):y\in \Sigma\},$$ where $d$ is the metric on $M$. Of course, in a small tubular neighborhood of $\Sigma$ the function $d\_\Sigma$ will be smooth. Rather, my questions have to do with *global* properties of $d\_\Sigma$. 


Since $\Sigma$ is a closed subset of $M$, it is not hard to prove, using the triangle inequality, that $d\_\Sigma$ is a Lipschitz-continuous function with respect to the metric $d$, with Lipschitz constant $1$. In fact, $d\_\Sigma \in W^{1,\infty}(M)$ (see Section 5.8 in Evans' PDE book) and it is differentiable a.e. on $M$ by Rademacher's Theorem.


My first question is the following:


1. If $M=\mathbb{R}^n$ then $d\_\Sigma$ is a solution to the Eikonal equation, i.e. $\|\nabla d\_\Sigma\|=1$ a.e. Is this also true for a general manifold $M$?


My second question is related to the behavior of $d\_\Sigma$ when we vary the set $\Sigma$. 


Suppose $\Sigma\_t$ are closed submanifolds of $M$ that vary continously in the Hausdorff distance $d\_H$, with respect to $t$. Remember that $d\_H$ is a metric in the set of compact subsets of $M$. In particular we have the triangle inequality $$d(x,\Sigma\_t)\leq d(x,\Sigma\_s) + d\_H(\Sigma\_s,\Sigma\_t).$$ This implies that the functions $d(\cdot,\Sigma\_t)$ form a continuous curve in $L^\infty(M)$.


2. Is it also true that $d(\cdot,\Sigma\_t)$ is a continuous curve in $W^{1,\infty}(M)$? i.e. does it's gradients vary continuously? If not, would it be continuous (perhaps under extra assumptions) in a less regular $L^p$-norm, e.g. $W^{1,2}(M)$?



Distance function to a submanifold
*I'm posting this sketch just for the sake of completeness. This question was already marked as answered by Anton. But I thought of this, more geometrical, argument after the discussion that answered the question in the first time. Notice that the fact that the $\Sigma$ are assumed to be submanifolds is of no relevance to this questions, the important feature is that they are compact subsets of $M$. Hence I will substitute $\Sigma$ and $\Sigma\_n$ by $K$ and $K\_n$ in what follows.* 


One important observation is the following:



> 
> **Assertion** If $d\_K$ is differentiable at a point $x\in M$, then there exists a unique geodesic $\gamma$ starting at $x$ that minimize the distance to $K$.
> 
> 
> 


To see this, observe that we can always find at least one such geodesic by compacity. Along one of such geodesics the distance to $K$ decreases linearly with time (otherwise it would contradict the fact that is minimizing), then we can differentiate along it, in particular in $t=0$ to obtain $$\gamma'(0)\cdot \nabla d\_K(x) = -1.$$ But $\|\gamma'(0)\|=1$ (because is geodesic) and $\|\nabla d\_K(x)\|\leq 1$ (because of the Lipschitz bound). This implies $\gamma'(0)=- \nabla d\_K(x)$, therefore $\gamma$ is unique and also $\|\nabla d\_K(x)\|= 1$. 


This answers **Question 1**: The function is always a solution to the Eikonal equation.


Next, suppose we have a sequence of compact sets $K\_n$ converging to $K$ in the Hausdorff distance. As Anton pointed out in his answer, since the gradients of the functions $d\_{K\_n}$ are all bounded, we can obtain convergence in $L^p$, for high $p$, from a weaker form of convergence. In particular, by Lebesgue $L^p$-dominated convergence, it is enough to prove pointwise convergence almost everywhere.


In almost every point, all the functions $d\_{K\_n}$ and $d\_K$ are differentiable. By the **Assertion** above we have a *unique* minimizing geodesic $\gamma\_n$ and $\gamma$ for each one, respectively. If $\gamma\_n \nrightarrow \gamma$ we would find another geodesic minimizing the distance to $K$, contradicting the uniqueness. Then the geodesics converge, and therefore they velocities at $x$ too, i.e. the gradients of the functions $d\_{K\_n}$.


This answers **Question 2** for every $1\leq p<\infty$. The case $p=\infty$, does not hold, as Anton pointed out, even for distance functions to points in $\mathbb R$.


