Let $X$ be an open domain in $R^n$. Let $E$ be a subspace of $X$ with Hausdorff dimension $m$. Fix $k$ and $p$. What are the optimal assumptions on $m$ and $n$ so that the trivial map $W^k_p(X) \to W^k_p(X \setminus E)$ becomes an isomorphism?
I am mostly interested in the case $k = 1$ and $p = 2$, and in that situation, it seems to me that the optimal bound is $m \leq n - 2$...
Here the Sobolev space $W^k_p(X)$ is defined as completion of smooth functions on $X$ with respect to the Sobolev norm (and not by the restriction from $R^n$).