Let $u \in H^1(\Omega)$ where $\Omega \subset \mathbb{R}^n$.
Define $$ u^+:=\max\{0,u\}, $$ prove that $$ \nabla u^+=\mathbb{1}_{\{u>0\}} \nabla u. $$ My attempt is to treat each $x \in \Omega.$ So, for $x \in \{u>0\}$ we have $u^+(x)=u(x)$ and $\mathbb{1}_{\{u>0\}}(x)=1.$ So, the identity holds. For $x \notin \{u>0\},$ we have $u^+(x)=0$ and thus $\nabla u^+(x)=0$. In this case, we also have $\mathbb{1}_{\{u>0\}}(x)=0,$ which gives the result.
Is this approach correct?