  We classify invariant Lagrangians of the form
$L(g_{ij},g_{ij,k},g_{ij,kl},D_I,D_{I,j})$ depending at most quadratically on
the variables $g_{ij,k},g_{ij,kl}$ and $D_I,D_{I,j}$, where $g$ is a Lorentz
metric and $D$ is a tensor field of arbitrary rank on a smooth manifold. As a
corollary, we prove a conjecture of Bray's regarding the classification of
certain variational principles with variables a Lorentz metric and an affine
connection.
