Lovelock theorem