I have written up a proof of a lemma, but it is very heuristic, and it would be cool if you could comment on whether it is cheating or not
There is a domain $\Omega \in \mathbb{R}^3$ consisting of two disjoint subdomains $\Omega_1$ and $\Omega_2$.There is a function defined on $\mathbb{R}^3$, namely
$F(\vec{x}) = Ind(\vec{x} \in \Omega_1)$
where the index function is defined as
$Ind(a) = \begin{cases} 1, \mathrm{if\ a\ is\ True} \\ 0, \mathrm{if\ a\ is\ False} \end{cases}$
I want to compute the integral
$\iiint_{\Omega} \vec{G}(\vec{x}) \cdot \nabla F(\vec{x}) d^3 x$
where $\vec{G}(\vec{x})$ is some well-behaved function on $\Omega$.
My first guess is that
$\nabla F(\vec{x}) = -\vec{n}_{\Omega_1}(\vec{x}) Ind(\vec{x} \in \partial \Omega _1)$
where $\vec{n}_{\Omega_1}$ is the unit outer normal of $\Omega_1$ and $\partial \Omega_1$ is the boundary of the subdomain. My second guess is that I can plug the gradient into the integral and rewrite it as
$\iiint_{\Omega} \vec{G}(\vec{x}) \cdot \nabla F(\vec{x}) d^3 x = -\iint_{\partial \Omega_1} \vec{G}(\vec{x}) \cdot \vec{n}_{\Omega_1}(\vec{x}) d^2 x$
Are the two above steps justified?
$F$ is discontinuous over $\Omega$, thus its gradient is defined only in the sense of distributions, so in some sense what you want is $\nabla F = -n \delta_{\partial\Omega_1}$. This will give you the equality of the integrals provided that $G$ is smooth enough.