We prove that if M is a closed n-dimensional Riemannian manifold, n ≥ 3, with Ric ≥ n − 1 and for which the optimal constant in the critical Sobolev inequality equals the one of the n-dimensional sphere S n , then M is isometric to S n . An almost-rigidity result is also established, saying that if equality is almost achieved, then M is close in the measure Gromov-Hausdorff sense to a spherical suspension. These statements are obtained in the RCD-setting of (possibly non-smooth) metric measure spaces satisfying synthetic lower Ricci curvature bounds.An independent result of our analysis is the characterization of the best constant in the Sobolev inequality on any compact CD space, extending to the non-smooth setting a classical result by Aubin. Our arguments are based on a new concentration compactness result for mGHconverging sequences of RCD spaces and on a Polya-Szego inequality of Euclidean-type in CD spaces.As an application of the technical tools developed we prove both an existence result for the Yamabe equation and the continuity of the generalized Yamabe constant under measure Gromov-Hausdorff convergence, in the RCD-setting.
Contentsq 2. Preliminaries 2.1. Basic notations 2.2. Calculus on metric measure spaces 2.3. CD(K, N ) and RCD(K, N ) spaces 2.4. Polya-Szego inequality 3. Upper bound for α p 3.1. Polya-Szego inequality of Euclidean-type 3.2. Local Sobolev inequality 3.3. Proof of the upper bound 4. Lower bound on α p 4.1. Blow-up analysis of Sobolev constants 4.2. Sharp and rigid Sobolev inequalities under Euclidean volume growth 5. The constant A opt q in metric measure spaces 5.1. Upper bound on A opt q in terms of Ricci bounds 5.2. Lower bound on A opt q in term of the first eigenvalue 5.3. Lower bound on A opt q in term of the diameter 6. Rigidity of A opt q 6.1. Concentration Compactness 6.2. Quantitative linearization 6.3. Proof of the rigidity 7. Almost rigidity of A opt 7.1. Behavior at concentration points 7.2. Continuity of A opt under mGH-convergence7.3. Proof of the almost-rigidity 43 8. Application: The Yamabe equation on RCD(K, N ) spaces 43 8.1. Existence of solutions to the Yamabe equation on compact RCD spaces 44 8.2. Continuity of λ S under mGH-convergence 48 References 50