import PoincareLib.Geometry.RicciFlow.Area.MinimalSphere.EnergyDensityCoordinates import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Coordinates.EnergyVariation /-! # The pointwise energy variation in a target chart Morgan-Tian Claim 18.12, printed pp. 426-427. An actual sphere variation with affine target coordinates has the covariant first-variation density. Every derivative is taken on the actual chart domain, and the target metric is fixed throughout the variation. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Topology BigOperators universe u namespace PoincareMT open CoordinateExponential ConnectionVariation ConjugateVariation variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] /-- Affine coordinates of an actual smooth sphere variation give the covariant derivative of the frozen half-energy density. Source: MT Claim 18.12, pp. 426-427, supported variation derivation. -/ theorem m60SphereEnergyDensity_hasDerivAt_of_affine_chart (g : RiemannianMetric n M) (b : M) (f : UnitTwoSphere โ†’ M) (hf : ContMDiff (๐“ก 2) (๐“ก n) โˆž f) (V : LoopPlane โ†’ EuclideanSpace โ„ (Fin n)) (hV : ContDiff โ„ โˆž V) {v : โ„ ร— UnitTwoSphere โ†’ M} {ฮต : โ„} (hฮต : 0 < ฮต) (hv : ContMDiffOn ((๐“˜(โ„, โ„)).prod (๐“ก 2)) (๐“ก n) โˆž v (Ioo (-ฮต) ฮต ร—หข (univ : Set UnitTwoSphere))) (hcoord : โˆ€ s โˆˆ Ioo (-ฮต) ฮต, โˆ€ z : LoopPlane, f (m60SphereParameter z) โˆˆ (extChartAt (๐“ก n) b).source โ†’ v (s, m60SphereParameter z) โˆˆ (extChartAt (๐“ก n) b).source โˆง extChartAt (๐“ก n) b (v (s, m60SphereParameter z)) = extChartAt (๐“ก n) b (f (m60SphereParameter z)) + s โ€ข V z) (z : LoopPlane) (hz : f (m60SphereParameter z) โˆˆ (extChartAt (๐“ก n) b).source) : let u := (extChartAt (๐“ก n) b) โˆ˜ (f โˆ˜ m60SphereParameter) let B := g.pullbackCoefficients (extChartAt (๐“ก n) b).symm HasDerivAt (fun s => m60SphereEnergyDensity g (fun p => v (s, p)) z) (โˆ‘ i : Fin 2, B (u z) (covDerivAlong (christoffelBilinear B) u V (EuclideanSpace.basisFun (Fin 2) โ„ i) z) (fderiv โ„ u z (EuclideanSpace.basisFun (Fin 2) โ„ i))) 0 := by let ฯ† := f โˆ˜ m60SphereParameter let c := extChartAt (๐“ก n) b let u := c โˆ˜ ฯ† let B := g.pullbackCoefficients c.symm let e := EuclideanSpace.basisFun (Fin 2) โ„ let O := ฯ† โปยน' c.source have hฯ† : ContMDiff (๐“ก 2) (๐“ก n) โˆž ฯ† := hf.comp m60SphereParameter_contMDiff have hO : IsOpen O := (isOpen_extChartAt_source b).preimage hฯ†.continuous have hu : ContDiffAt โ„ โˆž u z := contMDiffAt_iff_contDiffAt.mp ((contMDiffAt_extChartAt' (n := โˆž) (by simpa only [extChartAt_source, ฯ†, Function.comp_apply] using hz)).comp z (hฯ† z)) have hB : DifferentiableAt โ„ B (u z) := ((g.contDiffOn_chartCoefficients b).contDiffAt ((isOpen_extChartAt_target b).mem_nhds (c.map_source hz))).differentiableAt (by simp) have hterm (i : Fin 2) := M60.hasDerivAt_affine_coordinate_energy (u := u) (V := V) z (e i) hB (isMetricCompatibleAt_chartCoefficients g b (c.map_source hz)) (fun _ _ => g.symm _ _ _) (christoffelBilinear_chart_symm g b (u z)) have hsum := HasDerivAt.fun_sum (u := Finset.univ) (fun i _ => hterm i) apply hsum.congr_of_eventuallyEq filter_upwards [isOpen_Ioo.mem_nhds (show (0 : โ„) โˆˆ Ioo (-ฮต) ฮต from โŸจby linarith, hฮตโŸฉ)] with s hs have hvPlane : ContMDiff (๐“ก 2) (๐“ก n) โˆž (fun y => v (s, m60SphereParameter y)) := by intro y have hva : ContMDiffAt ((๐“˜(โ„, โ„)).prod (๐“ก 2)) (๐“ก n) โˆž v (s, m60SphereParameter y) := hv.contMDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds โŸจhs, mem_univ (m60SphereParameter y)โŸฉ) exact hva.comp y (contMDiffAt_const.prodMk (m60SphereParameter_contMDiff y)) have heq : (fun y => c (v (s, m60SphereParameter y))) =แถ [๐“ z] (fun y => u y + s โ€ข V y) := by filter_upwards [hO.mem_nhds hz] with y hy exact (hcoord s hs y hy).2 have hd : HasFDerivAt (fun y => u y + s โ€ข V y) (fderiv โ„ u z + s โ€ข fderiv โ„ V z) z := (hu.differentiableAt (by simp)).hasFDerivAt.add ((hV.differentiable (by simp) z).hasFDerivAt.const_smul s) change m60EnergyDensity g (fun y => v (s, m60SphereParameter y)) z = _ rw [m60EnergyDensity_eq_chart g b (hvPlane.mdifferentiable (by simp) z) (hcoord s hs z hz).1] dsimp only [Function.comp_def] rw [heq.fderiv_eq, hd.fderiv, (hcoord s hs z hz).2, Finset.mul_sum] rfl end PoincareMT