Let $M$ be a connected smooth manifold and $f \in C^\infty(M)$ such that $0$ is a regular value of $f$. Moreover, suppose that $f^{-1}(0)$ is connected. Is it true that $M \setminus f^{-1}(0)$ has exactly two connected components?


As $0$ is a regular value of $f$, we know that $f^{-1}(-\infty,0]$ and $f^{-1}[0,+\infty)$ are both regular domains, but I am not sure if my assumptions are sufficient.



Connected manifold without connected regular level set admits exactly two connected components
Since $M$ is connected and a manifold, it is path-connected. Thus, any two points $x,y \in M$ such that $f(x), f(y) > 0$ can be joined by a path $\gamma$. Suppose $\gamma$ does not lie entirely in $f^{-1}(0,\infty)$.


Then let $p = \text{inf}\{ t \in [0,1] : f(\gamma(t)) \leq 0\}$ and $q = \text{sup}\{ t \in [0,1] : f(\gamma(t)) \leq 0\}$. Then $p, q \in f^{-1}(0) = N$, and since $N$ is path-connected, we can join $p$ and $q$ by a path $\ell$ in $N$. As $f \circ \gamma$ takes positive values on $[0,p) \cup (q,1]$, first running through $\gamma\_{[0,p]}$, then through $\ell$, and finally through $\gamma\_{[q,1]}$ produces a path from $x$ to $y$ entirely contained in $f^{-1}[0,\infty)$. Using a tubular neighbourhood of $N$ in $M$, we can homotope this path so that it lies in $f^{-1}(0,\infty)$.


Thus, in any case, $x,y$ can be joined by a path in $f^{-1}(0,\infty)$, so this subset of $M$ is path-connected. The same is true for $f^{-1}(-\infty,0)$.


