  Careful analysis of parametrized variational principles in mechanics and
field theory leads to a generalization of Einstein theory that includes a
cosmological stress tensor. This generalization also follows by restricting
variations of the metric in the Hilbert action to spacetime diffeomorphisms.
The equation of motion for the generalized theory is the twice-contracted
Bianchi identity while the field equations constitute the stress tensor of the
theory. Gravity is interpreted as a cosmological fluid.
