import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.LocalMeasureComparison import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.InverseMeasure import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Calibration.MeasureGluing import Mathlib.Analysis.SpecificLimits.Basic /-! # Calibrated intrinsic volume in actual smooth local coordinates Sharp local metric comparisons identify the calibrated Hausdorff measure with the actual pullback Gram density. Countable gluing and constants tending to one allow arbitrary Borel sets of infinite measure. -/ set_option autoImplicit false open Set Filter MeasureTheory open scoped Manifold ContDiff Bundle Topology ENNReal NNReal universe u namespace PoincareMT.ReducedVolume variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] [T3Space M] [MeasurableSpace M] [BorelSpace M] /-- Calibrated intrinsic volume equals the actual Gram density on each smooth inverse branch. -/ theorem calibratedMetricVolume_image_eq_withDensity (g : RiemannianMetric n M) (e : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin n)) M) (he : ContMDiffOn (𝓑 n) (𝓑 n) 1 e e.source) (hei : ContMDiffOn (𝓑 n) (𝓑 n) 1 e.symm e.target) {A : Set (EuclideanSpace ℝ (Fin n))} (hA : MeasurableSet A) (hAsource : A βŠ† e.source) : calibratedMetricVolume g (e '' A) = (volume.withDensity (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y))) A := by let ΞΌ := calibratedMetricVolume g let pulled := (ΞΌ.restrict e.target).map e.symm let Ξ½ := volume.withDensity (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y)) let r : β„• β†’ ℝβ‰₯0 := fun k ↦ 1 + 1 / ((k : ℝβ‰₯0) + 1) have hr : βˆ€ k, (1 : ℝ) < r k := by intro k have h : (1 : ℝβ‰₯0) < r k := lt_add_of_pos_right _ (by positivity) exact_mod_cast h have hrt : Tendsto r atTop (𝓝 1) := by simpa only [add_zero] using (tendsto_const_nhds (x := (1 : ℝβ‰₯0))).add tendsto_one_div_add_atTop_nhds_zero_nat let c : β„• β†’ ℝβ‰₯0∞ := fun k ↦ (r k : ℝβ‰₯0∞) ^ (n + 1) have hc : Tendsto c atTop (𝓝 1) := by simpa only [c, Function.comp_apply, ENNReal.coe_one, one_pow] using ENNReal.Tendsto.pow (n := n + 1) ((ENNReal.continuous_coe.tendsto (1 : ℝβ‰₯0)).comp hrt) have hlocal : βˆ€ k, βˆ€ x ∈ e.source, βˆƒ V : Set (EuclideanSpace ℝ (Fin n)), IsOpen V ∧ x ∈ V ∧ βˆ€ B : Set (EuclideanSpace ℝ (Fin n)), MeasurableSet B β†’ B βŠ† V β†’ pulled B ≀ c k * Ξ½ B ∧ Ξ½ B ≀ c k * pulled B := by intro k x hx obtain ⟨V, hVo, hxV, hVsource, hbound⟩ := local_calibratedMeasure_density_comparison g e he hei hx (hr k) refine ⟨V, hVo, hxV, ?_⟩ intro B hB hBV have hmap : pulled B = ΞΌ (e '' B) := map_inverse_restrict_apply e ΞΌ hB (hBV.trans hVsource) rw [hmap] exact hbound B hB hBV have hforward : βˆ€ k, βˆ€ x ∈ e.source, βˆƒ V : Set (EuclideanSpace ℝ (Fin n)), IsOpen V ∧ x ∈ V ∧ βˆ€ B : Set (EuclideanSpace ℝ (Fin n)), MeasurableSet B β†’ B βŠ† V β†’ pulled B ≀ c k * Ξ½ B := by intro k x hx obtain ⟨V, hVo, hxV, hbound⟩ := hlocal k x hx exact ⟨V, hVo, hxV, fun B hB hBV ↦ (hbound B hB hBV).1⟩ have hreverse : βˆ€ k, βˆ€ x ∈ e.source, βˆƒ V : Set (EuclideanSpace ℝ (Fin n)), IsOpen V ∧ x ∈ V ∧ βˆ€ B : Set (EuclideanSpace ℝ (Fin n)), MeasurableSet B β†’ B βŠ† V β†’ Ξ½ B ≀ c k * pulled B := by intro k x hx obtain ⟨V, hVo, hxV, hbound⟩ := hlocal k x hx exact ⟨V, hVo, hxV, fun B hB hBV ↦ (hbound B hB hBV).2⟩ have h := measure_eq_of_local_comparisons c hc hforward hreverse hA hAsource rwa [map_inverse_restrict_apply e ΞΌ hA hAsource] at h /-- The local image formula as an explicit nonnegative integral of the actual Jacobian. -/ theorem calibratedMetricVolume_image_eq_lintegral (g : RiemannianMetric n M) (e : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin n)) M) (he : ContMDiffOn (𝓑 n) (𝓑 n) 1 e e.source) (hei : ContMDiffOn (𝓑 n) (𝓑 n) 1 e.symm e.target) {A : Set (EuclideanSpace ℝ (Fin n))} (hA : MeasurableSet A) (hAsource : A βŠ† e.source) : calibratedMetricVolume g (e '' A) = ∫⁻ y in A, ENNReal.ofReal (pullbackJacobian g e y) := by rw [calibratedMetricVolume_image_eq_withDensity g e he hei hA hAsource, withDensity_apply _ hA] end PoincareMT.ReducedVolume