Let $M$ be a smooth manifold, $\pi : E \to M$ and $\pi' : E' \to M$ smooth vector bundles and $f : E \to E'$ a smooth bundle map, i.e. $\pi' \circ f = \pi$ and the restriction of $f$ to each fibre is a linear map $f_x : \pi^{-1}(\{x\}) \to \pi'^{-1}(\{x\})$ ($x \in M$).
In my lectures I have stumbled across the following statement which I do not see how to prove:
There is an open dense set $M_{\mathrm{reg}} \subseteq M$ such that for all $x \in M_{\mathrm{reg}}$ the function $x \mapsto \dim \mathrm{im}(f_x)$ is constant.
Do you have any suggestions on how to tackle this problem? Thanks in advance.
EDIT: this statement becomes true if one replaces "constant" with "locally constant". See below for a proof.
I believe that the claim is false:
Let $M$ be the real line, and both $E$ and $E'$ be the trivial line bundle over the real line.
Let $f(x, t) = (x, g(x)t)$, where $$ g(x) = \begin{cases} 0 & x \ge 0\\ \exp(-1/x^2) & x < 0 \end{cases} $$
Then $rank(f_x) = 1$ for $x < 0$, and $rank(f_x) = 0$ for $x \ge 0$.
This same kind of construction can be carried out on the circle if you want $M$ compact, but it's a bit messier.