import PoincareLib.Geometry.Riemannian.ScalarOperators import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.RoundCylinder import PoincareLib.Geometry.Riemannian.LoopSpace.Width /-! # M60 actual sphere area and energy One fixed stereographic parameter identifies the plane with the unit sphere minus one point. The derivative of this parameter already contributes the conformal coordinate factor, so the plane integrals have no extra sphere volume weight. Area counts parametrized multiplicity and energy uses the one-half normalization. Source: Morgan--Tian Lemma 18.10 and Claims 18.12-18.13, printed pp. 424-427; `reviews/contracts/M60-round1.md` and `reviews/errata/2026-09-14-sphere-area.md`. The integrals are total definitions; their geometric conclusions separately require C1 regularity and integrability. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle BigOperators open MeasureTheory universe u namespace PoincareMT /-- The fixed unit coordinate vector used as the stereographic pole. -/ noncomputable def m60SpherePole : UnitTwoSphere := ⟨EuclideanSpace.basisFun (Fin 3) ℝ 0, by simpa only [Metric.mem_sphere, dist_zero_right] using (EuclideanSpace.basisFun (Fin 3) ℝ).norm_eq_one 0⟩ /-- Mathlib's fixed stereographic chart, independent of the target or metric. -/ noncomputable def m60SphereChart : OpenPartialHomeomorph UnitTwoSphere LoopPlane := letI : Fact (Module.finrank ℝ LoopAmbient = 2 + 1) := ⟨by simp [LoopAmbient]⟩ stereographic' 2 m60SpherePole /-- The inverse chart is defined on the entire parameter plane. -/ noncomputable def m60SphereParameter : LoopPlane → UnitTwoSphere := m60SphereChart.symm section Carrier variable {n : ℕ} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] /-- The actual two-by-two pullback Gram matrix in the plane coordinate basis. -/ noncomputable def m60AreaGram (g : RiemannianMetric n M) (f : LoopPlane → M) (z : LoopPlane) : Matrix (Fin 2) (Fin 2) ℝ := let d := mfderiv (𝓡 2) (𝓡 n) f z let e : Fin 2 → TangentSpace (𝓡 n) (f z) := fun i => d (EuclideanSpace.basisFun (Fin 2) ℝ i) fun i j => g.inner (f z) (e i) (e j) /-- The metric Jacobian of a parametrized two-dimensional map. -/ noncomputable def m60AreaDensity (g : RiemannianMetric n M) (f : LoopPlane → M) (z : LoopPlane) : ℝ := Real.sqrt (max 0 (Matrix.det (m60AreaGram g f z))) /-- The Dirichlet energy density, with the one-half normalization. -/ noncomputable def m60EnergyDensity (g : RiemannianMetric n M) (f : LoopPlane → M) (z : LoopPlane) : ℝ := (1 / 2 : ℝ) * Matrix.trace (m60AreaGram g f z) /-- Sphere area density pulled back by the fixed stereographic parameter. -/ noncomputable def m60SphereAreaDensity (g : RiemannianMetric n M) (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := m60AreaDensity g (f ∘ m60SphereParameter) z /-- Sphere energy density in the same conformal plane coordinate. -/ noncomputable def m60SphereEnergyDensity (g : RiemannianMetric n M) (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := m60EnergyDensity g (f ∘ m60SphereParameter) z /-- The actual parametrized sphere area, including multiplicity. -/ noncomputable def m60SphereArea (g : RiemannianMetric n M) (f : UnitTwoSphere → M) : ℝ := ∫ z : LoopPlane, m60SphereAreaDensity g f z ∂volume /-- The actual conformally invariant energy, normalized by one half. -/ noncomputable def m60SphereEnergy (g : RiemannianMetric n M) (f : UnitTwoSphere → M) : ℝ := ∫ z : LoopPlane, m60SphereEnergyDensity g f z ∂volume /-- The tangent-plane Ricci trace times area density. The rank-deficient locus contributes zero to the fixed-map area variation. -/ noncomputable def m60SphereRicciTraceDensity {g : RiemannianMetric n M} (D : LeviCivitaData g) (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := let F := f ∘ m60SphereParameter let d := mfderiv (𝓡 2) (𝓡 n) F z let e : Fin 2 → TangentSpace (𝓡 n) (F z) := fun i => d (EuclideanSpace.basisFun (Fin 2) ℝ i) let G := m60AreaGram g F z if Matrix.det G = 0 then 0 else (∑ i : Fin 2, ∑ j : Fin 2, (G⁻¹) i j * D.ricci (F z) (e j) (e i)) * m60AreaDensity g F z /-- The scalar-curvature infimum; compact nonempty regularity supplies attainment in the milestone conclusion. -/ noncomputable def m60ScalarMinimum {g : RiemannianMetric n M} (D : LeviCivitaData g) : ℝ := sInf (Set.range D.scalarCurvature) end Carrier /-- The general-dimensional density agrees exactly with the earlier disk Jacobian in target dimension three. -/ theorem m60AreaDensity_eq_parametrizedAreaDensity {M : Type u} [TopologicalSpace M] [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] (g : RiemannianMetric 3 M) (f : LoopPlane → M) (z : LoopPlane) : m60AreaDensity g f z = parametrizedAreaDensity g f z := rfl end PoincareMT