import Mathlib import OAI.Geometry.CubicTorus.Profiles.NormalizedCMCCharts namespace OAI section section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus lemma normalized_CMC_common_patch_curvature {B C : Set Torus} {N M : Cover → Cover} (hpN : ∀ m x,N (x+latticeVector m)=N x) (hpM : ∀ m x,M (x+latticeVector m)=M x) {H K : ℝ} (hBch : HasNormalizedCMCCharts B N H) (hCch : HasNormalizedCMCCharts C M K) {x : Torus} (hxB : x∈B) (hx : x∈orientedSurfaceAgreement B C N M) : H=K := by obtain ⟨a,rfl⟩ := quotientMap_surjective x have hxC := hx.self_of_nhds.1.mp hxB have hNM : N a=M a := by simpa only [periodic_representative hpN,periodic_representative hpM] using hx.self_of_nhds.2 hxB obtain ⟨hn,f,hf,hf0,_,hfm,_⟩ := hBch a hxB obtain ⟨_,g,hg,hg0,_,hgm,hgc⟩ := hCch a hxC rw [←hNM] at hgm hgc have hF0 : normalGraph (N a) f 0=0 := by change (normalPlaneLinearIsometry (N a)) 0+f 0 • N a=0 rw [map_zero,hf0,zero_smul,add_zero] have hFt : Tendsto (normalGraph (N a) f) (𝓝 (0 : Plane)) (𝓝 (0 : Cover)) := by simpa only [hF0] using ((normalGraph_contDiff hf (n := N a)).continuous.continuousAt (x := 0)).tendsto have hq : Tendsto (fun y : Plane ↦ quotientMap (a+normalGraph (N a) f y)) (𝓝 0) (𝓝 (quotientMap a)) := by have hc := (continuous_quotientMap.comp ( (continuous_const (y := a)).add (normalGraph_contDiff hf (n := N a)).continuous)).continuousAt (x := 0) simpa only [Function.comp_def,Pi.add_apply,hF0,add_zero] using hc.tendsto have hfg : f=ᶠ[𝓝 (0 : Plane)]g := by filter_upwards [hfm,hq.eventually hx,hFt.eventually hgc] with y hfy hxy hgy rw [normalPlaneCoordinates_graph hn] at hgy exact normalGraph_height_eq hn ((hgy.mp (hxy.1.mp hfy.2.1)).symm) have hc := planeCMC_germ hfg rw [hfm.self_of_nhds.2.2,hgm.self_of_nhds.2.2] at hc exact neg_injective hc theorem CMC_surfaces_identity {B C : Set Torus} (hBc : IsClosed B) (hCc : IsClosed C) (hBconn : IsPreconnected B) (hCconn : IsPreconnected C) {N M : Cover → Cover} (hN : Continuous N) (hM : Continuous M) (hpN : ∀ m x,N (x+latticeVector m)=N x) (hpM : ∀ m x,M (x+latticeVector m)=M x) {H K : ℝ} (hBch : HasNormalizedCMCCharts B N H) (hCch : HasNormalizedCMCCharts C M K) (hpatch : (B∩orientedSurfaceAgreement B C N M).Nonempty) : B=C ∧ H=K ∧ ∀ x∈B,N (representative x)=M (representative x) := by obtain ⟨x,hxB,hxag⟩ := hpatch have hHK := normalized_CMC_common_patch_curvature hpN hpM hBch hCch hxB hxag subst K have hAB : B⊆orientedSurfaceAgreement B C N M := preconnected_subset_of_relative_germ_closed hBconn (isOpen_orientedSurfaceAgreement _ _ _ _) ⟨x,hxB,hxag⟩ (fun _ hy ↦ orientedSurfaceAgreement_closed_at hCc hN hM hpN hpM hBch hCch hy.2 hy.1) have hxC := hxag.self_of_nhds.1.mp hxB have hAC : C⊆orientedSurfaceAgreement C B M N := preconnected_subset_of_relative_germ_closed hCconn (isOpen_orientedSurfaceAgreement _ _ _ _) ⟨x,hxC,orientedSurfaceAgreement_symm hxag⟩ (fun _ hy ↦ orientedSurfaceAgreement_closed_at hBc hM hN hpM hpN hCch hBch hy.2 hy.1) refine ⟨Subset.antisymm (fun y hy ↦ (hAB hy).self_of_nhds.1.mp hy) (fun y hy ↦ (hAC hy).self_of_nhds.1.mp hy),rfl,?_⟩ exact fun y hy ↦ (hAB hy).self_of_nhds.2 hy end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus lemma boundaryZeroGerm_homeomorph (e : Torus ≃ₜ Torus) (S : Set Torus) (F : Torus → ℝ) : boundaryZeroGerm (e ⁻¹' S) (F∘e)=e ⁻¹' boundaryZeroGerm S F := by ext x change (∀ᶠ y in 𝓝 x,e y∈S → F (e y)=0) ↔ (∀ᶠ y in 𝓝 (e x),y∈S → F y=0) rw [←e.map_nhds_eq x] rfl lemma boundaryZeroGerm_translation (a : Cover) (S : Set Torus) (f : smoothPeriodicScalars) : boundaryZeroGerm ((fun b ↦ b+quotientMap a) ⁻¹' S) (fun b ↦ (sibling_smoothScalarTranslate a f).val (representative b))= (fun b ↦ b+quotientMap a) ⁻¹' boundaryZeroGerm S (fun b ↦ f.val (representative b)) := by simp only [smoothScalarTranslate_descent] exact boundaryZeroGerm_homeomorph (Homeomorph.addRight (quotientMap a)) S (fun b ↦ f.val (representative b)) theorem isMinimizerAt_Jacobi_zero_germ_closed {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (haeN : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) (hjN : ∀ w : Cover,∀ v∈surfaceH1 μ,surfaceJacobiB μ (surfaceCurvatureLp μ N hN) (surfaceSmoothJet μ (directionalNormalScalar N hN hp w)) v=0) (f : smoothPeriodicScalars) (hjf : ∀ v∈surfaceH1 μ,surfaceJacobiB μ (surfaceCurvatureLp μ N hN) (surfaceSmoothJet μ f) v=0) (x : Torus) (hx : x∈frontier (openRepresentative E)) (hcl : x∈closure (frontier (openRepresentative E)∩ boundaryZeroGerm (frontier (openRepresentative E)) (fun x ↦ f.val (representative x)))) : x∈boundaryZeroGerm (frontier (openRepresentative E)) (fun x ↦ f.val (representative x)) := by let a : Cover := representative x-cubeCenter have hshift : quotientMap cubeCenter+quotientMap a=x := by dsimp [a] rw [quotientMap_sub,quotientMap_representative] abel let E' : Set Torus := (fun b ↦ b+quotientMap a) ⁻¹' E let μ' := μ.map (translateNormal a) let N' := normalTranslateField a N let hN' := normalTranslateField_smooth a hN let hp' := normalTranslateField_periodic a hp let f' := sibling_smoothScalarTranslate a f have hE' : MeasurableSet E' := hE.preimage (measurable_id.add measurable_const) have hmin' : IsMinimizerAt V E' := isMinimizerAt_translation hmin (quotientMap a) have hμ' : IsNormalMeasure E' μ' := isNormalMeasure_translation hE hμ a have haeN' := normalTranslateField_ae μ a hN.continuous hp haeN have hS' : frontier (openRepresentative E')=(fun b ↦ b+quotientMap a) ⁻¹' frontier (openRepresentative E) := frontier_openRepresentative_translation hE _ have hcenter : quotientMap cubeCenter∈frontier (openRepresentative E') := by rw [hS'] change quotientMap cubeCenter+quotientMap a∈frontier (openRepresentative E) rwa [hshift] obtain ⟨c⟩ := isMinimizerAt_centeredJacobiChart hV hE' hmin' hcenter hμ' hN' hp' haeN' have hcl' : quotientMap cubeCenter∈closure (frontier (openRepresentative E')∩ boundaryZeroGerm (frontier (openRepresentative E')) (fun b ↦ f'.val (representative b))) := by rw [hS',boundaryZeroGerm_translation,←preimage_inter] change quotientMap cubeCenter∈closure ((Homeomorph.addRight (quotientMap a)) ⁻¹' _) rw [←(Homeomorph.addRight (quotientMap a)).preimage_closure] change quotientMap cubeCenter+quotientMap a∈closure _ rwa [hshift] have hz := c.zero_germ_closed hE' hμ' hN' hp' haeN' (surfaceCurvatureLp μ' N' hN') f' (normalTranslate_smooth_weakJacobi μ a hN hp f hjf) (by rw [normalTranslate_directional a hN hp] exact normalTranslate_smooth_weakJacobi μ a hN hp _ (hjN c.n)) hcl' rw [hS',boundaryZeroGerm_translation] at hz change quotientMap cubeCenter+quotientMap a∈boundaryZeroGerm _ _ at hz rwa [hshift] at hz theorem isMinimizerAt_Jacobi_identity {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) (hconn : IsPreconnected (frontier (openRepresentative E))) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (haeN : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) (hjN : ∀ w : Cover,∀ v∈surfaceH1 μ,surfaceJacobiB μ (surfaceCurvatureLp μ N hN) (surfaceSmoothJet μ (directionalNormalScalar N hN hp w)) v=0) (f : smoothPeriodicScalars) (hjf : ∀ v∈surfaceH1 μ,surfaceJacobiB μ (surfaceCurvatureLp μ N hN) (surfaceSmoothJet μ f) v=0) (hpatch : (frontier (openRepresentative E)∩ boundaryZeroGerm (frontier (openRepresentative E)) (fun x ↦ f.val (representative x))).Nonempty) : ∀ x∈frontier (openRepresentative E),f.val (representative x)=0 := by have hsub := preconnected_subset_of_relative_germ_closed hconn (boundaryZeroGerm_open _ _) hpatch (fun x hx ↦ isMinimizerAt_Jacobi_zero_germ_closed hV hE hmin hμ hN hp haeN hjN f hjf x hx.2 hx.1) exact fun x hx ↦ (hsub hx).self_of_nhds hx end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus theorem CenteredJacobiChart.zero_germ_of_local_nonneg {E : Set Torus} (hE : MeasurableSet E) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (haeN : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) (c : CenteredJacobiChart E μ N) (q : Lp ℝ ∞ (μ : Measure NormalBundle)) (f : smoothPeriodicScalars) (hjf : ∀ v∈surfaceH1 μ,surfaceJacobiB μ q (surfaceSmoothJet μ f) v=0) (hjw : ∀ v∈surfaceH1 μ,surfaceJacobiB μ q (surfaceSmoothJet μ (directionalNormalScalar N hN hp c.n)) v=0) (hpos : ∀ᶠ x in 𝓝 (quotientMap cubeCenter),x∈frontier (openRepresentative E) → 0≤f.val (representative x)) (hz : f.val cubeCenter=0) : quotientMap cubeCenter∈boundaryZeroGerm (frontier (openRepresentative E)) (fun x ↦ f.val (representative x)) := by let F : Plane → ℝ := fun y ↦ c.weight y*f.val (c.parameter y) have hF : ContDiff ℝ (⊤ : ℕ∞) F := c.weight_smooth.mul (f.property.1.comp c.parameter_smooth) have hpos' : ∀ᶠ y in 𝓝 (0 : Plane),0≤f.val (c.parameter y) := by have ht : Tendsto (fun y ↦ quotientMap (c.parameter y)) (𝓝 (0 : Plane)) (𝓝 (quotientMap cubeCenter)) := by have ht := (show Continuous (fun y : Plane ↦ quotientMap (c.parameter y)) from continuous_quotientMap.comp c.parameter_smooth.continuous).tendsto (0 : Plane) rw [c.parameter_zero] at ht exact ht filter_upwards [ht.eventually hpos,Metric.ball_mem_nhds (0 : Plane) c.r_pos] with y hy hr simpa only [periodic_representative f.property.2] using hy (c.boundary_disk y (Metric.ball_subset_closedBall hr)) obtain ⟨s,hs,hsp⟩ := Metric.eventually_nhds_iff.mp hpos' let r := min s (c.r/2) have hr : 0