Towards a precise theory of cosmology