Let $\mathbb{D}^n$ be the closed $n$-dimensional unit ball, and let $f:\mathbb{D}^n \to \mathbb{R}^n$ be smooth. Suppose that $df$ is invertible outside a set of Hausdorff dimension $\le n-1$, and that $\text{rank}(df) \ge n-1 $ on $\partial \mathbb{D}^n$.
Question: Do there there exist $f_n \in C^{\infty}(\mathbb{D}^n, \mathbb{R}^n)$ such that $f_n \to f$ in $W^{1,2}(\mathbb{D}^n, \mathbb{R}^n)$ and $\text{rank}(df_n) \ge n-1 $ everywhere on $ \mathbb{D}^n $?
Easier question:
My intuition is that the set of points where the rank is less than $n-1$ should be very small. Indeed, it is the set where all the $n-1$-minors of $df$ vanish. These are $n^2$ (independent?) equations. Thus, I expect that typically, the Hausdorff dimension of this set would be zero. Can we prove that?
That is, can we find $f_n \in C^{\infty}(\mathbb{D}^n, \mathbb{R}^n)$ such that $f_n \to f$ in $W^{1,2}(\mathbb{D}^n, \mathbb{R}^n)$ and $\dim_{\mathcal H}(\{ p \, | \, \text{rank}(df_n)_p < n-1 \})=0$?