Let $\Omega$ be a bounded open subset of $\mathbb{R}^N$. Let $f, g\in H^1(\Omega)$, if $\|f-g\|_{L^{2}({\Omega})}=0$ then
$$\|\nabla f -\nabla g\|_{L^{2}({\Omega})}=0$$
This seems obvious since:
$$\int_{\Omega} (f-g)\frac{\partial \phi}{\partial x_i}=0 \quad \forall \phi\in \mathcal{D}(\Omega)=C^{\infty}_c(\Omega)$$
Thus
$$\int_{\Omega} (\frac{\partial f}{\partial x_i}-\frac{\partial g}{\partial x_i})\phi=0 \quad \forall \phi\in \mathcal{D}(\Omega)=C^{\infty}_c(\Omega)$$
So in order to check if two function are the same in $H^1(\Omega)$ we just need to check their difference in the $L^2(\Omega)$ norm? This is because $H^1(\Omega) \subset L^2(\Omega)$ ?