Measuring gravity at cosmological scales

This paper is a pedagogical introduction to models of gravity and how to constrain them through cosmological observations. We focus on the Horndeski scalar-tensor theory and on the quantities that can be measured with a minimum of assumptions. Alternatives or extensions of General Relativity have been proposed ever since its early years. Because of Lovelock theorem, modifying gravity in four dimensions typically means adding new degrees of freedom. The simplest way is to include a scalar field coupled to the curvature tensor terms. The most general way of doing so without incurring in the Ostrogradski instability is the Horndeski Lagrangian and its extensions. Testing gravity means therefore, in its simplest term, testing the Horndeski Lagrangian. Since local gravity experiments can always be evaded by assuming some screening mechanism or that baryons are decoupled, or even that the effects of modified gravity are visible only at early times, we need to test gravity with cosmological observations in the late universe (large-scale structure) and in the early universe (cosmic microwave background). In this work we review the basic tools to test gravity at cosmological scales, focusing on model-independent measurements.


I. INTRODUCTION
Gravity is the force that shapes the overall temporal and spatial structure of the Universe. There is no much need then to explain why it is important to test its validity at all scales and regimes. The huge progress in collecting cosmological data achieved in the last couple of decades makes possible, for the first time, to test gravity and measure its properties at astrophysical and cosmological scales. In order to test a theory one either has to build a set of alternatives against which to compare the standard model, or to parametrize the deviations from it in some meaningful and general way: both approaches are referred to as "modified gravity".
Lovelock's theorem [1] states that Einstein's gravity is the unique local diffeomorphism invariant theory of a tensor field in 4D with second-order equations of motion. It is clear then that modifying gravity often implies adding new degrees of freedom, either scalars, vectors, or tensors. Adding a mass to the graviton, for instance, requires an additional tensor field; including more derivatives is also equivalent to adding more propagating degrees of freedom. Other options based on torsion, non-metricity, or non-locality can also be contemplated, see for instance the review [2].
In this paper we review the main properties of an important class of modified gravity based on a single scalar field, the so-called Horndeski Lagrangian (HL). This model is general enough to display most of the phenomenology of non-Einsteinian gravity: generalized Poisson equation, Yukawa corrections to Newton's potential, presence of anisotropic stress, change in the gravitational wave speed, instabilities, ghosts. Still, the HL is relatively simple in that contains a single propagating degree of freedom in addition to General Relativity. Using the HL as a paradigm of modified gravity, we focus on its observability at various scales, from the local environment to galaxy clusters, with emphasis on cosmological observations. Although the recent measurement of the gravitational wave speed [3] severely constrain one of the phenomenological time-dependent parameters of the Horndeski model, as we will see, the other parameters are still mostly unconstrained and open to theoretical and observational investigation. A major topic of this review is the question of which properties of gravity can be measured as model-independently as possible.
We will not try to cover exhaustively the field of research in modified gravity; good reviews are already available [2,4]. Rather, we wish to discuss pedagogically some aspects or issues that are generic to the quest for traces of modified gravity.
We assume units such that c = 8πG N = M −2 Planck = 1 and metric signature − + ++. An overdot denotes derivation with respect to cosmic time t, a prime with respect to log a. A comma will refer to partial derivative, i.e. ∂ µ φ ≡ φ ,µ . Also φ = g µν ∇ µ ∇ ν φ where ∇ µ is the covariant derivative. Greek indexes run over space and time coordinates, Latin indexes over space coordinates only.

II. BEYOND EINSTEIN
The re-discovery of the most general scalar-tensor theory that gives second order equations of motion, Horndeski action [5] or Covariant Galileons [6], and their extensions [7][8][9][10][11][12][13] provides a very general framework for such theories (see [14] for a recent review). The HL is defined as the sum of four terms L 2 to L 5 . Defining with X = −g µν φ ,µ φ ,ν /2 the canonical kinetic term, the four terms are specified by two non-canonical kinetic functions K(φ, X) and G 3 (φ, X) and by two coupling functions G 4,5 (φ, X), all of them in principle arbitrary: where S m is the action for matter fields -dark matter, baryons and radiation -and Note that G 3 and G 5 must have an X dependence, otherwise they are total derivatives and could be rewritten -after integration by parts -as K and G 4 respectively. 1 As usual, each term in the HL has dimension mass 4 . Often one chooses the scalar field to have dimensions of mass, but this is not necessary. As already mentioned, the Horndeski Lagrangian is the most general Lagrangian for a single scalar which gives second-order equations of motion for both the scalar and the metric on an arbitrary background. This is a necessary, but not sufficient, condition for the absence of instabilities, as we will see later on. The terms L 4 , L 5 couple the field φ to the Ricci scalar R and the Einstein tensor G µν = R µν − Rg µν /2. As a consequence, G 4,5 are the gravity-modifying coupling function. The background equations of motion of the HL are given for completeness in the Appendix, although we do not need them in the following. It is enough to realize that the large freedom offered by the HL allows one to find a background evolution that satisfies all observational constraints. Let us now briefly discuss some useful limits of the HL.
• If G 4 = 1/2 and G 5 = 0 (it is actually sufficient G 5 = const) the HL reduces to the Einstein-Hilbert Lagrangian with a scalar field having a non-canonical kinetic sector given by L 2 , L 3 . The canonical form is obtained for K = X − V (φ) and G 3 = 0 (G 3 = const is sufficient). ΛCDM is recovered for K = −2Λ.
• The "minimal" form of modified gravity within the HL is provided by G 4 = G 4 (φ) and G 5 = const: this is then equivalent to a Brans-Dicke scalar-tensor model, again with a non-canonical kinetic sector.
• If one sets G i (φ, X) = G i (X) then the Lagrangian is invariant under the shift φ → φ + c with c = const. This shift-symmetric version of the HL is connected to the Covariant Galileon when the functional dependence of the G i is fixed [6] and is able to produce the accelerated expansion without a potential that makes the field slow roll.
In general, the equations of motion for the scalar will couple it to the matter energy density. The full set of equations of motion has been studied in several papers, for instance in [17,18]. Any modification of the HL, or addition of terms (except the so-called Beyond Horndeski terms), based on the same scalar field, will introduce higher order equations of motion and associated instabilities, as a consequence of the Ostrogradsky theorem [19,20]. 2 Of course one can in principle add several scalar fields, but on grounds of simplicity this is rather unnatural. Notice that we do not demand that the φ drives the present-day accelerated expansion. It could be, after all, that the modification of gravity and the accelerated expansion are independent phenomena. It would be very interesting, though, to explain the latter in terms of the former.

III. DECOMPOSITION IN MODES AND STABILITY
Einstein's gravity is carried by a massless spin-2 field, the metric. Being represented by a symmetric matrix, a metric in four dimensions has 10 degrees of freedom (DOF). These DOF can be collected according to how they behave under spatial rotations, i.e. as scalars, vectors and tensors. There are then four scalars (4 DOF), two divergence-free vectors (4 DOF) and one traceless, divergence-free tensor (2 DOF). However, only the tensor DOF propagate, that is, they are subject to linearized equations of motion second-order in the time derivatives. The other DOF obey constraint equations, fully determined by the matter content. This should have been expected, since a massless tensor field, as the gravitational field, has only two independent degrees of freedom.
The two propagating degrees of freedom are associated to the two polarizations +, × of the gravitational waves. To see that there are no other propagating DOF, one can proceed by linearly expanding the metric around Minkowski and keeping only scalar terms, i.e. functions that can be obtained from scalar or from derivatives of scalars. The most general such metric is then Inserting this metric into the Einstein-Hilbert Lagrangian without matter and developing to second order, one finds the second-order action in Minkowski space The linearly perturbed equations of motion can be obtained then by the Euler-Lagrange equations with respect to Φ, Ψ, E, B, but here we need only identify the degrees of freedom. When one varies the action with respect to B, one gets the constraintΦ = 0 which then shows that Φ is not a propagating DOF. The same is true for Ψ, since there are no time derivatives for it. As we know, in fact, the potentials Φ, Ψ are determined by the matter distribution through two constraints, the Poisson equations, which do not involve time derivatives. So there are no scalar propagating DOF in Einstein gravity without matter. The same holds for the vector degrees of freedom. If one considers instead the tensor DOF in h µν where, after imposing the traceless, divergence-less conditions, and considering a wave propagating in direction x 3 , one finds that the two modes h α = {h + , h × } obey in vacuum the same gravitational wave equation, h α = 0, analogous to electromagnetic waves. GWs propagate therefore with speed c T equal to unity. The same procedure can be applied to the HL. One finds then in absence of matter fields [18,22] S where ϕ is the scalar mode perturbation and h α the two tensor modes, and c S , c T their speed of propagation, respectively. As expected, HL has now three propagating DOF, plus those belonging to the matter sector. The four coefficients Q S , c S , Q T , c T depend on the HL functions. Their expression will be given in Sec. VI. From the classical point of view, stability is guaranteed when Q x , c 2 x (with x = S, T ) have the same sign. In this case in fact the equations of motion are well-behaved wave equations with speed c x , whose amplitude is constant (or decaying in an expanding space), rather than growing exponentially as it would happen for c 2 x < 0 (gradient instability). For the quantum stability, however, one must also require Q x > 0 (or more exactly, the same sign of the kinetic energy of matter particles, assumed by convention to be positive), since otherwise the Hamiltonian is unbounded from below, which means particles can decay into lower and lower energy states, without limit, generating so-called ghosts. Therefore, for the overall stability of the theory one requires Q x , c 2 x > 0.

IV. THE QUASI-STATIC APPROXIMATION
In what follows, we put ourselves in Fourier space. That is, we replace every perturbation variable X( x, t) with a plane wave parametrized by the comoving wavevector k, X( x, t) = X k (t)e i k· x . Since we deal only with linearized equations, this simply means replacing every perturbation variable or their time-derivative with its corresponding Fourier coefficient X k or its time derivativeẊ k , and every space derivative ∂ (n) i of order n with (ik i ) n X k . We drop from now on the k subscripts. We then assume that the so-called quasi-static approximation (QSA) is valid for the evolution of perturbations. This implies that we are observing scales well inside the cosmological horizon,k ≡ k/(aH) 1, where k is the comoving wavenumber, and also inside the Jeans length of the scalar, c Sk 1, such that the terms containing k (i.e., the spatial derivatives) dominate over the time-derivative terms. For the scalar field, this means we neglect its wavelike nature, and convert its Klein-Gordon differential equation into a Poisson-like constraint equation. If c S ≈ 1, the scales at which the QSA is valid correspond to all sub-horizon scales, which are also the observed scales in the recent Universe. For models with c S → 0, the QSA might be valid only in a narrow range of scales, or even be completely lost in the non-linear regime.
Let us explain in more detail the QSA procedure by using standard gravity as an example. Let us write down the perturbation equations for a single pressureless matter fluid in ΛCDM. From now on, we adopt the FLRW perturbed metric in the so-called longitudinal gauge, namely If we use N = log a as time variable, so thatẋ = Hx , the coefficients of the perturbation variables become dimensionless, and we are left with [23] δ = −θ − 3Φ (10) where instead of the matter density ρ m , we use Ω m , and . A glance at these equations tells us that, as an order of magnitude, δ ∼ θ ∼k 2 Ψ ∼k 2 Φ. Moreover, we assume X ∼ X , X for every perturbation variable X = {δ, θ, Ψ, Φ} (unless there is an instability, see below) and, consequently,k 2 X X , X . Therefore fork 1 the equations become and one can derive the well-known second-order growth equation with dimensionless coefficients The same QSA procedure can be followed for more complicate systems. When a coupled scalar field is present, its perturbation is of the same order as the gravitational potentials, δφ ∼ Ψ ∼ Φ.
The QSA says nothing about the background behavior. Additional conditions might be imposed, for instance that the background scalar field slow rolls so that the kinetic terms, proportional to the derivatives φ , φ , are negligible with respect to the potential ones. This is indeed expected in order to produce an accelerated regime not too dissimilar from ΛCDM but, first, one can have acceleration driven by purely kinetic terms, and second, acceleration can be produced even with a significant fraction of energy in the kinetic terms. So slow-roll approximation and QSA should be kept well distinguished. However, in some formula below we will explicitly make use of the slow-roll approximation on top of the QSA.
Let us emphasize that the QSA applies only for classically stable systems. Imagine a scalar field obeying a secondorder equation in Fourier space where from now on we use the physical wavenumber instead of the comoving one, and where F, S are the friction and the source, respectively, depending in general on the background solution and on other coupled fields. If c 2 S < 0, the solution φ will increase asymptotically as e |c S |k log a = a |c S |k and in this case φ ∼ |c 2 S |k 2 φ will not be negligible with respect to c 2 S k 2 φ as we assumed in the QSA.
For simplicity, from now on we assume that the space curvature has been found to be vanishing, so |Ω k0 | 1. Using Einstein's field equations and a pressureless perfect fluid for matter, we can derive from the HL two generalized Poisson equations in Fourier space, one for Φ and one for Ψ: (we remind that in our units 8πG N = 1) where z is the redshift, k the physical wavenumber, δ m the matter density contrast and η and Y are two functions of scale and time that parametrize deviations from standard gravity. In some papers the function Y is also called µ. Comparing with eqs. (12,13), we see that in Einstein's General Relativity they reduce to η = Y = 1. Clearly, the anisotropic stress η, or gravitational slip, is defined as (From now on, all the perturbation quantities are meant to be root-mean-squares of the corresponding random variables, and therefore positive definite; we can therefore define ratios like η). A value of η = 1 can be generated in standard General Relativity only by off-diagonal spatial elements of the energy-momentum tensor. For a perturbed fluid, these elements are quadratic in the velocity, T ij ∼ ρv i v j , and therefore vanish at first order for non-relativistic particles. Free-streaming relativistic particles can instead induce a deviation from η = 1: this is the case of neutrinos. However, they play a substantial role only during the radiation era and are negligible today [24]. Therefore, η = 1 in the late universe means that gravity is modified, unless there is some hitherto unknown abundant form of hot dark matter.
In the QSA one can show that for HL [25,26] for suitably defined functions h 1−5 of time alone that depend only on K, G 3,4,5 . Their full form will be given in Sec. VI along with another popular parametrization of the HL equations proposed in [22]. In general, the functions h 3,4,5 are proportional to µ −2 , where µ is a mass scale. In the simplest cases µ corresponds to the standard mass m, i.e. the second derivative of the scalar field potential, plus other terms proportional to φ or φ . These kinetic terms are expected to be subdominant if φ drives acceleration today or, more in general, during an evolution that is not strongly oscillating, so often we can assume that h 3,4,5 scale simply as m −2 . This approximation will be adopted in the explicit expression for f (R) and conformal coupling that are given below. If the scalar field drives acceleration one expects m to be very small, of order H 0 ≈ 10 −33 eV. In this case, at the observable sub-horizon scales, η → h 2 h 4 /h 5 and Y → h 1 h 5 /h 3 . If instead this scale is of the order of the linear scales that can be directly observed (e.g. 100 Mpc), then one could observationally detect the k-dependence of Y, η and find that at sufficiently large scale, such that k m, η → h 2 , Y → h 1 . The same form of Y, η can be obtained also in other theories not based on scalars that produce second-order equations of motion, namely, in bimetric models [27] and in vector models [28].
It is worth stressing the fact that the time dependence of Y, η, expressed by the functions h 1−5 , is essentially arbitrary. Given observations at several epochs, one can always design a HL that exactly fits the data, no matter how precise they are. In contrast, the space dependence, which in Fourier space becomes the k dependence, is very simple and fixed. The reason is that the HL equations are by definition second-order, and therefore contain at most factors of k 2 . The k dependence is therefore potentially a more robust test for the validity of the HL than the time one. A model with two coupled scalar fields would instead generate for Y, η a ratio of polynomials of order k 4 (see e.g. [29]). Clearly, one has to remember that all this is valid at linear scales: if the k dependence is important only at non-linear scales, e.g. for k > 1 Mpc −1 , then it might be completely lost.
Another equivalent form that we will employ often is where This form has a simple physical interpretation. Y η is the modifier of the Φ-Poisson equation, just as Y is the modifier of the Ψ-Poisson equation. The parameters α t , α s are the strengths of the fifth-force mediated by the scalar field for Ψ (the metric time-time perturbed component) and for Φ (the metric space-space perturbed component), respectively. Finally, m is the effective mass of the scalar field, and λ ≡ 1/m its spatial range. This interpretation will be discussed in the next section.
A particularly simple case is realized with the f (R) models, where f (R) is the function of the curvature R that is to be added to the Einstein-Hilbert Lagrangian. In this case in fact The derivative f ,R is often negligible at the present epoch, in order to reproduce a viable cosmology. In this case, m 2 R = (3f ,RR ) −1 and, for large k, η → 1/2 and Y → 4/3, regardless of the specific f (R) model. Another simple case is conformal scalar-tensor theory, with In this form, the strength of the fifth force is α t . In this case we have where M 2 = V ,φφ . When M is vanishingly small, η → 1 − 2α t /(1 + α t ) and Y = (1 + α t )/F . Comparing with eq. (26), we see that for f (R), α t = −α s = 1/3.

V. POTENTIALS IN REAL SPACE
In real space, one can derive the modified Newtonian potential for a radial mass density distribution ρ(r) by inverse Fourier transformation. Let us start with eq. (24) For a non-linear static structure (e.g. the Earth or a galaxy) the local density is much higher than the background average density, so is the background density and is the Fourier transform of ρ(r). The Poisson equation (21) becomes then In real space and for a radial configuration, this reads (since we use the physical k, now r refers to the physical distance) where is the inverse Fourier transform of Y (k)ρ m (k) and V is an arbitrary large volume that encompasses the structure. Assuming that Ψ vanishes at infinity, eq. (31) has the general solution where z = cos θ and where Ψ N is the standard Newtonian potential, while Ψ Y is the Yukawa correction proportional to α t . This can be solved for any given radial density distribution ρ(r). For m → ∞ (or α t → 0) we are back to the Newtonian case. Let us focus now on the modified gravity part. This can be analytically integrated in some simple cases. We write where F has two parts For a mass point at the origin, for instance, one has ρ(r) = M δ D is the Dirac delta function in 3D, defined for any regular function f (r) as´d 3 rf (r)δ i.e. the so-called Yukawa correction. The total potential is then where we reintroduced for a moment Newton's constant G N . As anticipated, α t gives the strength of the Yukawa interaction and λ ≡ 1/m its spatial range. The prefactor h 1 renormalizes the product G N M , so that only the product h 1 G N M is then observable (beside α t , m). Sometimes h 1 G N is denoted G eff because it can be seen as a renormalization of Newton's constant. A typical dark matter halo can be approximated by a Navarro-Frenk-White profile [30] with scale r s and density parameter ρ 0 , In this case we have [31] Ψ Y (y) = −2πh 1 α tˆ∞ 0 ρ(r)r 2 drF (y, r) where Ei(x) is the ExpIntegral function, Exactly the same procedure can be applied to the second potential Φ, which obeys another Poisson equation One has now Notice that the mass m is the same for Ψ, Φ: there is just one boson, not two. The real-space expression for Φ for a point-mass M is then identical to the one for Ψ with α s in place of α t and h 1 h 2 in place of −h 1 , Finally, the so-called lensing potential ψ(r) = Ψ(r) − Φ(r) is responsible for the gravitational lensing of source images in the linear regime. In this regime, given an elliptical source at distance r s characterized by semiaxes of angular extent θ s i = (θ s x , θ s y ), the image we see is distorted by intervening matter into a new set of semiaxes All observations of gravitational lensing lead therefore ultimately to an estimation of ψ(r). What is observed in practice is the power spectrum of ellipticities, i.e. the correlation of ellipticities of galaxies in the sky due to a non-zero ψ(r) along the line of sight (see e.g. [32], chap. 10). From eqs. (20,21) we see then that In our formalism, the lensing potential in real space amounts then to where Since h 2 is in general different from unity, the mass M (Ψ) ≡ h 1 M one infers at infinity from the Ψ potential (often called dynamical mass) is different from the mass M (Φ) ≡ h 1 h 2 M one infers from the Φ potential or the one from the lensing combination Ψ − Φ, i.e. M (Ψ−Φ) = h 1 (1 + h 2 )M/2 (lensing mass). These masses of course coincide in standard gravity. As we will see below, one can indeed compare observationally the estimations and extract η by taking suitable ratios.

VI. THE PARAMETERS OF THE YUKAWA CORRECTION
In [22] it has been shown that the HL perturbation equations can be entirely written in terms of four functions of time only, α K,B,M,T , given as This parametrization (collectively called α i ) is linked to the physical properties of the HL. Briefly, α T expresses the deviation of the GW speed from c, c 2 T = 1 + α T ; α K is connected to the field kinetic sector; α B to the mixing ("braiding") of the scalar and gravitational kinetic terms; M is the time-dependent effective reduced Planck mass and α M its running. They are designed so that α i = 0 for ΛCDM. They do not vanish, in general, for standard gravity with a non-ΛCDM background expansion, nor for non-standard gravity with a ΛCDM expansion. Several observational limits on these parameters in specific models have already been obtained (see e.g. [33]).
It is clear that cancellations can occur among terms belonging to different G i sectors. However, one should distinguish between dynamical cancellations, i.e. involving a particular background solution for φ(t), H(t), and algebraic cancellations, which only depend on some special choice for the functions G i (φ, X). The former ones, if they exist at all and are not unstable, can be guaranteed only for some particular set of initial conditions, and might occur only for some period, unless the solution happens to be an attractor. The algebraic cancellations, however, are independent of the background evolution and therefore valid at all times. Therefore, usually only the second class is regarded as an interesting one.
We can now express the four coefficients introduced in eq. (8) that determine the stability of the HL as [34] with this last relation one can get rid of ρ m everywhere). Here "matter" represents all the components beside the scalar field, i.e. baryons, dark matter, neutrinos, radiation. The matter equation of state w m = i w i Ω i /Ω m is then an effective value for all the matter components. Note that c 2 S = 1 in the standard minimally coupled scalar field case K = X − V (φ), G 3 = G 5 = 0 and G 4 = 1/2. The relation between the "observable" parameters h 1−5 that enter the Yukawa correction and the "physical" param- where 3 Two remarks are in order. First, the quantity µ 2 acts as an effective squared mass in the perturbation equation of motion for φ; we need to assume therefore that it is non-negative to avoid instability below some finite value of k. Second, the expressions for α i and h i are completely general and do not assume the QSA. The QSA is needed only when we connect the theory to observations through Y, η.
Considering now only pressureless matter, from the background equations in Appendix A we see that, where w HL = p HL /ρ HL . In a ΛCDM background, 2ξ + 3Ω m = 0, and µ 2 simplifies to ). Notice that α K does not appear in the h i -α i relation: this means that the kinetic parameter α K is not an observable in the QSA linear regime. In Sec. XIII we will discuss which combinations of α i are really model independent (MI) observables in cosmology. Assuming Einstein-Hilbert action for the gravitational sector and a canonical kinetic term for the scalar field, we have M 2 = 1 and α B,M,T = 0, so α 1 = 0 and Therefore h 1 = h 2 = 1 and so that, as per construction, Y, η → 1.
It is worth noticing that the stability conditions Q T , Q S , c 2 S > 0 imply (2 − α B )α 1 + 2α 2 > 0 and therefore h 3 > 0 if one also requires µ 2 > 0. As we have seen, λ = √ h 3 is the range of the fifth-force interaction, so it makes sense that it is positive definite for stable systems. In the standard Brans-Dicke model with a potential V (φ), for instance, and neglecting several subdominant kinetic terms, we have where m 2 φ = V ,φφ , and therefore finally 3 With respect to the mass defined in [34], we have where φ = M 2 * (notice that in Brans-Dicke φ has dimensions mass 2 and therefore m φ is dimensionless), so the fifth-force range is Assuming a ΛCDM expansion and α T = 0, the conditions for stability during the matter era simplify to α K > −3α 2 B /2 and Generalizing, we have that for a background parametrized by a (possibly time-dependent) EOS w HL and for matter with an effective w m , one has To these stability conditions, arising from Eqs. (60) and (61), one should add the requirement that the friction term in the perturbation equations for δφ, or equivalently, for the gravitational potentials Φ, Ψ, is positive. This condition is quite milder than those from Eqs. (60) and (61). While a negative c 2 s , for instance, even for a short period, induces a unbounded growth for k → ∞, a negative friction term typically leads to a power-law growth a p , which might be a problem only if it lasts for too long. However, in order to obtain the friction instability condition one should carefully investigate the existence of growing modes also when the various coefficient are time-dependent and no simple criteria have been identified so far. Therefore we just quote the condition for negative friction (i.e. stability) for the gravitational waves, best obtained by writing down the equation in conformal time, since in this case the k 2 term is time-independent (provided α T = const). The condition is simply α M > −2.
From the h i − α i relations (64) we can derive the Yukawa strengths The Yukawa strength α t is always positive, and therefore the fifth force is attractive, if Q T , Q S , c 2 S > 0. We also notice that if α M = α T = 0, then α 1 = α B and the two strengths become equal, and h 2 = 1. Therefore Ψ = −Φ and, finally, η = 1, even if both potentials do actually have a non-vanishing Yukawa correction, so that Y = 1. In order for the parameters α M , α T to vanish, the gravity sector of the HL must be standard, G 4 = const, G 5 = 0, barring the case of accidental dynamical cancellation for some particular background evolution. Therefore, we conclude that η = 1 implies, and is implied by, modified gravity, at least when matter is represented by a perfect fluid [35]. One cannot make a similar statement for Y . This is a crucial statement for what follows. Notice however that, as we show below, although modified gravity implies η = 1, a value η = 1 does not necessarily implies standard gravity, but only scale-free gravity, at least at the quasi-static level. In ref. [36] it has been shown that η = 1 at all scales implies indeed standard gravity.
We can draw more conclusions from eqs. (79).
• The two strengths α t , α s are equal also if α M = α T . In this case, η = (1 + α T ) −1 and has no scale dependence.
• The k → ∞ limit of the modified gravity parameters (provided we are still in the linear regime) is This coincides with eqs. (4.9) of [34]. If α T = 0 then It turns out that if one imposes stability, c 2 s > 0, then Y is always larger than, or equal to, 1/M 2 , so that matter perturbations in Horndeski with α T = 0 always grow faster, in the quasi-static regime, than any standard gravity model with the same M and the same background. It also follows that the lensing combination that appears in Eq. (52) amounts to Since the denominator has to be positive for stability, the sign of the effect on the gravitational lensing depends only on α M , α B .
• The Yukawa corrections disappear completely if α 1 = 0, i.e. for This is therefore the general condition to have a scale-free gravity, corresponding to h 3 = h 4 = h 5 4 . If we also assume α T = 0 and consequently G 4X = G 5 = 0 (conformal coupling) in the HL, as required by the GW speed constraints we discuss in Sec. VIII, it follows α B = −2α M [37,38] 5 and which gives an algebraic cancellation for . In this particular model, the local gravity experiments would not detect a Yukawa correction even if gravity actually couples to the scalar field. Gravity becomes then scale free. The Planck mass would still vary with time, though. So in this model η → 1 even if gravity is actually modified. Assuming a ΛCDM background, for this model to be stable, c 2 s > 0 implies the condition (α B H) > 0. For α B constant or slowly-varying, the stability condition amounts to α B < 0, so α M > 0 and therefore Y , or the effective Newton's constant, will decrease with time. A larger Y in the past means faster perturbation growth for the same Ω m . Once again, however, since Ω m is not a MI observable quantity, whether this means that perturbations grow faster than in ΛCDM or not is a model-dependent statement.
• From eq. (52) we find also that the lensing potential lacks a Yukawa term whenever A L = 0, defined in (54), i.e. h 2 α s + α t = 0, which amounts to Then we see that A L = 0 not only when α 1 = 0, but also for α 1 = −α B . Again imposing the GW speed constraint, this becomes α B = −α M . On the HL functions, this implies which actually means that the G 3 sector, after an integration by parts, can be absorbed in K(φ, X). So for the conformal coupling and when the G 3 term is absent or does not depend on X, the lensing potential becomes simply twice the standard Newtonian potential This means radiation, being conformally-invariant, 6 does not feel the modification of gravity, except for the overall factor h 1 which, if time dependent, induces a time-dependent mass or Newton's constant.
• In the same case as above, α B = −α M and α T = 0, one has which becomes when the kinetic component α K is small. Similarly, α s = −1/(3c 2 s ). For c s = 1 one obtains a Yukawa strength of 1/3 (−1/3) for the Ψ (Φ) potential. This case is exactly realized for the f (R) models.
• Finally, in the uncoupled case α M = α T = 0, in which only the kinetic sector of the scalar field is modified, one has that α s = α t > 0, so that there is a Yukawa correction, but η = 1 at all quasi-static scales. 4 We recently noticed that this relation was first provided in an unpublished draft by Mariele Motta in early 2016 5 Note that in Ref. [37] α B is defined as our −α B /2 6 The electromagnetic Lagrangian √ −gF αβ g βµ g αν Fµν does not change for gµν → f (φ)gµν .

VII. LOCAL TESTS OF GRAVITY
Gravity has been tested since a long time in the laboratory and within the solar system (see e.g. [39]). The generic outcome of these experiments is that Einsteinian gravity works well at all the scales that have been probed so far. In many experiments one assumes the existence of the same type of "fifth-force" Yukawa correction to the static Newtonian potential predicted by the HL model, (here we drop the subscript from α t since we need consider only Ψ; moreover, any overall parameter can be absorbed in G N M ). Current limits on α and λ = 1/m have been obtained in a range of scales from micrometers to astronomical units. The constraints on the strength α obviously weakens for very small λ. To give an idea, at the smallest scales probed in laboratory, one has [40] |α| ≤ 10 6 at λ ∼ 10 −5 m and |α| ≤ 10 −2 at λ ∼ 10 −3 m (Casimir-force experiments probe even shorter scales, but the constraints on |α| get correspondingly weaker). At planetary scales, one has |α| ≤ 10 −6 for λ ∼ 10 6 m (Earth-Moon distance), and |α| ≤ 10 −8 at λ ∼ 10 11 m (planetary orbits). Beyond this distance, the constraints from direct tests of the Newtonian 1/r potential weaken again. However, the scalar field responsible for the Yukawa term induces also two post-Newtonian corrections to the Minkowski metric. For a mass distribution with velocity field v i (x, t) and density distribution ρ(x, t), we define U as the potential that solves the standard Poisson equation for non-relativistic particles, i.e. [39] and V i as a velocity-weighted potential Then we can write down the parametrized post-Newtonian metric as follows (the full post-Newtonian metric includes several other terms which however are not excited by a conformally coupled scalar field, see e.g. [41]). Clearly, γ = β = 0 produces the standard weak-field metric. Taking the extreme case of λ → ∞, one has where β 0 = d α(φ)/dφ. The parameter 1 + γ can be seen as the local-gravity analogue of the anisotropic stress η, both being the ratio of (g ii − 1)/(g 00 + 1) at linear level.
Local tests of gravity can therefore measure the Yukawa correction for both Φ, Ψ, i.e. α t , α s and λ, and the ratio Φ/Ψ, in a model-independent way. The parameter |γ|, for instance, is constrained to be less than 10 −5 [42], inducing a similar constraint on α at large scales. A similar constraint applies also to β. With such a small strength, there would hardly be any interesting effect in cosmology.
However, all these tests are performed within a limited range of scales, both spatial and temporal. Moreover, the tests are performed with (some of the) standard matter particles and not with, say, dark matter. Therefore, they are completely escaped if standard model particles do not feel modified gravity, for instance because the scalar field that carries the modification of gravity does not couple to them or because of screening effects, as we discuss next.
So far we considered only linear scales. At strongly non-linear scales, e.g. in the galaxy or in the solar system, the effects of modified gravity depend on the actual configuration of the scalar field. If such a configuration is static and homogeneous within a scale r s , then the effects of modified gravity can be screened within r s , since they are proportional to the variation of φ. This is the so-called chameleon effect [43,44]. On the other hand, screening can occur also because of non-linearities in the kinetic part of the Klein-Gordon equation: this is the Vainshtein effect [45,46]. Finally, a third mechanism appears if the coupling α sets on a vanishing value in structures (high density regions), via a symmetry restoration, while being different from zero at the background (low density) [47][48][49][50]. In all cases, the strong deviation from standard gravity that we might see in cosmology are no longer visible by local experiments. In this sense, one can always build models that escape the local gravity constraints. This can be achieved also by assuming the baryons are completely decoupled from the scalar field.
In the light of these arguments, let us consider for instance in more detail the constraint on G N associated with the big bang nucleosynthesis (BBN), sometimes quoted as one of the most stringent cosmological bound. The yields of light elements during the primordial expansion depends on the baryon-to-photon constant ratio η b and on the cosmic expansion rate during nucleosynthesis, which in turn depend on G N at that time and on various standard model parameters. Fixing the standard model parameters and estimating η b by CMB measurements, one can find constraints on G N (t BBN )/G N (t 0 ) ≈ 1 ± 0.2 [51] by comparing the predicted abundances with the observed ones, for instance deuterium in quasar absorption systems. This means that G N at nucleosynthesis was close to G N on Earth today. The easiest explanation, that G N did not vary at all or anyway less than 0.2 throughout the expansion, implies |α M (t 0 )| < 0.2(H 0 T 0 ) −1 (equal to ≈ 0.2 in ΛCDM), where T 0 is the cosmic age. However, G N in the solar system might be screened, as we have mentioned, and therefore equal to the "bare" G N of standard gravity. Therefore, any model which is standard general relativity in the early Universe, like essentially all models built to explain present day's acceleration, will automatically pass the BBN constraint. Moreover, one should notice that this constraint depends on a estimate of Ω b h 2 from CMB that assumed ΛCDM. Also, G N is in fact degenerate with the number g * of relativistic degrees of freedom at nucleosynthesis, so that the bound applies to G N g * rather than to G N alone. Finally, a simultaneous change of the other standard-model parameters might weaken considerably the constraint, see [52,53].

VIII. THE IMPACT OF GRAVITATIONAL WAVES
The Horndeski model predict an anomalous propagation speed c T for gravitational waves (or rather, c T /c), since the scalar field is coupled in a non-conformal way. As already mentioned, one has [26,54], The almost simultaneous detection of GWs and the electromagnetic counterparts tells us that within 40 Mpc (at z ∼ 0.008) from us, GWs propagate essentially at the speed of light [3]. Since the signals arrived within 1s difference and light took 10 15 s to reach us, we have that |c 2 T /c 2 − 1| < 10 −15 . Such tight constraint immediately ruled out most of the scalar-tensor theories containing derivative couplings to gravity or at least those models which show this effect in the nearby universe (in cosmological scales) [55][56][57][58][59][60]. That is, we need to have G 5 = 0 and G 4,X = 0. In other words, the surviving Lagrangian has arbitrary K, G 3 but vanishing G 5 and X-independent G 4 . This kind of Lagrangian is just a form of Brans-Dicke gravity (plus a scalar field potential and a non-canonical kinetic term). It is also equivalent to standard gravity with matter conformally coupled to a scalar field, i.e. coupled to a metricĝ µν = f (φ)g µν . A dynamical cancellation among the terms depending on G 5 and G 4,X appears extremely fine-tuned. A possible way out is to design a model with an attractor on which the conformal coupling holds, as proposed in [61]. In this case after the attractor is reached we measure c T = 1, but this does not have to be true in the past. Deviations from the speed of light in the past could be detected in B-mode CMB polarization [62].
The constraints on c T also affect directly η. From eq. (65) one has in fact Hence, the GW constraint h 2 = 1 implies that η should also be equal to unity for sufficiently large scales (small k) [63], i.e. it should recover its General Relativity value. The obvious exception are theories without a mass scale beside the Planck mass [64], in which case η = h 4 /h 5 at all scales. On the other hand, no obvious GW constraint affects Y . Gravitational waves might in principle measure another HL parameter, the running of the Planck mass, α M . In fact, as it has been shown for instance in [35], the GW amplitude h obeys the equation Assuming c T = 1, this equation in the sub-horizon limit is solved by [65] h a = M * ,em where the prefactor is the ratio of the Planck mass values at emission and at observation, and h s is the standard amplitude expression that, for merging binaries, can be approximated as (see e.g. [66], eq. 4.189) Here, d L is the luminosity distance, M c the so-called chirp mass and f GW the GW frequency measured by the observer. GWs in standard gravity can measure the luminosity distance d L because the chirp mass and the frequency can be independently measured by the interferometric signal. In modified gravity, what is really measured is therefore a GW distance [65,67,68] Comparing this with an optical determination of d L leads to a direct measurement of M at various epochs, and therefore of α M . It is however likely that both the emission and the observation occur in heavily screened environments. In this case, M is the same at both ends, and no deviation from d L would be observed. If emission occurs in a partially unscreened environment, then one should see instead some deviation, although not necessarily connected to the cosmological, unscreened, value of α M .

IX. MODEL DEPENDENCE
The standard model of cosmology, ΛCDM, is amazingly simple. It consists of a flat, homogeneous and isotropic background space with perturbations that, at scales above some Megaparsec, have been evolving linearly until recently. The initial conditions for perturbations are set by the inflationary mechanism, and provide an initially linear and scaleinvariant spectrum of scalar, vector, and tensor perturbations, that is, power-law spectra k nx , where x stands for the three types of perturbations that can be excited in General Relativity. These are encoded in a spin-2 massless field, that mediates gravitational interactions via Einstein's equations. The energy content is shared among relativistic particles, photons, and quasi-relativistic ones, neutrinos, pressureless "cold" dark matter particles, standard model particles ("baryons"), and a cosmological constant. The density of photons can be directly measured via the CMB temperature: it amounts to 0.005%; the density of neutrinos depends on their mass and is known to be less than 1% of the total content today. Therefore, today, only the last three components are important. The density of baryons can be fixed by the primordial Big Bang Nucleosynthesis [69]. Since the space curvature has been measured (although so far only in a model-dependent way) to be negligible, only a single parameter is left free, the present fraction of the total energy density in pressureless matter, Ω m0 . The fraction in the cosmological constant is then Ω Λ0 = 1 − Ω m0 .
With this one free parameter, the fraction of energy in the cosmological constant, Ω Λ ≈ 0.7, ΛCDM fits all the current cosmological data: the cosmic microwave background (CMB), the weak lensing data, the redshift distortion data (RSD), the distance indicators (supernovae Ia, SNIa; baryon acoustic oscillations, BAO; cosmic chronometers, CCH; gravitational waves, GW).
There are actually a few discrepancies. Two in particular seem to be more robust. The first is the value of H 0 obtained through local measurements, in particular through Cepheids, H 0 = (73.45 ± 1.66) km/s/Mpc [70], independent of cosmology, that deviates from the Planck [71] value obtained through an extrapolation from the last scattering epoch performed assuming ΛCDM, H 0 = (67.51±0.64) km/s/Mpc [71]. The second one is the level of linear matter clustering embodied in the normalization parameter σ 8 : here again, the value from CMB (σ 8 = 0.82 ± 0.014) [71] differs from the late-universe value delivered by weak lensing, σ 8 = 0.745 ± 0.039 [72], and by RSD data [73] Another source of discrepancies is related to the dark matter clustering [74]. Dark matter-only simulations fail at reproducing some of the observed properties of the DM distribution. Although the inclusion of baryon physics may solve this, so far there is no conclusive statement and some of these issues may in fact be due to modification of gravity.
These conflicting results already display a basic problem of cosmological parameter estimation, namely the fact that it is very often model-dependent. The Planck satellite estimates of the cosmological parameters, from Ω m to h, from the equation of state of dark energy w 0 to the clustering amplitude σ 8 , can be obtained only by assuming, among others, a particular model of initial conditions (inflation) and of later evolution (ΛCDM). For instance, if we assume w 0 = −0.9 instead of the cosmological constant value w 0 = −1, one obtains H 0 ≈ 65.5 km/sec/Mpc( [71], fig.  27), outside the error range given above. Another example of model-dependency comes from distance indicators and the dark energy equation of state. Cosmological distance indicators, whether based on SNIa, BAO or other, measure basically the comoving distance where Ω k0 = −k/H 2 0 is the present amount of spatial curvature k expressed as a fraction of total energy density. We see that r(z) depends only on H 0 , Ω k0 and E(z) = H(z)/H 0 . However, since distance indicators depend on the assumption of a standard candle or ruler or clock, whose absolute value we do not know, the absolute scale of r(z), that is H 0 , cannot be measured (except for "standard sirens", i.e. gravitational waves, [75]). Assuming for simplicity that Ω k0 = 0, the only direct observable is E(z) = H(z)/H 0 . If we neglect also radiation (a very good approximation for observations at redshift less than a few) and assume that beside pressureless matter we have a dark energy component with EOS w(z), we have wherew We can then invert the relation (107) and obtain (here E ,z means differentiation with respect to redshift). It appears then that in order to reconstruct w(z) one needs to know Ω m0 , beside E(z). For instance, if the true cosmology is ΛCDM with Ω m0 = 0.3, and we assume erroneously that Ω m0 = 0.31, we would infer w(z = 0) = −0.986 and w(z = 1) = −0.897, way different from the true value −1.
The problem is that Ω m0 is not a model-independent observable. Whenever an estimate of Ω m0 is given, e.g. from CMB or lensing or SNIa, it always depends on assuming a model. The reason is that there is no way, with phenomena based on gravity alone (clustering and velocity of galaxies, lensing, integrated Sachs-Wolfe, etc) to distinguish between various components of matter, since matter responds to gravity in a universal manner, unless one breaks the equivalence principle (see the "dark degeneracy" of Ref. [76]). So in order to measure w(z) one has to assume a model, that is, a parametrization, even with extremely precise measurements. For instance, if w(z) = w 0 + w a (1 − a), then we reduce the complexity to just two parameters, and a measurement of E(z) at at least three different redshifts can fix simultaneously w 0 , w a , Ω m0 . Without a parametrization, w(z) cannot be reconstructed. With a parametrization, the result depends on the parametrization itself.
On the other hand, it is clear that we can always perform null tests on w(z), as for most other cosmological parameters. That is, we can assume a specific w(z), e.g. w = −1, and test whether it is consistent with the data. In this case, in flat space, one needs just three distance measurements at three different redshifts, since there are only two parameters, H 0 and Ω m0 . If the system of three equations in two parameters has no solution, the ΛCDM model is falsified. While it is relatively easy to test, i.e. falsify, a model of gravity, it is much more complicate to measure the properties of gravity in a way that does not demand too many assumptions. This explains why the title of this paper mentions "measuring", and not "testing," gravity.
The rest of the paper will discuss what kind of model-independent measurements we can perform in cosmology, with emphasis on parameters of modified gravity. As it is obvious, one cannot claim absolute model independence. The point is rather to isolate clearly which are the assumptions, and see how far can one reach with a minimum amount of them. In the following, we will assume this set of assumptions: a) the Universe is well-described by a homogeneous and isotropic geometry with small (linear) perturbations; b) gravity is universal; c) standard model particles behave from inflation onwards in the same way as we test them in our laboratories; d) dark matter is "cold". One can replace the last statement with the assumption that we know the equation of state and sound speed of dark matter, provided it is not relativistic, and that the fluid remains barotropic, i.e. p = p(ρ), as we will show later on. Unless otherwise specified, however, for the rest of this work we assume pressureless, cold dark matter.
Notice that we are not assuming any particular form of gravity, standard or otherwise: in fact, we refer to "gravity" as to one or more forces that act universally and without screening, at least beyond a certain scale. So we include in our treatment also gravity plus one or more scalar, vector and tensor fields. Later on we will use the Horndeski generalized scalar-tensor model for a specific example but the methods discussed here are not restricted to this case.

X. MODEL-INDEPENDENT DETERMINATION OF THE HOMOGENEOUS AND ISOTROPIC GEOMETRY
What we observe in cosmology are redshifts and angular positions of sources. What we need to build and test models, however, are distances. Can we convert redshifts and angles into distances in a model-independent (MI) way? If this turns out not to be possible then there is no reason to continue our investigation to the perturbation level. Fortunately it appears we can.
The FLRW metric of a homogeneous and isotropic Universe in spherical coordinates is where a(t) is the scale factor normalized at present time to a(t 0 ) = 1. If we measure s, t, r in units of the natural scale length H −1 0 , the metric can be rewritten as The value of Ω k0 has been estimated by Planck to be extremely small, |Ω k0 | < 0.004 ( [71], tab. 5, last column) but, again, this is a model-dependent estimate, and for now we consider it as a free parameter. We see than up to an overall scale, the FLRW metric depends only on Ω k0 and on E(z) =ȧ/a, from which a(t) is obtained by inverting (where again t is in units of H −1 0 ). Baryon-acoustic oscillations are the remnant of the primordial pressure waves propagating through the plasma of baryons and photons before their decoupling. By assumption c), we assume their interaction at all times is the same as in our laboratories. Therefore, we can predict that the comoving scale of the BAO today is a constant R independent of the redshift at which it is observed. For instance, in ΛCDM, R (in units of where the indexes γ, b, m refer to radiation, baryons, and dark matter, respectively; moreover, R s (z) = (3Ω b0 /4Ω γ0 )/(1+ z), z drag ≈ 1000 is the redshifts of the drag epoch (see the numerical formula given in [77]), and z eq = 2.396 × 10 4 Ω m0 h 2 ≈ 3200 is the redshift at equivalence. The value R can be used as a standard ruler: as for SNIa, we do not need to know R, but just to assume that it is constant. Therefore, we can search in the clustering of galaxies for such a scale, in particular by identifying a peak in the correlation function. The angle under which we observe R gives us the 'transverse BAO'. In turn, this angle gives us the dimensionless angular diameter distance The correlation function however depends both on the angle between sources and on their redshift difference. That is, one can observe also a 'longitudinal BAO' scale which, for a small redshift separation dz, amounts to This means that BAO can estimate at every redshift two combinations involving E(z) and Ω k0 , and therefore determine both in a MI way. Therefore the FLRW metric can in principle be reconstructed, within the range covered by BAO observations, without assumptions beside a). Clearly, SNIa and other distance indicators can contribute to the statistics, but do not offer information on alternative combinations of cosmological parameters. Once we have the FLRW metric, the redshifts and angles can be converted to distance by solving ds = 0 . Given two sources at redshifts z 1 , z 2 separated by an angle θ, their relative distance r 12 is [78] where the comoving distance r(z) is defined in (106). The background geometry is then recoverable in a MI way. But this is not a test of gravity. We move then to the next layer, perturbations.

XI. MEASURING GRAVITY: THE ANISOTROPIC STRESS
We have seen that the gravitational slip η is defined as the ratio between the two gravitational potentials The lensing potential Ψ − Φ is the combination that exerts a force on the relativistic particles (i.e., for our purposes, light), while Ψ exerts a force on non-relativistic particles (i.e., for our purposes, galaxies). The explicit form of the equation of motion for a generic particle moving with velocity v and relativistic factor γ 2 = (1 − v 2 ) −1 in a weak-field Minkowski metric is in fact [79] For small velocities, only the last term on the rhs survives; for relativistic velocities, only the square bracket term. This means that in order to test gravity at cosmological scales we need to combine observations of lensing and of clustering and velocity of galaxies. The linear gravitational perturbation theory gives the growth of the matter density contrast δ m (k, z) at any redshift z and any wavenumber k, given a background cosmology and a gravity model. It is convenient to define also the growth function and the growth rate where, as usual, the prime stands for derivative with respect to N = log e a. However, what we observe is the galaxy number density contrast in redshift space, usually expressed in terms of the galaxy power spectrum as a function of wavenumber k and redshift, P gal (k, z). Since galaxies are expected to be a biased tracer of mass, we need to introduce a bias function that in general depends on time and space (that is, on k, z). If b = 1 then the number density of galaxies in a given place is proportional to the amount of underlying total matter, ρ gal = const × ρ m . If b > 1 (< 1) then galaxies are more (less) clustered than matter. Moreover, since we observe in redshift space, which means we observe sum of cosmic expansion and the radial component of the local peculiar velocity, to convert to real space we need the Kaiser transformation [80], which induces a correction factor (1 + f µ 2 /b) 2 that depends on the cosine µ of the angle between the line of sight and the wavevector k. This means that the relation between what we observe, namely the galaxy power spectrum in redshift space, and what we need to test gravity, namely δ m , can be written as [81] P gal (k, z, µ) = (A + Rµ 2 ) 2 (122) where (A, R are mnemonics for amplitude and redshift, respectively) where δ m0 (k) = δ m (k, 0) is the root-mean-square matter density contrast today. With this definition, δ m0 is normalized as where W 8 (kR 8 ) is the window function for a 8 h −1 Mpc sphere, W (x) = 3(sin x − x cos x)/x 3 . Sometimes one defineŝ δ m0 = δ m0 /σ 8 , which is then normalized to unity.δ m0 can be referred to as the shape of the present power spectrum.
Eq. (122) shows that A, R are the only two observables one can derive from linear galaxy clustering. This dataset is often collectively called redshift distortion, RSD.
There is then a third observable that one can obtain from weak lensing. From eq. (52) we see that by estimating the shear distortion one can measure the quantity Since E(z) can be estimated independently, we define another observable, to be denoted L [26], as follows Together with E = H(z)/H 0 , the quantities A, R, L are the only cosmological information one can directly gather at the linear level 7 . Other observations, like the integrated Sachs-Wolfe or velocity fields, only give combinations of A, R, L, E, rather than new information. A direct measurement of the peculiar velocity field and its time derivative, for instance, would produce through the Euler equation (11) an estimation of the combination V = Ω m0 Y Gδ m0 , which however is equivalent to 2RE 2 (2 + (log ER) )/3(1 + z) 3 . That is, at least at the linear level, one can add more statistics, but will always end up with these four quantities rather than, say, a direct estimate of Ω m0 or Y . A preliminary non-linear analysis [82] shows that employing higher-order statistics we can obtain more MI information, but we will not consider this here.
We can now write down the lensing equation in Fourier space in the following way (see [83]) wherek = k/aH. The linearized matter conservation equations, i.e. the continuity equation and the Euler equation, can be combined in a single second-order equation that depends only on the pressureless assumption d) and not on the gravitational model. In terms of our observational variables and for slowly varying potentials, this becomes These equations show clearly that lensing and matter growth can measure some combination of R, L, E and their derivatives, as will be seen explicitly below. For now, let us just rewrite eq. (129), employing also eq. (21) as We see then that Y is not, unfortunately, a MI quantity. Even if we have precise information on R, E, we would still need at any k, z the combination Ω m0 /f , which is not an observable. Only a null test of standard gravity plus a specific cosmological model, say ΛCDM, is possible: in this case in fact Y = 1, and f ≈ Ω 0.55 m are known, and we have that Ω m0 is uniquely measured by a combination of R, R , E, E . Any two measures at different k or z must then give the same Ω m0 . We show below that η, in contrast to Y , is a MI quantity.
Although A, R, L might be interesting statistics on their own, our goal here is to test gravity. Now, the bias function depends on complicate, possibly non-linear and hydrodynamical processes, so that, even if b depends on gravity, we do not know how. Also the shape δ m0 of the power spectrum depends on initial conditions (inflation) and, possibly, on processes that distorted the initial spectrum during the cosmic evolution. In fact, even if we could exactly measure the power spectrum shape from CMB without a parametrization like n s or its "running", nothing prevents that an unknown process, for instance the presence of early dark energy or early modified gravity, distorted the spectrum at some intermediate redshift between last scattering and today. Therefore, in order to obtain model-independent measures, we should get rid of both b and δ m0 . It was shown in [83,84] that one can obtain only three statistics where the effects of the shape of the primordial power spectrum is canceled out, namely In the last equation we introduced the often-employed quantity Notice that we are not defining σ 8 (k, z) as an integral over the power spectrum at z, as in eq. (124), because we are interested in the k-dependence. These quantities depend in general on k, z in an arbitrary way. Every other ratio of A, R, L or their derivatives can be obtained through P 1−3 or their derivatives. Let us discuss the three statistics P 1−3 in turn. The first quantity, P 1 , often called β in the literature, contains the bias function. Since we do not know how to extract gravitational information, if any, from the bias, we do not consider it any longer.
Concerning P 3 , we notice that, although related, what is observed is R and not f σ 8 (k, z). In order to determine the latter from the observable R, one has to assume a value of δ m0 /σ 8 =δ m0 (typically chosen to be given by ΛCDM), so that it is not a model-independent observable. One could imagine that P 3 alone is instead a direct test of gravity, since it depends only on f . However, in order to predict the theoretical value of R (or f ) as a function of the gravity parameter Y from eq. (130) one needs to choose a value of Ω m0 and the initial condition f (k, z i ) at some epoch z i for every k. In almost all the papers on this topic since [85], this initial condition is assumed to be given by a purely matter-dominated universe at some high redshift (this is, for instance, how the well-known approximated formula f ≈ Ω γ m (z) is obtained). However, in models of early dark energy or early modified gravity, this assumption is broken. Therefore, once again, P 3 alone cannot provide a MI measurement of gravity. Clearly, exactly as we have seen for the dark energy EOS w(z), if one parametrizes Y (k, z) with a sufficiently small number of free parameters, then the RSD data alone, which provide R(k, z), can fix both Ω m0 and Y (k, z).
We can also see that P 2 is trivially related to the E G statistics, whose expected value at a scale k is (see [86] and references therein) as In ΛCDM and with Planck 2015 parameters, its present value is E g0 ≈ Ω m0 /f 0 ≈ 0.58. With our definitions, the relation with P 2 is given by The E g statistics has been used several times as a test of modified gravity [86][87][88][89]. However, it is not per se a model-independent test. In fact, the theoretical value of E g depends on Ω m0 and on f . As already stressed, Ω m0 is not an observable quantity. Moreover, the growth rate f is estimated by solving the differential equation of the perturbation growth and this requires initial conditions and Y . As a consequence of this, when we compare E g to the predicted value (132), we can never know whether any discrepancy is due to a different value of Ω m0 or different initial conditions, or non-standard modified gravity parameters Y, η. As previously, one can employ E g only to perform a null test of standard gravity plus ΛCDM, or other specific models. This is of course a task of primary importance, but is different from measuring the properties of gravity in a model-independent way.
In contrast, we can define a MI statistics to measure gravity, in particular the parameter η, by combining the equation for the growth of structure formation eq. (129) with the lensing equation (127), and with eqs. (21,14). We see then that the gravitational slip as a function of model-independent observables is given by In order to distinguish the observables from the theoretical expectations, we denoted the combination on the left-handside of this equation as η obs . The statistics η obs is model-independent because it estimates directly η without any need to assume a model for the bias, nor to guess σ 8 or Ω m0 , nor to assume initial conditions for f . So if observationally one finds η obs =1, then ΛCDM and all the models in standard gravity and in which dark energy is a perfect fluid are ruled out. As a consequence, cautionary remarks like those in [90], namely that their results about E g cannot be employed until the tension between Ω m0 in different observational dataset is resolved, do not apply to η obs . The price to pay is that eq. (137) depends on derivatives of E and, through P 3 , of f σ 8 (z). Derivatives of random variables are notoriously very noisy. In the next sections we will compare several methods to extract the signal. If we abandon the linear regime then of course new observables can be devised, see e.g. [82]. One interesting case is provided by relaxed galaxy clusters, for which we can reasonable expect that the virial theorem is at least approximately respected. In this case, we can directly measure the potential Ψ by the Jeans equation, i.e. the equilibrium equation between the motion of the member galaxies and the gravitational force (note that the potential remains linear for galaxies and clusters, even for a non-linear distribution of matter). The lensing potential can instead be mapped through weak and strong lensing of background galaxies. In this case, one can gather much more information on the modified gravity parameters than in the linear regime [31]. However, the validity of this approach relies entirely on two important assumptions. First, we must assume the validity of the virial theorem, which can be more or less reasonable, but cannot be proved independently. Second, since we have access only to the radial component of the member galaxy velocities, we must assume a model for the velocity anisotropy, i.e. how the other components are distributed within the cluster.
Concluding this section, we recap and emphasize the main points. A, R, L, E are the only independent linear observables in cosmology. The ratios P 1−3 are independent of the initial conditions (i.e., of the power spectrum shape). P 2 , P 3 are also independent of the galaxy bias. The combination η obs (P 2, P 3, E) is therefore a model-independent test of gravity: it does not depend on bias, on initial conditions, nor on other unobservable quantities like Ω m0 or σ 8 . If η obs = 1, gravity is not Einsteinian; if η obs does not have the same k 2 dependence as the Horndeski theory, the entire Horndeski model is rejected. All this, of course, provided our conditions a) − d) are verified.

XII. GENERAL PERFECT FLUID
What happens if we remove condition d), namely, that matter is pressureless? If matter is a perfect fluid and we know or hypothesize a different equation of state and sound speed, then eq. (128) is modified since the continuity and Euler equations, which come directly from the conservation of the energy-momentum tensor, now read where the sound speed is c 2 s ≡ δp/δρ and σ is the matter anisotropic stress. Here we are assuming that δ represents the density contrast of matter, both baryons and dark matter, whose microphysical properties are described by with some effective parameters σ, c s , w. Assuming a zero anisotropic stress, since we are dealing with non-relativistic matter, and for small and constant w and c 2 s , we obtain the following second order differential equation which reduces to eq. (17) for cold dark matter, where σ = w = c 2 s = 0. In the case of a constant w, the matter would not follow an a −3 behavior as a function of time, but it would scale with (1 + z) 3(1+w) , so that the lensing equation (127) would now read Taking the appropriate ratios of the two equations above, we can obtain η as we did for eq. 137, but this time some extra term appears where W 1 = 3(c 2 s − 2w) and W 2 = 6(c 2 s − w). Both W 1 and W 2 reduce to zero for standard cold dark matter, such that we recover eq. (137) exactly in that case. For a barotropic fluid such that p = p(ρ), c 2 s = w and W 2 = 0. In this case, we have again a MI estimator for η, provided we know c s , w. On the other hand, if W 2 = 0, we see that this estimation of η contains the growth rate f , which we argued not to be a model-independent observable in the linear regime. However, an extension of this formalism to the quasilinear scales [82] has shown that f can indeed be recovered in a model-independent way, using observations of the bispectrum.

XIII. THE LINEAR, SCALAR, QUASI-STATIC, MODEL-INDEPENDENT HORNDESKI OBSERVABLES
For the previous sections we can draw a remarkable conclusion. Since η is the only linear, quasi-static, MI cosmological observable, we see that, among the HL parameters, only the time-dependent functions h 2 , h 4 , h 5 (see eq. 23) share the same property. The GW speed constraint has already measured h 2 (t 0 ) = 1. Assuming this can be extended at all times, so that α T = 0, and assuming H is also measured in a MI way, we see that what can still be measured at the linear perturbation level are the combinations that corresponds to the two scales one can measure in η. If O 2 vanishes, h 4 = h 5 and η = h 2 = 1 as in the standard case. As we have already seen, this happens only in two cases, for α M = 0 and for α M = −α B /2.

XIV. DATA
In the next sections we obtain an estimate of η obs using all the currently available data 8 . The first step is to reconstruct E(z) (and therefore E (z)), P 2 (z) and P 3 (z) using the data all the currently relevant available data, shown in Fig. 1, where we also plot the ΛCDM curves of the different functions using the cosmological parameters from the TT+lowP+lensing Planck 2015 best-fits [91]. A similar analysis, with the much smaller dataset then available, was carried out also in Ref. [92].
For the Hubble parameter measurements, we have used the most recent compilation of H(z) data from [93], including the measurements from [94][95][96][97], Baryon Oscillation Spectroscopic Survey (BOSS) [98][99][100] and the Sloan Digital Sky Survey (SDSS) [101,102]. In this compilation, the majority of the measurements was obtained using the cosmic chronometric technique. This method infers the expansion rate dz/dt by taking the difference in redshift of a pair passively-evolving galaxies. The remaining measurements were obtained through the position of the BAO peaks in the power spectrum of a galaxy distribution for a given redshift. For this case, the measurements from [98] and [99] are obtained using the BAO signal in the Lyman-α forest distribution alone or cross correlated with Quasi-Stellar Objects (QSO) (for the details of the method, we refer the reader to the original papers). Ref. [102] provides the covariance matrix of three H(z) measurements from the radial BAO galaxy distribution. To this compilation we add the results from WiggleZ [103]. In addition to these, we use the recent results from [104] where a compilation of Type Ia Supernovae from CANDELS and CLASH Multi-cycle Treasury programs were analyzed providing a few tight measurements of the expansion rate E(z).
The E g data include the results from KiDS+2dFLenS+GAMA [90], i.e, a joint analysis of weak gravitational lensing, galaxy clustering and redshift space distortions. We also include image and spectroscopic measurements of the Red Cluster Sequence Lensing Survey (RCSLenS) [105] where the analysis combines the the Canada-France-Hawaii Telescope Lensing Survey (CFHTLenS), the WiggleZ Dark Energy Survey and the Baryon Oscillation Spectroscopic Survey (BOSS). Finally the work of VIMOS Public Extragalactic Redshift Survey (VIPERS) [106] is also accounted for in our data. The latter reference uses redshift-space distortions and galaxy-galaxy lensing.
These sources provide measurements in real space within the scales 3 < R p < 60h −1 Mpc and in the linear regime, which is the one we are interested in. They have been obtained over a relatively narrow range of scales λ meaning that we can consider them relative to the k = 2π/λ-th Fourier component, as a first approximation. In any case, the discussion about the k-dependence of η is beyond the scope of this work, so the final result can be seen as an average over the range of scales effectively employed in the observations. Moreover, in the estimation of E g , based on [86], one assumes that the redshift of the lens galaxies can be approximated by a single value. With these approximations, indeed E g is equivalent to P 2 /2, otherwise E g represents some sort of average value along the line of sight. We caution that these approximations can have a systematic effect both on the measurement of E g and on our derivation of η. In a future work we will quantify the level of bias possibly introduced by these approximations in our estimate.

XV. RECONSTRUCTION OF FUNCTIONS FROM DATA
The only difficulty in obtaining η obs is that we need to take the ratios P 2 , P 3 at the same redshift, while we have datapoints at different redshifts, and that we need to take derivatives of E(z) and f σ 8 (z). This essentially means we need to have a reliable way to interpolate the data to reconstruct the underlying behavior.
There is no universally accepted method to interpolate data. Depending on how many assumptions one makes regarding the theoretical model, e.g. whether the reconstructed functions need just to be continuous, or smooth, depending on few or many parameters, etc., one gets unavoidably different results, especially in the final errors. Here, we consider and compare three methods to obtain the value of η obs : binning, Gaussian Process (GP), and generalized linear regression.
The first, and simplest, method assembles the data into bins. This consists in dividing the data into particular redshift interval (bin) and for each of these intervals one calculates the average value of the subset of the data contained in that bin. The corresponding redshift and error of each bin are computed as weighted averages.
Another way to reconstruct a continuous function from a dataset is using a Gaussian Process algorithm as explained in [122]. This process can be regarded as the generalization of Gaussian distributions to function space since it provides a distribution over functions instead of a distribution of a random variable. Considering a dataset D = {(x i , y i )|i = 1, ...n}, where x i are deterministic variables and y i random variables, the goal is to obtain a continuous function f (x) that best describes the dataset. A function f evaluated at a point x is a Gaussian random variable with mean µ(x) and variance Var(x). The f (x) values depend on the function value evaluated at otherx point (particularly if they are close points). The relation between these can be given by a covariance function cov(f (x), f (x)) = k(x,x). The covariance function k(x,x) is in principle arbitrary. Since we are interested in reconstruct the derivative of data, a Gaussian covariance function as is the chosen function since it is the most common having the least number of additional parameters. This function depends on the hyperparameters σ f and that allow to set the strength of the covariance function. These hyperparameters can be regarded as the typical scale and change in the x and y direction. The full covariance function takes the data covariance matrix C into account by M (x,x) = k(x,x) + C. The log likelihood is then where |M | is the determinant of M (x i , x j ). The distribution eq. (146) is usually sharply peaked and so we maximize the distribution to optimize the hyperparameters, although this is an approximation to the marginalization process and it may not be the best approach for all datasets. We employ the Python publicly available GaPP code from Seikel et al. (2012) [123].
As a third method, we use a generalized linear regression. Let us assume we have N data y i , one for each value of the independent variable x i and that where e i are errors (random variables) which are assumed to be distributed as Gaussian variables. Here f i are theoretical functions that depend linearly on a number of parameters A α where g iα (x i ) are functions of the variable x i , chosen to be simple powers, g iα = x α i , so that f i are polynomials of order n.
The order of the polynomial is in principle arbitrary, up to the number N of datapoints. However, it is clear that with too many free parameters the resulting χ 2 will be very close to zero, that is, statistically unlikely. At the same time, too many parameters also render the numerical Fisher matrix computationally unstable (producing, e.g., a non-positive definite matrix) and the polynomial wildly oscillating. On the other hand, too few parameters restrict the allowed family of functions. Therefore, we select the order of the polynomial function by choosing the degree for which the reduced chi-squared χ 2 red = χ 2 min N −n−1 , is closest to unity and such that the Fisher matrix is positive definite.

XVI. RESULTS
Let us now discuss the results of the final observable η obs for each of these methods. The binning method contains the least number of assumptions compared to the polynomial regression or the Gaussian Process method. It is essentially a weighted average over the data points and its error bars at each redshift bin. Since we need to take derivatives in order to calculate P 3 and E , and we have few data points, we opt to compute finite difference derivatives. This has the caveat that it introduces correlations among the errors of the function and its derivatives, that we cannot take into account with this simple method. Moreover, for the binning method, we do not take into account possible non-diagonal covariance matrices for the data, which we do for polynomial regression and the Gaussian Process reconstruction. Figure 2 shows the reconstructed functions obtained by the binning method, the Gaussian Process and with polynomial regression, alongside with the theoretical prediction of the standard ΛCDM model. In all cases the error bars or the bands represent the 1σ uncertainty.
With the binning method, the number of bins is limited by the maximum number of existing data redshifts from the smallest data set corresponding to one of our model-independent observables. In this case, this is the quantity E g , for which we have effectively only three redshift bins. There are nine E g data points, but most of them are very close to each other in redshift, due to being measured by different collaborations or at different scales in real space for the same z. As explained in the data section above, we just regard this data as an average over different scales, assuming that non-linear corrections have been correctly taken into account by the respective experimental collaboration. Since we do not have to take derivatives of E g , or equivalently P 2 , this leaves us with three possible redshift bins, centered at z 1 = 0.294, z 2 = 0.580 and z 3 = 0.860, all of them with an approximate bin width of ∆z ≈ 0.29. At these redshifts we obtain η obs (z 1 ) = 0.48±0.45, η obs (z 2 ) = −0.03±0.34 and η obs (z 3 ) = −2.78±6. 84. These values and the estimation of the intermediate model-independent quantities can be seen in Table II.
Regarding the Gaussian Process method, we have computed the normalized Hubble function and its derivative, E(z) and E (z) with the dgp module of the GaPP code. We reconstructed the E(z) and E (z) for the redshift interval of the data using the Gaussian function as the covariance function and initial values of the hyperparameters θ = [σ f = 0.5, f = 0.5] that later are estimated by the code. The same procedure was done for the P 2 (z) data. We obtain for E(z) and E (z) functions the hyperparameters σ f = 2.12 and f = 2.06 and for the P 2 function, σ f = 0.58 and f = 0.67.
For the P 3 (z) observable, the hyperparameters obtained by the GaPP code led to a very flat and unrealistic reconstruction, that suggested us to take another approach for obtaining the optimal hyperparameters. We sampled the logarithm of the marginal likelihood on a grid of hyperparameters σ f , f from 0.01 to 2, setting this way a prior with the redshift range of the dataset, and 300 points equally separated in log-space for each dimension. Remember that the hyperparameter f constrains the typical scale on the independent variable z. Thus, as an additional prior, we impose that f needs to be smaller than the redshift range of the data, which was not guaranteed by the default GaPP code. Then we chose the pair of hyperparameters corresponding to the maximum of the log-marginal likehood. Therefore, for the ln(f σ 8 (z)) data, we obtain σ f = 0.549 and f = 1.361. Its reconstructed derivative P 3 can be seen in the lower right panel of Figure 2. The function remains relatively flat, compared to the one given by other methods, but this approach has improved the determination of this observable.
Regarding the choice of the kernel function, several functions were compared, each of them with a different number of parameters to see the impact on the output. We tested the Gaussian kernel with two parameters, (σ f , f ); the rational quadratic kernel with three parameters and the double Gaussian kernel with four parameters (see the original reference for the explicit implemented formula [123]). We performed tests using the H(z) data obtained with the cosmic chronometer technique and the f σ 8 (z) data. Our tests show that the different choices shift the reconstructed function up to 6% on its central value compared to the Gaussian kernel function. This happens for H(z) while the effect is negligible for f σ 8 (z). Taking into account the above choices and procedure, we report that with the Gaussian Process method we obtain η obs (z 1 ) = 0.38 ± 0.23, η obs (z 2 ) = 0.91 ± 0.36 and η obs (z 3 ) = 0.58 ± 0.93.
For the polynomial regression method, we find η obs (z 1 ) = 0.57 ± 1.05, η obs (z 2 ) = 0.48 ± 0.96 and η obs (z 3 ) = −0.11 ± 3.21. Note that we applied the criteria of a χ 2 red closest to one and a positive definite Fisher matrix to chose the order of the polynomial for each of the datasets. These criteria led to a choice of a polynomial of order 3 for the E(z) and E g (z) data and order 6 for the ln(f σ 8 (z)) data. These polynomials can be seen in Figure 2 as solid yellow lines, together with their 1σ uncertainty bands. The higher order of the polynomial of ln(f σ 8 (z)) explains the "bumpiness" of the reconstruction of P 3 , leading to larger errors on this observable in comparison to the GP method.
In Fig. 3 we show the reconstructed η obs as a function of redshift with the three different methods, again with GP in a green dashed line, polynomial regression in a yellow solid line and the binning method in blue squares with error bars. It is possible to conclude that the methods are consistent with each other, within their 1σ uncertainties and that in most bins the results are consistent with the standard gravity scenario. We find that the error bars of the Gaussian Process reconstruction are generally smaller than the other methods, such that at the lowest redshift, GP is not compatible with η obs = 1 at nearly 2σ, while in the case of the binning method at the intermediate redshift, z = 0.58, the tension is nearly 3σ.
Finally, we can combine the estimates at three redshifts of Table II into a single value. Assuming a constant η obs in this entire observed range and performing a simple weighted average, we find finally η obs = 0.15 ± 0.27 (binning), η obs = 0.53 ± 0.19 (Gaussian Process) and η obs = 0.49 ± 0.69 (polynomial regression). The Gaussian Process method yields the smallest error and would exclude standard gravity. However, despite being sometimes advertised as "modelindependent", we believe that this method actually makes a strong assumption, since it compresses the ignorance about the reconstruction into a kernel function that depends on two or a small number of parameters, which are often not even fully marginalized over, as we did in our case. Also the binning method taken at face value would rule out standard gravity. However, as already mentioned, we did not take into account the correlation induced by the finite differences, and this might have decreased the overall error. Overall, we think the polynomial regression method is the most satisfactory one, providing the best compromise between the least number of assumptions and the best estimation of the data derivative. Therefore, we consider it as our "fiducial" result.

XVII. CONCLUSION
Measuring the properties of gravity at large scales is one of the main tasks of cosmology for the next years. Several large observational campaigns that are underway, or will soon be [124][125][126][127][128], will collect enough data on galaxy clustering and lensing to render this task possible to a high level of accuracy.
In order to test gravity one has to provide an alternative, either a full model or at least some parametrization that goes beyond Einstein's gravity. Here we chose to consider the Horndeski Lagrangian because, although based on a single scalar field, displays most of the properties that make the field of modified gravity models such a rich area of research. We connected a more theoretical-oriented parameterization, the α i parameters of Ref. [34] with more phenomenologically-oriented ones, the h i parameters. To gain a deeper physical understanding, we discuss also some interesting limiting cases, how the Newtonian potentials look in real space, and the impact of the constraints from gravitational wave speed.
The first practical goal in cosmology is to test and possibly rule out specific models of gravity and background expansion. For instance, one can rule out ΛCDM in a number of way, the simplest of which being measuring a deviation from the predicted H(z) behavior (which is not equivalent, as we have seen, to simply finding deviations from a w = −1 equation of state). Models in which gravity is modified can often be designed to have a perfect ΛCDM background, so it is necessary to test them at perturbation level.
Here, however, a problem arises, namely that many more assumptions need generally to be made. Some of them, listed in sec. IX, are in some sense of fundamental character, and we follow them in this work. However, most cosmological analyses that test gravity assume in addition one or more of the following assumptions: 1) that the initial conditions are given by a simple inflationary spectrum described by one or two parameters; 2) that the cosmological evolution at z larger than a few is given by a pure CDM dominated Universe living in standard gravity; 3) that the linear bias depends only on time and not on scale; and 4) that the value of some parameters, like Ω m0 obtained from CMB analyses assuming ΛCDM, can be applied also to different models.
We have shown that a statistics called η obs can be measured without any of the assumptions 1-4. This statistics is an estimator of the anisotropic stress parameter η, one of the two phenomenological functions of linearized, scalar, sub-horizon modified gravity. In this sense, we say that η obs is (relatively) model independent. If η obs differs from unity, either gravity is modified, or at least one of the four "fundamental" assumptions of sec. IX are false.
We provided a preliminary estimate of η obs based on currently available data, η obs = 0.49 ± 0.69 in the redshift range z = (0.2 − 0.8). The full k-and z-dependence is still unaccessible with current data. According to [26], the Euclid mission will be able to measure η to a few percent, so almost two orders of magnitude better than current values, and begin to put interesting limits on the k-and z-dependence. As the philosopher of science Alexandre Koyré said concerning the emergence of modern science 9 , also in measuring gravity at cosmological scales, we will finally move "from the world of approximation to the Universe of precision".