I'm having some trouble with a few steps of the reasoning.
My first issue is why kinetic energy is diagonal in momentum representation, and why that means the Hamiltonian as a whole will be diagonal in this representation (as far as I can understand, the potential can cause scattering which manifests in off diagonal terms). The book (Condensed Matter Field Theory (2nd Ed) by Alexander Altland and Ben Simons) says to start with the momentum representation, and to generalise to the position basis. I assume this is because the Hamiltonian is diagonal in the momentum basis, which is what the book says to use as a starting point. Is it simply because in momentum space the kinetic energy operator behaves like a c-number (i.e. $\frac{p^2}{2m}$ where $p$ is a c-number).
The second part that I'm having some issue is with the actual derivation. My steps are as follows. Starting with what I think is the second quantised representation of the Hamiltonian $\hat{H}_1$ in momentum representation $$\hat{H}_1=\sum^{\infty}_{p=0}\langle p|\frac{p^2}{2m}+U(p)|p\rangle a_p^\dagger a_p$$ where $a^\dagger$ is the creation operator, $a$ is the annihilator operator, and $p$ is the momentum in momentum space representation.
Using the projection operator as a unitary transformation, we change the basis to position representation $$\hat{H}_1=\sum_{p=0}^\infty\int\langle p|x\rangle\langle x|\frac{p^2}{2m}+U(p)| x\rangle\langle x|p\rangle a_p^\dagger a_pd^dr$$ This I'm not quite sure about, since I think $\langle p|\frac{p^2}{2m}+U(p)|p\rangle$ should be treated as a constant, so I'm not sure whether I'm allowed to insert the identity $I=\int |x\rangle\langle x|d^dr$ inside the expected value. I'm also not completely sure on why we can take the sum over the same range, since in general for a sincle body operator $\hat{O}_1$ $$\hat{O}_1=\sum_{\mu\nu}\langle\mu|\hat{o}|\nu\rangle a_\mu^\dagger a_\nu$$ Is the domain of the integral the same because the projection operator is unique, and we are projecting onto the same range? The solution given is $$\hat{H}=\int a^\dagger(\textbf{r})\left[ \frac{\hat{\textbf{p}}^2}{2m}+U(\textbf{r})\right]a(\textbf{r})d^dr$$ which I can get by using the identity $$a(x)=\sum_k\langle x|k\rangle a_k$$
Any help is much appreciated, thanks!