Let $W^{1,p}$ be the Sobolev space of $L^p$ functions with $L^p$ first derivatives. Let $W^{1,p}_0$ be the closure of the test functions in $W^{1,p}$. I am not explicitly writing the domain of the functions because I expect it won't matter, but call it $\Omega$ if you wish. What I will need is $\Gamma$ to be the boundary. I know we can define an operator $\gamma_0:W^{1,p}\to L^p(\Gamma)$ such that it is a bounded linear operator and its restriction to smooth functions is the restriction operator $u\mapsto u|_\Gamma$. I have been told the following holds:
$$W^{1,p}_0=\ker\gamma_0.$$
I can easily see $\subseteq$: if $u\in W^{1,p}_0$, then by definition we have test functions $u_n$ converging to $u$ in $W^{1,p}$, but test functions belong to the kernel and $\gamma_0$ is continuous, hence:
$$\gamma_0u=\lim_{n\to\infty}\gamma_0u_n=0.$$
But what about the converse? Assume $\gamma_0u=0$. How do I prove this implies $u$ is the limit of test functions? I wasn't able to find that on the internet, and the teacher decided to omit the proof, so here I am asking for a proof. How do I proceed? I know that I can find smooth functions $u_n\to u$ in $W^{1,p}$ (e.g. convolutions with mollifiers, which are not necessarily test functions, I mean the convolutions, the mollifiers are) since smooth functions on $\overline\Omega$ are dens i $W^{1,p}$, but how do I show they are (at least eventually) with zero trace? I can only see that their traces converge to 0 in $W^{1,p}$ by continuity of $\gamma_0$…
In Evans book (Chapter 5) we can find a proof for bounded $\Omega$ with $C^1$ boundary. (The author says to omit it in a first reading.) Here it is in full: