import PoincareLib.Geometry.Curvature.Integral.Concentration.BallCover import PoincareLib.Geometry.Curvature.Integral.Induction.Corners.Slab.Summation /-! # From ambient ball estimates to an integral bound A Bishop--Gromov cover is recentered in the measured space. Nonnegative error integrals over the doubled balls are bounded by the total error. This supplies the local-to-global step for compact corner fibers. Reference: Petrunin (2009), Sections 4.5--4.7, author manuscript pp. 9--14. -/ open Set MeasureTheory PoincareMT open scoped Manifold ContDiff Bundle Topology set_option autoImplicit false set_option backward.isDefEq.respectTransparency false theorem PoincareMT.RiemannianMetric.integral_le_uniform_ambient_cover_bound {n : ℕ} {M X : Type*} [TopologicalSpace M] [T3Space M] [PreconnectedSpace M] [MeasurableSpace M] [BorelSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] [MeasurableSpace X] [Nonempty X] (g : RiemannianMetric n M) (D : LeviCivitaData g) (hc : MetricComplete g) (hn : 1≤n) (hsec : ∀ x (v w : TangentSpace (𝓡 n) x), -1≤D.sectionalCurvature x v w) (p : M) (f : X → M) (hf : Measurable f) (hinside : ∀ x, f x∈g.ball p 2) (μ : Measure X) (R K : X → ℝ) (hRi : Integrable R μ) (hKi : Integrable K μ) (hRn : ∀ x, 0≤R x) (hKn : ∀ x, 0≤K x) {r B : ℝ} (hr : 0 D.ricci_quadratic_lower_bound_of_sectionalCurvature_lower_bound x 1 (hsec x) v) have hcenters (q : S) : ∃ x:X, ∀ y:X, f y∈g.ball q.val (r/2) → f y∈g.ball (f x) r := by by_cases hx : ∃ x:X, f x∈g.ball q.val (r/2) · obtain ⟨x,hx⟩ := hx refine ⟨x,?_⟩ intro y hy rw [←g.toMetricSpace_ball] at hx hy ⊢ change dist (f y) (f x) (hx ⟨y,hy⟩).elim⟩ choose center hcenter using hcenters have hmeas (x:X) (s:ℝ) : MeasurableSet (f ⁻¹' g.ball (f x) s) := by rw [←g.toMetricSpace_ball] exact Metric.isOpen_ball.measurableSet.preimage hf have hcover' : (univ:Set X) ⊆ ⋃ q∈(Finset.univ:Finset S), f ⁻¹' g.ball (f (center q)) r := by intro x _ obtain ⟨q,hq,hx⟩ := mem_iUnion₂.mp (hcover (hinside x)) exact mem_iUnion₂.mpr ⟨⟨q,hq⟩,Finset.mem_univ _,hcenter ⟨q,hq⟩ x hx⟩ have hs := Poincare.CurvatureIntegral.integral_le_card_mul_weighted_bound_of_finset_cover (μ := μ) (R := R) (K := K) (E := univ) (W := univ) MeasurableSet.univ (Finset.univ:Finset S) (fun q => f ⁻¹' g.ball (f (center q)) r) (fun q => f ⁻¹' g.ball (f (center q)) (2*r)) (fun q _ => hmeas _ _) hRn hKn hRi.integrableOn (fun _ _ => hRi.integrableOn) hKi.integrableOn hcover' (fun _ _ => subset_univ _) hB (fun q _ => hbound (center q)) simp only [Measure.restrict_univ,Finset.card_univ,Fintype.card_coe] at hs refine hs.trans ?_ apply mul_le_mul_of_nonneg_right _ (add_nonneg zero_le_one (integral_nonneg hKn)) apply mul_le_mul_of_nonneg_right _ hB have hcard' : S.card ≤ ⌈modelVolume n 1 6 / modelVolume n 1 (r/4)⌉₊ := by simpa only [show (3:ℝ)*2=6 by norm_num,show r/2/2=r/4 by ring] using hcard exact_mod_cast hcard'