import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Modulus.MinimumStationarity import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Modulus.ChartEnergyVariation import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Supported.ChartAnnulusVariation /-! # Actual coordinate tests at the conformal modulus Admitted supported chart perturbations and actual area minimality give the weighted covariant test identity. The two domain directions retain the factors of the chosen modulus. Source: the local first variation underlying Morgan--Tian Lemma 19.15, pp. 447-449. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter MeasureTheory open scoped Manifold ContDiff Topology universe u namespace PoincareMT open CoordinateExponential ConnectionVariation variable {n : β„•} {M : Type u} [TopologicalSpace M] [T2Space M] [CompactSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {g : RiemannianMetric n M} {c0 c1 : ℝ β†’ M} /-- The actual weighted chart-test integral vanishes at an attained modulus-conformal annular minimum, with no assumed weak equation. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ theorem m64Annulus_chart_test_integral_eq_zero_of_modulus_minimum (A : M64Annulus g c0 c1) {r : ℝ} (hr : 0 < r) (hminimum : A.area = m64LeastAnnulusArea g c0 c1) (hconformal : βˆ€α΅ p βˆ‚volume.restrict m64AnnulusDomain, r * m60AreaGram g A.map p 0 0 = r⁻¹ * m60AreaGram g A.map p 1 1 ∧ m60AreaGram g A.map p 0 1 = 0) (b : M) {U : Set LoopPlane} (hU : IsOpen U) (hUinside : U βŠ† m64AnnulusInterior) (hf : ContMDiffOn (𝓑 2) (𝓑 n) ∞ A.map U) (hfU : MapsTo A.map U (extChartAt (𝓑 n) b).source) (V : LoopPlane β†’ EuclideanSpace ℝ (Fin n)) (hV : ContDiff ℝ ∞ V) (hcompact : HasCompactSupport V) (hsupport : tsupport V βŠ† U) : let u := (extChartAt (𝓑 n) b) ∘ A.map let B := g.pullbackCoefficients (extChartAt (𝓑 n) b).symm let e := EuclideanSpace.basisFun (Fin 2) ℝ (∫ z : LoopPlane, r * B (u z) (covDerivAlong (christoffelBilinear B) u V (e 0) z) (fderiv ℝ u z (e 0)) + r⁻¹ * B (u z) (covDerivAlong (christoffelBilinear B) u V (e 1) z) (fderiv ℝ u z (e 1))) = 0 := by let u := (extChartAt (𝓑 n) b) ∘ A.map let B := g.pullbackCoefficients (extChartAt (𝓑 n) b).symm let e := EuclideanSpace.basisFun (Fin 2) ℝ let J := fun z => r * B (u z) (covDerivAlong (christoffelBilinear B) u V (e 0) z) (fderiv ℝ u z (e 0)) + r⁻¹ * B (u z) (covDerivAlong (christoffelBilinear B) u V (e 1) z) (fderiv ℝ u z (e 1)) let c := chartAt (EuclideanSpace ℝ (Fin n)) b let v := M60.supportedChartVariation c U A.map V have hfU' : MapsTo A.map U c.source := by simpa only [c, extChartAt_source] using hfU obtain ⟨epsilon, hepsilon, hv, hchart, hadmissible⟩ := m64SupportedChartVariation_exists_admissible_interval A b hU hUinside hf hfU' V hV hcompact hsupport have hcenter : βˆ€ p, v (0, p) = A.map p := M60.supportedChartVariation_zero c U A.map V hfU' have hfixall (s : ℝ) (z : LoopPlane) (hz : z βˆ‰ tsupport V) : v (s, z) = A.map z := m64SupportedChartVariation_eq_of_notMem_tsupport A b hfU' V s hz have hfix (s : ℝ) (_hs : s ∈ Ioo (-epsilon) epsilon) (z : LoopPlane) (hz : z βˆ‰ tsupport V) : v (s, z) = v (0, z) := by rw [hcenter] exact hfixall s z hz have hKdomain : tsupport V βŠ† m64AnnulusDomain := (hsupport.trans hUinside).trans m64AnnulusInterior_subset_domain have hstat := m64Annulus_supported_modulus_stationarity_of_minimum_of_eqOn A hr hminimum hconformal hepsilon hU hcompact hsupport hKdomain hv hadmissible hcenter hfix have hint (s : ℝ) (hs : s ∈ Ioo (-epsilon) epsilon) : IntegrableOn (m64ModulusEnergyDensity g r (fun z => v (s, z))) m64AnnulusDomain volume := by obtain ⟨C, hC⟩ := hadmissible s hs exact (C.weightedGramEnergy_integrable r).congr (m64ModulusEnergyDensity_ae_eq_of_eqOn g r hC) have htotal := m64ModulusEnergy_hasDerivAt_of_supported_variation g r hepsilon hU hcompact hsupport hKdomain hv hfix hint let E := fun q : ℝ Γ— LoopPlane => m64ModulusEnergyDensity g r (fun z => v (q.1, z)) q.2 let D := fun q : ℝ Γ— LoopPlane => E q - E (0, q.2) have hzero : (0 : ℝ) ∈ Ioo (-epsilon) epsilon := ⟨by linarith, hepsilon⟩ have hcoord : βˆ€ s ∈ Ioo (-epsilon) epsilon, βˆ€ z ∈ U, v (s, z) ∈ (extChartAt (𝓑 n) b).source ∧ extChartAt (𝓑 n) b (v (s, z)) = extChartAt (𝓑 n) b (A.map z) + s β€’ V z := by simpa only [extChartAt_source, extChartAt_coe, modelWithCornersSelf_coe, Function.id_comp] using hchart have hDzero (s : ℝ) (z : LoopPlane) (hz : z βˆ‰ tsupport V) : D (s, z) = 0 := by apply sub_eq_zero.mpr apply m64ModulusEnergyDensity_congr_of_eventuallyEq g r filter_upwards [(isClosed_tsupport V).isOpen_compl.mem_nhds hz] with y hy exact (hfixall s y hy).trans (hcenter y).symm have hderiv (z : LoopPlane) : fderiv ℝ D (0, z) (1, 0) = J z := by by_cases hz : z ∈ U Β· have hEp : ContDiffAt ℝ ∞ E (0, z) := m64ModulusEnergyDensity_family_contDiffAt g r (hv.contMDiffAt ((isOpen_Ioo.prod hU).mem_nhds ⟨hzero, hz⟩)) have hproj : ContDiffAt ℝ ∞ (fun q : ℝ Γ— LoopPlane => ((0 : ℝ), q.2)) (0, z) := contDiffAt_const.prodMk contDiffAt_snd have hEcomp : ContDiffAt ℝ ∞ (fun q : ℝ Γ— LoopPlane => E (0, q.2)) (0, z) := ContDiffAt.comp (f := fun q : ℝ Γ— LoopPlane => (0, q.2)) (g := E) (0, z) hEp hproj have hDp : ContDiffAt ℝ ∞ D (0, z) := hEp.sub hEcomp have hpoint := m64ModulusEnergyDensity_hasDerivAt_of_affine_chart g r b A.map hU hf hfU V hV hepsilon hv hcoord z hz exact ((hDp.differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt (l := D) (f := fun s : ℝ => (s, z)) 0 ((hasDerivAt_id (0 : ℝ)).prodMk (hasDerivAt_const (0 : ℝ) z))).unique (hpoint.sub_const (E (0, z))) Β· have hout : z βˆ‰ tsupport V := fun h => hz (hsupport h) have hJ : J z = 0 := by simp only [J, covDerivAlong, image_eq_zero_of_notMem_tsupport hout, fderiv_of_notMem_tsupport (π•œ := ℝ) hout, zero_apply, map_zero, add_zero, mul_zero] have hDeq : D =αΆ [𝓝 (0, z)] (fun _ => (0 : ℝ)) := by filter_upwards [continuous_snd.continuousAt.preimage_mem_nhds ((isClosed_tsupport V).isOpen_compl.mem_nhds hout)] with q hq exact hDzero q.1 q.2 hq simp only [hDeq.fderiv_eq, fderiv_const_apply, zero_apply, hJ] change (∫ z : LoopPlane, J z) = 0 calc _ = ∫ z : LoopPlane, fderiv ℝ D (0, z) (1, 0) := by apply integral_congr_ae exact Eventually.of_forall fun z => (hderiv z).symm _ = 0 := htotal.2.unique hstat end PoincareMT