Stability of Sobolev inequalities on Riemannian manifolds with Ricci curvature lower bounds

We study the qualitative stability of two classes of Sobolev inequalities on Riemannian manifolds. In the case of positive Ricci curvature, we prove that an almost extremal function for the sharp Sobolev inequality is close to an extremal function of the round sphere. In the setting of non-negative Ricci curvature and Euclidean volume growth, we show an analogous result in comparison with the extremal functions in the Euclidean Sobolev inequality. As an application, we deduce a stability result for minimizing Yamabe metrics. The arguments rely on a generalized Lions' concentration compactness on varying spaces and on rigidity results of Sobolev inequalities on singular spaces.


Introduction
The sharp Sobolev inequality on the standard round sphere S n , n > 2, reads as where 2 * := 2n/(n − 2) and the norms are computed with the renormalized volume measure Vol S n (S n ) .This inequality goes back to the work of Aubin [15], who also characterized nonconstant extremizers (see also [69,Chapter 5]) having the following expression (denoting by d the distance induced by the metric): , with a ∈ R, b ∈ (0, 1), z 0 ∈ S n . (1.2) We will refer to them as spherical bubbles.A natural question is the one of stability: (Q) Is a function satisfying almost equality in (1.1) close to a spherical bubble?Up to a change of coordinates via the stereographic projection (see e.g.[80,44,46]), this question is equivalent to the stability of the Euclidean Sobolev inequality where Ẇ 1,2 (R n ) := {u ∈ L 2 * (R n ) : |∇u| ∈ L 2 (R n )} and Eucl(n, 2) > 0 is the sharp constant, computed by Aubin [16] and Talenti [98] (see (2.10) for its precise value).Extremizers, i.e. functions u for which equality occurs in (1.3), are also in this case completely characterized: We shall refer to these functions as Euclidean bubbles (usually called Talenti or Aubin-Talenti bubbles).The first quantitative stability result was obtained by Bianchi and Egnell [25] who showed that inf for a dimensional constant C n > 0 and the infimum taken among all w as in (1.4).This stability is strong, in the sense that the L 2 -norm of the difference of gradients is the biggest possible norm that can be controlled, and optimal, as the exponent 1/2 is sharp.We mention that quantitative stability for the case of the p-Sobolev inequality in R n has also been obtained in sharp form (see [41,48,88,49]).The stability of (1.3) in qualitative form, meaning that if the right-hand side of (1.5) is small then so is the left-hand side (in a non-quantified sense), can be deduced via concentration compactness [81,82].
In this note, we address the analogous stability of (Q) for Sobolev inequalities on more general Riemannian manifolds.
Under these assumptions the same Sobolev inequality (1.1) as in the sphere holds [73]: where the norms are with the renormalized volume measure.Proofs of this inequality using different methods are also given in [19,21,51,69,20,45].We can ask an analogous stability: (Q ′ ) Is a function satisfying almost equality in (1.6) close to a spherical bubble?Almost equality here means that In the previous work [89], we proved that if |Q(u) − 2 * −2 n | is small, then M is qualitatively close in the measure Gromov-Hausdorff sense to a spherical suspension, which roughly said is a possibily-singular generalization of the round sphere.In particular, when sup Q(u) = n −1 (2 * − 2), rigidity occurs, i.e.M is isometric to S n .These facts already suggested an affirmative answer to (Q ′ ) and in fact here we will confirm that this is indeed the case.More precisely, for M as above, every a ∈ R, b ∈ [0, 1) and z ∈ M , set w a,b,z (•) := a with the convention that w a,0,z ≡ a.Our main result is then the following (as before, all the norms are with respect to the renormalized volume measure): Theorem 1.1.For every ε > 0 and n > 2 there exists δ := δ(ε, n) > 0 such that the following holds.Let (M, g) be an n-dimensional Riemannian manifold with Ric g ≥ (n−1)g and suppose there exists u ∈ W 1,2 (M ) non-constant satisfying Then, there exist a ∈ R, b ∈ [0, 1) and z ∈ M such that ∇(u − w a,b,z ) L 2 + u − w a,b,z L 2 * u L 2 * ≤ ε. (1.9) Moreover, if w a,b,z ≡ a (i.e.b = 0), then a ∈ R can be chosen so that the reminder ) for some p ∈ M and positive constants α, β, C n depending only on n.
The above theorem is the first stability result for the Sobolev inequality that covers a wide class of Riemannian manifolds; indeed up to our best knowledge only very special symmetric cases had been studied so far: see [24] for the hyperbolic space and [52] for S 1 (1/ √ d − 2) × S n−1 (1).Some comments on the above statement are in order.
i) The value of δ depends only on n and ε > 0, but not on the manifold M .Moreover, up to scaling, an analogous statement holds assuming Ric g ≥ K for some K > 0, with δ depending also on K. ii) Even if Theorem 1.1 is stated completely in the smooth-setting, its proof will require the study of the Sobolev inequality also in singular spaces (see below the strategy for more details).iii) The result (1.9) actually holds under a slightly weaker assumption than (1.8), namely: iv) The first part of Theorem 1.1 holds also restricting to the class of non constant spherical bubbles, that is w a,b,z with b = 0. v) The second part of Theorem 1.1 should be read as follows: if the almost extremal function u is close to a constant, then (up to changing the constant) the reminder is close in L 2 -sense to a cosine of the distance.Thus, since , this means that u still retains, at a 'second-order' approximation, the shape of a spherical bubble.This extra information essentially comes from the fact that the linearization of the Sobolev inequality is the Poincaré inequality, which means that plugging in (1.6) functions of the type 1 + εf and sending ε → 0 gives the sharp Poincaré inequality for f (see e.g.[89,Lemma 6.7]).Therefore if 1+εf satisfies almost equality in (1.6), then f almost satisfies equality in the sharp Poincaré inequality and thus should be close to a cosine of the distance (see [39]).vi) When M is not the round sphere, the existence of an extremizer, that is a function which maximizes Q(u), is unknown in general.This question is contained in [69, Question 4B, Pag.120] as part of the so-called AB-program around Sobolev inequalities on general Riemannian manifolds.In this direction, we mention the Sobolev-alternative statement proved in [89,Theorem 6.8].Nevertheless, thanks to the above theorem, we are able to say something about the shape of functions for which this ratio is large, i.e. satisfying (1.8).
Remark 1.2.Note that above we deal only with p = 2.The reason is that the inequality u p L p * ≤ A ∇u p L p + u p L p , ∀u ∈ W 1,p (M ), (1.12) is false for any p > 2, A > 0 and any (M, g) closed manifold (see [69,Prop. 4.1]).
As an application of Theorem 1.1, we prove a stability-type result for minimizing Yamabe metrics.Recall that a solution to the Yamabe problem on a Riemannian manifold (M, g) is a smooth positive function u such that the metric u 4 n−2 g has constant scalar curvature (see [100] and also the surveys [79,30]).After the works [99,15,93] it is known that a solution exists on every closed Riemannian manifold and that can be found as a minimizer of where Scal g is the scalar curvature of g and Vol g is the (non-renormalized) volume measure.Y (M, g) is a called Yamabe constant of (M, g) and it is a conformal invariant.Note that in the case of S n , the minimizers of E(u) are precisely the spherical bubbles in (1.2).
Here d GH denotes the Gromov-Hausdorff distance.A similar stability for almost minimizers of E(•) has been recently proved in [46] in quantitative form and under no assumptions on the metric.The novelty here is that we have a comparison with an explicit class of functions, while in [46] no information is known about the shape of the minimizers.
We discuss now a second stability result on non-compact Riemannian manifolds.Our motivations come from the fact that, to prove Theorem 1.1, non-compact setting will naturally arise in our investigation (see below the main strategy of proof).
Let us consider an n-dimensional Riemannian manifolds (M, g), n > 2, satisfying for x ∈ M .The latter condition is called Euclidean volume growth property and AVR(M ) is the asymptotic volume ratio.Notice that the limit exists and is independent of x, by the Bishop-Gromov inequality.
In [22], the following sharp Euclidean-type Sobolev inequality was derived under the assumptions (1.15): Moreover, they proved that equality occurs in (1.16) for some non-zero function u ∈ Ẇ 1,2 (M ), then M is isometric to R n and u is in particular an Euclidean bubble.Actually in [22] this rigidity requires also u ∈ C n (M ) and u ≥ 0, however these additional assumptions can be removed after the results in [13] and [34] (see also Theorem 5.3).
The natural stability question is what happens if a function satisfies almost equality in (1.16).Clearly, differently from (1.6), we cannot deduce anything about the geometry of M .Indeed the inequality is sharp on every M as in (1.15), which means that we can always find functions so that ).We can prove however that a function for which almost equality occurs in (1.16) is close to a Euclidean bubble.Set v a,b,z := a Theorem 1.4.For every ε > 0, V ∈ (0, 1) and n > 2, there exists δ := δ(ε, n, V ) > 0 such that the following holds.Let (M, g) be an n-dimensional Riemannian manifold as in (1.15) with AVR(M ) ≥ V and assume there exists u ∈ Ẇ 1,2 (M ) non-zero satisfying Then, there exist a ∈ R, b > 0, and z ∈ M so that Notice that the stability is strong in the sense that we control the gradient norm as in the Euclidean case (1.5).
A direct consequence of the above theorem is: Corollary 1.5.Let (M, g) be an n-dimensional Riemannian manifold as in (1.15).Then AVR(M ) Remark 1.6.Our main results in Theorem 1.1 and Theorem 1.4, even if stated on smooth Riemannian manifolds, actually hold also in the context of weighted Riemannian manifolds and more generally in the singular setting of metric measure spaces with a synthetic Ricci curvature lower bound.The generalized version of these statements can be found in Theorem 8.1 and Theorem 8.4.
Strategy of proof and non-smooth setting.We outline the argument for Theorem 1.1 (Theorem 1.4 is simpler and follows by the same strategy).The underlying idea is classical, that is to argue by contradiction and concentration compactness.However, the novelty is that the space is not homogeneous and also not fixed, since we need to deal with a whole class of Riemannian manifolds.Moreover, singular and non-compact limit spaces must also be considered.In particular, the whole analysis will be carried out in the more general setting of RCD spaces, which are metric measure spaces with a synthetic notion of Ricci curvature bounded below (see Section 2 for details and references).Suppose that Theorem 1.1 is false.Then, there exist ε > 0, a sequence where the inf runs among all spherical bubbles w = a(1 (d k being the distance on M k ).Similarly to the classical concentration compactness [81,82] in R n , we choose points y k ∈ M k and constants σ k > 0 so that, defining we have (in the actual proof we choose a suitable constant close to 1).The spaces (Y k , ρ k , µ k ) are in particular metric measure spaces which are rescalings of the original manifolds M k .Note that it can happen that σ k ↑ ∞, which corresponds to a concentrating behavior of the sequence u k .In this case, the diameter of Y k goes to infinity and we are in a sense performing a blow-up along M k .
Thanks to Gromov's precompactness theorem [65] it is possible to show that, up to a subsequence, (Y k , ρ k , µ k , y k ) converges in the pointed-measure-Gromov-Hausdorff sense to a limit RCD space (Y, ρ, µ, ȳ) (which might be non-smooth).Using a generalized version of Lions' concentration compactness for a sequence of RCD spaces (see Section 6), we show that up to a further subsequence, u σ k converges L 2 * -strongly (on varying spaces, see Definition 2.9 below) to some u ∈ L 2 * (µ).It also follows that u is extremal for a 'limit Sobolev inequality' on Y , that might be both as in (1.6) or of Euclidean-type as in (1.16), depending if there is concentration or not along the original sequence u k .The key point is proving:

Concentration
⇒ Y is a metric-cone and u is a Euclidean bubble Non-concentration ⇒ Y is a spherical suspension and u is a spherical bubble We will show these two facts by proving suitable rigidity theorems for the Sobolev inequalities on RCD spaces (see Section 5).The proof will be then completed by carefully bringing back this information from u to the sequence u k to find a contradiction with (1.17).It is worth noticing that, in case of concentration, the scaled functions u σ k tend to a Euclidean bubble but, to reach a contradiction, the original sequence u k must be close to the family of spherical bubbles.This turns out to be true because a concentrated spherical bubble looks locally, around the point where it is concentrated, like a Euclidean bubble (see Lemma 7.3).
We conclude this introduction by mentioning that generalized concentration compactness techniques on varying spaces, in a similar spirit to the present work, have been recently developed in [11,12] and applied to study the problem of existence of isoperimetric regions on non-compact Riemannian manifolds [10].

Preliminaries
2.1.Calculus on metric measure spaces.A metric measure space is a triple (X, d, m), where (X, d) is a complete and separable metric space and m = 0 is a non-negative and boundedly finite Borel measure.Two metric measure spaces are isomorphic, provided there exists a measure preserving isometry between them.To avoid technicalities, we will always assume supp(m) = X.We will denote by LIP(X) and LIP bs (X) respectively the space of Lipschitz functions and Lipschitz functions with bounded support in (X, d).We recall the notion of local lipschitz constant of a Lipschitz function f ∈ LIP(X): set to +∞ if x is isolated.The Sobolev space on a metric measure space was introduced in [40] and [94] (inspired by the notion of upper gradient [70,71]).Here we follow the axiomatization of [5] (equivalent to that of [94,40]).Let (X, d, m) be a metric measure space and define the Cheeger energy Ch : The Sobolev space is defined as W 1,2 (X) := {f ∈ L 2 (m) : Ch(f ) < ∞} and equipped with the norm f 2 W 1,2 (X) := f 2 L 2 (m) + Ch(f ) turning it into a Banach space.We recall also (see e.g.[5]) that for every f ∈ W 1,2 (X) there exists a minimal m-a.e.object |∇f | ∈ L 2 (m) called minimal weak upper gradient so that To lighten the notation, we will often write ∇f L 2 (m) in place of |∇f | L 2 (m) .We shall often use the locality of minimal weak upper gradients: m-a.e. in {f = g}.for every f, g ∈ W 1,2 (X).For Ω ⊂ X open we say that f ∈ W 1,2 loc (Ω), provided ηf ∈ W 1,2 (X) for every η ∈ LIP bs (X) with d(supp(η), X \ Ω) > 0. By locality, the object m-a.e. on {η = 1}, is well defined as an L 2 loc (Ω)-function and will be called again minimal weak upper gradient.It can be easily checked that if We shall need also the following semicontinuity result: The W 1,2 loc regularity can be directly proved by appealing to the semicontinuity (see, e.g., [60,Prop 2.1.13])in the space W 1,2 (X) and a cut-off argument.The fact that |∇f | ∈ L 2 (m) follows by noticing that, for any ball , where η ∈ LIP c (X) + with η ≡ 1 on B, having used twice the locality of the minimal weak upper gradient and again [60,Prop 2.1.13].This proves (2.1) by arbitrariness of B.
For Ω ⊆ X open, we define the Sovolev space of functions vanishing at the boundary W 1,2 0 (Ω) ⊂ W 1,2 (X) as the closure or LIP c (Ω) with respect to the W 1,2 norm.A metric measure space is called infinitesimally Hilbertian [55] provided m-a.e., ∀f, g ∈ W 1,2 (X), or equivalently if W 1,2 (X) is Hilbert.This allows defining a formal scalar product between gradients of Sobolev functions by polarization ∇f, ∇g that is bilinear on its entries.By locality, it is possible to consider also a scalar product for functions in W 1,2 loc (Ω).We recall next the measure-valued Laplacian as in [55], in the case of X proper and infinitesimally Hilbertian.We say that f ∈ W 1,2 loc (Ω) has a measure-valued Laplacian on Ω, and we write f ∈ D(∆, Ω), provided there exists a (signed) Radon measure µ such that Here signed Radon measure means difference of two positive Radon measures (see also [38] for a related discussion).The unique measure µ satisfying the above is denoted by ∆f and depends linearly on f .If Ω = X we simply write f ∈ D(∆).Moreover, if ∆f ≪ m, we write ∆f := d∆f dm ∈ L 1 loc (Ω).Next, we introduce the sets of finite perimeter following [3,85].For E ⊂ X Borel and If Per(E, X) < ∞ we say that E has finite perimeter.In this case, the map A → Per(E, A) is the restriction to open sets of a non-negative finite Borel measure called the perimeter measure of E (see [3] and also [85]).As a convention, when A = X we simply write Per(E) instead of Per(E, X).
2.2.RCD-spaces.In this note, we shall work with spaces that encode Ricci lower bounds in a synthetic sense as introduced first and independently in [83] and [96,97].For K ∈ R, N ∈ [1, ∞), the Curvature Dimension condition CD(K, N ) for a metric measure space is a weak notion of Ricci curvature bounded below by K and dimension bounded above by N .We will actually consider here the subclass of spaces satisfying the so-called Riemannian Curvature Dimension condition.The RCD-condition has been defined first in the infinite dimensional setting [6] and later in [55] in finite dimension.We also recall [18,7,4,9,47,36] for key contributions on this theory and for the study of the equivalence of different definitions and approaches.We refer to [2] for more details and references.
Definition 2.1.A metric measure space (X, d, m) satisfies the RCD(K, N ) condition for some K ∈ R, N ∈ (1, ∞), if it is infinitesimally Hilbertian and satisfies the CD(K, N ) condition To keep the exposition shorter will not recall the definition of the CD(K, N ) condition and instead focus on recalling the key properties of RCD spaces used in this note.
We start recalling that RCD(K, N ) spaces satisfy the Bishop-Gromov inequality [96,97]: where K + is the positive part of K and v K,N (r) is the volume of a ball of radius r in the (K, N )-model space, see [96,97] for the precise definition.We only recall the particular case v 0,N (r) = ω N r N .In particular RCD(K, N ) spaces are uniformly locally doubling and, since they support a weak local Poincaré inequality [92], by the work [40] we have: Since RCD(K, N ) spaces are geodesic and uniformly locally doubling, they admit a reverse doubling inequality.We omit the standard argument (see e.g.[64,Prop. 3.3]).
We recall also the following version of the coarea formula from [85, Proposition 4.2] adapted to RCD-setting after [58].
Then by [85,Remark 4.3] and the results in [58] about the identification of total variation and minimal weak upper gradient, (2.6) holds for s, t, any g and with f in place of f .To pass to f simply use the locality of the weak upper gradient and note that by construction { f > r} = {f > r} for every r > s.
We also report a regularity result from [74].
In particular u ∈ LIP loc (X).
We say that an RCD(0, N ) space (X, d, m) has Euclidean volume growth, if for one (and thus, any) x ∈ X.In this setting, a sharp isoperimetric inequality was proved in [22] (previous versions in the smooth-setting already appeared in [29,1,50,75]).A slightly weaker inequality holds also in the MCP setting ( [35]).
Theorem 2.6.Let (X, d, m) be an RCD(0, N ) space with N ∈ (1, ∞), AVR(X) > 0. Equality holds in (2.8) for some E ⊂ X Borel with m(E) < +∞ if and only if X is a N -Euclidean metric measure cone and E is (up to m-neglible sets) a metric ball centred at one of the tips of X. Theorem 2.6 is stated in [34] with the extra assumption that E is bounded, however this assumption can be dropped thanks to the recent [14].
Recall that for N ∈ [1, ∞), the N -Euclidean cone over a metric measure space (Z, m Z , d Z ) is defined to be the space Z × [0, ∞)/(Z × {0}) endowed with the following distance and measure The point Z × {0} is called tip of the cone.
For convenience in the rest of this note, we adopt the following notation.

2.4.
Convergence and stability under pmGH-convergence.We start recalling the notion of pointed-measure Gromov Hausdorff convergence (pmGH convergence for short) following [59].This presentation is not standard (see e.g.[33,65]), but it is equivalent in the case of a sequence of uniformly locally doubling metric measure spaces ( [59]).
Set N := N∪{∞} and consider a sequence of pointed metric measure spaces (X n , d n , m n , x n ), with x n ∈ X n .We say that X n pmGH-converge to X ∞ if there exist isometric embeddings In the case of a sequence of uniformly locally doubling spaces (as in the case of RCD(K, N )spaces for fixed K ∈ R, N < ∞) we can also take (Z, d) to be proper.
It will be also convenient to adopt the so-called extrinsic approach and identify X n with their isomorphic copies in (Z, d).This allows writing m n ⇀ m ∞ in duality with C bs (Z).A choice of space (Z, d) together with isomorphic copies of the spaces X n will be often called a realization of the convergence.
For the scope of this note, it is important to recall the notion of convergence of functions along pmGH-convergence [72,59,8] and their properties.We fix in what follows a pmGHconvergent sequence of pointed metric measure spaces as discussed above.Definition 2.9.Let p ∈ (1, ∞) and fix a realization of the convergence in (Z, d).We say: Recall from [72,59,8] the linearity of convergence: if We point out the following simple fact: for any p ∈ (1, ∞) it holds Indeed, if the above liminf above is +∞, then there is nothing to prove.So let us assume it to be finite and also to be a limit, hence f n is L 2 -bounded.Then there exists an L 2weak convergent subsequence (see [59]) to some . By uniqueness of limits we have h = f ∞ , which shows (2.15).After the works in [96,97,83,53,6,59] and thanks to Gromov's precompactness theorem [65] we have the following precompactness result.
We report from [59] the Mosco-convergence of the Cheeger energies for pmGH-converging RCD-spaces: if (2.16) In particular, the above is a limit.

Pólya-Szegő inequality
3.1.Non-compact case.In this part we extend to the non-compact case the Pólya-Szegő inequality of Euclidean-type obtained in [89].
We need first to recall basic notations and facts about monotone decreasing rearrangements for functions in a m.m.s.(X, d, m) (for more details we refer to [87]).Let Ω ⊆ X be an open set (possibly unbounded) and u : Ω → [0, +∞) be a Borel function such that m({u > t}) < ∞ for any t > 0. We define µ : [0, +∞) → [0, ∞), the distribution function of u as µ(t) := m({u > t}).For u and µ as above, let us consider the generalized inverse u # of µ: Note that u # is non-increasing.In this note, we will perform rearrangements into the Euclidean model space For any open set Ω ⊂ X we set Note that u * N is always a non-increasing function, since so is u # .To lighten the notation, we shall often drop the subscript and just write u * .We collect basic facts about rearrangements, that can be proved by standard arguments as in the Euclidean case (see, e.g.[77]): be an non-decreasing sequence of Borel functions.Denote u := sup n u n and suppose that m({u > t}) < +∞ for every t > 0.Then, u * n : I N → R + (which exists by the assumptions) is a monotone non-decreasing sequence and lim n u * n = u * a.e. in [0, ∞).Proof.The fact that (u * n ) is monotone non-decreasing follows by the order preserving property of the rearrangement (3.1).Set So g, u * : [0, ∞) → [0, +∞] are equimeasurable and non-increasing (indeed g is the supremum of non-increasing functions), therefore they coincide a.e.(see e.g. the proof [77,Prop. 1.1.4]).
We will need the following approximation result to pass from the bounded to the unbounded case in the Euclidean Pólya-Szegő inequality.It will be needed also in other parts of this note.Lemma 3.2.Let (X, d, m) be a metric measure space and u ∈ W 1,2 loc (X) such that m({|u| > t}) < +∞ for all t > 0 and |∇u| ∈ L 2 (m).Then there exists a sequence u n ∈ W 1,2 (X) of functions with bounded support, such that u n → u m-a.e. and |∇(u Proof.We first deal with the case u ≥ 0 and u ∈ L ∞ (m) with m(supp(u)) < +∞.Fix x ∈ X and consider the sequence (η n ) ⊂ LIP(X) given by η n (.
and by the Leibniz rule by dominated convergence.Moreover, since u k ∈ L ∞ (m) and m(supp(u k )) < +∞, the conclusion in this case follows from the previous one and a diagonal argument (multiplying by the functions η n ).Monotonicity of the sequence is preserved because η n f ≤ η ng m-a.e. for every n > n and assuming 0 ≤ f ≤ g m-a.e..The pointwise m-a.e.convergence is also kept, since it remains true on every ball, recalling that Finally for a general u we approximate first u + and then u − by functions u n and v n respectively as we did in the above steps.
Moreover by construction we have that . This concludes the proof also in this case.
We can now prove the Pólya-Szegő inequality in the non compact case.
loc (X) be non-negative and such that m({u > t}) < ∞ for any t > 0.Then, meaning that, if the left hand side is finite, then u * ∈ W 1,2 loc (I N ) and (3.4) holds.Proof.First, if ∇u L 2 (m) = ∞, there is nothing to prove.So, suppose |∇u| ∈ L 2 (m).By Lemma 3.2 there exists a non-decreasing sequence u n ∈ W 1,2 (X) of functions with bounded support, such u n → u m-a.e. and ∇u n L 2 (m) → ∇u L 2 (m) .Applying the Pólya-Szegő inequality for bounded domains in [89, Theorem 3.6], we have u * n ∈ W 1,2 (I N ) and Moreover by Lemma 3.1 the sequence u * n is non-increasing and sup n u * n = u * pointwise.The proof is now concluded since we have that u * ∈ W 1,2 loc (I N ) and lim n ´|∇u * n | 2 dm N ≥ ´|∇u * | 2 dm N by semicontinuity (recall (2.1)).
3.2.Rigidity.In this section, we prove the rigidity in the Pólya-Szegő inequality of Proposition 3.3.The idea is that if equality in (3.4) is attained, the superlevel sets are isoperimetric sets, so Theorem 2.6 implies that the space is a cone.This line of thoughts follow classical arguments that date back to the work of [90] in Euclidean contexts and [23] for manifolds with Ricci curvature lower bounds.
Moreover, under additional regularity, the function can also be proven to be radial.A similar rigidity result was proved in [87] in the compact case for a different Pólya-Szegő inequality.
Proof.We divide the proof into different steps.
Step 1.We establish an improved version of (3.4) for a function u as in the statement.Fix such u.By Theorem 2.8 we know that u ∈ L 2 * (m).For every n ∈ N set v n := (u−1/n) + and notice that they are supported in the open set Ω n := {u > 1/(2n)}, which is bounded.Therefore v n ∈ LIP c (X).In particular by the Lipschitz-to-Lipschitz property of the rearrangement in the compact case (see [89,Prop. 3 and analogously ϕ, ψ, µ : [0, sup u) → [0, +∞] replacing everywhere v n with u.Note that, thanks to the locality of the gradient, ϕ(t) = ϕ n (t − 1/n) for all t ∈ (1/n, ∞) and the same holds for ψ and µ.We claim that a) µ n is absolutely continuous with If moreover |∇u| = 0 m-a.e. in {u > 0} then also ) is instead just a direct verification using the coarea formula (see (2.6)), since v n ∈ LIP c (X).Under the assumption |∇u| = 0 m-a.e. in {u > 0}, by the Hölder inequality (using (3.6)) we have Hence, the isoperimetric inequality (2.8) gives directly having also used coarea formula for the function v * n since it is LIP([0, R n ]) as recalled before.Since v n = (u − 1/n) + and v * n = (u * − 1/n) + , from the locality of the gradient we can rewrite (3.10) (after a change of variable) as for every s < r with s, r ∈ (0, sup u − 1/n].Taking the limit as n → +∞ we obtain Step 2. We pass to the proof that X is a cone.We claim that if equality occurs in (3.10) for some n ∈ N and some r, s t ∈ (s, r).Claim i) follows directly from the way we deduced (3.10) from (3.9) using the isoperimetric inequality (2.8).Claim ii) instead follows by the equality case in the Hölder inequality (3.8).
We now suppose, as in the hypotheses, that u attains equality in (3.4), which means that equality holds in (3.12) with (s, r) = (0, sup u).We claim that equality must hold in (3.12) also for all s < r with s, r ∈ (0, sup u).Suppose it fails for some s < r.Then, calling L(s ′ , r ′ ) and R(s ′ , r ′ ) respectively the left and right hand sides of (3.12), we have which contradicts the equality for (0, sup u).This proves the claim.Thus, equality holds in (3.11) for every s < r, with s, r ∈ (0, sup u − 1/n] which is equivalent to equality in (3.10) for every s < r with r, s ∈ [0, sup v n ].Therefore i) holds and, provided |∇u| = 0 at m-a.e. point in {u > 0}, also ii) holds for every s < r with r, s ∈ [0, sup v n ] and n ∈ N. Putting these together and by arbitrariness of n, implies that for a.e.t ∈ (0, sup u).Therefore, there exists t with µ(t) > 0 so that equality occurs in (3.13), and recalling the rigidity in Theorem 2.6, we get that X is isomorphic to an N -Euclidean metric measure cone.
Step 3.Here we prove the functional rigidity of u, i.e. we prove that u is radial under the additional assumption: |∇u| = 0 m-a.e. on {u > 0}.
We first claim that (3.13) actually holds for every t ∈ (0, sup u).Let t ∈ (0, sup u) and consider a sequence t n ↓ t for which (3.13) holds in every t n .Then, by lower-semicontinuity of the perimeter (see, e.g., [85,Proposition 3.6]) and continuity of µ, we get Being the converse inequality always true (from (2.8)), the claim follows.Since {u > t} are bounded (recall that u tends to zero at infinity), we can apply the rigidity Theorem 2.6 to deduce that for every t ∈ (0, sup u) there exists a radius R t > 0 and x t ∈ X a tip for X (recall that X is a cone from Step 2) so that m({u > t}△B Rt (x t )) = 0, where △ denotes the symmetric difference.However {u > t} is open.Thus {u > t} = B Rt (x t ). (3.15) We stress that the notation x t is chosen because the cone structure may depend a priori on the isoperimetric superlevel set {u > t}.From here, the rest of the proof is devoted to show that x t is in fact independent of t and u is radial.To do so we will follow the lines of the argument used in [87, Theorem 5.1], for the compact case.Using (3.14) and (3.5) (recall that µ(t) = µ n (t − 1/n)) we get for a.e.t ∈ (0, sup u).In particular, Per({u > t})-a.e. and a.e.t ∈ (0, sup u). (3.16) From the hypotheses u * is non-negative, strictly decreasing and locally absolutely continuous (in fact locally Lipschitz) in {u * > 0} = [0, A) for some A ∈ (0, +∞] (in fact A = m({u > 0})).Hence it admits a strictly decreasing continuous inverse (u * ) −1 : (0, M ] → [0, A), locally absolutely continuous in (0, M ).Since (u * ) −1 (M ) = 0, we can extend it by zero in [M, ∞) and call H : (0, ∞) → [0, A) this extension.In particular H ∈ AC loc (0, ∞).Observe that H might blow up at zero.Note also that, since u * is locally Lipschitz in (0, A), it preserves L 1 -null sets.Hence pre-images of L 1 -null subsets of (0, M ) via H = (u * ) −1 are also L 1 -null.Therefore for a.e.t ∈ (0, A) the function u * is differentiable at (u * ) −1 (t), the function H is differentiable at t and To conclude the proof, we need to show that f := AVR(X) for some point x 0 ∈ {u > 0}.Observe that f is continuous.We start proving that: To show this we will use the chain rule in Lemma B.3 with u, Ω := {u > 0}, ϕ := H and I := (0, ∞).To check the hypotheses we observe that by continuity u(Ω ′ ) ⊂⊂ (0, ∞) for all Ω ′ ⊂⊂ Ω. Moreover by (3.16) and (3.17) we have that for a.e.t ∈ (0, M ) it holds (3.20) This proves (3.19).Next, we claim that with x t ∈ {u > 0}.We already know by (3.15) and since H is strictly decreasing, that for every t ∈ (0, A) the set {f < t} is a ball B rt (x t ) for some r t ≥ 0 and x t tip of X.In particular m({f < t}) = ω N θ(r t ) N and Per({f < t}) = (ω N θ) , where θ := AVR(X).Moreover by coarea formula (2.6) applied to −f and using (3.19) Therefore the function (r t ) N is absolutely continuous with from which follows that r t = a + t, for all t ∈ (0, A), for some constant a ≥ 0. We claim that a = 0. Indeed by continuity and Bishop-Gromov inequality we have where in the last equality we used that |∇u| = 0 m-a.e. in {u > 0}.This proves (3.21).
It remains to prove that x t ≡ x 0 for all t ∈ (0, A).This would show (3.18) and conclude the proof.We argue by contradiction and suppose that x t = xt for some t < t < A. Set δ := d(x t , xt) > 0. Recall that x t is a tip of X, hence there is a ray emanating from it and containing xt , i.e. an isometry γ : [0, ∞) → X with γ 0 = x t and γ δ = xt.Consider the points x := γ t ∈ ∂B t (x t ) = {f = t} and y := γ δ+ t ∈ ∂Bt(xt) = {f = t}.Since γ δ+ t ∈ B t (x t ) and γ is an isometry, δ+ t < t.Therefore applying (3.20), since d(y, {u = 0}) ≥ d(y, ∂B t (x t )) = d(x, y), we finally find a contradiction: From Step 1 of the above proof, we deduce the following that has its own interest.Proposition 3.5 (Improved Pólya-Szegő inequality).Let (X, d, m) be an RCD(0, N ) space with N ∈ (1, ∞) and AVR(X) > 0. Then for every u ∈ LIP loc (X), non-negative, u(x) → 0 as d(x, z) → +∞ for some z ∈ X, and with (u * ) ′ = 0 -a.e. in {u * > 0}, it holds Remark 3.7 (On the necessity of (u * ) ′ = 0 and |∇u| = 0).We point out that, the hypothesis (u * ) ′ = 0 in Theorem 3.4 is necessary to prove that u is radial.This is well-known, see e.g.[32,Example 4.6] for an easy counterexample (in R n ) of a Lipschitz function saturating the Pólya-Szegő inequality with (u * ) ′ = 0 occurring on a set of positive measure.
In Theorem 3.4 we also assumed |∇u| = 0 at m-a.e. point of {u > 0}.This was needed to carry out key computations by differentiating the distribution functions (see, e.g., (3.6) above), as also done in [87].It is not clear to us at the moment if this assumption can be removed.

Regularity of extremal functions
We discuss here the general regularity properties of extremal functions for the Sobolev inequalities (S) considered in this note.
For the proof, we need two additional results.By continuity there exists r small enough so that B r (z 0 ) ⊂ U and v ≥ −δ/(2c) in B r (z 0 ).Then ∆v ≥ cvm + δm ≥ δ/2m in B r (x 0 ) and in particular v is subharmonic.Then from the strong maximum principle for subharmonic functions [62] (see also [26]) (recall that balls in X are connected) we deduce that v ≡ m in B r (z 0 ), which contradicts the fact that z 0 ∈ ∂C ⊂ U.
We now go back to the proof.The argument is essentially the same in [62], only that we will use the above weak maximum principle instead of the weak maximum principle for subharmonic functions.
Define the set C := {u = u(x 0 )} ⊂ Ω.If C = Ω we are done.Otherwise there exists x ∈ Ω \ C such that exists a unique y ∈ C satisfying r := d(x, y) = d(x, C) < d(x, Ω c ) (see [62]).Define the function h(z) := e −Ad(x,z) 2 − e −Ar 2 , with A ≫ 1 to be chosen.Let r ′ < r/2 be such that B r ′ (y) ⊂ Ω.To finish the proof it is sufficient to show that indeed the conclusion then follows arguing exactly as at the end of [62].By Laplacian comparison [55] (with computations similar to [62]) we can show that, provided A is chosen large enough depending on r and c, ∆ In particular for every ε > 0 from which (4.3) follows from (4.2) with v := u + εh, U := B r ′ (y), noticing that sup B r ′ (y) v ≥ u(y) + εh(y) = u(x 0 ) ≥ 0. Proof.We adapt an argument present in [84] in the Euclidean setting.
Remark 4.4.Even if not needed here, we observe that Proposition 4.3 actually holds in the more general setting of RCD(K, ∞) spaces (with the same proof).
We can now prove the regularity result for Sobolev extremals.
Proof of Theorem 4.1.The fact that u ∈ D(∆) and that (4.1) holds follows from a straightforward computation exploiting the fact that u is a minimizer of where the infimum is among all v ∈ W 1,2 loc (X) such that m({|v| > t}) < +∞ for every t > 0 and taking variations of the form u + εv, v ∈ LIP c (X) as ε → 0. See e.g.[89,Prop. 8.3] for the details in the compact case.
We pass to the second part, assuming that u is in L ∞ (m).From (4.1) we have that ∆u ∈ L ∞ (m), therefore Theorem 2.4 shows that u ∈ LIP loc (X).
From now on we will identify u with its continuous representative.We need to show that |u| > 0 in X. Suppose this is not the case, i.e. |u|(x 0 ) = 0 for some x 0 ∈ X.Note that |u| also satisfies the hypotheses of the theorem, hence provided we choose the constant C > 0 big enough.In particular, v satisfies the assumption of the maximum principle of Proposition 4.2 with v(x 0 ) = 0 = max v. Hence v ≡ 0 in X, which is a contradiction because u is assumed non-zero.Finally, if B = 0, since u never vanishes, we have that also ∆u never vanishes, hence |∇u| = 0 m-a.e.thanks to (4.4).

5.
Rigidity of extremal functions in the Sobolev inequality 5.1.Compact case.We study here the equality case for the Sobolev inequality as in (2.9).
As a technical tool we will need the following result that is a standard application of the Moser iteration scheme (see e.g.[68,Theorem 4.4]).This is known to be still valid in our setting, relying only on the Sobolev inequality (see also the discussion after [57, Theorem 5.7]).
We can now state and prove the main result of this section.Note that the fact that X is spherical suspension already follows from [89, Theorem 1.9].Here, we are mainly interested in the explicit expression of extremal functions.
. Then, X is isomorphic to a spherical suspension and, for some a ∈ R, b ∈ (0, 1) and z 0 ∈ X: Proof.The argument is inspired by the computations in [45, Section 2.1].
First, we need to deduce some regularity on the extremal function u.From Theorem 4.1 we know that u ∈ D(∆) and that 2 * − 2 Since u 2 * −2 ∈ L N/2 (m), by Lemma 5.1 below we deduce that u ∈ L q (m) for all q < +∞.In particular ∆u ∈ L q (m) for all q < +∞.Therefore by [76,Corollary 6] we have u ∈ LIP(X) and so u ∈ L ∞ (m) (alternatively we could have showed u ∈ L ∞ (m) applying [91, Lemma 4.1] and then deduced the Lipschitzianity from Theorem 4.1).Then we can apply the second part of Theorem 4.1 to deduce that either u > 0 or u < 0 in X.Note also that ∆u ∈ W 1,2 (X).Without loss of generality, we can assume that u > 0. Set v := u −2 N−2 .By the chain rule for the Laplacian (see e.g.[60,Prop. 5 N−2 , an easy computation using (5.1) shows Since v is bounded above and away from zero, by the chain rule for the Laplacian we also have that v 1−N ∈ D(∆) with ∆v 1−N ∈ L ∞ (m).We can then multiply (5.2) by ∆v 1−N and integrate We now proceed to integrate by parts.To do this note that v∆v ∈ W 1,2 (X) and |∇v| 2 ∈ D(∆) (see [56,Prop. 3.1.3]).Moreover by the Leibniz rule for the divergence div(∇v∆v) = ∇v, ∇∆v + (∆v) 2 ∈ L 1 (m) by the Leibniz rule (see [56,61] for the notion of divergence and e.g.[63,Prop. 3.2] for a version of the Leibniz rule that applies here).Hence Combining the above with the dimensional Bochner inequality ( [47,67]) and with v > 0, we get 1 2 Integrating and using that ´d∆|∇v| 2 = 0 gives from which ´(∆v) 2 dm = N ´|∇v| 2 dm.In particular ´ṽ 2 dm = N ´|∇ṽ| 2 , where ṽ := (v − ´vdm).Then by [78] we deduce that X is a spherical suspension and ṽ(x) = c cos d(x, z 0 ) = −c cos d(x, z0 ), ∀x ∈ X, for some constant c > 0 and z 0 , z0 ∈ X tips of the spherical suspension with d(z, z0 ) = π.
Recalling that v = u 2 2−N concludes the proof.

Non-compact case.
Here we investigate the equality case in the Euclidean-type Sobolev inequality (2.13).
Proof.We will apply Theorem 3.4.First we need to prove the required regularity of u.
Notice that we can equivalently suppose that u L 2 * (m) = 1, by scaling invariance.Moreover also |u| satisfies the equality in (5.3).By assumptions, it is possible to perform a Euclidean rearrangement |u| * of |u|.By the Pólya-Szegő inequality and the one-dimensional Bliss inequality we get Note that we can apply (2.11) since by Proposition 3.3, u * ∈ W 1,2 loc (I N ) and thus u is locally absolutely continuous in (0, ∞) (see e.g.[89, Section 2.2]).By (3.3) we see that the inequalities in the above are all equalities, and therefore equality holds in the Bliss inequality.Therefore for some a ∈ R, b > 0. In particular, since u L ∞ = u * L ∞ < ∞ by equimeasurability, we have u ∈ W 1,2 loc (X) ∩ L ∞ (m) and we can invoke Theorem 4.1 (with B = 0) to deduce u ∈ Lip loc (X) ∩ D(∆), m({|∇u| = 0}) = 0, u > 0 or u < 0, and (assuming u > 0): . By the Sobolevto-Lipschitz property (see [54,6]), u has a Lipschitz representative, still denoted by u in what follows.It remains to show that u(x) → 0 as d(z, x) → ∞, for z ∈ X. Suppose, by contradiction, that there is a sequence (x n ) ⊂ X satisfying d(x n , z) → ∞ as n ↑ ∞ and with the property that u(x n ) ≥ c > 0 for all n ∈ N. Since u ∈ LIP(X), denoting L := Lip(f ), we see that for any However this contradicts u ∈ L 2 * (m).We deduced all the regularity required to invoke Theorem 3.4, so we know that that X is an N -Euclidean metric measure cone with tip z 0 and u is radial, i.e. u(x) = u * • AVR(X) for some a ∈ R, b > 0.

Compactness of extremizing sequences
A classical result using concentration compactness is that a sequence extremizing functions for the Sobolev inequality in R n , up to a rescaling, dilation and translation, converges up to a subsequence to an extremal function.In this part, we generalize this method to an extremizing sequence of functions defined on a sequence of RCD(0, N ) spaces (Theorem 6.2).
6.1.Density upper bound.We first address a technical density bound that will be needed in the proof of Theorem 6.2 to get pre-compactness in the pmGH-topology.This part is needed only for collapsed RCD-spaces: a reader interested in the case of smooth manifolds can skip this subsection.Lemma 6.1 (Density bound from reverse Sobolev).For every N ∈ (2, ∞), K ∈ R, there are constants λ N,K ∈ (0, 1), r K − ,N > 0 (with r 0,N = +∞), C N,K > 0 such that the following holds.Let (X, d, m) be an RCD(K, N ) space and u for some A > 0. Assume also that for some η ∈ (0, Proof.We fix a constant λ = λ N,K ∈ (0, 1) sufficiently small and to be chosen later.We also fix a constant r K − ,N > 0, with r 0,N = +∞ and with r K − ,N small and to be chosen later in the case K < 0 (r K − ,N will be chosen after λ N,K ).Assume ρ ≤ r K − ,N and η ≤ λ N,K are as in the hypotheses.

Concentration compactness for Sobolev extremals.
In the following theorem we show that a sequence of extremizing functions defined on a sequence of RCD(0, N ) spaces, after a suitable rescaling of both the function and the space, admits a subsequence converging to a limit extremal function on some limit RCD(0, N ) space.The idea is similar to the classical Lions' concentration-compactness principle ( [81,82]).The first step is a characterization of the failure of compactness in the critical Sobolev embedding by specific concentration and splitting of the mass phenomena (see Appendix A.2).The second step is observing that the extra information that the sequence is extremizing for the Sobolev inequality will prevent these pathological phenomena and ensure compactness.A crucial point will be to exploit the strict concavity property of the Sobolev inequality, and in particular of the function t → t 2/2 * , to deduce that splitting the mass is not convenient in an extremizing sequence.
We subdivide the proof into different steps.
Step 1.We take η N := λ 0,N 8 ∧ 1 3 , with λ 0,N as in Lemma 6.1.In light of Theorem 2.10, to extract a subsequence converging pmGH it is sufficient to check that , thanks to the assumptions (6.4) and ( 6.5), we can apply Lemma 6.1 to obtain )) < +∞ is directly true by the assumptions.On the other hand, since by assumption the spaces Y n satisfy a Sobolev inequality with constants A n , B n , plugging in functions where we used the Bishop-Gromov inequality.Since lim n (A n + B n ) = A + B > 0 we also obtain lim n µ n (B 1 (y n )) > 0. Therefore up to a not relabelled subsequence, the spaces Y n pmGH converge to a pointed RCD(0, N ) space (Y, ρ, µ, y).Moreover, the stability of the Sobolev inequalities [89,Lemma 4.1] ensures that Y supports a Sobolev inequality as in (S) with constants A, B. This settles point i).
Step 2. From now on we assume to have fixed a realization of the convergence in a proper metric space (Z, d) (as in Section 2.4).Let ν n := |u n | 2 * µ n ∈ P(Z).Moreover we will denote by B r (z), z ∈ Z, and by B n r (y), y ∈ Y n , respectively the balls in (Z, d) and in (Y n , ρ n ), recalling that we are identifying (Y n , ρ n ) as a subset of (Z, d).From Lemma A.6 we have that, up to a subsequence, (exactly) one of cases i),ii),iii) in the statement of Lemma A.6 holds.We claim i) (i.e.compactness) occurs.First, notice that vanishing as in case ii) cannot occur: Thus, it remains to exclude the dichotomy case iii).Suppose by contradiction that iii) of Lemma A.6 holds for some λ ∈ (0, 1) (with we can estimate by triangular inequality, the Leibniz rule and Young inequality for every δ > 0 and every n.
we have by the Hölder inequality , by the Bishop-Gromov inequality.Notice that we also have is uniformly bounded by (6.5), choosing appropriately δ n → 0, we get Combining (6.7) with (6.8), recalling that lim n A n = lim n Ãn , we get 1 having used the strict concavity of t → t 2/2 * and the fact that λ ∈ (0, 1).This gives a contradiction, hence dichotomy in iii) cannot happen.
Step 3. In the previous step, we proved that case i) in Lemma A.6 occurs, i.e. there exists (z n ) ⊂ Z such that for every ε > 0 there exists Moreover y n → y in Z, hence the sequence of probabilities |u n | 2 * µ n is tight (Z is proper) and, along a not relabelled subsequence, converges in duality with C b (Z) to some ν ∈ P(Y ).
Additionally, up to a further subsequence we have that u n is L 2 * -weak convergent to some u ∈ L 2 * (µ) ( [8]) with sup n ∇u n L 2 (µn) < ∞ and also that |∇u n | 2 dµ n ⇀ ω in duality with C bs (Z) for some bounded Borel measure ω.Applying Lemma A.3, up to a further subsequence, we also deduce that u n converges L 2 loc -strong to some u ∈ L 2 loc (µ), together with the facts u ∈ W 1,2 loc (Y ) and |∇u| ∈ L 2 (µ).Note that if B > 0 then actually u ∈ W 1,2 (Y ), by (6.5) and the lower semicontinuity of the L 2 -norm (2.15).
We are in position to invoke Lemma A.7 to infer the existence of countably many points {x j } j∈J ⊂ Y and positive weights (ν j ), (ω j ) ⊂ R + , so that ν = |u| 2 * µ + j∈J ν j δ x j and ω ≥ |∇u| 2 µ + j∈J ω j δ x j , with Aω j ≥ ν 2/2 * j and in particular j ν 2/2 * j < ∞.Moreover up to passing to a subsquence we can, and will, from now on assume that the limits lim n ∇u n 2 L 2 (µn) and lim n B n u 2 L 2 (µn) exist.Finally, by the lower semicontinuity of the , where B u 2 L 2 (µ) is taken to be zero when B = 0 and having used, in the last inequality, the concavity of the function t 2/2 * .In particular, all the inequalities must be equalities and, since t 2/2 * is strictly concave, we infer that every term in the sum ´|u| 2 * dµ + j∈J ν 2/2 * j must vanish except one.By the assumption (6.4) and |u| 2 * m n ⇀ ν in C b (Z), we have ν j ≤ 1 − η for every j ∈ J. Hence ν j = 0 and u L 2 * (µ) = 1.This means that u n converges L 2 * -strong to u.Moreover, retracing the equalities in the above we have that lim n ´|∇u n | 2 dµ n = ´|∇u| 2 dµ and, when B > 0, lim n ´|u n | 2 dµ n = ´|u| 2 dµ.This proves point ii).Finally, equality in the fourth inequality is precisely part iii) of the statement.The proof is now concluded.

Radial functions: technical results
In this section, we prove results about convergence and approximation of radial functions.The first one (Lemma 7.2 below) says that, given a sequence of RCD spaces converging in the pmGH-sense, a radial function on the limit space is the limit of the same radial functions along the sequence.
We will need the following simple fact.We omit the proof, which is an easy consequence of Cavalieri's formula and Bishop-Gromov inequality.In this section, we denote d z (.) := d(z, .) the distance function from a point z.
Lemma 7.1.Let (X, d, m) be an RCD(0, N ) space for some N ∈ (2, ∞).Then for every α > N , z ∈ X and r > 0 it holds where In particular, for any Proof.We only need to prove that f • ρ zn converges L p -strong to f • ρ z 0 , then (7.3) follows from the linearity of the L p -convergence (2.14).
The assumptions on f imply that f is uniformly continuous and we denote by ω : [0, ∞) → [0, ∞) a global modulus of continuity for f .Observe that f is also bounded.In the sequel, we fix (Z, d) a realization of the convergence and recall that d where in the last step we assume that n is big enough so that d(z n , z 0 ) < R/2, which ensures where we have used that B R (z 0 where ε R is independent of n.Therefore The second result of this section is a technical fact that will play a key role in the proof of our main theorem.It states that a Euclidean bubble which is strongly concentrated around a point is close to a spherical bubble. , f sphere (t) := σ Proof.We fix η ∈ (0, 1) to be chosen later.Denote B := B 1 ησ (z).In what follows C N > 0 is a constant depending only on N , its value may vary from line to line without notice and without being relabelled.By Bishop-Gromov and the assumptions, we get m(B) ≤ v(ησ) −N . (7.4) We divide the proof into two steps, one for the L 2 * -norm and one for the L 2 -norm of the gradient.

Proof of the main results
8.1.Stability in the compact case.In this part, we prove the main qualitative stability result of this note.Note that this proves our main Theorem 1.1.We will also provide a proof of Corollary 1.3 at the end.
Given N > 2 the family of spherical bubbles in a metric space (X, d) is denoted by Theorem 8.1.For every ε > 0 and N ∈ (2, ∞) there exists δ := δ(ε, N ) > 0 such that the following holds.Let (X, d, m) be an RCD(N −1, N ) space for some N ∈ (2, ∞) with m(X) = 1, set 2 * = 2N/(N − 2) and suppose that there exists u ∈ W 1,2 (X) non-constant satisfying Then there exists w ∈ M sphere (X) such that Moreover if w ≡ a ∈ R, then a ∈ R can be chosen so that the reminder for some positive constants α, β, C N depending only on N .
Proof.By scaling invariance, it is not restrictive to assume u L 2 * (m) = 1.We only need to prove the first part, as the second follows from Proposition 8.3 below.We argue by contradiction and suppose that there exist ε > 0, a sequence of RCD(N −1, N ) spaces (X n , d n , m n ) and non-constant functions with Ãn → 2 * −2 N and satisfying inf w∈M sphere (Xn) Let us fix η < (η N ∧ 1 3 ), where η N is as in Theorem 6.2.For every n there exist y n ∈ X n and t n < diam(X n ) such that u n ∈ W 1,2 (Y n ).In particular, by scaling, it holds that and also for all n ∈ N.Moreover, Y n supports a Sobolev inequality with constants [89,Theorem 1.10] and up to passing to a subsequence, we can assume that diam(X n ) ≥ π/2 and in particular that diam Hence, up to a subsequence and no matter the value of σ, the hypotheses of Theorem 6.2 are satisfied.Applying Theorem 6.2 we get that, up to a further subsequence, Y n pmGH-converge to a pointed metric measure space (Y, ρ, µ, ȳ) and that u σn converges L 2 * -strong to some u ∈ W 1,2 (Y ) satisfying (where it is intended that σ −2 u 2 L 2 (µ) = 0 if σ = ∞ and u / ∈ L 2 (µ)).We distinguish now two cases, depending on the value of σ.
Case 1: σ < ∞.In this case, B n → B := σ −2 > 0 and Y n are compact of uniformly bounded diameter.Therefore, Y n mGH-converges to Y and u σn converges also W . Here, we distinguish two situations: v is constant, or not.If v is constant, then v ≡ 1 and u ≡ σ −N/2 * .By linearity of convergence (2.14), u σn − σ −N/2 * converges W 1,2 -strong and L 2 * -strong to zero so, by scaling, we reach . This yields a contradiction with (8.5).
If v is not constant, by Theorem 5.2, there exist a ∈ R, b ∈ (0, 1), z 0 ∈ X ∞ so that Take now a sequence z n → z 0 GH-converging and invoke Lemma 7.2 (here (7.2) is trivially satisfied by equi-boundedness of the diameters) to get that f (8.9) We want to scale back this information to the original sequence u n .Simple estimates and triangular inequalities give = 0, using that f is bounded and that σ n is away from zero.We pass now to the gradient norm.
From the chain rule of weak gradients and the fact that |∇ρ(•, z 0 )| = 1 µ-a.e., we have In particular again by Lemma 7.2 we have that Moreover, as we said above, also u σn W Arguing as above for the 2 * -norm we can scale back the above information to obtain lim We omit the computation since it is analogous.Since f • d n (•, z n ) ∈ M sphere (X n ), we again reached a contradiction with (8.5).
Therefore √ A = Eucl(N, 2)AVR(Y ) −1/N (recall that u is non-zero) and in particular AVR(Y ) depends only on N .Recalling the rigidity in Theorem 5.3 we get that Y is isomorphic to an N -Euclidean metric measure cone with tip z 0 and u is radial of the following form for some a ∈ R, b > 0.
Pick now a sequence z n ∈ Y n with z n → z 0 in Z.Note that, since z n → z 0 and z 0 is a tip of Y , by pmGH convergence we have Hence up to a subsequence, since AVR(Y ) depends only on N , for every n it holds Hence assumption (7.2) in Lemma 7.2 is satisfied for Y n and both f ′ , f and we can apply the result twice to get that f and that |f . By Lemma A.5 and the convergence of the gradient norms, we immediately get from the parallelogram identity Scaling all back to X n we can rewrite the above convergences as where .
Multiplying and dividing by 1 + ( ) and gives a contradiction with (8.5).Having examined all the possible cases, the proof is now concluded.Remark 8.2.It is evident from the proof that (8.2) holds true assuming only that , which is a weaker assumption than (8.1).Indeed, the starting point of the argument is the reverse Sobolev inequality (8.4) (for u n ) and adding here a sequence B n → 1 in front of u n 2 L 2 (mn) does not influence the subsequent steps.Proposition 8.3.Let (X, d, m) be an RCD(N − 1, N ) space, N > 2, with m(X) = 1 and set Then setting g := u − ´u we have for some x ∈ X for some positive constants α, β depending only on N .
Proof.We can clearly assume that ´u = 1.Moreover we can assume that ∇u L 2 (m) ≤ ε N u L 2 * (m) for some small constant ε N > 0, otherwise the statement is trivial.Analogously we can assume that δ is small with respect to N. By the Sobolev and the Poincaré inequalities, provided ε N is small enough, we have u L 2 * ≤ 2. Set g := u − ´u.Then by [89,Lemma 6.7] and the Poincaré inequality we have, provided δ and ε N are small enough, for some α > 0 depending only on N. Now (8.15) follows directly from the quantitative Obata theorem in [39] (there, written for Lipschitz functions but by density in W 1,2 , the statement directly extend to Sobolev functions recalling (2.4)).
We conclude this part with the proof of the stability result for the Yamabe minimizers in the smooth setting.
Proof of Corollary 1.3.Take as in the hypotheses (M, g) so that Ric g ≥ n−1 and d where the norms are computed using the renormalized volume measure.Recall also that by [42] we have that Vol g (M ) ≥ (1 − ε ′ )Vol(S n ), where ε ′ = ε ′ (δ, n) goes to zero as δ → 0. This in particular gives that Y (M, g) ≥ c(n) > 0 if δ is chosen small enough (depending on n).Therefore, combining the above with the inequality (see [16]) The conclusion now follows applying Theorem 1.1 (in the stronger version given by (1.11)).
Then, there exists v ∈ M eu (X) so that Proof.We can clearly assume that u L 2 * (m) = 1.Moreover by approximation it is also sufficient to prove the statement for u ∈ W 1,2 (X) (see Lemma 3.2).We proceed by contradiction and suppose that there exist ε > 0, a sequence (X n , d n , m n ) of RCD(0, N ) spaces with AVR(X n ) ∈ (V, V −1 ) and a sequence u n ∈ W 1,2 (X n ) ∩ L 2 * (m n ) of non-constant functions satisfying where A n := AVR(X n ) − In particular, we have j ν 2/2 * j < ∞.
Proof.We subdivide the proof into two steps.
Step 1. Suppose first that u ∞ = 0.Then, the conclusion follows arguing as in Step 1 of [89,Lemma 6.6] taking here ϕ a Lipschitz and boundedly supported (instead of only Lipschitz) cut-off and using the assumed L 2 loc -strong convergence.
Step 2. For general u ∞ , the idea is to apply the above to 'u ∞ −u n ' and then use a Brezis-Lieb lemma to recover the information for u ∞ .Take ũn a recovery sequence given by Lemma A.4 for u ∞ .Thus, for every ϕ ∈ Lip bs (Z) + , we have ϕu n is L 2 -strong to ϕu ∞ and L 2 * -bounded and ϕũ n is L 2 and L 2 * -strong convergent to ϕu ∞ .Therefore Lemma A. m n converge in duality with C b (Z) to ν and |∇v n | 2 m n converge in duality with C bs (Z) to a finite Borel measure ω.Then from Step 1, i),ii) hold true for (v n ), for suitable weights (ν j ), (ω j ) ⊂ R + and points (x j ) ⊂ X ∞ .Then passing to the limit in (A.m ∞ + j ν j δ x j that is point i).We pass to prove ii) and therefore we need to show separately that ω({x j }) = ω({x j }) ≥ ω j , ∀ j ∈ J, The first can be verified arguing exactly as in Step 2 of [89,Lemma 6.6] replacing the usage of [8,Theorem 5.7] with Lemma A.4 above.For the second, we fix ϕ ∈ C bs (Z), ϕ ≥ 0, and χ ∈ LIP bs (Z) be such that χ = 1 in supp(ϕ).It is easy to check that χ u n is W 1,2 -weak converging to χ u ∞ (recall that u n → u ∞ in L 2 loc ).Then, [8, Lemma 5.8] ensures that By arbitrariness of ϕ, we showed ii) and the proof is now concluded.

Appendix B. Technical results
In this appendix, we collect basic results about Sobolev inequalities and a version of the chain rule for the weak upper gradient.where 2 * := 2N N −2 .Then (B.1) holds also for all u ∈ W 1,2 loc (X) satisfying m({|u| > t}) < +∞ for all t > 0.
Proof.It is enough to prove (B.1) for non-negative functions.First note that (B.1) holds for every u ∈ W 1,2 (X), by density in energy of Lipschitz functions [5] and by the lower semicontinuity of the L 2 * -norm with respect to L 2 -convergence.For a general u ≥ 0 as in the hypotheses, if ´|∇u| 2 dm = +∞ there is nothing to prove, otherwise take u n := ((u − 1/n) + ) ∧ n ∈ W 1,2 (X) (since u n , |∇u n | ∈ L 2 (m)) and then send n → +∞).Proof.It is enough to prove the statement for u ∈ LIP c (B R/2 (x)).Thanks to the uniformly locally doubling property of (X, d, m) and the validity of a local (1, 1)-Poincaré inequality ( [92]), from the results in [66] the following Sobolev-Poincaré inequality holds 3) for every R ≤ R 0 and where f B R (x) := ffl B R (x) f dm (see also [27]).Moreover if K ≥ 0, the constant C(N, K, R 0 ) can be taken independent of R 0 .
Hence applying (B.where we have used that supp(u) ⊂ B R/2 (x).Thanks to the reverse doubling inequality (recall (2.5)), assuming R ≤ R K − ,N , we can absorb the rightmost term inside the left-hand side of the above to obtain (B.2) as desired.
A technical result needed in this note is a chain rule for the composition with an absolutely continuous function ϕ, which we could not find in the literature (see [56] or [60] for the classical one with ϕ Lipschitz).The equality in (B.4) then follows with a standard argument (see e.g.[60,Theorem 2.1.28]).

(3. 22 ) 3 . 6 .
Remark Even if we shall not need it, we observe that Proposition 3.3, Proposition 3.5 and Theorem 3.4 hold replacing p = 2 with any p ∈ (1, ∞), the proof is the same.We point out that the improved rearrangement inequality (3.22) appeared also in [13, Eq. (3.46)] for non-collapsed spaces and for functions defined on open sets (with finite volume) and with zero-Dirichlet boundary conditions.