Absolute Continuity of Finite Borel Measure Characterized by Orthonormal Basis I've been working through Fundamentals of Stochastic Filtering (Bain, Crisan) and am a little perplexed by the following (initially) seemingly straightforward exercise and its given solution.
We are given a certain finite Borel measure $\mu$ on $\mathbb{R}^d$ and we wish to determine whether or not it is absolutely continuous with respect to Lebesgue measure. The exercise purports the following:

Let $\{\varphi_i\} _{i>0}$ be an orthonormal basis of $L^2(\mathbb{R}^d$) with the property that $\varphi_i$ is continuous and bounded for all $i$. Let $\mu$ be a finite measure. If
$$\sum_{i=1}^\infty \, \mu(\varphi_i)^2 <\infty $$
then $\mu$ is absolutely continuous with respect to Lebesgue measure. Moreover, if $g_\mu$ is the density of $\mu$ with respect to Lebesgue measure, then $g_\mu \in L^2(\mathbb{R}^d)$.

The solution in the book goes as follows: we construct a density function, use it to define a new measure (which is necessarily absolutely continuous with respect to Lebesgue measure) and then show that this new measure is indeed the one we were given.
Defining our density function $\bar{g_\mu} = \sum_{i=1}^\infty \, \mu(\varphi_i) \varphi_i$, it is easy to see that this is in $L^2$. Defining $\bar{\mu}$ to be the finite measure given rise to by this density, we see that $\bar{\mu}(\varphi_i) = \mu(\varphi_i)$ for all i. All well so good. The problem is showing that our wavelet basis $\{\varphi_i\}_{i>0}$ is a separating set of functions with respect to Borel measures on $\mathbb{R^d}$, which would show that $\bar{\mu} = \mu$. The book simply says:

[...] via an approximation argument $\bar{\mu}(A) = \mu(A) $ for any ball A of arbitrary center and radius. Hence $\bar{\mu} = \mu$.

The issue I have here is making this approximation argument or any similar one work. The most obvious idea is to show that $ \bar{\mu}(f) =\mu(f)$ for any continuous bounded function $f$. If we approximate naively $f$ in $L^2$ by functions in the span of our wavelet basis, this will also approximate the left hand side since we have absolute continuity between Lebesgue measure and $\bar{\mu}$. However, the same cannot be said a priori about the right hand side.
I note that the proposition supposed continuity of the wavelet functions, but this was never explicitly referred to in the proof. In fact, continuity must be necessary here, because it's easy to construct a counter example to this if the wavelets are allowed to be discontinuous (take $\mu$ to be Dirac measure at the origin, with any wavelet basis whose basis functions are modified to be zero at the origin). Being able to approximate in $L^2$ alone is clearly not strong enough - we need some uniform or uniform-like strength. Unfortunately though I can't think of any specific properties (such as their span forming an algebra) of general wavelets that would let us infer this.
As I type this, it occurs to me that for the way this result is applied in the book, it is enough for it to hold for one particular choice of basis. Using finiteness of $\mu$, it would be enough to exhibit existence of a wavelet basis that can uniformly approximate any given continuous $f$ on $\mathbb{R}^d$ (or on any given compact interval/cube). I guess we could use truncated trigonometric base functions (truncation in the sense of domain) - allowing for uniform convergence on $...,[-1,0],[0,1],[1,2],...$ simultaneously (similarly for $\mathbb{R}^d$. Now the wavelets are only piecewise continuous, but this is probably not a problem). For the time being I'll likely go with this makeshift approach, so I hope I haven't made any mistakes in my reasoning.
For general continuous wavelets, is the original proposition true, I wonder.
EDIT: It turns out that my above makeshift approach isn't going to work for proving the main result since I need the wavelets to have bounded partial derivatives up to second order.
 A: If I just gave the answer this post would be too short, heh-heh. A little discussion of how I came to the answer, possibly of interest:
Decided I had no idea how to prove it, if true. Didn't see why it should be true, which proves nothing, since I have no feeling for an arbitrary orthonormal set. So I look for a counterexample.
I noticed it is true for the Haar functions. (Define them using half-open intervals so they add up nicely at every point.) Not that the Haar functions are continuous, but since it's true for the Haar functions I conjecture it's true for much more general wavelets. Not that I'm the guy to prove that.
I still think it's false in general. But I'm stuck on where to look for a counterexample, since I don't know any other orthonormal bases. If only we had an orthonormal basis of continuous functions that all vanished at some point...
Omg I do know another orthonormal basis! Paraphrase of something Littlewood said somewhere:
Littlewood If a Fourier series doesn't work try a cosine series or a sine series; the latter in particular have many properties not shared by general Fourier series.
Counterexample In one dimension: For $n\ge1$ and $j\in\Bbb Z$ define $$\phi_{n,j}(t)=\sin(nt)\chi_{[j\pi,(j+1)\pi]}.$$Let $$\mu=\delta_0,$$a point mass at the origin. We leave it to the reader to verify that (i) $\int \phi_{n,j}\,d\mu=0$, (ii) $\sum0^2<\infty$, (iii) $\mu$ is singular. Heh...
(In $\Bbb R^2$ use $\phi_{n,j}(t_1)\phi_{m,k}(t_2)$.)
A: Here is a complement to David C. Ullrich's counterexample.

Theorem. Let $\mu\in\mathcal{M}(\mathbb{R}^{d})$ be a finite Borel measure. If $\sum\left|\langle{\mu,\varphi_{j}}\rangle\right|^{2}<\infty$ for a complete orthonormal basis for $L^{2}(\mathbb{R}^{d})$, such that $\text{span}\left\{\varphi_{j}\right\}$ is dense in $(C_{c}^{\infty}(\mathbb{R}^{d}),\left\|\cdot\right\|_{L^{\infty}})$, then $\mu$ is absolutely continuous (with respect to Lebesgue measure) with square-integrable density.

Assuming the existence of such a basis for now, we prove the theorem.
Proof. Let $\left\{\varphi_{j}\right\}$ be a basis with the stated property. Define an element $g\in L^{2}(\mathbb{R})$ by
$$g:=\sum_{j}\langle{\mu,\varphi_{j}}\rangle\varphi_{j}$$
and let $\bar{\mu}$ be the Borel measure defined by
$$\bar{\mu}(A)=\int_{A}g\mathrm{d}x, \quad\forall A\in\mathcal{B}(\mathbb{R}^{d})$$
It is evident that $\bar{\mu}$ is absolutely continuous with respect to Lebesgue measure and that $\langle{\bar{\mu},\varphi_{j}}\rangle=\langle{\mu,\varphi_{j}}\rangle$ for all $j$.
I claim that $\langle{\bar{\mu},f}\rangle=\langle{\mu,f}\rangle$ for any $f\in C_{c}^{\infty}(\mathbb{R}^{d})$. Fix such an $f$, and let $\epsilon>0$ be given. Let $\psi=\sum_{k}a_{k}\varphi_{j_{k}}$ be a finite linear combination of basis elements such that $\left\|f-\psi\right\|_{L^{\infty}}\leq\epsilon$. Since $\mu$ and $\bar{\mu}$ agree on the $\varphi_{j}$, linearity gives $\mu(\psi)=\bar{\mu}(\psi)$. Whence
\begin{align*}
\left|\int_{\mathbb{R}^{d}}f\mathrm{d}\mu(x)-\int_{\mathbb{R}^{d}}fg\mathrm{d}x\right|&\leq\epsilon\mu(\mathbb{R}^{d})+\int_{\text{supp}(f)}\left|f-\psi\right|\left|g\right|\mathrm{d}x\\
&\leq \epsilon\left(\mu(\mathbb{R}^{d})+\left|\text{supp}(f)\right|^{1/2}\left\|g\right\|_{L^{2}}\right)
\end{align*}
where we use Holder's inequality to obtain the second estimate. Since $\epsilon>0$ was arbitrary, we conclude the claim.
I claim that $\bar{\mu}(B)=\mu(B)$ for any ball $B=B_{r}(c)\subset\mathbb{R}^{d}$. Indeed, fix $r>0$ and $c\in\mathbb{R}^{d}$, and let $f_{\delta}\in C_{c}^{\infty}$ satisfy $0\leq f_{\delta}\leq 1$, $\text{supp}(f_{\delta})\subset B_{r}(c)$ and $f_{\delta}=1$ on the closed ball $\overline{B}_{r-\delta}(c)$. Then
$$\left|\bar{\mu}(B)-\mu(B)\right|\leq\limsup_{\delta\rightarrow 0}\int_{\mathbb{R}^{d}}\left|\chi_{B}-f_{\delta}\right|\left|g\right|\mathrm{d}x+\int_{\mathbb{R}^{d}}\left|\chi_{B}-f_{\delta}\right|\mathrm{d}\mu(x)=0$$
$\Box$

Lemma. There exists a complete orthonormal basis with the above property.

Proof. Let $\psi$ be a smooth, rapidly decreasing wavelet, and let $\psi_{jk}:=\psi(2^{j}\cdot-k)$ ($j,k\in\mathbb{Z}$), be the complete basis in $L^{2}(\mathbb{R})$ formed by $\psi$. For $J\in\mathbb{Z}$, define the projection $P_{J}$ by
$$P_{J}f=\sum_{j\leq J}\sum_{k\in\mathbb{Z}}\langle{f,\psi_{jk}}\rangle\psi_{jk}, \quad a_{jk}:=\langle{f,\psi_{jk}}\rangle=2^{j/2}\int_{\mathbb{R}}f\overline{\psi}_{jk}$$
For the remainder of the proof, we assume $f\in C_{c}^{\infty}(\mathbb{R})$. By Holder's inequality and translation/dilation invariance,
$$\left|a_{jk}\right|\leq 2^{j/2}\left\|f\right\|_{L^{p}}\left\|\psi_{jk}\right\|_{L^{p'}}=2^{j/2-j/p'}\left\|f\right\|_{L^{p}}\left\|\psi\right\|_{L^{p'}}=2^{-j/2+j/p}\left\|f\right\|_{L^{p}}\left\|\psi\right\|_{L^{p'}}$$
for all $1\leq p\leq\infty$. For $j\geq 0$, we take $p<2$, and for $j<0$, we take $p>2$.
For any $j\in\mathbb{Z}$ fixed, the series
$$\sum_{k\in\mathbb{Z}}\left|\psi(2^{j}x-k)\right|$$
is $2^{-j}$-periodic. So to analyze its convergence, it suffices to consider $x\in[0,2^{-j}]$. By rapid decrease, for any $N>0$, there exists $C_{N}>0$ such that
$$\sum_{k}\left|\psi(2^{j}x-k)\right|\leq C_{N}\sum_{k}\dfrac{1}{1+\left|2^{j}x-k\right|^{N}}\lesssim C_{N}\sum_{k}\dfrac{1}{1+(\left|k\right|-\left|2^{j}x\right|)^{N}}\leq C_{N}\left(2+\sum_{k}\dfrac{1}{1+\left|k\right|^{N}}\right)<\infty$$
Combining these estimates, we see that the series defining $P_{J}f$ converges absolutely and uniformly on $\mathbb{R}$ and that $P_{J}f\rightarrow f$ uniformly as $j\rightarrow\infty$. It follows that $f\in C_{c}^{\infty}(\mathbb{R})$ can be uniformly approximated by a finite linear combination of wavelet elements. $\Box$
