# Example of a $C^\infty$ function which cannot be approximated by local diffeomorphisms

I'm trying to understand the proof of Whitney's theorem characterizing generic maps from $\mathbb R^2$ to $\mathbb R^2$ as in chapter 8 of Brocker and Lander's Differentiable Germs and Catastrophes. I'm not sure that I have properly wrapped my head around the topology they are putting on $C^\infty(\mathbb R^2, \mathbb R^2)$. They give a basis for the origin consisting of sets $U(\epsilon,k)$ where $k \geq 0$ and $\epsilon: \mathbb R^n \to (0,\infty)$ is continuous, and $U(\epsilon,k) = \{f \in C^\infty(\mathbb R^n): |\partial^\alpha f(x)| \leq \epsilon(x), x \in \mathbb R^n, |\alpha| \leq k\}$. In this topology, maps with non-zero rank are dense. What I don't understand is this: why aren't maps with everywhere invertible differentials dense? Let $f \in C^\infty(\mathbb R^2, \mathbb R^2)$. Then $Df \in C^\infty (\mathbb R^2, \mathbb R^{2 \times 2})$, and therefore by Sard's theorem $Df$ has image in a set of measure zero. Non-invertible matrices also form a set of measure zero. It's not clear that one can find arbitrarily small matrices $A$ so that $D_x f - A$ is invertible for all $x$, but it seems plausible. If this could be done, one could patch together a map $g \in f + U(\epsilon,k)$ for every $\epsilon$ and $k$.

What I would like is a counterexample to the claim that maps with everywhere invertable differential are dense in this topology. If there is no such counterexample, I don't quite understand the point of the singular maps in Whitney's theorem.

Okay, I was confused about something silly. Consider the map $f(x,y) = (x,y^2)$. We have $Jf(x,y) = \det(Df(x,y)) = 1 - 2y$. For $\eta$ small in the topology on $C^\infty(\mathbb R^2, \mathbb R^2)$ given above, we have $|J(f + \eta)(x,y) - (1 - 2y)|$ is small, and therefore there exist $(x_{-},y_{-})$ and $(x_{+},y_{+})$ with $J(f+\eta)(x_{-},y_{-})<0$ and $J(f+\eta)(x_{+},y_{+})>0$. Thus there must exist $(x_0,y_0)$ with $J(f+\eta)(x_0,y_0) = 0$, and so $f+\eta$ does not have everywhere invertible differential.