  We study analogs of value functions arising in classical mechanics in the
space of probability measures endowed with the Wasserstein metric $W_p$, for
$1<p<\infty$. Our main result is that each of these generalized value functions
is a type of viscosity solution of an appropriate Hamilton-Jacobi equation,
completing a program initiated by Gangbo, Tudorascu, and Nguyen. Of particular
interest is a formula we derive for a generalized value function when the
associated potential energy is of the form ${\cal
V}(\mu)=\int_{\mathbb{R}^d}V(x)d\mu(x)$. This formula allows us to make
rigorous a well known heuristic connection between Euler-Poisson equations and
classical Hamilton-Jacobi equations. Further results are presented which
suggest there is a rich theory to be developed of deterministic control in the
Wasserstein spaces.
