I'm reading Ambrosio's Gradient Flows in Metric Spaces and the Space of Probability Measures textbook, and I'm stuck on a part of Lemma 8.4.2. Rather than give the whole Lemma, I'll state the specific claim I'm confused by, and I'll simplify it by taking $p = 2$ ($p = 2$ is the only case I'm interested in), $X = \mathbb{R}^n$ (rather than some other separable Hilbert space $X$).
Here $\mu$ is a finite Borel measure on $X$, and $v,w$ are $L^2(\mu)$ vector fields (the integral of $|v|^2$ w.r.t. $\mu$ is finite). The statement is as follows: \begin{equation*} \int_X v \cdot w \, d \mu(x) = 0 \, , \text{ for any $w \in L^2(\mu)$ s.t. $\nabla \cdot (w \mu) = 0$} \end{equation*}
is equivalent to \begin{equation*} v \text{ belongs to the $L^2(\mu)$ closure of } \{\nabla \phi \, : \, \phi \in C_c^\infty(X)\} \, . \end{equation*}
Some clarifications:
- $\nabla \cdot (w \mu) = 0$ means that, for any test function $\phi \in C_b^1(X)$, $$\int_X \nabla \phi \cdot w \, d \mu = 0 \, . $$
- The second statement means that there is some sequence $\{\phi_n\} \subseteq C_c^\infty(X)$ so that $$\lim_{n \to \infty} \int_X |\nabla \phi_n - v|^2 \, d \mu = 0 \, . $$
Why is the stated equivalence true??? (The textbook states it without justification.)
I think the backward implication is clear: if we can write $v = \nabla \phi$ for some $\phi$, then $\nabla \cdot (w\mu) = 0$ means precisely that $\int_X v \cdot w \, d \mu = 0$.
However, the forward implication is unclear to me. If $\mu$ were just the Lebesgue measure/some absolutely continuous measure w.r.t. Lebesgue then I would try integration by parts (looks like some Sobolev thing going on), but I don't believe this is available to us here? I can't find any integration by parts formulas for arbitrary measures in the textbook.
With all definitions given, the statement is more about Hilbert spaces (in this case $L^2(\mu)$), than anything else.
Notice that the first condition is that $v$ is orthogonal to the set of divergence free vector fields, while the second condition is that $v$ is orthogonal to the orthogonal complement of smooth gradient fields (recall double orthogonal complement gives the closure of a subspace).
By definition, if $u$ is orthogonal to smooth gradient fields then it's divergence free (this can be justified by approximating $C^1_b$ functions by $C^\infty_c$ ones in an appropriate way) and so by hypothesis $u\perp v$, which gives the implication.