TITLE: Can the level set of a critical value be a regular submanifold?
QUESTION [10 upvotes]: I know that there is a theorem that a non-empty level set of a regular value of a smooth function $f:M\rightarrow\mathbb{R}$ on a smooth manifold is a regular submanifold (or embedded submanifold) of codimension 1.
Now I wonder if there is also a condition in which the converse holds true. I mean suppose $c\in\mathbb{R}$ is a critical value of $f$ is there a condition under which you know the level set of $c$ is not a regular submanifold. 
If $g:M\rightarrow\mathbb{R}$ is defined by mapping all of $M$ to $0$ then it seems to me that $0$ is a critical value of $g$. Now $g^{-1}(0)=M$ so definitely a regular submanifold of $M$. So I know that it is at least not true without an extra condition. 
Also if the function is second degree polynomial from $\mathbb{R}$ to $\mathbb{R}$ then the level set of a critical value is just a point which would again be a regular submanifold. 
If there is no such general condition on the function $f$ or the critical value then how in general does one go about showing that a critical level set is or is not a regular submanifold?
Thanks in advance

REPLY [12 votes]: Suppose that $0$ is a regular value of $f$. Then $0$ is a critical value of $g=f^2$, yet the level set $g^{-1}(0)$ is a regular submanifold. In this case all the points on $g^{-1}(0)$ are critical points of $g$.
The general answer is difficult.     You need to assume something about $f$. A natural assumption would be that the critical points of $f$ are isolated and of finite type. Near such points one can find local coordinates  so that in these coordinate $f$  looks like a polynomial.  (This is  a generalization of the classical Morse lemma due to Tougeron.)    In such cases  you need to understand   the zero sets  of real polynomials which can be challenging. A nice place to consult for such issues is the book by Arnold, Gussein-Zade and Varchenko on   singularities of differentiable mappings.