  We first show that a continuous function f is nonnegative on a closed set
$K\subseteq R^n$ if and only if (countably many) moment matrices of some signed
measure $d\nu =fd\mu$ with support equal to K, are all positive semidefinite
(if $K$ is compact $\mu$ is an arbitrary finite Borel measure with support
equal to K. In particular, we obtain a convergent explicit hierarchy of
semidefinite (outer) approximations with {\it no} lifting, of the cone of
nonnegative polynomials of degree at most $d$. Wen used in polynomial
optimization on certain simple closed sets $\K$ (like e.g., the whole space
$\R^n$, the positive orthant, a box, a simplex, or the vertices of the
hypercube), it provides a nonincreasing sequence of upper bounds which
converges to the global minimum by solving a hierarchy of semidefinite programs
with only one variable. This convergent sequence of upper bounds complements
the convergent sequence of lower bounds obtained by solving a hierarchy of
semidefinite relaxations.
