import Mathlib import OAI.Geometry.CubicTorus.Profiles.TransverseTorus namespace OAI section section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus namespace LatticeIsometry lemma volumeSupport_preimage (e : LatticeIsometry) {E : Set Torus} (hE : MeasurableSet E) : volumeSupport (e.torus ⁻¹' E)=e.torus ⁻¹' volumeSupport E := by ext a rw [mem_preimage,mem_volumeSupport_iff,mem_volumeSupport_iff] apply forall_congr' intro r apply imp_congr_right intro _ have he : (e.torus ⁻¹' E)∩Metric.ball a r=e.torus ⁻¹' (E∩Metric.ball (e.torus a) r) := by ext z simp only [mem_inter_iff,mem_preimage,Metric.mem_ball,e.torus.dist_eq] rw [he,Measure.real_def,Measure.real_def,e.measurePreserving.measure_preimage (hE.inter Metric.isOpen_ball.measurableSet).nullMeasurableSet] lemma openRepresentative_preimage (e : LatticeIsometry) {E : Set Torus} (hE : MeasurableSet E) : openRepresentative (e.torus ⁻¹' E)=e.torus ⁻¹' openRepresentative E := by unfold openRepresentative rw [←preimage_compl,e.volumeSupport_preimage hE.compl] rfl lemma frontier_openRepresentative_preimage (e : LatticeIsometry) {E : Set Torus} (hE : MeasurableSet E) : frontier (openRepresentative (e.torus ⁻¹' E))=e.torus ⁻¹' frontier (openRepresentative E) := by rw [e.openRepresentative_preimage hE] exact (e.torus.toHomeomorph.preimage_frontier _).symm def normalMap (e : LatticeIsometry) (z : NormalBundle) : NormalBundle := (cubeRepresentative (e.torus (quotientMap z.1)), ⟨e.cover (z.2 : Cover),by rw [LinearIsometryEquiv.norm_map,z.2.property]⟩) lemma measurable_normalMap (e : LatticeIsometry) : Measurable e.normalMap := by apply Measurable.prodMk · exact measurable_cubeRepresentative.comp (e.torus.continuous.measurable.comp (measurable_quotientMap.comp (measurable_subtype_coe.comp measurable_fst))) · exact (e.cover.continuous.measurable.comp (measurable_subtype_coe.comp measurable_snd)).subtype_mk lemma normalMap_periodic_eval (e : LatticeIsometry) {Y : Type*} {F : Cover → Y} (hp : ∀ m x,F (x+latticeVector m)=F x) (z : NormalBundle) : F (e.normalMap z).1=F (e.cover z.1) := by change F (representative (e.torus (quotientMap z.1)))=_ rw [←e.commute,periodic_representative hp] lemma isNormalMeasure_preimage (e : LatticeIsometry) {E : Set Torus} (hE : MeasurableSet E) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) : IsNormalMeasure (e.torus ⁻¹' E) (μ.map e.symm.normalMap) := by constructor · have hm : ((μ.map e.symm.normalMap).mass : ℝ)=(μ.mass : ℝ) := by have hh := congrArg ENNReal.toReal (Measure.map_apply e.symm.measurable_normalMap MeasurableSet.univ (μ := (μ : Measure NormalBundle))) simpa only [preimage_univ,FiniteMeasure.mass,FiniteMeasure.coeFn_def, FiniteMeasure.toMeasure_map,Measure.real,ENNReal.toReal] using hh rw [hm,hμ.1,e.perimeter_eq hE.nullMeasurableSet] · intro F hF change (∫ z,normalTest F hF.1.continuous z ∂Measure.map e.symm.normalMap (μ : Measure NormalBundle))=_ rw [integral_map e.symm.measurable_normalMap.aemeasurable (normalTest F hF.1.continuous).continuous.aestronglyMeasurable, e.flux hF hE,←hμ.2 _ (e.symm.pullback_admissible hF)] apply integral_congr_ae exact Eventually.of_forall fun z ↦ by change ⟪e.cover.symm (z.2 : Cover),F (e.symm.normalMap z).1⟫= ⟪(z.2 : Cover),e.cover (F (e.cover.symm z.1))⟫ rw [e.symm.normalMap_periodic_eval hF.2.1] exact (e.cover.inner_map_map (e.cover.symm (z.2 : Cover)) (F (e.cover.symm z.1))).symm.trans (by rw [e.cover.apply_symm_apply]) lemma pullback_normal_ae (e : LatticeIsometry) {μ : FiniteMeasure NormalBundle} {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (hae : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) : ∀ᵐ z ∂((μ.map e.symm.normalMap) : Measure NormalBundle),e.pullback N z.1=(z.2 : Cover) := by rw [FiniteMeasure.toMeasure_map] have hc : Continuous (fun z : NormalBundle ↦ e.pullback N z.1) := (e.pullback_contDiff hN).continuous.comp normalEmbedding_continuous.fst apply (ae_map_iff e.symm.measurable_normalMap.aemeasurable (isClosed_eq hc continuous_normalUnit).measurableSet).mpr filter_upwards [hae] with z hz change e.pullback N (e.symm.normalMap z).1=e.cover.symm (z.2 : Cover) rw [e.symm.normalMap_periodic_eval (e.pullback_periodic hp)] change e.cover.symm (N (e.cover (e.cover.symm z.1)))=_ rw [e.cover.apply_symm_apply,hz] theorem normal_equivariant (e : LatticeIsometry) {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) (he : E=ᵐ[torusVolume](e.torus ⁻¹' E)) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (hae : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) (x : Cover) (hx : quotientMap x∈frontier (openRepresentative E)) : N (e.cover x)=e.cover (N x) := by have hμ' := (e.isNormalMeasure_preimage hE hμ).congr_ae he.symm obtain ⟨w,hw⟩ := isMinimizerAt_normal_unique hV hE hmin x hx have hh := (hw μ hμ N hN hp hae).trans (hw _ hμ' _ (e.pullback_contDiff hN) (e.pullback_periodic hp) (e.pullback_normal_ae hN hp hae)).symm change N x=e.cover.symm (N (e.cover x)) at hh have hh' := congrArg e.cover hh simpa only [e.cover.apply_symm_apply] using hh'.symm end LatticeIsometry end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus def axisReflection (i : Fin 3) : LatticeIsometry where cover := ((sibling_coverCoordinatePermute (Equiv.swap 0 i)).trans firstReflection).trans (sibling_coverCoordinatePermute (Equiv.swap 0 i)) torus := ((torusCoordinatePermute (Equiv.swap 0 i)).trans torusFirstReflection).trans (torusCoordinatePermute (Equiv.swap 0 i)) commute x := by change quotientMap (sibling_coverCoordinatePermute (Equiv.swap 0 i) (firstReflection (sibling_coverCoordinatePermute (Equiv.swap 0 i) x)))=_ rw [coverCoordinatePermute_quotient,firstReflection_quotient,coverCoordinatePermute_quotient] rfl lemma axisReflection_cover_apply (i j : Fin 3) (x : Cover) : (axisReflection i).cover x j=if j=i then -x j else x j := by classical change (sibling_coverCoordinatePermute (Equiv.swap 0 i) (firstReflection (sibling_coverCoordinatePermute (Equiv.swap 0 i) x))) j=_ simp only [sibling_coverCoordinatePermute_apply,firstReflection_apply,Equiv.swap_apply_self] by_cases h : j=i · subst j simp · have : Equiv.swap (0 : Fin 3) i j≠0 := by intro he have := congrArg (Equiv.swap (0 : Fin 3) i) he exact h (by simpa using this) simp [h,this] lemma axisReflection_torus_apply (i j : Fin 3) (x : Torus) : (axisReflection i).torus x j=if j=i then -x j else x j := by classical change (torusCoordinatePermute (Equiv.swap 0 i) (torusFirstReflection (torusCoordinatePermute (Equiv.swap 0 i) x))) j=_ simp only [sibling_torusCoordinatePermute_apply,torusFirstReflection_apply,Equiv.swap_apply_self] by_cases h : j=i · subst j simp · have : Equiv.swap (0 : Fin 3) i j≠0 := by intro he have := congrArg (Equiv.swap (0 : Fin 3) i) he exact h (by simpa using this) simp [h,this] lemma axisReflection_conjugate (i : Fin 3) (x : Torus) : (axisReflection i).torus (torusCoordinatePermute (Equiv.swap 0 i) x)= torusCoordinatePermute (Equiv.swap 0 i) (torusFirstReflection x) := by ext j simp only [axisReflection_torus_apply,sibling_torusCoordinatePermute_apply,torusFirstReflection_apply] have he : (j=i) ↔ Equiv.swap (0 : Fin 3) i j=0 := by constructor · rintro rfl; simp · intro h have hh := congrArg (Equiv.swap (0 : Fin 3) i) h simpa using hh simp only [he] def centeredAxisReflection (i : Fin 3) (a : Torus) : Torus ≃ᵢ Torus := ((IsometryEquiv.addRight (-a)).trans (axisReflection i).torus).trans (IsometryEquiv.addRight a) lemma centeredAxisReflection_apply (i j : Fin 3) (a x : Torus) : centeredAxisReflection i a x j=if j=i then -x j+(a j+a j) else x j := by change ((axisReflection i).torus (x+ -a)+a) j=_ rw [PiLp.add_apply,axisReflection_torus_apply] simp only [PiLp.add_apply,PiLp.neg_apply] split_ifs <;> abel lemma centeredAxisReflection_eq (i : Fin 3) {a b : Torus} (h : a i=b i) : centeredAxisReflection i a=centeredAxisReflection i b := by ext x j simp only [centeredAxisReflection_apply] split_ifs with hj · subst j; rw [h] · rfl lemma translated_axis_symmetry_iff (i : Fin 3) (a : Torus) (E : Set Torus) : ((fun z : Torus ↦ z+a) ⁻¹' E)=ᵐ[torusVolume] ((axisReflection i).torus ⁻¹' ((fun z : Torus ↦ z+a) ⁻¹' E)) ↔ E=ᵐ[torusVolume](centeredAxisReflection i a ⁻¹' E) := by constructor · intro h have hh := (measurePreserving_add_right torusVolume (-a)).quasiMeasurePreserving.preimage_ae_eq h filter_upwards [hh] with x hx change (x∈E)=((axisReflection i).torus (x+ -a)+a∈E) change ((x+ -a)+a∈E)=((axisReflection i).torus (x+ -a)+a∈E) at hx simpa only [neg_add_cancel_right] using hx · intro h have hh := (measurePreserving_add_right torusVolume a).quasiMeasurePreserving.preimage_ae_eq h filter_upwards [hh] with x hx change (x+a∈E)=((axisReflection i).torus x+a∈E) change (x+a∈E)=((axisReflection i).torus ((x+a)+ -a)+a∈E) at hx simpa only [add_neg_cancel_right] using hx end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus lemma axisReflection_zero_torus : (axisReflection 0).torus=torusFirstReflection := by ext x j simp only [axisReflection_torus_apply,torusFirstReflection_apply] lemma torusCoordinateSwap_involutive (i : Fin 3) : Function.Involutive (torusCoordinatePermute (Equiv.swap 0 i)) := by intro x ext j simp only [sibling_torusCoordinatePermute_apply,Equiv.swap_apply_self] lemma centeredAxisReflection_conjugate (i : Fin 3) (a x : Torus) : centeredAxisReflection i (torusCoordinatePermute (Equiv.swap 0 i) a) (torusCoordinatePermute (Equiv.swap 0 i) x)= torusCoordinatePermute (Equiv.swap 0 i) (centeredAxisReflection 0 a x) := by ext j simp only [centeredAxisReflection_apply,sibling_torusCoordinatePermute_apply] have he : (j=i) ↔ Equiv.swap (0 : Fin 3) i j=0 := by constructor · rintro rfl; simp · intro h have hh := congrArg (Equiv.swap (0 : Fin 3) i) h simpa using hh simp only [he] theorem isMinimizerAt_exists_axis_reflection {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) (hc : IsPreconnected (frontier (openRepresentative E))) (i : Fin 3) : ∃ a : Torus,E=ᵐ[torusVolume](centeredAxisReflection i a ⁻¹' E) := by let P := torusCoordinatePermute (Equiv.swap 0 i) let F := P ⁻¹' E have hmF : IsMinimizerAt V F := isMinimizerAt_coordinatePermutation hmin _ have hcF : IsPreconnected (frontier (openRepresentative F)) := by change IsPreconnected (frontier (openRepresentative ((coordinatePermutation (Equiv.swap 0 i)).torus ⁻¹' E))) rw [(coordinatePermutation (Equiv.swap 0 i)).frontier_openRepresentative_preimage hE] exact P.toHomeomorph.isPreconnected_preimage.mpr hc obtain ⟨a,ha⟩ := isMinimizerAt_exists_first_reflection hV hmF hcF have ha' : F=ᵐ[torusVolume](centeredAxisReflection 0 a ⁻¹' F) := by apply (translated_axis_symmetry_iff 0 a F).mp rw [axisReflection_zero_torus] exact ha have hh := (coordinatePermutation (Equiv.swap 0 i)).measurePreserving.quasiMeasurePreserving.preimage_ae_eq ha' refine ⟨P a,?_⟩ filter_upwards [hh] with x hx change (P (P x)∈E)=(P (centeredAxisReflection 0 a (P x))∈E) at hx have hleft : P (P x)=x := torusCoordinateSwap_involutive i x have hright : P (centeredAxisReflection 0 a (P x))=centeredAxisReflection i (P a) x := by rw [←centeredAxisReflection_conjugate i a (P x),hleft] change (x∈E)=(centeredAxisReflection i (P a) x∈E) rwa [hleft,hright] at hx theorem isMinimizerAt_common_reflection_origin {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hmin : IsMinimizerAt V E) (hc : IsPreconnected (frontier (openRepresentative E))) : ∃ a : Torus,∀ i : Fin 3,let E' := (fun z : Torus ↦ z+a) ⁻¹' E E'=ᵐ[torusVolume]((axisReflection i).torus ⁻¹' E') := by classical let F := toMeasurable torusVolume E have hF : MeasurableSet F := measurableSet_toMeasurable _ _ have hae : F=ᵐ[torusVolume]E := hmin.1.1.toMeasurable_ae_eq have hmF := (isMinimizerAt_congr_ae hae).mpr hmin have hcF : IsPreconnected (frontier (openRepresentative F)) := by rwa [openRepresentative_congr_ae hae] choose b hb using isMinimizerAt_exists_axis_reflection hV hF hmF hcF let a : Torus := WithLp.toLp 2 (fun i ↦ b i i) refine ⟨a,fun i ↦ ?_⟩ have hf : F=ᵐ[torusVolume](centeredAxisReflection i a ⁻¹' F) := by rw [centeredAxisReflection_eq i (a := a) (b := b i) rfl] exact hb i have hf' := (translated_axis_symmetry_iff i a F).mpr hf have htAE := (measurePreserving_add_right torusVolume a).quasiMeasurePreserving.preimage_ae_eq hae refine htAE.symm.trans (hf'.trans ?_) exact (axisReflection i).measurePreserving.quasiMeasurePreserving.preimage_ae_eq htAE end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus lemma representative_coordinatePermute (e : Fin 3 ≃ Fin 3) (x : Torus) : representative (torusCoordinatePermute e x)=sibling_coverCoordinatePermute e (representative x) := by ext j rfl lemma LatticeIsometry.pullback_representative (e : LatticeIsometry) {N : Cover → Cover} (hp : ∀ m x,N (x+latticeVector m)=N x) (x : Torus) : e.pullback N (representative x)=e.cover.symm (N (representative (e.torus x))) := by have he := periodic_representative hp (e.cover (representative x)) rw [e.commute,quotientMap_representative] at he change e.cover.symm (N (e.cover (representative x)))=_ rw [he] lemma coordinateSwap_pullback_scalar (i : Fin 3) {N : Cover → Cover} (hp : ∀ m x,N (x+latticeVector m)=N x) (x : Torus) : (coordinatePermutation (Equiv.swap 0 i)).pullback N (representative (torusCoordinatePermute (Equiv.swap 0 i) x)) 0=N (representative x) i := by rw [LatticeIsometry.pullback_representative _ hp] change (sibling_coverCoordinatePermute (Equiv.swap 0 i)).symm (N (representative (torusCoordinatePermute (Equiv.swap 0 i) (torusCoordinatePermute (Equiv.swap 0 i) x)))) 0=_ rw [torusCoordinateSwap_involutive,coverCoordinatePermute_symm] simp only [sibling_coverCoordinatePermute_apply,Equiv.symm_swap,Equiv.swap_apply_left] theorem isMinimizerAt_axis_strict_normal_sign {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) (hc : IsPreconnected (frontier (openRepresentative E))) (i : Fin 3) (hR : E=ᵐ[torusVolume]((axisReflection i).torus ⁻¹' E)) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (hae : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) : (∀ x∈frontier (openRepresentative E),N (representative x) i=0) ∨ (∀ x∈frontier (openRepresentative E),Real.sin (2*Real.pi*representative x i)<0 → N (representative x) i<0) ∨ (∀ x∈frontier (openRepresentative E),Real.sin (2*Real.pi*representative x i)<0 → 0 simp only [hbi,Bool.false_eq_true,ite_false,ite_true] at hn hh · exact mul_nonneg_of_nonpos_of_nonpos (sub_nonpos.mpr hh) hn · exact mul_nonneg (sub_nonneg.mpr hh) hn end CubicTorus end end section noncomputable section open MeasureTheory Set Filter open scoped ENNReal NNReal Topology RealInnerProductSpace namespace CubicTorus lemma isMinimizerAt_axis_fixed_normal_zero {V : ℝ} (hV : V∈Ioo 0 1) {E : Set Torus} (hE : MeasurableSet E) (hmin : IsMinimizerAt V E) (i : Fin 3) (hR : E=ᵐ[torusVolume]((axisReflection i).torus ⁻¹' E)) {μ : FiniteMeasure NormalBundle} (hμ : IsNormalMeasure E μ) {N : Cover → Cover} (hN : ContDiff ℝ (⊤ : ℕ∞) N) (hp : ∀ m x,N (x+latticeVector m)=N x) (hae : ∀ᵐ z ∂(μ : Measure NormalBundle),N z.1=(z.2 : Cover)) (x : Cover) (hx : quotientMap x∈frontier (openRepresentative E)) (hfix : (axisReflection i).torus (quotientMap x)=quotientMap x) : N x i=0 := by have he := (axisReflection i).normal_equivariant hV hE hmin hR hμ hN hp hae x hx have hq : quotientMap ((axisReflection i).cover x)=quotientMap x := by rw [(axisReflection i).commute,hfix] obtain ⟨m,hm⟩ := same_quotient_lattice hq rw [hm,hp] at he have hh := congrArg (fun v : Cover ↦ v i) he simp only [axisReflection_cover_apply,ite_true] at hh linarith end CubicTorus end end end end OAI