I apologize in advance if this question is well-known. I would like to know an explicit example of a compact, connected manifold $M$ and a smooth function $f: M \to\mathbb{R}$ which satisfy the following properties (1)-(3):
(1) We denote by m the minimum value of $f$. Then there is an unique point $p$ on $M$ such that $f(p)=m$.
(2) By (1), $p$ is a critical point of $f$. We assume that $p$ is an isolated critical point. But we also assume that $p$ is a degenerate critical point.
(3) Let $c$ be a real number which is slightly bigger than $m$. Then the level set $f^{-1}(c)$ is not homeomorphic to a sphere.
Note: If $p$ is a non-degenerate critical point, then Morse lemma shows that $f^{-1}(c)$ is a sphere.
Another question: If a function $f: M \to \mathbb{R}$ satisfies the above (1) and (2), then can we conclude that $f^{-1}(c)$ is a homological sphere?