Is "immersion by parts" on a union of submanifolds an immersion?

Let $M$ be a smooth manifold of dimension greater than $2$.

Suppose $H_1,H_2,\dots,H_k$ are disjoint embedded submanifolds of $M$. Suppose that $H_k$ is open and dense in $M$, and that $\cup_{i=1}^k H_i$ is also an open submanifold of $M$. Let $f:\cup_{i=1}^k H_i \to N$ be a smooth injective map. ($N$ is another smooth manifold).

Finally, assume $f|_{H_i}$ is an immersion for every $i$. Is it true that $f:\cup_{i=1}^k H_i \to N$ is an immersion?

The dimensions of the $H_i$ are distinct, and only the last one, $H_k$ is open. (All the rest have positive codimension in $M$).

Edit:

As Ted Shifrin showed, the answer is negative. The idea is actually quite simple: Even if $H_k$ is open and dense in $M$, the rank of $f$ "can fall in the limit"- that is it can be non-maximal outside $H_k$. The reason for that is that outside $H_k$ we only have "partial injectivity", that is $df$ is is assumed to be injective only on a strict subspace of the tangent space of $M$.

Here is why I thought there should be a counter-example:

Let $p \in \cup_{i=1}^k H_i$. Then there is exactly one $j$, $1 \le j \le k$ such that $p \in H_j$.

Note that $T_p(\cup_{i=1}^k H_i)=T_pM$, since $\cup_{i=1}^k H_i$ is open, by assumption. We ask whether or not $df_p:T_pM \to T_{f(p)}N$ must be injective.

Of course, we know $df_p|_{T_pH_j}$ is injective. Since $p \notin H_i$ for $i \neq j$, I don't see a way to use the assumption $f$ is an immersion on the other $H_i$.

• Why do you say $p\in H_j$ for a unique $j$? It seems to me that with your hypotheses, the only way $\cup H_i$ can be an open submanifold is for $H_i$ to be contained in $H_k$ for every $i$. Jun 13 '18 at 16:56
• No, I'm wrong. One can imagine the original $H_k$ to be missing some (relatively) closed submanifolds and put them back in as the $H_i$. Oh, and I missed your hypothesis that the $H$'s were disjoint to start with. My apologies. Let me now think about the question. Jun 13 '18 at 17:12
• BTW, the example I had in mind was the $H_i$ to be square matrices of rank $i$. Then there is no containment, and only the last one, $H_d$ is open ($d$ is the dimension). And of course, the union is also open. Jun 14 '18 at 14:20

Take the surface $S=\{y^2=x^3\}$ in $\Bbb R^3$. The $z$-axis immerses just fine, as does the top stratum $H = S - \{z\text{-axis}\}$. But the surface does not immerse. (You need normal data as you approach the lower strata.)
EDIT: To be more specific, let $H_2 = \{(s,t)\in\Bbb R^2: s\ne 0\}$ and $H_1 = \{(0,t)\in\Bbb R^2\}$. Then $H_1\cup H_2 = \Bbb R^2 = M$. Now let $f\colon\Bbb R^2\to\Bbb R^3$ be given by $f(s,t) = (s^2,s^3,t)$. $f$ is an immersion on $H_i$ individually, but fails to be an immersion.
• Thanks, but I am not sure I understand: In your example: $H_1$=the z-axis, $H_2=S-H_1$, and $S=H_1 \cup H_2$,right? Are you claiming the map $i:S \to \mathbb{R}^3$ is not an immersion? (I don't see why it is even smooth tough, that is why $S$ is a regular surface/embedded submanifold of $\mathbb{R}^3$? Doesn't it have singularity at the origin?). If you could say a bit more on the smoothness, and about the failure of $i$ to be an immersion, that would be great. Jun 14 '18 at 14:16
• Regarding the smoothness, I guess this comes down to why $y^2=x^3$ is a smooth one-dimensional submanifold of $\mathbb{R}^2$, which I don't see. Jun 14 '18 at 14:18
• I've edited with specifics. Your example is the stratification people work with in the context of Thom-Boardman singularities, etc. It's very important. (Oh, and certainly $y^2=x^3$ fails to be a smooth submanifold. The fact that $f(s)=(s^2,s^3)$ fails to be an immersion doesn't establish it, but it is true nevertheless. Jun 14 '18 at 18:15