A Lagrangian is proposed for interacting number fields such that below the Planck length p-adic fields and non-Archimedean geometry are relevant while at larger length scales the usual Riemannian geometry is applicable. Our motivation for the Lagrangian is based on the consideration of group properties in the previously-proposed primary quantization approach.