Berry phase and an emergent gauge field In Nakahara 10.6.2 the case of system with fast $r$ and slow $R$ degrees (might be more than one of each) of freedom is discussed. The Hamiltonian is -  
$$H=\frac{p^2}{2m}+\frac{P^2}{2M} + V(r;R)$$ 
Where $p(P)$ is the momentum associated with $r(R)$.
In describing the Schrodinger equation for the entire system, the total wavefunction of both dofs $\Psi(r,R)=\Phi(R)\left|R\right\rangle$ where $\Phi(R)$ is the slow dof wavefunction, $\left|R \right\rangle$ is the fast dofs wavefunction for fixed values of $R$. 
In the derivation Nakahara apears to use this equality - 
$$\left\langle R|\nabla^2_R|R \right\rangle=\left\langle R|\nabla_R|R \right\rangle)^2$$ 
However, I do not understand how it is reached. When starting with the LHS, and using integration by parts, I find a minus sign which I cannot wave off.
 A: I do not have a copy of Nakahara to hand, but I don't think it is an equality, but rather an approximation.  Your notation is a bit confusing as 
$$
\Psi(r,R)= \Phi(R)|R\rangle
$$ does not make sense as written. The LHS is a function and $|R\rangle$ is a vector in the Hilbert space, so the two sides are quite different things. I think what is meant is that we can factor the combined wavefunction for the slow nucleaus and the fast electron as 
$$
\Psi(r,R)= \psi(r,R)\Phi(R)
$$
 where  the wavefunction for the fast moving electron is 
$$
\langle r|R\rangle= \psi(r,R).
$$
Here $R$ is a parameter.
  Berry connection is 
$$
i {\bf A}(R)= \langle R| \nabla_R |R\rangle=\int \psi^*(r,R)\nabla_R \psi(r,R) d^3{\bf r}.
$$
We want an  equation for the $\Phi(R)$ wavefunction to include the gauge covariant derivative
$$
(\nabla_R+i{\bf A}(R))^2.
$$ 
However, when we plug the factored wavefunction into the full Shroedinger equation, we get $\langle R|\nabla^2_R|R\rangle$ instead of the $(iA)^2$. We therefore insert a complete set of states between the two $\nabla_R$'s  but it is pecisely at  this point that we make the adiabatic approximation   by only keeping  the single intermediate state $|R\rangle \langle R|$.
