Let $M=B \times\_f F$ be a warped product of two pseudo-Riemannian manifolds. If $X, Y, Z \in L(B)$ and $U, V, W \in L(F)$, (with $L(B)$ and $ L(F)$ I mean the set of all horizontal and vertical lift to M), then we have: 


(1) $R(V, W)U = {R(V, W)U}^F +
\frac{\langle \nabla f, \nabla f \rangle }{f^2}(\langle V, U \rangle W − \langle W, U \rangle V )$


(with ${R(V, W)U}^F$ is lift to $M$ to the curvature tensor of $F$).


and Ricci curvature:


(2) $\operatorname{Ric}(V, W)={\operatorname{Ric}(V,W)}^F-(\frac{\Delta f}{f}+(k-1)\frac{\langle \nabla f , \nabla f \rangle }{f^2})\langle V,W \rangle$.
(where $k$ is the dimension of $F$).


From (1) to (2), $k$ turns out (which is the dimension of the fiber manifold) and will be due to some trace, but I don't understand if it will be a trace where they get $k$ and then they find something like:


$k \frac{\langle \nabla f, \nabla f \rangle }{f^2}-\frac{\langle \nabla f, \nabla f \rangle }{f^2}$, then:


$(k-1)\frac{\langle \nabla f, \nabla f \rangle }{f^2}$.


Or a trace in which a dimension is excluded for some reason, therefore not get $k$, but $k-1$, then $(k-1)\frac{\langle \nabla f, \nabla f \rangle }{f^2}$.


How is that $(k-1)$ found?



From Riemannian curvature to Ricci curvature in warped product manifold
Using (1), the relevant trace is the following, where $e\_1, \dots, e\_k$ is an orthonormal frame on $F$:
\begin{align\*}
\mathrm{Ric}(V,W) &= \cdots - \sum\_{i=1}^k \langle e\_i, R(V,e\_i)W\rangle\\
&=
\cdots - \sum\_{i=1}^k\frac{\langle\nabla f,\nabla f\rangle}{f^2}(\langle e\_i,e\_i\rangle\langle V,W\rangle - \langle V, e\_i\rangle\langle W,e\_i\rangle)
\end{align\*}


