In four dimensions, Lovelock's theorem restricts a local natural symmetric divergence-free metric tensor with at most second derivatives of the metric to a constant linear combination of the Einstein tensor and the metric. A generic nonlinear f(R) gravity equation contains : the Ricci scalar already has second metric derivatives, so this term generally introduces fourth metric derivatives. It therefore violates the second-order hypothesis, although it remains covariant, symmetric and divergence-free.
The exception must be stated. For , the same tensor reduces to
which is precisely of Lovelock form. In particular, is a counterexample to a blanket claim that the theorem never applies. The intended exclusion concerns generic nonlinear , with not identically zero. Restricting attention to a special constant-curvature solution of a nonlinear theory does not turn its off-shell equations into a universally second-order metric tensor.