  We consider certain subsets of the space of $n\times n$ matrices of the form
$K = \cup_{i=1}^m SO(n)A_i$, and we prove that for $p>1, q \geq 1$ and for
connected $\Omega'\subset\subset\Omega\subset \R^n$, there exists positive
constant $a<1$ depending on $n,p,q, \Omega, \Omega'$ such that for $ \veps=\|
{dist}(Du, K)\|_{L^p(\Omega)}^p$ we have $\inf_{R\in
K}\|Du-R\|^p_{L^p(\Omega')}\leq M\veps^{1/p}$ provided $u$ satisfies the
inequality $\| D^2 u\|_{L^q(\Omega)}^q\leq a\veps^{1-q}$. Our main result holds
whenever $m=2$, and also for {\em generic} $m\le n$ in every dimension $n\ge
3$, as long as the wells $SO(n)A_1,..., SO(n)A_m$ satisfy a certain
connectivity condition. These conclusions are mostly known when $n=2$, and they
are new for $n\ge 3$.
