$\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!