Solution (source code)

= Solution

For <separately conserved cosmological fluids>, the prerequisite is absence of energy or momentum exchange between components. Each matter action then gives its own local conservation equation $\nabla_\mu T_i^{\mu\nu}=0$. In the homogeneous <perfect fluid in general relativity>, its time component is
$$
\boxed{\dot\rho_i+3H(\rho_i+P_i)=0,\qquad H=\dot a/a.}
$$
This is the <cosmological perfect-fluid continuity equation>. Equivalently, a physical volume $V\propto a^3$ following the fluid satisfies $d(\rho_iV)=-P_i\,dV$.

The <Einstein field equations> instead have the single shared metric on its left and $\sum_iT_i^{\mu\nu}$ on its right. The <Friedmann equation> and <Friedmann acceleration equation> therefore involve total density and total pressure; the same geometry cannot be sourced separately by each component's density alone.

The PDF's separate-conservation statement needs this noninteraction qualification. In an interacting system,
$$
\dot\rho_i+3H(\rho_i+P_i)=Q_i,\qquad\boxed{\sum_iQ_i=0,}
$$
where $Q_i$ is the energy-transfer rate into component $i$. Total conservation remains true, but the source-free equation does not hold individually during processes such as annihilation or particle decay.