import PoincareLib.Geometry.RicciFlow.Area.MinimalSphere.EnergyDensityCoordinates import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Compact.SupportIntegralDerivative import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Integrability /-! # Differentiating the actual energy of supported sphere variations Morgan-Tian Claim 18.12, printed pp. 426-427, first-variation derivation. The density difference has a common compact plane support. Its actual time derivative can therefore be integrated. The original sphere energy is integrable independently by the established C1 sphere estimate. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter MeasureTheory open scoped Manifold ContDiff Topology universe u namespace PoincareMT variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] /-- The actual frozen plane energy density is jointly smooth on every smooth variation interval. Source: MT Claim 18.12, pp. 426-427. -/ theorem m60SphereEnergyDensity_family_contDiffOn (g : RiemannianMetric n M) {v : ℝ Γ— UnitTwoSphere β†’ M} {Ξ΅ : ℝ} (hv : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (𝓑 2)) (𝓑 n) ∞ v (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set UnitTwoSphere))) : ContDiffOn ℝ ∞ (fun q : ℝ Γ— LoopPlane => m60SphereEnergyDensity g (fun p => v (q.1, p)) q.2) (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set LoopPlane)) := by have hfst : ContMDiff π“˜(ℝ, ℝ Γ— LoopPlane) π“˜(ℝ, ℝ) ∞ (Prod.fst : ℝ Γ— LoopPlane β†’ ℝ) := contDiff_fst.contMDiff have hsnd : ContMDiff π“˜(ℝ, ℝ Γ— LoopPlane) (𝓑 2) ∞ (Prod.snd : ℝ Γ— LoopPlane β†’ LoopPlane) := contDiff_snd.contMDiff have hparam := hfst.prodMk (m60SphereParameter_contMDiff.comp hsnd) intro q hq have hvq : ContMDiffAt ((π“˜(ℝ, ℝ)).prod (𝓑 2)) (𝓑 n) ∞ v (q.1, m60SphereParameter q.2) := hv.contMDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds ⟨hq.1, mem_univ (m60SphereParameter q.2)⟩) exact (m60EnergyDensity_family_contDiffAt g (hvq.comp q (hparam q))).contDiffWithinAt /-- The energy of a smooth sphere variation which is fixed outside one compact parameter-plane set has the integral of its actual density time derivative as derivative. Source: MT Claim 18.12, pp. 426-427. -/ theorem m60SphereEnergy_hasDerivAt_of_supported_variation (g : RiemannianMetric n M) {v : ℝ Γ— UnitTwoSphere β†’ M} {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) (hv : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (𝓑 2)) (𝓑 n) ∞ v (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set UnitTwoSphere))) {K : Set LoopPlane} (hK : IsCompact K) (hfix : βˆ€ s ∈ Ioo (-Ξ΅) Ξ΅, βˆ€ z βˆ‰ K, v (s, m60SphereParameter z) = v (0, m60SphereParameter z)) : let E := fun q : ℝ Γ— LoopPlane => m60SphereEnergyDensity g (fun p => v (q.1, p)) q.2 Integrable (fun z => fderiv ℝ E (0, z) (1, 0)) volume ∧ HasDerivAt (fun s => m60SphereEnergy g (fun p => v (s, p))) (∫ z : LoopPlane, fderiv ℝ E (0, z) (1, 0)) 0 := by let E := fun q : ℝ Γ— LoopPlane => m60SphereEnergyDensity g (fun p => v (q.1, p)) q.2 let G := fun s z => fderiv ℝ E (s, z) (1, 0) have hzero : (0 : ℝ) ∈ Ioo (-Ξ΅) Ξ΅ := ⟨by linarith, hΡ⟩ have hO : IsOpen (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set LoopPlane)) := isOpen_Ioo.prod isOpen_univ have hE : ContDiffOn ℝ ∞ E (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set LoopPlane)) := m60SphereEnergyDensity_family_contDiffOn g hv have hEs (s : ℝ) (hs : s ∈ Ioo (-Ξ΅) Ξ΅) : Continuous (fun z => E (s, z)) := hE.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) (fun z => ⟨hs, mem_univ z⟩) have hG : ContinuousOn (Function.uncurry G) (Ioo (-Ξ΅) Ξ΅ Γ—Λ’ (univ : Set LoopPlane)) := ((hE.fderiv_of_isOpen hO (m := ∞) (by simp)).clm_apply contDiffOn_const).continuousOn have hdiff (s : ℝ) (hs : s ∈ Ioo (-Ξ΅) Ξ΅) (z : LoopPlane) : HasDerivAt (fun t => E (t, z) - E (0, z)) (G s z) s := by have hEp : ContDiffAt ℝ ∞ E (s, z) := hE.contDiffAt (hO.mem_nhds ⟨hs, mem_univ z⟩) have hd := hEp.differentiableAt (by simp) have ht : HasDerivAt (fun t : ℝ => (t, z)) (1, 0) s := (hasDerivAt_id s).prodMk (hasDerivAt_const s z) exact (hd.hasFDerivAt.comp_hasDerivAt (l := E) (f := fun t : ℝ => (t, z)) s ht).sub_const _ have hsupp (s : ℝ) (hs : s ∈ Ioo (-Ξ΅) Ξ΅) (z : LoopPlane) (hz : z βˆ‰ K) : E (s, z) - E (0, z) = 0 := by apply sub_eq_zero.mpr apply m60EnergyDensity_congr_of_eventuallyEq g filter_upwards [hK.isClosed.isOpen_compl.mem_nhds hz] with y hy exact hfix s hs y hy obtain ⟨hGint, hd⟩ := M60.hasDerivAt_integral_of_common_compact_support (ΞΌ := volume) (F := fun s z => E (s, z) - E (0, z)) (F' := G) hK hΞ΅ (fun s hs => (hEs s hs).sub (hEs 0 hzero)) hG hdiff hsupp refine ⟨hGint, ?_⟩ have hvSlice (s : ℝ) (hs : s ∈ Ioo (-Ξ΅) Ξ΅) : ContMDiff (𝓑 2) (𝓑 n) ∞ (fun p => v (s, p)) := by have hi : ContMDiff (𝓑 2) ((π“˜(ℝ, ℝ)).prod (𝓑 2)) ∞ (fun p : UnitTwoSphere => (s, p)) := contMDiff_const.prodMk contMDiff_id intro p have hvp : ContMDiffAt ((π“˜(ℝ, ℝ)).prod (𝓑 2)) (𝓑 n) ∞ v (s, p) := hv.contMDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds ⟨hs, mem_univ p⟩) exact hvp.comp p (hi p) have hEi (s : ℝ) (hs : s ∈ Ioo (-Ξ΅) Ξ΅) : Integrable (fun z => E (s, z)) volume := by change Integrable (m60SphereEnergyDensity g (fun p : UnitTwoSphere => v (s, p))) volume exact m60SphereEnergyDensity_integrable g (fun p : UnitTwoSphere => v (s, p)) ((hvSlice s hs).of_le (by simp)) apply (hd.add_const (m60SphereEnergy g (fun p => v (0, p)))).congr_of_eventuallyEq filter_upwards [isOpen_Ioo.mem_nhds hzero] with s hs dsimp only [m60SphereEnergy] rw [integral_sub (hEi s hs) (hEi 0 hzero)] change (∫ z : LoopPlane, E (s, z)) = (∫ z : LoopPlane, E (s, z)) - (∫ z : LoopPlane, E (0, z)) + ∫ z : LoopPlane, E (0, z) ring end PoincareMT