Extension by zero of functions of H^1 Let $\omega$ be an open subset of an other bounded open set $\Omega$ of $R^n,\; n\in N. $ For an element $f$ of $H^1(\omega)$ we consider the function defined by $F(x)=f(x),\; x\in \omega$ and $F(x)=0$ else. Are there any conditions on $f$ such that $F\in H^1(\Omega)?$
 A: Here, the following holds: if $f\in H^1_0(\omega)$ then $F\in H^1(\Omega)$. 
If the extension-by-zero $F$ is in $H^1(\Omega)$ and $\omega$ has $C^0$-boundary ($\omega$ is locally on one side of the boundary), then $f\in H^1_0(\omega)$ necessarily.
If $f$ belongs to $H^1_0(\omega)$, then the extension by zero belongs to $H^1_0(\Omega)$. This is intuitively true: extending a function with zero boundary values by zero will not introduce new singularities. Since $C_c^\infty$-functions are dense in $H^1_0(\omega)$, we can find a sequence $f_k$ of such functions approximating $f$. Extending $f_k$ by zero yields $f_k\in C_c^\infty(\Omega)$, $f_k\to F$ in $H^1(\Omega)$ and $F\in H^1(\Omega)$.
The reverse statement is much more difficult to prove. Since the boundary is $C^0$, we have a suitable covering $U_0\dots U_m$ of $\omega$, where
$U_i$, $i=1\dots m$, contain parts of the boundary. Then we can take a parition of unity $\psi_i$ subordinate to this covering. The final step is to translate $\psi_i F$ inside $\omega$ and mollify there. This yields an approximation of $F$ by $C_c^\infty(\omega)$ functions.
A proof of the latter statement for $C^1$-boundary can be found in Evans [Section 5.5, Thm 2]. There, it is proven that if $f\in H^1(\Omega)$ and trace of $f$ is zero, then $f\in H^1_0(\Omega)$.
I could not found a reference for the sketched proof above.
