Theory of the rotation of the rigid earth