I want to take the weak gradient operator
$$ \begin{aligned} \nabla: L^2(\Omega) &\to W^{-1,2}(\Omega,\mathbb{R}^d) \\ \langle \nabla u, \phi \rangle_{W^{-1,2},W_0^{1,2}}&:=(u,\text{div}\phi)_{L^2}=\int_\Omega u(x) \,\text{div}\phi(x) ~\text{d}x \end{aligned} $$ for all $\phi \in W_0^{1,2}(\Omega,\mathbb{R}^d)$.
Assume $\nabla u=0$. Show that $u$ is constant.
I know that if I interpret $u$ as a tempered distribution and take the gradient as a distributional derivative it should be possible to conclude $u$ is constant. But I'd like to take the definition of the weak gradient operator above.
We have $$ \int_\Omega u(x) \, \text{div}\phi(x) ~dx=0 \text{ for all } \phi \in W_0^{1,2}(\Omega,\mathbb{R}^d).$$
If $d=1$ I could conclude $u=\text{const}$ by the fundamental lemma of calculus of variations. But in general $$ \int_\Omega u(x) \, (\partial_{1}\phi_1(x)+...+\partial_d \phi_d(x)) ~d(x_1,...,x_d)=0 \text{ for all } \phi \in W_0^{1,2}(\Omega,\mathbb{R}^d)$$ and I don't know if there is a similar theorem.