I'm reading the proof of the next proposition:
A semi-riemannian manifold $M$ is an Einstein manifold provided $Ric=cg$ for some constant $c.$ If $M$ is connected, $n=dim(M)\geq 3$ and $Ricfg=fg,$ then $M$ is Einstein.
The proof is the next:
Suposse $Ricfg=fg.$ Because of contraction $S=nf.$ Then, for the second Bianchi identity $dS=2divRic,$ so $ndf=2df.$ Then $f$ is constant.
I have two doubts: How the contraction gives the equality $S=nf?$ I don't get it.
I've tried utilizing the second identity of Bianchi to get $dS=2divRic,$ but I don't get any useful.
If the previous holds, because of $M$ is connected and $n\geq 3$ the equality $ndf=2df$ implies $df=0.$ Then $f$ is constant and the proof is done.
Any kind of help is thanked in advanced.