$(M,g)$ is a Riemannian manifold and $N$ is a submanifold of $M$, then is the function $r(x)=\mathop {\min }\limits_{y \in N} d(x,y)$ smooth near $N$? ($d(x,y)$ is the distance function induced by Riemannian metric $g$ )
I think a possible proof may involve the tubular neighborhood of $N$, that is, the normal bundle of $N$ is diffeomorphic to a neighborhood of $N$ in $M$. But I am not sure how to prove that $r(x)$ is equal to the length of the normal vector $v$ where exp$(y,v)=x$ for some $y$ in $N$.
Note: Here we say $r(x)$ is smooth "near" $N$ means that $r(x)$ is smooth on $U-N$ where $U$ is a neighborhood of $N$. For example, when $M$ is $\mathbb R$, $N$ is $\{0\}$, the function $\left| x \right|$ is smooth near $0$.