# Double Einstein summation simplification

Suppose that we are given the EFEs for the SEM tensor $$T_{\mu\nu}=\frac{1}{8 \pi}G_{\mu\nu},$$ where the Einstein tensor $$G_{\mu\nu}$$ is defined to be $$G_{\mu\nu}=R_{\mu\nu}-\frac12Rg_{\mu\nu}.$$ The Ricci tensor is given by $$R_{\mu\nu}=\partial_\lambda\Gamma^{\lambda}_{\mu\nu}-\partial_\mu\Gamma^{\lambda}_{\nu\lambda}+\Gamma^{\lambda}_{\lambda\sigma}\Gamma^{\sigma}_{\mu\nu}-\Gamma^{\lambda}_{\mu\sigma}\Gamma^{\sigma}_{\nu\lambda}.$$ Furthermore, suppose that we already know a metric which is given by $$ds^2=g_{\mu\nu}dx^{\mu}dx^{\nu}=-e^{2 \phi}dt^2+\left(1-\frac{b}{r}\right)^{-1}dr^2+r^2d \Omega^2,$$ where $$d \Omega^2=d\theta^2+\sin^2(\theta).$$ Given this metric we can calculate all the Christoffel symbols for it by the expression $$\Gamma_{\mu\nu}^{\lambda}=\frac12g^{\lambda\sigma}\left(\partial_{\nu}g_{\sigma\mu}+\partial_{\mu}g_{\sigma\nu}-\partial_{\sigma}g_{\mu\nu}\right).$$ This leads to the discovery that the only non-zero Christoffel symbols for the metric are $$\Gamma_{rr}^{r},\Gamma_{r \theta}^{\theta},\Gamma_{r \phi}^{\phi},\Gamma_{\theta\theta}^{r},\Gamma_{\theta\phi}^{\phi},\Gamma_{\phi\phi}^{r}\Gamma_{\phi\phi}^{\theta}.$$ Given all the non-zero christoffel symbols we can contract and expand the expression $$R_{\mu\nu}=\partial_\lambda\Gamma^{\lambda}_{\mu\nu}-\partial_\mu\Gamma^{\lambda}_{\nu\lambda}+\Gamma^{\lambda}_{\lambda\sigma}\Gamma^{\sigma}_{\mu\nu}-\Gamma^{\lambda}_{\mu\sigma}\Gamma^{\sigma}_{\nu\lambda}.$$ The first 2 contractions are easy to write out although the second 2 contractions $$\Gamma^{\lambda}_{\lambda\sigma}\Gamma^{\sigma}_{\mu\nu}$$ and $$\Gamma^{\lambda}_{\mu\sigma}\Gamma^{\sigma}_{\nu\lambda}$$ yield 16 summed terms, most of which will equal $$0$$ and vanish; however, I am not aware of a way to distinguish which of the 16 terms will vanish without having to write out the massive expression. Is there a general way to find out which combinations of $$\sigma$$ and $$\lambda$$ yield non-zero products of Christoffel symbols or do I explicitly have to write out all of the 16 terms and cancel one by one?