  We study the Fock quantization of scalar fields in (generically) time
dependent scenarios, focusing on the case in which the field propagation occurs
in --either a background or effective-- spacetime with spatial sections of flat
compact topology. The discussion finds important applications in cosmology,
like e.g. in the description of test Klein-Gordon fields and scalar
perturbations in Friedmann-Robertson-Walker spacetime in the observationally
favored flat case. Two types of ambiguities in the quantization are analyzed.
First, the infinite ambiguity existing in the choice of a Fock representation
for the canonical commutation relations, understandable as the freedom in the
choice of inequivalent vacua for a given field. Besides, in cosmological
situations, it is customary to scale the fields by time dependent functions,
which absorb part of the evolution arising from the spacetime, which is treated
classically. This leads to an additional ambiguity, this time in the choice of
a canonical pair of field variables. We show that both types of ambiguities are
removed by the requirements of (a) invariance of the vacuum under the
symmetries of the three-torus, and (b) unitary implementation of the dynamics
in the quantum theory. In this way, one arrives at a unique class of unitarily
equivalent Fock quantizations for the system. This result provides considerable
robustness to the quantum predictions and renders meaningful the confrontation
with observation.
