Consider a smooth map $f:M\rightarrow N$ between smooth manifolds.


Ehresmann's theorem states that if $f$ is a proper submersion, then it is locally trivializable; in particular, this implies that nearby fibers are homeomorphic. If we weaken the condition of properness, we can still say something of the sort near a compact component of a fiber. For any $x\in M$, let $F\_x$ denote the connected component of $f^{-1}\!\big(f(x)\big)$ containing $x$. Then the proof of Ehresmann's theorem can be adapted to show the following: If $f$ is a submersion and $F\_x$ is compact, then there is an open set $V\ni f(x)$ and a local trivialization $V\times F\_x\rightarrow M$. In particular, this implies that there is an open set $U\ni x$ such that $F\_y$ is compact for all $y\in U$. This can be phrased succinctly by saying that "compactness of fiber components is an open condition" for any submersion $f$. The proof that I have in mind very much relies on $f$ being a submersion, but I have had trouble thinking of an example of any $f$ lacking this property (namely, that compactness of fiber components is an open condition). As such, I am seeking an example of such an $f$ (or if I am wrong in my guess that one might exist, an explanation of non-existence).



When is compactness of fiber components an open condition?
Let $f:X\rightarrow Y$ be a continuous map between locally compact Hausdorff spaces. For $x\in X$ denote by $A\_x:=f^{-1}(f(x))$ the fiber over $f(x)$ and by $C\_x$ the connected component of $A\_x$ containing $x$.


Assume that $C\_{x}$ is compact for some given $x\in X$.


**Claim**: there is an open neighborhood $V\subset X$ of $x$ such that $C\_z$ is compact for all $z\in V$.


Proof of Claim: By applying the Lemma below with $C:=C\_x$ and $A:=A\_x$, we find a compact open neighborhood $N$ of $C\_x$ in $A\_x$. Since $N$ is compact and $A\_x\setminus N$ is closed, there is a relatively compact, open neighborhood $U\subset X$ of $N$ whose closure does not meet $A\_x\setminus N$.
Its boundary $\partial U$ is mapped by $f$ to a compact set in the complement of $f(x)$. Pick $W\subset Y$ open containing $f(x)$ and disjoint from $f(\partial U)$. Let $V:=U\cap f^{-1}(W)$.


If $z\in V$, then $z\in U$ but its connected component $C\_z$ of the fiber $A\_z$ never touches $\partial U$, since $\partial U$ maps to the complement of $W$, while $f(z)\in W$. Thus $C\_z$ is compact as closed subset of $\overline{U}$.


**Lemma**: Let $C$ be a compact connected component of a locally compact Hausdorff topological space $A$. Then $C$ has an open neighborhood $N$ which is compact.


Proof of Lemma: $C$ admits a relatively compact open neighborhood $B\subset A$. Then $C$ is also a connected component of the compact Hausdorff space $\overline{B}$; thus $C$ is also a quasicomponent of $\overline{B}$.
Therefore, for each $b\in \partial B$, there exists a closed and open subset $U\_b$ of $\overline{B}$ in the complement of $b$, which contains $C$. The complements of the $U\_b$'s form an open cover of the compact set $\partial B$.
We can pick a finite subcover corresponding to $b\_1,\ldots b\_k$ and conclude that $N:=U\_{b\_1}\cap\ldots\cap U\_{b\_k}$ is an open and closed subset of $\overline{B}$ with $N\cap \partial B=\emptyset$ (if $\partial B=\emptyset$, then we set $N:=B$). It follows that $N$ is open in $B$ (and thus in $A$) and also compact.


