If $A$ and $B$ are self-adjoint operators, each of which possesses a complete set of eigenvectors, then $AB = BA$ if and only if there exists a complete set of eigenvectors which are eigenvectors of both $A$ and $B$.
I know how the proof goes for discrete spectrum with degeneracy accounted, but how can I prove this considering degeneracy of a continuous spectrum?
For example, in the continuous case, to prove that if A and B have a commom complete set of eigenvectors $\implies$ that AB=BA, it is common, when we have no degeneracy, to write down A and B in the following way
$\int da |a⟩⟨a|$ and $\int db |b⟩⟨b|$.
How could I write that considering degeneracy?