Quantitative Obata's Theorem

We prove a quantitative version of Obata's Theorem involving the shape of functions with null mean value when compared with the cosine of distance functions from single points. The deficit between the diameters of the manifold and of the corresponding sphere is bounded likewise. These results are obtained in the general framework of (possibly non-smooth) metric measure spaces with curvature-dimension conditions through a quantitative analysis of the transport-rays decompositions obtained by the localization method.

Remark 1.2.On ‫ޓ‬ N , the first eigenvalue λ 1 = N has multiplicity N + 1.The corresponding eigenspace is spanned by the restriction to ‫ޓ‬ N of affine functions of ‫ޒ‬ N +1 (i.e., an L 2 -orthogonal basis is composed of the standard coordinate functions {x 1 , x 2 , . . ., x N +1 } of ‫ޒ‬ N +1 ).Equivalently, a function u : ‫ޓ‬ N → ‫ޒ‬ is a first eigenfunction normalized as ∥u∥ L 2 ‫ޓ(‬ N ) = 1 if and only if there exists P ∈ ‫ޓ‬ N such that u = √ N + 1 cos d P , where we denote by d P the Riemannian distance from the point P.
Our main result is a quantitative spectral gap involving the shape of the eigenfunctions (or, more generally, of functions with almost optimal Rayleigh quotient), when compared with the eigenfunctions of the model space ‫ޓ‬ N (as in Remark 1.2).In detail, we show that if Ric g ≥ (N − 1)g and u : M → ‫ޒ‬ is a first eigenfunction with ∥u∥ L 2 (M) = 1, then there exists P ∈ M such that (1-1) More generally, the same conclusion holds for every Lipschitz function u : M → ‫ޒ‬ with null mean value and ∥u∥ L 2 (M) = 1, provided λ 1 on the right-hand-side is replaced by the Dirichlet energy M |∇u| 2 d vol g .We will prove (1-1) with tools of optimal transport tailored to study (possibly nonsmooth) metric measure spaces satisfying Ricci curvature lower bounds and dimensional upper bounds in the synthetic sense, the so-called CD(K , N ) spaces introduced in [Sturm 2006a;2006b;Lott and Villani 2009].For the sake of this introduction, a metric measure space (m.m.s. for short) is a triple (X, d, m), where (X, d) is a compact metric space and m is a Borel probability measure, playing the role of reference volume measure.A CD(K , N ) space should be roughly thought of as a possibly nonsmooth metric measure space having Ricci curvature bounded below by K ∈ ‫ޒ‬ and dimension bounded above by N ∈ (1, ∞) in the synthetic sense.The basic idea of the synthetic approach of Lott, Sturm and Villani is to analyze weighted convexity properties of suitable entropy functionals along geodesics in the space of probability measures endowed with the quadratic transportation (also known as Kantorovich-Wasserstein) distance.An important technical assumption throughout the paper is the essentially nonbranching ("e.n.b." for short) property [Rajala and Sturm 2014], which roughly corresponds to requiring that the L 2 -optimal transport between two absolutely continuous (with respect to the reference volume measure m) probability measures is performed along geodesics which do not branch (for the precise definitions see Sections 2A and 2B).Notable examples of spaces satisfying e.n.b.CD(K , N ) include (geodesically convex domains in) smooth Riemannian manifolds with Ricci bounded below by K and dimension bounded above by N, their measured Gromov-Hausdorff limits (i.e., the so-called "Ricci limits") and more generally RCD(K , N ) spaces (i.e., CD(K , N ) spaces with linear Laplacian; see Remark 2.4 for more details), finite-dimensional Alexandrov spaces with curvature bounded below, and Finsler manifolds endowed with a strongly convex norm.A standard example of a space failing to satisfy the essentially nonbranching property is ‫ޒ‬ 2 endowed with the L ∞ norm.Later in the introduction, when discussing the main steps of the proof, we will mention how the essentially nonbranching assumption is used in our arguments.
We will establish our results directly on the more general class of e.n.b.CD(N − 1, N ) metric measure spaces.For an m.m.s.(X, d, m) we define the nonnegative real number λ 1,2  (X,d,m) as where |∇u| is the slope (also called local Lipschitz constant) of the Lipschitz function u given by |∇u|(x) = lim sup y→x |u(x) − u(y)|/d(x, y) if x is not isolated, 0 otherwise.
It is well known that, in case (X, d, m) is the m.m.s.corresponding to a smooth compact Riemannian manifold (possibly with boundary) λ 1,2 (X,d,m) coincides with the first eigenvalue of the problem − u = λu with Neumann boundary conditions.
Considering the extension of (1-1) to e.n.b.CD(N −1, N ) spaces is natural: indeed a sequence (M j , g j ) of Riemannian N -manifolds with Ric g j ≥ (N − 1)g j where the right-hand side of (1-1) converges to zero as j → ∞ may develop singularities and admits a limit (up to subsequences) in the measured Gromov-Hausdorff sense to a possibly nonsmooth e.n.b.CD(N − 1, N ) space (actually the limit is, more strongly, RCD(N − 1, N )).
• Even in the case when N is an integer, the round sphere ‫ޓ‬ N is not anymore the only case of equality in the Lichnerowicz spectral gap as the spherical suspensions achieve equality as well [Ketterer 2015].
A key geometric property of the spherical suspensions is that they have diameter π , thus saturating Bonnet-Myers diameter upper bound.The first part of our main result is a quantitative control of how close to π the diameter must be, in terms of the spectral gap deficit.The second part of the statement is an L 2 -quantitative control of the shape of functions with almost optimal Rayleigh quotient.We can now state our main theorem.
Let us compare Theorem 1.3 with related results in the literature.Under the standing assumption that (M, g) is a smooth Riemannian N -manifold without boundary and with Ric g ≥ (N − 1)g: (1) It follows from Cheng's comparison theorem [1975] that if λ 1,2 (M,g) is close to N then the diameter of M must be close to π.Conversely, Croke [1982] proved that if the diameter is close to π then λ 1,2 (M,g) must be close to N. Bérard, Besson and Gallot [Bérard et al. 1985] sharpened the diameter estimate of Cheng by proving an estimate very similar to (1-3).
(2) Bertrand [2007] established the following stability result for eigenfunctions (see also [Petersen 1999]): for every ϵ > 0 there exists δ > 0 such that if λ 1 ≤ N +δ and u is an eigenfunction relative to λ 1 normalized so that M u 2 d vol g = vol g (M), then there exists a point P ∈ M such that ∥u− Theorem 1.3 sharpens and extends the above results in various ways: • The estimate (1-3) extends [Bérard et al. 1985] to e.n.b.CD(N − 1, N ) spaces.These spaces are nonsmooth a priori and may have (convex) boundary.Actually, as the reader will realize, the claim (1-3) will be proved in Section 4 along the way to proving the much harder (1-4), to which the entire Section 5 is devoted.
• The estimate (1-4) extends Bertrand's stability [2007] to the more general class of e.n.b.CD(N − 1, N ) spaces and to arbitrary functions (a priori not eigenfunctions) with Rayleigh quotient close to N. The fact that u is an eigenfunction was key in [Bertrand 2007] in order to apply maximum principle and gradient estimates in the spirit of [Li and Yau 1980].Let us stress that our methods are completely different and work for an arbitrary Lipschitz function satisfying a small energy condition but no PDE a priori.
Inequality (1-4) naturally fits in the framework of quantitative functional/geometric inequalities.A basic result in this context is the quantitative Euclidean isoperimetric inequality proved by Fusco, Maggi and Pratelli [Fusco et al. 2008] (see also [Figalli et al. 2010;Cicalese and Leonardi 2012] for different proofs) stating that for every Borel set E ⊂ ‫ޒ‬ n of positive and finite volume there exists x ∈ ‫ޒ‬ n such that where r E is such that |B r E ( x)| = |E|.Quantitative results involving the spectrum of the Laplacian have been proved for domains in ‫ޒ‬ n , among others, by Hansen and Nadirashvili [1994]  Taking variations in the broad context of metric measure spaces makes the prediction on the sharp exponent η in (1-4) a hard task.Even formulating a conjecture is a challenging question and it could actually be that η = O(1/N ) as N → ∞ is already sharp.In the direction of this guess, we notice that the exponent 1/N in (1-3) is indeed optimal in the class of metric measure spaces, as a direct computation on the model one-dimensional space Before discussing the main steps in the proof of Theorem 1.3, it is worth recalling remarkable examples of spaces fitting in the assumptions of the result.Let us stress that our main theorem seems new in all of them.The class of essentially nonbranching CD(N − 1, N ) spaces includes many notable families of spaces, among them: • Geodesically convex domains in (resp.weighted) Riemannian N -manifolds satisfying Ric g ≥ (N − 1)g (resp.N -Bakry-Émery Ricci curvature bounded below by N − 1).
• Alexandrov spaces with curvature ≥ 1. Petrunin [2011] proved that the synthetic curvature lower bound in the sense of comparison triangles is compatible with the optimal transport lower bound on the Ricci curvature of Lott, Sturm and Villani (see also [Zhang and Zhu 2010]).Moreover geodesics in Alexandrov spaces with curvature bounded below do not branch.It follows that Alexandrov spaces with curvature bounded from below by 1 and Hausdorff dimension at most N are nonbranching CD(N − 1, N ) spaces.
• Finsler manifolds with strongly convex norm, and satisfying Ricci curvature lower bounds.More precisely we consider a C ∞ -manifold M, endowed with a function Under these conditions, it is known that one can write the geodesic equations and the geodesics do not branch: in other words these spaces are nonbranching.We also assume (M, F) to be geodesically complete and endowed with a C ∞ probability measure m in such a way that the associated m.m.s.(X, F, m) satisfies the CD(N − 1, N ) condition.This class of spaces has been investigated by Ohta [2009], who established the equivalence between the curvature dimension condition and a Finsler version of the Bakry-Émery N -Ricci tensor bounded from below.
An overview of the proof.The starting point of the proof of Theorem 1.3 is the metric-measure version of the classical localization technique.First introduced by Payne and Weinberger [1960] for establishing a sharp Poincaré-Wirtinger inequality for convex domains in ‫ޒ‬ n , the localization technique has been developed into a general dimension-reduction tool for geometric inequalities in symmetric spaces by Gromov and Milman [1987], Lovász and Simonovits [1993] and Kannan, Lovász and Simonovits [Kannan et al. 1995].More recently, Klartag [2017] used optimal transportation tools in order to extend the range of applicability of the technique to general Riemannian manifolds.The extension to the metric setting was finally obtained in [Cavalletti and Mondino 2017b]; see Section 2D.
Given a function u ∈ L 1 (X, m) with X u m = 0, the localization theorem (Theorem 2.10) gives a decomposition of X into a family of one-dimensional sets {X q } q∈Q formed by the transport rays of a Kantorovich potential associated to the optimal transport from the positive part of u (i.e., µ 0 := max{u, 0} m) to the negative part of u (i.e., µ 1 := max{−u, 0} m); each X q is in particular isometric to a real interval.A first key property of such a decomposition is that each ray X q carries a natural measure m q (given by the disintegration theorem) in such a way that (X q , d, m q ) is a CD(N − 1, N ) space and X q u m q = 0, (1-6) so that both the geometry of the space and the null mean value constraint are localized into a family of one-dimensional spaces.An important ingredient used in the proof of such a decomposition is the essentially nonbranching property which, coupled with CD(N − 1, N ) (actually the weaker measure contraction would suffice here), guarantees that the rays form a partition of X (up to an m-negligible set).
In order to exploit (1-6), as a first step, in Section 3 we prove the one-dimensional counterparts of Theorem 1.3.More precisely, given a one-dimensional CD(N − 1, N ) space and that, if u ∈ Lip(I ) satisfies u m = 0 and u 2 m = 1, then (Theorem 3.11) Combining (1-6) and (1-7), it is not hard to prove (see Theorem 4.3) the first claim (1-3) of Theorem 1.3.Actually, calling Q ℓ (for "Q long") the set of indices for which |X q | ≃ π , we aim to show that q(Q ℓ ) ≃ 1 (i.e., "most rays are long").As we will discuss in a few lines, this is far from being trivial (in particular, it needs new ideas when compared with [Cavalletti et al. 2019]).
A second crucial property of the decomposition {X q } q∈Q , inherited by the variational nature of the construction, is the so-called cyclical monotonicity.This was key in [Cavalletti et al. 2019] for showing that, for q ∈ Q ℓ , the transport ray X q has its starting point close to a fixed "south pole" P S , and ends up near a fixed "north pole" P N (in particular, the distance between P S and P N is close to π) (Proposition 5.1).
Then we observe that (1-8) forces, for q ∈ Q ℓ , the fiber u q := u ⌞ X q (that is the restriction of u to the corresponding one-dimensional element of the partition) to be L 2 close to a multiple of the cosine of the arclength parametrization along the ray X q , i.e., , where c q = ∥u q ∥ L 2 (m q ) for q ∈ Q ℓ (see (5-13)). (1-9) The difficulties in order to conclude the proof are mainly two, and are strictly linked: (1) Show that Q ℓ ∋ q → c q is almost constant.
Let us stress that at this stage the only given information is that Q ℓ c 2 q q ≃ 1.The intuition why (1) and (2) should hold is that an oscillation of c q would correspond to an oscillation of u "orthogonal to the transport rays", which would be expensive in terms of Dirichlet energy of u.The proofs of the two claims are the most technical part of the work and correspond respectively to Propositions 5.2 and 5.3.
Let us mention that the two difficulties (1) and (2) were not present in the proof of the quantitative Lévy-Gromov inequality in [Cavalletti et al. 2019], where it was sufficient to work with characteristic functions (which have a fixed scale, i.e., they are either 0 or 1).

Background material
The goal of this section is to fix the notation and to recall the basic notions/constructions used throughout the paper: in Section 2A we review geodesics in the Wasserstein distance, in Section 2B curvaturedimension conditions, in Section 2C some basics of CD(K , N ) densities on segments of the real line, and in Section 2D the decomposition of the space into transport rays (localization).
2A. Geodesics in the L 2 -Kantorovich-Wasserstein distance.Let (X, d) be a compact metric space and m a Borel probability measure over X.The triple (X, d, m) is called metric measure space, m.m.s. for short.
A metric space (X, d) is said to be a geodesic space if and only if for each x, y ∈ X there exists γ ∈ Geo(X ) such that γ 0 = x, γ 1 = y.A basic fact of W 2 geometry is that if (X, d) is geodesic then (P(X ), W 2 ) is geodesic as well.For any t ∈ [0, 1], let e t denote the evaluation map: e t : Geo(X ) → X, e t (γ ) := γ t .
A set F ⊂ Geo(X ) is a set of nonbranching geodesics if and only if for any γ 1 , γ 2 ∈ F, it holds there exists t ∈ (0, 1) such that, for all t ∈ [0, t ], A measure µ on a measurable space ( , F) is said to be concentrated on F ⊂ if there exists E ⊂ F with E ∈ F so that µ( \ E) = 0.With this terminology, we next recall the definition of essentially nonbranching space from [Rajala and Sturm 2014].
2B. Curvature-dimension conditions for metric measure spaces.The L 2 -transport structure described in Section 2A allows us to formulate a generalized notion of Ricci curvature lower bound coupled with a dimension upper bound in the context of possibly nonsmooth metric measure spaces.This corresponds to the CD(K , N ) condition introduced in the seminal works of Sturm [2006a;2006b] and Lott and Villani [2009], which here is reviewed only for a compact m.m.s.(X, d, m) with m ∈ P(X ) and in the case K > 0, 1 < N < ∞ (the basic setting of the present paper).
Remark 2.3 (case of a smooth Riemannian manifold).It is worth recalling that if (M, g) is a Riemannian manifold of dimension n and h ∈ C 2 (M) with h > 0 then, denoting by d g and vol g the Riemannian distance and volume measure, the m.m.s.−n) , in other words if and only if the weighted Riemannian manifold (M, g, h vol g ) has N -Bakry-Émery Ricci tensor bounded below by K .Note that if N = n, the Bakry-Émery Ricci tensor Ric g,h,N = Ric g makes sense only if h is constant.□ Remark 2.4 (CD * (K , N ), RCD * (K , N ) and RCD(K , N )).The lack of the local-to-global property of the CD(K , N ) condition (for K /N ̸ = 0) led Bacher and Sturm [2010] to introduce the reduced curvature-dimension condition, denoted by CD * (K , N ).The CD * (K , N ) condition asks for the same inequality (2-4) of CD(K , N ) to hold but the coefficients τ (s) K ,N (d(γ 0 , γ 1 )) are replaced by the slightly smaller σ (s)  K ,N (d(γ 0 , γ 1 )).Let us explicitly notice that, in general, CD * (K , N ) is weaker than CD(K , N ).A subsequent breakthrough in the theory was obtained with the introduction of the Riemannian curvature dimension condition RCD(K , N ): in the infinite-dimensional case N = ∞ this condition was introduced in [Ambrosio et al. 2014] (for finite measures m, and in [Ambrosio et al. 2015] for σ -finite ones).The finite-dimensional refinements RCD(K , N )/ RCD * (K , N ) with N < ∞ were subsequently studied in [Gigli 2015;Erbar et al. 2015;Ambrosio et al. 2019].We refer to these articles as well as to the survey papers [Ambrosio 2018;Villani 2019] for a general account on the synthetic formulation of Ricci curvature lower bounds, in particular of the latter Riemannian-type.Here we only briefly recall that it is a stable [Gigli et al. 2015] strengthening of the (resp.reduced) curvature-dimension condition: an m.m.s.satisfies RCD(K , N ) (resp.RCD * (K , N )) if and only if it satisfies CD(K , N ) (resp.CD * (K , N )) and the Sobolev space W 1,2 (X, m) is a Hilbert space (with the Hilbert structure induced by the Cheeger energy).
To conclude we recall also that recently, the first author together with E. Milman [Cavalletti and Milman 2021] proved the equivalence of CD(K , N ) and CD * (K , N ), together with the local-to-global property for CD(K , N ), in the framework of essentially nonbranching m.m.s.having m(X ) < ∞.As we will always assume the aforementioned properties to be satisfied by our ambient m.m.s.(X, d, m), we will use both formulations with no distinction.It is worth also mentioning that an m.m.s.satisfying RCD * (K , N ) is essentially nonbranching (see [Rajala and Sturm 2014, Corollary 1.2]), implying also the equivalence of RCD * (K , N ) and RCD(K , N ) (see [Cavalletti and Milman 2021] for details).□ We shall always assume that the m.m.s.(X, d, m) is essentially nonbranching and satisfies CD(K , N ) for some K > 0, N ∈ (1, ∞) with supp(m) = X.It follows that (X, d) is a geodesic and compact metric space.More precisely: note we assumed from the beginning (X, d) to be compact for the sake of simplicity; however, such an assumption could have been replaced by completeness and separability throughout Sections 2A and 2B, but compactness would have been now a consequence of CD(K , N ) for some A useful property of essentially nonbranching CD(K , N ) spaces is the validity of a weak local Poincaré inequality.
Recalling that by the Bishop-Gromov inequality [Sturm 2006b, Theorem 2.3] it holds 2C.CD(K, N) densities on segments of the real line.We will use several times the following terminology: recalling the coefficients σ from (2-2), a nonnegative function h defined on an interval The link with the definition of CD(K , N ) for an m.m.s.can be summarized as follows (see for instance [Cavalletti and Milman 2021, Theorem A.2 ) and I = supp(µ) is not a point, then µ ≪ L 1 and there exists a representative of the density h = dµ/dL 1 which is a CD(K , N ) density on I.
A CD(K , N ) density h defined on an interval I ⊂ ‫ޒ‬ satisfies the following properties: • h is lower semicontinuous on I and locally Lipschitz continuous in its interior (this is easily reduced to the corresponding statement for concave functions on I ).
• h is strictly positive in the interior of I whenever it does not vanish identically (this follows directly from the definition (2-7)).
• h is locally semiconcave in the interior of I, i.e., for all x 0 in the interior of I, there exists In particular, h is twice differentiable in I with at most countably many exceptions.
As proven in [Cavalletti and Milman 2021, Lemma A.5], if h is a CD(K , N ) density on an interval I then at any point x in the interior where it is twice differentiable (thus up to at most countably many exceptions) it holds Also the converse implication holds; see [Cavalletti and Milman 2021, Lemma A.6] for the proof and the precise statement.
We next recall some estimates on CD(N − 1, N ) densities, which will turn out to be useful in the paper.Let h N be the model density for the CD(N − 1, N ) condition given by where ω N := Then, for any t ∈ (0, D), it holds (2-10) Corollary 2.7.Under the assumptions of Proposition 2.6, there exist a constant C = C(N ) > 0 and ϵ 0 > 0 with the following property: if ϵ ∈ [0, ϵ 0 ] then for any t ∈ (0, D) it holds (2-11) Moreover, for r ∈ 0, 1 10 and ϵ ∈ 0, 1 10 r the following improved estimate holds: Proof.The validity of (2-11) follows from (2-10) taking into account the Lipschitz continuity of h N and the asymptotic expansions of ) follows analogously from (2-10) and the mean value theorem.□ Armed with Corollary 2.7 we can prove that, if D ∈ (0, π ) is close to π , then the integrals of the functions sin and cos (and of any bounded function, more in general) with respect to a CD(N − 1, N ) density h defined on [0, D] do not differ much from the value of the corresponding integrals computed with respect to the model density h N .
Under the assumptions of Proposition 2.6, there exist a constant C = C(N ) > 0 and ϵ 0 > 0 with the following property: (2-13) Moreover, for any r ∈ 0, 1 10 and ϵ ∈ 0, 1 10 r the following improved estimate holds Proof.The conclusion follows from Corollary 2.7 just by integrating on [0, D] and taking into account that Localization and L 1 -optimal transportation.The localization technique has its roots in a work of Payne and Weinberger [1960] and has been developed by Gromov and Milman [1987], Lovász and Simonovits [1993] and Kannan, Lovász and Simonovits [Kannan et al. 1995]  Given a measure space (X, X , m), suppose a partition of X into disjoint sets is given by {X q } q∈Q so that X = q∈Q X q .Here Q is the set of indices and Q : X → Q is the quotient map, i.e., We endow Q with the push forward σ -algebra Q of X : i.e., the biggest σ -algebra on Q such that Q is measurable.Moreover, the push forward measure q := Q ♯ m defines a natural measure q on (Q, Q).The triple (Q, Q, q) is called the quotient measure space.Definition 2.9 (consistent and strongly consistent disintegration).A disintegration of m consistent with the partition is a map such that the following requirements hold: (1) For all B ∈ X , the map q → m q (B) is q-measurable.
(2) For all B ∈ X and C ∈ Q, the following consistency condition holds: A disintegration of m is called strongly consistent if in addition: (3) For q-a.e.q ∈ Q, m q is concentrated on In the next theorem, for q-a.e.q ∈ Q, the equivalence class X q is a geodesic in X.With a slight abuse of notation X q denotes also the arc-length parametrization on a real interval of the corresponding geodesic; i.e., it is a map from a real interval with image X q .We will use the following terminology: q → m q is a CD(K , N ) disintegration if, for q-a.e.q ∈ Q, m q = h q H 1 ⌞ X q , where H 1 denotes the one-dimensional Hausdorff measure and h q • X q is a CD(K , N ) density, in the sense of (2-7).
Theorem 2.10 [Cavalletti and Mondino 2017b].Let (X, d, m) be an essentially nonbranching metric measure space satisfying the CD(K , N ) condition for some K ∈ ‫ޒ‬ and N ∈ [1, ∞).Let f : X → ‫ޒ‬ be m-integrable such that X f m = 0, and assume the existence of x 0 ∈ X such that Then the space X admits a partition {X q } q∈Q and a corresponding (strongly consistent) disintegration of m, {m q } q∈Q , such that: where q is a probability measure over Q defined on the quotient σ -algebra Q.
• For q-almost every q ∈ Q, the set X q is a geodesic (possibly of zero length) and m q is supported on it.Moreover q → m q is a CD(K , N ) disintegration.
• For q-almost every q ∈ Q, it holds X q f m q = 0.
In Theorem 2.10 we can also distinguish the set of X α having positive length, whose union forms the so-called transport set denoted by T , from the ones having zero length, i.e., points, whose union we usually denote by Z , so to have a decomposition of X into T and Z .The last point of Theorem 2.10 implies then that m-a.e.f ≡ 0 on Z .
Following the approach of [Klartag 2017], Theorem 2.10 was proven in [Cavalletti and Mondino 2017b] studying the following optimal transportation problem.Let µ 0 := f + m and µ 1 := f − m, where f ± denote the positive and the negative parts of f respectively, and study the L 1 -optimal transport problem associated with it: (2-15) Then the relevant object to study is given by the dual formulation of the previous minimization problem.
By the summability properties of f (see the hypotheses of Theorem 2.10), there exists a 1-Lipschitz function φ : X → ‫ޒ‬ such that π is a minimizer in (2-15) if and only if π( ) = 1, where is the naturally associated d-cyclically monotone set; i.e., for any (x 1 , y 1 ), . . ., (x n , y n ) ∈ it holds for any n ∈ ‫.ގ‬The set induces a partial order relation whose maximal chains produce a partition (up to an m-negligible subset) of the set T ⊂ X appearing in the statement of Theorem 2.10, made of one-dimensional subsets.For a summary of the constructions see [Cavalletti et al. 2019, Section 2.5]; for more details see [Cavalletti and Mondino 2017b;Cavalletti and Milman 2021].

One-dimensional estimates
The goal of this section is to give a self-contained presentation of the one-dimensional estimates we will use throughout the paper.
3A. Bérard-Besson-Gallot explicit lower bound on the model isoperimetric profile.For N > 1, let where To keep notation short, we also set I N := I N ,π .Notice that I N is the isoperimetric profile of ‫ޓ‬ N for an integer N. We refer to Section 4 for a brief discussion about the isoperimetric profile; note also that I N ,D is the model isoperimetric profile in the Lévy-Gromov isoperimetric comparison theorem for spaces with Ricci ≥ N − 1, dimension ≤ N and diameter ≤ D; see [Gromov 1999, Appendix C;Bérard et al. 1985;Milman 2015;Cavalletti and Mondino 2017b].
Lemma 3.2.It holds that Proof.Recalling the expression of C N ,D from (3-5), we have Now, as D → π , we have the expansion Taking into account the asymptotic where C N ,D was defined in (3-5).
In particular, there exists a constant C N > 0 (more precisely one can choose C N = C N, where C was defined in Lemma 3.2) such that Recalling that λ 1,2,D N ,π 1 2 = λ 1,2 N ,π = N (see for instance [Bakry and Qian 2000]), we conclude that The second part of the statement follows by choosing D = diam(I ) and applying Lemma 3.2.□ A converse of the inequality proved in Proposition 3.3 can be obtained as follows.
Lemma 3.4.For any N > 1 there exists Proof.By the Lichnerowicz spectral gap we already know that λ 1,2 ([0,D],d eucl ,m) ≥ N. It is therefore enough to prove the existence of u ∈ Lip([0, D]) such that Setting u * N (t) := √ N + 1 cos(t) and using Corollary 2.8 we get . Using the estimates (3-24), it is straightforward to check that u = (1/c v )v satisfies (3-23).□ 3C.Spectral gap and shape of eigenfunctions.Next we establish some basic estimates on eigenfunctions which will be useful later.Given a one-dimensional CD(K , N ) space (I, d eucl , m), we know that we can write m(dt) = hL 1 (dt) for some CD(K , N ) density h.We start by recalling the definition and basic properties of the Laplace operator .A function u ∈ W 1,2 (I, m) is said to be in the domain of , and we write u ∈ Dom( ) if for every φ ∈ C ∞ c (I ) it holds for some C u ≥ 0 depending on u.In this case, by the Riesz theorem, there exists a function u ∈ L 2 (I, m) such that It is readily seen that the operator Dom( ) ∋ u → u ∈ L 2 (I, m) is linear.Moreover, using the properties of CD(K , N ) densities recalled at the beginning of the section, it holds that every u ∈ Dom( ) is twice differentiable L 1 -a.e. on I and Step 1: We claim that it holds Since by assumption u ∈ W 1,2 (I, d eucl , m) is an eigenfunction we have − u ∈ W 1,2 (I, d eucl , m) as well.
Step 2: Inserting the eigenvalue relation λu = − u into (3-27), we obtain Eventually, where, in the last estimate, we used the assumption λ ≤ 2N.□ The aim of the remaining part of this section is to prove Theorem 3.11 stating roughly that, on any one-dimensional CD(N − 1, N ) m.m.s.(I, d eucl , m), a function u : I → ‫ޒ‬ whose 2-Rayleigh quotient is close to N (the optimal one on the model (N − 1, N )-space) and with L 2 -norm equal to 1, is W 1,2 -close to the (normalized) cosine of the distance from one of the extrema of the interval, in quantitative terms.
The conclusion of Theorem 3.11 will be achieved through some intermediate steps.First we estimate the W 1,2 -closeness of a first eigenfunction u * for (I, d eucl , m) with the cosine of the distance from one of the extremes of the segment, see Proposition 3.6.Then, we bound the W 1,2 -closeness of the function u from u * (or −u * ), see Proposition 3.10.
Let us observe that and, by symmetry,   where δ := |∇u * | 2 m − N < ϵ 0 .Furthermore the conclusion can be improved to W 1,2 -closeness: ) be the density of m with respect to L 1 and let x 0 ∈ (0, D) be a maximum point of h.In [Cavalletti et al. 2019, Lemma A.4] it is proved that such a maximum point is unique and that h is strictly increasing on [0, x 0 ] and strictly decreasing on [x 0 , D].
Step 1: In this first step we prove that, given z ∈ L 2 ([0, D], m), any solution of v ′′ +v = z can be written as for some α, β ∈ ‫.ޒ‬To this aim, it suffices to prove that v 0 (t) := solves v ′′ +v = z.First we observe that v 0 is well-defined, since the assumption z ∈ L 2 ((0, D), m) guarantees that z ∈ L 1 loc ((0, D), L 1 ) (due to the fact that h is locally bounded from below by a strictly positive constant in the interior of [0, D]).The fact that it satisfies v ′′ 0 +v 0 = z follows from an elementary computation.
Step 4: Conclusion.In order to get (3-34), we have to bound |α| and min{| From (3-40), Step 3, the last remark in Step 2 and Corollary 2.8 it follows that  up to increasing the value of the constant C in the second inequality.Plugging (3-44) into (3-42) gives (3-45) From (3-45) we easily obtain that min{| In conclusion, (3-45) and (3-46) can be bootstrapped to give min{| Finally, we improve the L 2 (m)-closeness to W 1,2 (m)-closeness.To this aim, differentiate (3-39) to obtain With computations analogous to the ones used to obtain the bound ∥v 0 ∥ 2 ≤ π∥z∥ 2 in Step 2, one can prove that, letting w 0 (t) := follows taking into account (3-44) and .□ We isolate the following corollary, which will be useful later in the paper.
Corollary 3.7.Under the assumptions of Proposition 3.6, setting r = δ γ /N for some γ ∈ (0, 1), it holds Proof.It is enough to improve the final estimates in Step 4 of the proof of Proposition 3.6 by using (2-14): The improved estimate for the first derivative and for the domain [r − η, r + η] is analogous.□ Proof.We argue by contradiction.Suppose there is a sequence of CD(N −1, N ) measures m n = h n L 1 with supp h n = [0, D n ] and D n ↑ π satisfying the following: for every n there exists where where in the last identity we used (3-25), and the convergence of λ n to N follows from Lemma 3.4.From Corollary 2.7, the fact that supp In particular, for every η ∈ (0, π/2) the densities h n restricted to [η, 1 − η] are bounded above and below by strictly positive constants.
Proof.We begin by rewriting Now (3-54) implies that vu * m > 1 2 by Corollary 3.9.Hence, assuming without loss of generality that Therefore, Corollary 3.9 yields The combination of the last estimate with (3-56) gives with C := 1/β.We now improve (3-57) to W 1,2 -closeness, namely (3-55).In order to do so, it suffices to observe that the estimates we obtained above yield Moreover, setting r = δ γ /N for some γ ∈ (0, 1), for any η ∈ 0, 1 10 r it holds Proof.First apply Proposition 3.10 to bound the W 1,2 (m)-distance between u and a first eigenfunction of the Neumann Laplacian on ([0, D], d eucl , m), then apply Proposition 3.6 (respectively Corollary 3.7) between the first eigenfunction and the normalized cosine.The sought estimate follows by the triangle inequality.□

Quantitative Obata's theorem on the diameter
Building on top of the one-dimensional results obtained in Section 3, we will derive several quantitative estimates for a general essentially nonbranching m.m.s.(X, d, m) satisfying CD(K , N ).Given an m.m.s.(X, d, m), the perimeter P(E) of a Borel subset E ⊂ X is defined as where χ E is the characteristic function of E. Accordingly E ⊂ X has finite perimeter in (X, d, m) if and Given a smooth Riemannian manifold (M, g) with finite Riemannian volume vol g (M) < ∞, let us denote by vol g the normalized Riemannian volume measure.We next recall the improved Lévy-Gromov inequality obtained by Bérard, Besson and Gallot [Bérard et al. 1985, Remark 3.1] for smooth Riemannian N -manifolds with Ricci ≥ N − 1 and with upper bound on the diameter (see also [Milman 2015]).
Theorem 4.1.Let (M, d, m g ) be the metric measure space associated to a Riemannian manifold (M, g) with dimension N ∈ ‫,ގ‬ N ≥ 2, Ricci bounded from below by N − 1 and diameter D (recall that, by the Bonnet-Myers theorem, D ≤ π).Then, for any v ∈ (0, 1), it holds where I N , defined in (3-3), for N ≥ 2, N ∈ ‫,ގ‬ is the isoperimetric profile of the normalized round sphere of constant sectional curvature 1 ‫ޓ(‬ N , d ‫ޓ‬ N , m g ‫ޓ‬ N ).
We extend Theorem 4.1 to the class of essentially nonbranching CD(N − 1, N ) metric measure spaces, N > 1 any real parameter.In view of [Cavalletti and Mondino 2017b;2018] the result follows from the one-dimensional improved Lévy-Gromov inequality proved in Lemma 3.1.
where I N was defined in (3-3).
Proof.One of the main results in [Cavalletti and Mondino 2017b;2018] is that for (X, d, m) as in the assumptions of the theorem it holds where I N ,D stands for the model isoperimetric profile defined in (3-3).The claimed (4-4) follows by combining (4-5) with Lemma 3.1.□ It is also possible to obtain a quantitative spectral gap inequality for Neumann boundary conditions.The analogous result in the case of smooth Riemannian manifolds was established in [Croke 1982, Theorem B] building upon a quantitative improvement of the Lévy-Gromov inequality and on [Bérard and Meyer 1982] (see also [Bérard et al. 1985, Corollary 17]).where C N ,D is given in (4-4).Moreover, there exists C = C N > 0 (more precisely one can choose C N = C N where C was defined in Lemma 3.2) such that Proof.Thanks to [Cavalletti and Mondino 2017c, Theorem 4.4] (see also Proposition 3.3) we know that λ 1,2 (X,d,m) ≥ λ 1,2 N ,D , where λ 1,2 N ,D was defined in (3-21).Let us briefly outline the argument since it will be relevant for addressing the quantitative inequality for the first eigenfunction later in the note.By the very definition of λ 1,2  (X,d,m) it suffices to prove that, for any u ∈ Lip(X ) with u m = 0 and u 2 m = 1, it holds To this aim, we perform the one-dimensional localization associated to the function u which by assumption has null mean value (this is analogous to the proof of [Cavalletti and Mondino 2017c, Theorem 4.4]; see Section 2D for some basics about one-dimensional localization).We obtain u 2 q m q q(dq) Taking into account Proposition 3.3, we conclude that and (4-6) can be obtained in an analogous way.□ Remark 4.4.In [Jiang and Zhang 2016] the authors obtained a quantitative version of the estimate for the gap of the diameters in terms of the deficit in the spectral gap for RCD spaces (see Remark 1.3 therein).Their estimate reads as follows: if Theorem 4.3 extends such quantitative control to essentially nonbranching CD(N − 1, N ) spaces whose Sobolev space W 1,2 is a priori non-Hilbert (but just Banach, as for instance on Finsler manifolds).
4A. Volume control.The aim of this brief subsection is to prove that for a CD(N − 1, N ) m.m.s. with diameter close to π we have a quantitative volume control for balls centered at extrema of long rays.The proof is inspired by [Ohta 2007, Lemma 5.1], where the case of maximal diameter π is treated (see also [Cavalletti et al. 2019, Proposition 5.1]).
Moreover, the integral constraint X u m = 0 localizes to almost every ray: X q u q m q = 0. (5-4) Since almost each ray (X q , d| X q , m q ) is a one-dimensional CD(N −1, N ) space, the Lichnerowicz spectral gap gives (5-5) where |u ′ q |(x) denotes the local Lipschitz constant of u q : (X q , d| X q ) → ‫ޒ‬ at x ∈ X q .It is clear that, for each x ∈ X q ⊂ X, |u ′ q |(x) is bounded by the local Lipschitz constant |∇u|(x) of u : (X, d) → ‫:ޒ‬ |u ′ q |(x) ≤ |∇u|(x) for all x ∈ X q , q-a.e.q ∈ Q. (5-6) With a slight abuse of notation, order to keep the formulas short, in the following we will often identify q and q⌞ {q∈Q: c q >0} .Localizing the spectral gap deficit using (5-6) gives where we set δ(u q ) := the one-dimensional spectral gap deficit of u q .From now on, in order to keep notation short, we will write δ for δ(u).Let β ∈ (0, 1) be a real parameter to be optimized later in the proof and denote the set of "long rays" by Q ℓ := {q ∈ Q : δ(u q ) ≤ δ β and c q > 0}.
Throughout this last section we will often make the identification between the ray X q and the interval (0, |X q |).
Proposition 5.1.There exists a distinguished q ∈ Q ℓ having initial point P N and final point P S such that (5-12) Proof.Fix any q ∈ Q ℓ and set P N := a(X q ), P S := b(X q ).By d-cyclical monotonicity of the transport set T , for any other which we rewrite as Combining the last estimate with (5-10) gives 2C N δ β/N ≥ π − d(a(X q ), P S ) + π − d(b(X q ), P N ).
Finally by [Cavalletti et al. 2019, Proposition 5.1] we deduce the existence of a constant, depending only on the dimension N, such that d(a(X q ), P N ) ≤ C(N )δ β/N , d(b(X q ), P S ) ≤ C(N )δ β/N , and the claim follows.□ From now on, for every q ∈ Q ℓ choose the sign of c q so that From Theorem 3.11 we obtain that for all q ∈ Q ℓ it holds (5-13) The goal of the next section is to globalize estimate (5-13) to the whole space X.
The sought bound will be obtained through two intermediate steps: Firstly, in Proposition 5.2, we control the variance of the map q → c q with respect to the measure q on the set of long rays Q ℓ .Then, in Proposition 5.3, we estimate (1 − q(Q ℓ )) in terms of a power of the deficit.
Below we briefly present the strategy of the proof.In order to fix the ideas, we discuss the heuristics in the rigid case of zero deficit.Actually in the case of zero deficit there is a more streamlined argument (the assumption that u is Lipschitz, combined with the fourth bullet below, gives immediately that q → c q is constant); however, the point here is to present a strategy which generalizes to the nonrigid case of nonzero deficit.
In the case where δ(u) = 0, the results of the previous sections give the following conclusions: • Almost all the transport rays have length π.Moreover, they start from a common point P N , with u(P N ) > 0, and end in a common point P S , with u(P S ) < 0.
• For q-a.e.q ∈ Q, it holds that m q = m N is the model measure for the CD(N − 1, N ) condition.
Our aim is to prove that q(Q) = 1 and that c q = 1 for q-a.e.q ∈ Q.The basic idea is to apply the Poincaré inequality to balls centered at P N and having radii converging to 0.
A second heuristic motivation of the fact that the oscillation of the map q → c q is controlled by (a power of) the deficit is that "the gradient of u is almost aligned along the rays" in a quantitative L 2 -sense, suggesting that u "should not oscillate much in the direction orthogonal to the rays".Note that in the current framework of CD(K , N ) spaces there is no scalar product and the set Q is far from regular, this is the reason why we cannot directly implement this heuristic strategy.However, let us make precise the fact that "the gradient of u is almost aligned along the rays" in a quantitative L 2 -sense, since this will be used in the arguments below: |u ′ q | 2 m q q(dq) (by (5-1),(5-5)) (5-3) = δ. (5-17) The proofs of Propositions 5.2 and 5.3 below are based on the idea we just presented, although they are quite technical since one has to handle all the various error terms occurring in the nonrigid case δ(u) > 0.
5A.Control on the variance.
Proof.In order to bound the variance of q → c q on Q ℓ we wish to prove that it can be controlled by an integral depending on the variation of the function u on a small ball B r (P N ).Next we will appeal to the fact that in the rigid case the L 2 -norm squared of the gradient of u on B r (P N ) is comparable with r N +2 and, at least heuristically, this has to be the case also when dealing with almost rigidity.Some intermediate steps are devoted to reducing to the case where the function u coincides with c q cos( • ) when restricted to any long ray X q .
In order to slightly shorten the notation, we will write C in place of C(N ) to denote a dimensional constant.
Recall that we will often tacitly identify the ray X q with the interval (0, |X q |).
we obtain (3-17).The second conclusion in the statement easily follows from the first one.□ 3B.Spectral gap and diameter.Building on top of the lower bound of the isoperimetric profile obtained in Lemma 3.1, we next obtain a quantitative spectral gap inequality for Neumann boundary conditions in terms diameters.The analogous result in the case of smooth Riemannian manifolds was established in [Croke 1982, Theorem B] building upon a quantitative improvement of the Lévy-Gromov inequality and on [Bérard and Meyer 1982] (see also [Bérard et al. 1985, Corollary 17]).The usual strategy to show the improved Neumann spectral gap inequality is based on the observation that a Neumann first eigenfunction of the Laplacian f is a Dirichlet first eigenfunction of the Laplacian on the domains { f > 0} and { f < 0} (see, for instance, [Matei 2000, Lemma 3.2]).The improved Dirichlet spectral gap inequality is then obtained by rearrangement starting from the isoperimetric inequality.
Klartag [2017] of Euclidean spaces, spheres and Hilbert spaces.The basic idea is to reduce an n-dimensional problem, via tools of convex geometry, to lower-dimensional problems which are easier to handle.In the aforementioned papers, the symmetries of the spaces were heavily used to obtain such a dimensional reduction, typically via iterative bisections.RecentlyKlartag [2017]found a bridge between L 1 -optimal transportation problems and the localization technique yielding the localization theorem in the framework of smooth Riemannian manifolds.Inspired by this approach, the first and the second author in [Cavalletti and Mondino 2017b] proved a localization theorem for essentially nonbranching metric measure spaces satisfying the CD(K , N ) condition.Before stating the result it is worth recalling some basics about the disintegration of a measure associated to a partition (for a comprehensive treatment see the monograph [Bianchini and Caravenna 2009]on closer to the spirit of this paper see[Bianchini and Caravenna 2009]; for a one-page summary see[Cavalletti et al. 2019, Appendix B]).