I know how to show that the Coulomb operator of the Fock operator is invariant under a unitary transformation of the orbitals, as on page 121 of Szabo and Ostlund, but the indices in my proof for the exchange operator are just not working. What might I be missing? I have $$\sum_i\hat{K}_i'(1)=\sum_i\int dr_2\chi_i'^*(2)\chi_j'(2)/r_{12} \\ =\sum_i\int dr_2\sum_kU_{ki}^*\chi_k^*(2)\sum_lU_{lj}\chi_l(2)/r_{12}\\ =\sum_{ikl}\int dr_2U_{ki}^*U_{lj}\chi_k^*(2)\chi_l(2)/r_{12}\\ =\sum_{i}\int dr_2\chi_i^*(2)\chi_i(2)/r_{12}\\ \neq\sum_{i}\int dr_2\chi_i^*(2)\chi_j(2)/r_{12}$$.
\begin{align} \sum_i\hat{K}_i'(1) &=\sum_i\int dr_2\chi_i'^*(2)\chi_j'(2)/r_{12} \\ &=\sum_i\int dr_2\sum_kU_{ki}^*\chi_k^*(2)\sum_lU_{lj}\chi_l(2)/r_{12}\\ &=\sum_{ikl}\int dr_2U_{ki}^*U_{lj}\chi_k^*(2)\chi_l(2)/r_{12}\\ &=\sum_{i}\int dr_2\chi_i^*(2)\chi_i(2)/r_{12}\\ &\neq\sum_{i}\int dr_2\chi_i^*(2)\chi_j(2)/r_{12}. \end{align}