# Field equation of Palatini $f(R)$ gravity

I've been reading a paper about a Palatini formulation of $$f(R, T)$$ gravity theory, and when they vary the gravitational action with respect the connection $$\widetilde{\Gamma}$$, they obtain that \begin{align} \widetilde{\nabla}_{\lambda}\left[ \sqrt{-g}\left( A^{\mu \nu}\delta_{\alpha}^{\lambda} - A^{\mu \lambda}\delta_{\alpha}^{\nu}\right)\right] = 0\tag{23} \end{align} with $$A^{\mu \nu} = f'(R)g^{\mu \nu}\tag{21}.$$

Then they say:

"This equation can be significantly simplified by taking into account that for $$\alpha = \lambda$$ the equation is identically zero. Hence for the case $$\alpha \neq \lambda$$, we find \begin{align} \widetilde{\nabla}_{\lambda}\left[ \sqrt{-g}f'(R)g^{\mu \nu}\right] = 0\tag{24} \end{align} ".

but I do not see where does the last equation come from. I mean, I can see why when $$\alpha = \lambda$$ the equation is identically zero, but I would expect for the case $$\alpha \neq \lambda$$ that the equation becomes \begin{align} \widetilde{\nabla}_{\lambda}\left[ \sqrt{-g} A^{\mu \lambda}\delta_{\alpha}^{\nu}\right] = 0\tag{24'} \end{align} since $$\delta_{\alpha}^{\lambda} = 0$$ for $$\alpha \neq \lambda$$.

Does anyone know what's going on? Here is the source: https://arxiv.org/abs/1805.07419 page 5.

In eq. (23) the index $$\alpha$$ is an external index. On the other hand, the index $$\lambda$$ is an internal index, which is summed over, and cannot be chosen. Hence there seems to be an index typo in the text between eqs. (23) & (24). A better strategy is to put $$\alpha=\nu$$ in eq. (23) and sum. This yields $$(1-d) \widetilde{\nabla}_{\alpha}(\sqrt{-g}A^{\mu\alpha})~=~0\tag{23'}$$ in $$d\neq 1$$ spacetime dimensions. Plugging eq. (23') back into eq. (23) yields eq. (24).