General expression of the redshift: explanation? In some papers, authors put the following formula for the cosmological redshift $z$ :
$1+z=\frac{\left(g_{\mu\nu}k^{\mu}u^{\nu}\right)_{S}}{\left(g_{\mu\nu}k^{\mu}u^{\nu}\right)_{O}}$
where :


*

*$S$ is the source and $O$ the observer

*$g_{\mu\nu}$ is the metric

*$k^{\mu}=\frac{dx^{\mu}}{d\lambda}$ is the coordinate derivative regarding the affine parameter $\lambda$

*$u^{\nu}$ is the 4-velocity of the cosmic fluid
My first question is : according to the Einstein summation, is it a fraction of sums $\left(\frac{\sum_{\mu\nu}X}{\sum_{\mu\nu}Y}\right)$ or a sum of fractions $\left(\sum_{\mu\nu}\frac{X}{Y}\right)$ ?
My second question (and more important) is : where does this formula come from ? Where can I find a "demonstration"/"derivation"/"explanation" of this ? 
 A: For the first question, it is the same quantity, the Minkowski dot product of the four vectors $k$ and $u$ that you may call $A_{O}$ and $A_{S}$, in general
$$g_{\mu\nu}k^{\mu}u^{\nu}=k_{\nu}u^{\nu}\equiv A$$
computed for the source and computed for the observer. So you have
$$1+z=\frac{A_{S}}{A_{O}} $$
A: The energy $h\nu$ of a photon is simply the contraction
$$
h\nu = g_{\alpha\beta} k^\alpha u^\beta
$$
of its momentum $k^\mu$ with the frame's velocity $u^\mu$.
The frequency shift is then given by
$$
1 + z = \frac{\nu_S}{\nu_O} = \frac{(g_{\alpha\beta} k^\alpha u^\beta)_S}{(g_{\sigma\rho} k^\sigma u^\rho)_O}
$$
where we denote the velocities of both source and observer with $u^\mu$ as we're dealing with the special case of cosmological redshift, where source and observer are supposed to be comoving with the Hubble flow.
The momentum $(k^\mu)_S$ and $(k^\mu)_O$ of the photon at times of emission and absorption are related by parallel transport along the photon worldline, and if the worldline is not affinely parametrized, solving the parallel transport equation is a way to compute the frequency shift that works for arbitrary spacetimes.
This is actually nothing but the generalization of the special relativistic Doppler effect, and in Minkowski spacetime (or even just normal coordinates if we transport the source velocity along the photon geodesic), it reduces to the Doppler factor.
I've taken the time to write this up in more detail.
