Prove there is an open and dense set $\Omega \subset \mathbb{R}^n$ 
Let $f : \mathbb{R}^n \to \mathbb{R}^n$ be a mapping of class $C^1$. Prove there is an open and dense set $\Omega \subset \mathbb{R}^n$ such that the function $R(x) = rank Df(x)$ is locally constant on $\Omega$.

I'm trying to show that $\Omega = \bigcup_{k=0}^\infty R_k$, where $R_k = \{x \in \mathbb{R}^n: R(y) = k \ \ \forall y \in U_x$, $U_x\subset \mathbb{R}^n$ open neighborhood of $x \}$. Showing this set is open isn't an issue, but I'm trying to show it's dense. I tried fixing a point $x$ and considered an arbitrary neighborhood $U$. My goal is to find an open nighborhood $V\subset U$ of some point $y$ such that $rank Df$ is constant there, which would show that $y \in \Omega$, but I'm not quite sure how to show that. Assistance would be  greatly appreciated.
 A: Let $G_k = \{ x |R(x) \ge k \}$. Using continuity of $\det$ we see that the $G_k$ are open.
Note that for any $k$ we have
$\mathbb{R}^n = G_k \cup \partial G_k \cup \overline{G_k}^c$ and $G_k \cup \overline{G_k}^c$ is open and dense in $\mathbb{R}^n$.
(Note that if $n=1$ this is the desired result since
$R$ is $1$ on $G_k$ and $0$ on $\overline{G_k}^c$.)
We proceed by induction. Suppose $V$ is open, non empty and $m=\max_{x \in v} R(x)$, then we see that
$V = (V \cap G_m) \cup (V \cap \partial G_m) \cup (V \cap \overline{G_m}^c)$
and from the previous remark we see that $(V \cap G_m) \cup (V \cap \overline{G_m}^c)$ is open and
dense in $V$ and it is clear that $R(x) = m$ for $x \in V \cap G_m$ and
$R(x) \le m-1$ for $x \in V \cap \overline{G_m}^c$.
Start with $V_1 = \mathbb{R}^n$ which will give a dense open subset $(V_1 \cap G_{m_1}) \cup (V_1 \cap \overline{G_{m_1}}^c)$ such that $R$ is constant on the open $D_1 = V_1 \cap G_{m_1}$. Now repeat with $V_2=V_1 \cap \overline{G_{m_1}}^c$.
Continue until $\overline{G_{m_l}}^c$ is empty, then $D_1 \cup \cdots \cup D_l$ is open and dense in $\mathbb{R}^n$ and $R$ is constant on each $D_k$.
Note:
Note that $\operatorname{rk}A \ge k$ iff $A$ has an invertible $k \times k$ submatrix.
If $R(x) = k$ then there is a $k \times k$ invertible submatrix of $Df(x)$, call it $A(x)$. Since $f$ is $C^1$ we see that $Df$ is continuous and hence so is $A$. Since $\det $ is continuous and $\det A(x) \neq 0 $ we see that there is a neighbourhood of $x$ such that $\det A(y) \neq 0$ for $y$ in this neighbourhood.
Hence $R(y) \ge k$ in this neighbourhood (it might be strictly greater).
A: DEFINE $\Omega: = \{x \in R^n: \text{rank is constant on some $B(x,r)$}\}$.
By its very definition $\Omega$ is open.
To show it is dense we prove that $R^n \backslash \Omega$ has no interior points. Suppose $x \in int(R^n \backslash \Omega)$, i.e. for some $\delta$, $B(x,\delta) \subset R^n \backslash \Omega$. By lower-semicontinuity, this means that there exists some $y_1 \in B(x,\delta)$ such that $rank \, Df(y_1)> rank \, Df(x)$. Now, some $B(y_1,\delta_1) \subset B(x,\delta) \subset R^n \backslash \Omega$ and therefore, rank is not constant on any nghd of $y_1$ either. So, there exists some $y_2 \in B(x,\delta)$ such that
$$
rank \,Df(y_2) > rank \, Df(y_1) > rank\, Df(x) \, .
$$
We can repeat the process and reach a contradiciton because with those inequalities at some point we will have to go above rank $n+1$, which is impossible. This contradiction arose from assuming that all of $B(x,\delta)$ is contained in $R^n \backslash \Omega$.
So, no point $x$ can be in the interior of $R^n \backslash \Omega$. Thus, $int \, (R^n \backslash \Omega) = \emptyset$.
