@TedShifrin Hi, always on my exercise. I have $f$ be a smooth real-valued function on an compact submanifold $M$ of $\Bbb{R}^n$. If $a<b$ and $f^{−1}([a, b])$ does not contain a critical point, then there exists a diffeomorphism of $M$ from $M^a$ to $M^b$.
We define $\nabla f$ by requiring $\langle \nabla_m f,v\rangle=df_m(u)$ for all $m\in M$ and all $u\in T_mM.$ the set of critical points of $f$ is closed