I want to prove this result: Let $D$ be an open subset of $\mathbb{R}^n$, $p \in[1,\infty)$ and $f$ be in $L^p(D)$. Assume $\int_{D}fgdx=0\forall g\in C_{c}^{\infty}\left(D\right)$. Then $f = 0$ a.e. on $D$.
I found a corollary of the book Haim Brezis - Functional Analysis, Sobolev Spaces and Partial Differential Equations that is a nearly result. It's corollary $4.24$. But the assumption is $f \in L^1_{loc}(D)$. Can I apply the proof of corollary $4.24$ for my problem?