  We take a unifying and new approach toward polynomial and trigonometric
approximation in an arbitrary number of variables, resulting in a precise and
general ready-to-use tool that anyone can easily apply in new situations of
interest. The key idea is to show, in considerable generality, that a module,
which is generated over the polynomials or trigonometric functions by some set,
necessarily has the same closure as the module which is generated by this same
set, but now over the compactly supported smooth functions. The particular
properties of the ambient space or generating set are to a large degree
irrelevant. This translation -- which goes in fact beyond modules -- allows us,
by what is now essentially a straightforward check of a few properties, to
replace many classical results by more general and stronger statements of a
hitherto unknown type. As a side result, we also obtain a new integral
criterion for multidimensional measures to be determinate. At the technical
level, we use quasi-analytic classes in several variables and we show that two
well-known families of one-dimensional weights are essentially equal. The
method can be formulated for Lie groups and this interpretation shows that many
classical approximation theorems are "actually" theorems on the unitary dual of
n-dimensional real space. Polynomials then correspond to the universal
enveloping algebra.
