import OAI.Geometry.Nikodym.Chart.Radius import OAI.Geometry.Nikodym.Chart.Measure open OAI.Analysis.Fourier.Wave open _root_.MeasureTheory Set open scoped ENNReal noncomputable section namespace OAI.Geometry.Nikodym theorem lintegral_restrict_le_of_measure_le {X : Type*} [MeasurableSpace X] {μ ν : Measure X} {b : ℝ≥0∞} (h : μ≤b • ν) (T : Set X) (f : X → ℝ≥0∞) : (∫⁻ x in T,f x ∂μ) ≤ b * ∫⁻ x in T,f x ∂ν := by calc _ ≤ ∫⁻ x,f x ∂((b • ν).restrict T) := lintegral_mono' (Measure.restrict_mono_measure h T) le_rfl _ = _ := by rw [Measure.restrict_smul,lintegral_smul_measure]; rfl /-- Measure comparison for a chart is needed only on its actual image. -/ theorem measure_inner_le {X : Type*} [MeasurableSpace X] {μ ν : Measure X} {a : ℝ≥0∞} {V I T : Set X} (hI : MeasurableSet I) (hIV : I⊆V) (hIT : I⊆T) (h : μ.restrict V≤a • ν) : μ I ≤ a * ν T := by have H := Measure.le_iff'.mp h I rw [Measure.restrict_apply hI,inter_eq_left.mpr hIV,Measure.smul_apply] at H exact H.trans (mul_le_mul' le_rfl (measure_mono hIT)) /-- A measurable majorant for an arbitrary straightened geodesic tube. The inner tube lying in `V` is the explicit chart-margin requirement. -/ theorem chartTube_average_le_nikodym {n : ℕ} {ν : Measure (Space n)} {V T : Set (Space n)} {a b : ℝ≥0∞} (_ : a≠⊤) (hb : b≠⊤) (hup : ν≤b • volume) (hdown : volume.restrict V≤a • ν) {r R l l₀ : ℝ} (hr : 0