A rigorous Hamiltonian approach to the rotation of elastic bodies