Spectral Measures - Spectral Theorem I'm trying to understand the following lemma from Reed and Simon's text: 
Lemma 1: Let $A$ be a bounded self-adjoint operator with cyclic vector $\psi$. Then, there is a unitary operator $U : \mathscr{H} \to L^2(\sigma(A), d\mu_{\psi})$ with $$(UAU^{-1}f)(\lambda) = \lambda f(\lambda).$$ 
Proof: Define $U$ by $U \phi(f) \psi \equiv f$, where $f$ is continuous. To show that $U$ is well defined, we compute $$\| \phi(f)\psi \|^2 = \langle \psi, \phi^{\ast}(f)\phi(f) \psi \rangle = \langle \psi, \phi(f\overline{f})\psi \rangle = \int \left| f(\lambda) \right|^2 d\mu_{\psi}.$$
I'm not understanding the last two equalities. 
Thanks  
 A: I think I understand what's going on.  The map $\phi(f)$ is the $*$-homomorphism (from RS Theorem VII.1) that takes a continuous function $f\in C(\sigma(A))\rightarrow \mathscr{L}(\mathscr{H})$.  In words, $\phi$ maps a continuous function defined on the spectrum to a bounded linear operator.  This linear operator is usually denoted $\phi(f)\equiv f(A)$, indicating that it is a "function applied to the operator $A$".
So the first equality follows from part (a) of Theorem VII.1: $\phi^*(f) = \phi(\bar{f})$ and $\phi(fg) = \phi(f)\phi(g)$ gives 
$$
\phi^*(f)\phi(f) = \phi(\bar{f})\phi(f) = \phi(f\bar{f})
$$
For the last equality, this is just the definition of the spectral measure; see the intro paragraph to section VII.2 - for any $\psi\in\mathscr{H}$, we have a unique spectral measure $\mu_\psi$ such that 
$$
(\psi,f(A)\psi) := (\psi,\phi(f)\psi) = \int_{\sigma(A)}f(\lambda)d\mu_\psi
$$  Note that $f(A)$ is by definition $\phi(f)$ where $\phi$ is that $*$-homomorphism from VII.1.  So in your case,  
$$
(\psi,\phi(f\bar{f})\psi) = \int_{\sigma(A)}f(\lambda)\bar{f}(\lambda)d\mu_{\psi} = \int_{\sigma(A)}\vert f(\lambda)\vert^2 d\mu_{\psi} 
$$
