  The derivation of the effective theory for the phase degrees of freedom in a
superconductor is still, to some extent, an open issue. It is commonly assumed
that the classical XY model and its quantum generalizations can be exploited as
effective phase-only models. In the quantum regime, however, this assumption
leads to spurious results, such as the violation of the Galilean invariance in
the continuum model. Starting from a general microscopic model, in this paper
we explicitly derive the effective low-energy theory for the phase, up to
fourth-order terms. This expansion allows us to properly take into account
dynamic effects beyond the Gaussian level, both in the continuum and in the
lattice model. After evaluating the one-loop correction to the superfluid
density we critically discuss the qualitative and quantitative differences
between the results obtained within the quantum XY model and within the correct
low-energy theory, both in the case of s-wave and d-wave symmetry of the
superconducting order parameter. Specifically, we find dynamic anharmonic
vertices, which are absent in the quantum XY model, and are crucial to restore
Galilean invariance in the continuum model. As far as the more realistic
lattice model is concerned, in the weak-to-intermediate-coupling regime we find
that the phase-fluctuation effects are quantitatively reduced with respect to
the XY model. On the other hand, in the strong-coupling regime we show that the
correspondence between the microscopically derived action and the quantum XY
model is recovered, except for the low-density regime.
