It is a fundamental result (e.g. Thm 3.20 in Banyaga-Hurtubise) in Morse Theory that if a smooth function $f:M\to \mathbb{R}$ on a smooth manifold has no critical points on $f^{-1}([a,b])$, then the sets $f^{-1}((-\infty,x])$ are all diffeomorphic (for $x\in [a,b]$). (Provided some compactness assumptions hold). But I'm having trouble understanding why this doesn't break down when $M$ has a boundary and I'd greatly appreciate help.
For instance, consider the standard "height function" $f$ on the "standing torus", which has 4 critical points, say with $f$-values $0,1,2,3$. Remove a small open-disk neighbourhood of the critical point $p$ with $f$-value $1$, obtaining a 2-manifold $M$ whose boundary is a circle, and with only 3 critical points. Then $f^{-1}([0.5, 1.5])$ has no critical points and is compact. Nevertheless $f^{-1}((-\infty,0.5])$ is a closed disk while $f^{-1}((-\infty, 1.5])$ is a cylinder with a disk removed (in particular, its boundary has 3 connected components). So they are not diffeomorphic.
Where is my reasoning failing? Thank you for your help!
According to Morris W. Hirsh Differential Topology, the theorem states that if $f:M\to [a,b]$ has no critical point with $M$ a compact $\partial$-manifold, then the level surfaces are diffeomorphic. But the hypothesis $$f(\partial M)=\{a,b\}$$ is required. Do you have a less restrictive theorem, because your counter example doesn't verify this hypothesis?
Edit: I looked at the proof of Hirsh and it is not obvious where he uses his assumption. The classical idea of the proof is to take the flow of the vector field $$X(x)=\frac{\nabla f(x)}{\Vert \nabla f(x)\Vert^2}.$$
But in your case, there will exist points $x$ in the boundary of $M$ such that $X(x)$ will point "out" of the manifold (in the direction of the center of the disk you deleted), and the flow wont be defined for positive time at this point.