Spectral families of commuting operators Consider two self-adjoint bounded operators $A$ and $B$ on a separable Hilbert space. According to the spectral theorem we can write
$$
A=\int_{-\infty}^{\infty} x d E^{A}_x, \quad B=\int_{-\infty}^{\infty} y d E^{A}_y
$$
where $E^{A}_x$ and $E^{B}_y$ are the spectral families of projectors of $A$ and $B$ respectively. Is there a simple way to prove that if $[A,B]=AB-BA=0$, then $[E^{A}_x,E^{B}_y]=0$ for all $x,y$?
 A: From $AB=BA$, you get $A^nB=BA^n$ for all $n$, and immediately $p(A)B=Bp(A)$ for any polynomial $p$. By Stone-Weierstrass, $f(A)B=Bf(A)$ for any $f\in C(\sigma(A))$. 
Now let $$\Sigma=\{\Delta:\ \Delta\ \text{ is Borel and } E^A(\Delta)B=BE^A(\Delta)\}. $$ From the fact that $E^A$ is a spectral measure, it is quickly deduced that $\Sigma$ is a $\sigma$-algebra. If $V\subset\sigma(A)$ is any open set, it may be written as a disjoint union of intervals, which allows us to see that there exists a sequence $\{f_n\}\subset C(\sigma(A))$ such that $f_n\nearrow 1_V$ pointwise. Then, for any $x\in H$, 
\begin{align}
\langle BE^A(V)x,x\rangle
&=\langle E^A(V)x,B^*x\rangle
=\int_{\sigma(A)}1_V\,d E^A_{x,B^*x}\\ \ \\
&=\lim_n\int_{\sigma(A)}f_n\,d E^A_{x,B^*x}
=\lim_n\langle f_n(A)x,B^*x\rangle\\ \ \\
&=\lim_n\langle Bf_n(A)x,x\rangle=\lim_n\langle  f_n(A)Bx,x\rangle\\ \ \\
&=\lim_n\int_{\sigma(A)}f_n\,d E^A_{Bx,x}
=\int_{\sigma(A)}1_V\,d E^A_{Bx,x}\\ \ \\
&=\langle E^A(V)Bx,x\rangle.
\end{align}
As $x$ was arbitrary, $E^A(V)B=BE^A(V)$. So $V\in\Sigma$, and thus $\Sigma$ contains all open subsets of $\sigma(A)$, and then the whole Borel $\sigma$-algebra of $\sigma(A)$. Thus $E^A(\Delta)B=BE^A(\Delta)$ for  any Borel $\Delta\subset\sigma(A)$. 
So far we haven't even used that $B$ is selfadjoint; but now we can use the fact to repeat the above argument for a fixed $\Delta_1\subset\sigma(A)$, to obtain 
$$
E^A(\Delta_1)E^B(\Delta_2)=E^B(\Delta_2)E^A(\Delta_1)
$$
for any pair of Borel sets $\Delta_1\subset\sigma(A)$, $\Delta_2\subset\sigma(B)$. 
A: What you need is a way to construct $E_A$ and $E_B$ directly from $A,B$. This is accomplished through Stone's Formula:
$$
       \frac{1}{2}\left(E(a,b)x+E[a,b]x\right) \\
= \lim_{\epsilon\downarrow 0}\frac{1}{2\pi i} \int_{a}^{b}(A-(r+i\epsilon)I)^{-1}x-(A-(r-i\epsilon)I)^{-1}x dr
$$
This is a contour integral around $[a,b]$ with the vertical pieces missing. Using strong limits you can isolate $E(a,b)x$ and $E[a,b]x$ through limits in $a$, $b$. You can actually do this in a constructive way using the $\tan^{-1}$ function to explicitly integrate and take the limit in the strong topology.
If $AB=BA$, then
$$
         (A-\lambda I)B = B(A-\lambda I) \\
          (A-\lambda I)(B-\mu I)=(B-\mu I)(A-\lambda I) \\
          (B-\mu I)(A-\lambda I)^{-1} = (A-\lambda I)^{-1}(B-\mu I) \\
           (A-\lambda I)^{-1}(B-\mu I)^{-1}=(B-\mu I)^{-1}(A-\lambda I)^{-1}.
$$
From this and Stone's formula, you have a constructive proof that the spectral measures of $A$ and $B$ commute. I think it helps to see how the spectral measure is constructively determined on intervals of $\mathbb{R}$.
