$\DeclareMathOperator\SL{SL}$Suppose $M$ is a Riemannian manifold with distance function $d:M\times M \rightarrow [0,\infty)$. If it helps let $M$ be a Lie group with finite Haar measure $\mu$ and left invariant metric (like $\SL(n,\mathbb Z)\backslash \SL(n,\mathbb R)$). Then for fixed $q$ the distance function $d(q,.)$ is smooth at a neighborhood of $q$ at points $p\neq q$.


But what can you say if the point $q$ is replaced by a set $V\subseteq M$. Are there any sufficient conditions on $V$ such that $d(V,.)$ is smooth? What about if $V$ is open? Can you establish smoothness at the boundary $\partial V$ if you look at $d(V,.)^2$ instead? Are there any estimates for the $(2,l)$-th sobolev norm for $d(V,.)$?


Thanks very much!



Sobolev norm of distance function on Riemannian manifold
You should definitely have a look at [this paper of Mantegazza-Mennucci](https://doi.org/10.1007/s00245-002-0736-4), which gives you quite a lot of information on how the regularity of the set $V$ influences the regularity of $d(V,\cdot)$ and $d(V,\cdot)^2$.


For example, in Proposition 4.2 they show that if $V$ is a $C^r$ submanifold of $M$ (of any dimension) with $r\geq 2$, then there exists an open set $\Omega\supset V$ such that $d(V,\cdot)$ is $C^r$ in $\Omega\backslash V$ and $d(V,\cdot)^2$ is $C^r$ in $\Omega$.


This paper also contains many useful references, like [this one](http://dx.doi.org/10.1006/jfan.1994.1086), which also discusses Sobolev norms.


