If $f:M\to \Bbb R$ is smooth and $f^{-1}(0)$ is a compact regular level set, then each $t\in (-\epsilon,\epsilon)$ is a regular value of $f$ Let $M$ be a smooth manifold and $f:M\to \Bbb R$ a smooth function. Suppose $0\in \Bbb R$ is a regular value of $f$, so that $f^{-1}(0)$ is an embedded submanifold of $M$. Also suppose that $f^{-1}(0)$ is compact. My goal is to show that $t$ is a regular value of $f$ for sufficiently small $|t|$.
My attempt: For each point $p\in f^{-1}(0)$, $f$ is a submersion at $p$, so $f$ is a submersion in a neighborhood $U_p\subset M$ of $p$. Now $\{U_p\}_{p\in f^{-1}(0)}$ is an open cover of the compact set $f^{-1}(0)$, so there must exist finitely many points $p_1,\dots,p_n\in f^{-1}(0)$ so that $f^{-1}(0)\subset U_{p_1}\cup \cdots \cup U_{p_n}=:U$. Also $f$ is a submersion in $U$. I would be done if I can show that $U$ contains $f^{-1}(-\epsilon,\epsilon)$ for some $\epsilon>0$, but I can't show this. Should I need a different approach? Thanks in advance.
 A: The statement is false. Let $M$ be the real line. Take any smooth map $f: \mathbb{R} \to \mathbb{R}$ such that $f$ vanishes only at zero but $f(x)$ goes to zero when $x$ goes to the infinity. Assume there exists a sequence $\{y_n\}$ such that $y_n \to \infty$ and $f'(y_n) = 0$. Then $f^{-1}(f(y_n))$ is not a regular fibre but $f(y_n)$ can be as close as we want to $0$. It is easy to construct such functions using smooth bump functions. Indeed, consider $f : \mathbb{R}^{\star} \to \mathbb{R}$ defined by
$$ f(x) = \frac{1}{\int_0^{x^2} \sin^2(2\pi y)\ dy}.$$
Then $f'(k) = 0$ for any $k \in \mathbb{Z}$ and $f > 0$ on $\mathbb{R}^{\star}$ and $f(x) \to 0$ when $|x| \to \infty$. Now, using a bump function, you can modify the function $f$ at the origin in such way $f(0) = 0$, $f$ is till positive outside the origin and $f'(0) = 1$ for instance.
If there exists a compact neighbourhood $K$ of $0$ such that $f^{-1}(K)$ is compact then all the values of $f$ in a small neighbourhood of $f$ have to be regular. Indeed, arguing by contradiction, assume there exist two sequences $\{x_n\}$ and $\{y_n\}$ such that $x_n$ tends towards $0$ and $f(y_n) = x_n$ and the Jacobian matrices $\mathrm{J}_f(y_n)$ have not full rank. We can assume that $x_n \in K$ and $\{y_n\}$ converges to some $y$ since $f^{-1}(K)$ is compact. By continuity, we should have $f(y) = 0$. Thus, $\mathrm{J}_f(y)$ has full rank, which is a contradiction.
In particular, the statement holds when $f$ is proper.
