import Mathlib import OAI.Geometry.BallPacking.Annuli.AnnularEmbeddedChart namespace OAI noncomputable section namespace PackingSufficiencySupport.Hamiltonian.AnnularHandleData open scoped ContDiff Manifold Topology open Set Function Manifold variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {Ω : V →L[ℝ] V →L[ℝ] ℝ} theorem handleAnnularCover_mem_band (D : AnnularHandleData Plane M) (b : ℝ) {p : Plane} (hp : p.1 ∈ Icc (-b) b) : D.handleAnnularCover p ∈ D.chart '' band b := by exact ⟨cylinderCover p,⟨hp,mem_univ _⟩,rfl⟩ theorem annularUnshearMap_mem_interior (D : AnnularHandleData Plane M) (b : ℝ) (Φ : CompactHamiltonianIsotopy Ω) {Y : Set V} {Kbase : Set M} (hbase : D.chart '' band b ⊆ interior Kbase) (hΦ : ∀ t∈Icc (0:ℝ) 1,MapsTo (Φ.map t) Y Y ∧ MapsTo (Φ.map t).symm Y Y) {p : Plane × V} (hp : p.1.1 ∈ Icc (-b) b) (hv : p.2 ∈ interior Y) : annularUnshearMap D b Φ p ∈ interior (Kbase ×ˢ Y) := by rw [interior_prod_eq] refine ⟨hbase (D.handleAnnularCover_mem_band b hp),?_⟩ have ht : intervalClock (-b) b p.1.1 ∈ Icc (0:ℝ) 1 := intervalClock_bounds _ _ _ exact homeomorph_mapsTo_interior (Φ.map _).symm (hΦ _ ht).2 (hΦ _ ht).1 hv end PackingSufficiencySupport.Hamiltonian.AnnularHandleData namespace PackingSufficiencySupport.Hamiltonian open scoped ContDiff Manifold Topology open Set Function Manifold section variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold 𝓘(ℝ,Plane) ∞ M] def annularCoverTwoCoefficient (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) (a : ℝ) (Λ : ManifoldTwoForm Plane M) (q : Plane) : ℝ := euclideanPullbackTwoForm (fun _ => Λ) (handleAnnularCover e a) (0,q) (1,0) (0,1) omit [IsManifold 𝓘(ℝ,Plane) ∞ M] in theorem annularCoverDomain_eq (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) {a : ℝ} (ha : a<1/2) (he : compactHandleBand a⊆e.source) : annularCoverDomain e a=Ioo (-a) a ×ˢ univ := by rw [annularCoverDomain,handleAnnularChart_source e ha he] rfl theorem annularCoverTwoCoefficient_smooth (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) (a : ℝ) {Λ : ManifoldTwoForm Plane M} (hΛ : SmoothTwoForm Λ) : ContDiffOn ℝ ∞ (annularCoverTwoCoefficient e a Λ) (annularCoverDomain e a) := by intro q hq have hs := euclideanPullbackTwoForm_contDiffAt (Ω := fun _ : ℝ => Λ) (g := handleAnnularCover e a) (p := (0,q)) (SmoothTwoFormFamily.const (P := ℝ) hΛ) (handleAnnularCover_smoothAt e a hq) exact (((hs.clm_apply contDiffAt_const).clm_apply contDiffAt_const).comp q (contDiffAt_const.prodMk contDiffAt_id)).contDiffWithinAt omit [IsManifold 𝓘(ℝ,Plane) ∞ M] in theorem annularCoverTwoCoefficient_ne_zero (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) (a : ℝ) {Λ : ManifoldTwoForm Plane M} (hs : ∀ x u v,Λ x u v= -Λ x v u) (hp : ∀ c y,y∈(extChartAt 𝓘(ℝ,Plane) c).target→ 0 hs _ _ _ have hB0 : B (1,0) (0,1)=0 := hz have hzero : Λ (handleAnnularCover e a q)=0 := by apply ContinuousLinearMap.ext intro u apply ContinuousLinearMap.ext intro v have hv := planar_skew_coefficient B hB (D.symm u) (D.symm v) simpa only [B,ContinuousLinearMap.bilinearComp_apply,ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply,hB0,zero_mul,zero_apply] using hv let c := handleAnnularCover e a q have hc := mem_extChartAt_source (I := 𝓘(ℝ,Plane)) c have hi := hp c (extChartAt 𝓘(ℝ,Plane) c c) ((extChartAt 𝓘(ℝ,Plane) c).map_source hc) have hcc : (extChartAt 𝓘(ℝ,Plane) c).symm (extChartAt 𝓘(ℝ,Plane) c c)=c := (extChartAt 𝓘(ℝ,Plane) c).left_inv hc simp only [chartTwoForm,hcc,ContinuousLinearMap.bilinearComp_apply] at hi change 0<Λ (handleAnnularCover e a q) _ _ at hi rw [hzero] at hi exact (lt_irrefl 0) hi theorem annularCoverTwoCoefficient_positive (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) {a : ℝ} (ha : a<1/2) (he : compactHandleBand a⊆e.source) (hor : PositivePartialChart (handleDensityChart e a)) {Λ : ManifoldTwoForm Plane M} (hΛ : SmoothTwoForm Λ) (hs : ∀ x u v,Λ x u v= -Λ x v u) (hp : ∀ c y,y∈(extChartAt 𝓘(ℝ,Plane) c).target→ 0 B (mfderiv 𝓘(ℝ,Plane) 𝓘(ℝ,Plane) (handleAnnularCover e a) q (1,0)) (mfderiv 𝓘(ℝ,Plane) 𝓘(ℝ,Plane) (handleAnnularCover e a) q (0,1))) heq have hp' := mul_pos hr (annularCoverTwoCoefficient_positive e ha he hor hΛ hs hp hq) exact lt_of_lt_of_eq hp' hv.symm omit [IsManifold 𝓘(ℝ,Plane) ∞ M] in theorem handleAnnularCover_surjOn (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,Plane) HandleTorus M ∞) (a : ℝ) : SurjOn (handleAnnularCover e a) (annularCoverDomain e a) (handleAnnularChart e a).target := by intro x hx let z := (handleAnnularChart e a).symm x let q : Plane := (z.1,shortCircleArgument z.2) have heq : cylinderCover q=z := by exact Prod.ext rfl (circleTurn_shortCircleArgument z.2) refine ⟨q,?_,?_⟩ · change cylinderCover q∈(handleAnnularChart e a).source rw [heq] exact (handleAnnularChart e a).map_target hx · change handleAnnularChart e a (cylinderCover q)=x rw [heq] exact (handleAnnularChart e a).right_inv hx end variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold 𝓘(ℝ,Plane) ∞ M] theorem annularPackingRectangle_subset {a b δ : ℝ} (hab : b surfaceFirstPrimitive Φ S H a b w (ℓ,x)) p).IsInvertible := by obtain ⟨a',b',ha',hb',hea,heb⟩ := exists_smooth_base_germs hU ha hb hp have hbase' : 0 surfaceFirstPrimitive Φ S H a' b' w (ℓ,x)) =ᶠ[𝓝 p] (fun x => surfaceFirstPrimitive Φ S H a b w (ℓ,x)) := by filter_upwards [continuousAt_fst.preimage_mem_nhds hea, continuousAt_fst.preimage_mem_nhds heb] with y hya hyb change a' y.1=a y.1 at hya change b' y.1=b y.1 at hyb apply ContinuousLinearMap.ext intro v simp only [surfaceFirstPrimitive,horizontalOneForm_apply,hya,hyb] rwa [euclideanExteriorOneForm_congr_germ he] at hi theorem surfaceSecondPath_isInvertible_local [FiniteDimensional ℝ E] {ι : Type*} [Fintype ι] (hΩ : Ω.IsInvertible) (hskew : ∀ v w, Ω v w = -Ω w v) (Φ : CompactHamiltonianIsotopy Ω) {S : ℝ → ℝ} {K H : E → ℝ} {h : ι → E → ℝ} {ρ : ι → ℝ → ℝ} {ρ₀ : ℝ → ℝ} {a b w : Plane → ℝ} (hS : ContDiff ℝ ∞ S) (hK : ContDiff ℝ ∞ K) (hH : ContDiff ℝ ∞ H) (hh : ∀ i, ContDiff ℝ ∞ (h i)) (hρ : ∀ i, ContDiff ℝ ∞ (ρ i)) (hρ₀ : ContDiff ℝ ∞ ρ₀) {U : Set Plane} (hU : IsOpen U) (ha : ContDiffOn ℝ ∞ a U) (hb : ContDiffOn ℝ ∞ b U) (hw : ContDiff ℝ ∞ w) (τ : ℝ) (hτ : τ ∈ Icc (0:ℝ) 1) (p : Plane × E) (hp : p.1∈U) (hbase : 0 surfaceSecondPrimitive Φ S K H h ρ ρ₀ a b w (τ,x)) p).IsInvertible := by obtain ⟨a',b',ha',hb',hea,heb⟩ := exists_smooth_base_germs hU ha hb hp have hbase' : 0 surfaceSecondPrimitive Φ S K H h ρ ρ₀ a' b' w (τ,x)) =ᶠ[𝓝 p] (fun x => surfaceSecondPrimitive Φ S K H h ρ ρ₀ a b w (τ,x)) := by filter_upwards [continuousAt_fst.preimage_mem_nhds hea, continuousAt_fst.preimage_mem_nhds heb] with y hya hyb change a' y.1=a y.1 at hya change b' y.1=b y.1 at hyb apply ContinuousLinearMap.ext intro v simp only [surfaceSecondPrimitive,horizontalOneForm_apply,hya,hyb] rwa [euclideanExteriorOneForm_congr_germ he] at hi theorem horizontalCoupling_congr_germ {A B A' B' : Plane × E → ℝ} {p : Plane × E} (hA : A =ᶠ[𝓝 p] A') (hB : B =ᶠ[𝓝 p] B') : horizontalCoupling Ω A B p = horizontalCoupling Ω A' B' p := by have h : horizontalOneForm A B =ᶠ[𝓝 p] horizontalOneForm A' B' := by filter_upwards [hA,hB] with x ha hb apply ContinuousLinearMap.ext intro v simp only [horizontalOneForm_apply,ha,hb] simp only [horizontalCoupling,euclideanExteriorOneForm_congr_germ h] theorem baseShear_weighted_pullback_local (hΩ : Ω.IsInvertible) (hskew : ∀ v w, Ω v w = -Ω w v) (Φ : CompactHamiltonianIsotopy Ω) {S : ℝ → ℝ} (hS : ContDiff ℝ ∞ S) {U : Set Plane} (hU : IsOpen U) {a b w : Plane → ℝ} {G : ℝ × E → ℝ} (ha : ContDiffOn ℝ ∞ a U) (hb : ContDiffOn ℝ ∞ b U) (hw : ContDiff ℝ ∞ w) (hG : ContDiff ℝ ∞ G) (p : Plane × E) (hp : p.1 ∈ U) : (horizontalCoupling Ω (baseCoefficient a) (weightedSecondCoefficient b w G) (hamiltonianBaseShear Φ S hS p)).bilinearComp (fderiv ℝ (hamiltonianBaseShear Φ S hS) p) (fderiv ℝ (hamiltonianBaseShear Φ S hS) p) = horizontalCoupling Ω (firstBaseCoefficient (baseShearPrimitiveCoefficient Φ S) + baseCoefficient a ∘ hamiltonianBaseShear Φ S hS) (weightedSecondCoefficient b w G ∘ hamiltonianBaseShear Φ S hS) p := by obtain ⟨a',b',ha',hb',hea,heb⟩ := exists_smooth_base_germs hU ha hb hp have hl : horizontalCoupling Ω (baseCoefficient a') (weightedSecondCoefficient b' w G) (hamiltonianBaseShear Φ S hS p) = horizontalCoupling Ω (baseCoefficient a) (weightedSecondCoefficient b w G) (hamiltonianBaseShear Φ S hS p) := by have hf : ContinuousAt (Prod.fst : Plane × E → Plane) (hamiltonianBaseShear Φ S hS p) := continuousAt_fst apply horizontalCoupling_congr_germ · exact hf.preimage_mem_nhds hea · filter_upwards [hf.preimage_mem_nhds heb] with x hx change b' x.1 = b x.1 at hx simp only [weightedSecondCoefficient,hx] have hr : horizontalCoupling Ω (firstBaseCoefficient (baseShearPrimitiveCoefficient Φ S) + baseCoefficient a' ∘ hamiltonianBaseShear Φ S hS) (weightedSecondCoefficient b' w G ∘ hamiltonianBaseShear Φ S hS) p = horizontalCoupling Ω (firstBaseCoefficient (baseShearPrimitiveCoefficient Φ S) + baseCoefficient a ∘ hamiltonianBaseShear Φ S hS) (weightedSecondCoefficient b w G ∘ hamiltonianBaseShear Φ S hS) p := by apply horizontalCoupling_congr_germ · filter_upwards [continuousAt_fst.preimage_mem_nhds hea] with x hx change a' x.1 = a x.1 at hx change _ + a' x.1 = _ + a x.1 rw [hx] · filter_upwards [continuousAt_fst.preimage_mem_nhds heb] with x hx change b' x.1 = b x.1 at hx change b' x.1 + _ = b x.1 + _ rw [hx] have h := baseShear_coupling_pullback_general hΩ hskew Φ hS (baseCoefficient_smooth ha') (weightedSecondCoefficient_smooth hb' hw hG) p rwa [hl,hr] at h theorem surfaceSecondEndpoint_shear_pullback {ι : Type*} [Fintype ι] (hΩ : Ω.IsInvertible) (hskew : ∀ v w, Ω v w = -Ω w v) (Φ : CompactHamiltonianIsotopy Ω) {S : ℝ → ℝ} {K H : E → ℝ} {h : ι → E → ℝ} {ρ : ι → ℝ → ℝ} {ρ₀ : ℝ → ℝ} (hS : ContDiff ℝ ∞ S) (hK : ContDiff ℝ ∞ K) (hH : ContDiff ℝ ∞ H) (hh : ∀ i, ContDiff ℝ ∞ (h i)) (hρ : ∀ i, ContDiff ℝ ∞ (ρ i)) (hρ₀ : ContDiff ℝ ∞ ρ₀) {U : Set Plane} (hU : IsOpen U) {a b w : Plane → ℝ} (ha : ContDiffOn ℝ ∞ a U) (hb : ContDiffOn ℝ ∞ b U) (hw : ContDiff ℝ ∞ w) (p : Plane × E) (hp : p.1 ∈ U) : (horizontalCoupling Ω (baseCoefficient a) (weightedSecondCoefficient b w (surfaceFinalLayer (K-H) h (surfaceRemainder K H h (Φ.map 1).symm) ρ ρ₀)) (hamiltonianBaseShear Φ S hS p)).bilinearComp (fderiv ℝ (hamiltonianBaseShear Φ S hS) p) (fderiv ℝ (hamiltonianBaseShear Φ S hS) p) = Ω.bilinearComp (ContinuousLinearMap.snd ℝ Plane E) (ContinuousLinearMap.snd ℝ Plane E) + euclideanExteriorOneForm (fun x => surfaceSecondPrimitive Φ S K H h ρ ρ₀ a b w (1,x)) p := by rw [surfaceSecondPrimitive_coupling Φ hS] have hG := surfaceInterpolatedLayer_smooth hS hK hH hh (Φ.map_inverse_smooth 1) hρ hρ₀ 1 have he : surfaceInterpolatedLayer S K H h (Φ.map 1).symm ρ ρ₀ 1 = surfaceFinalLayer (K-H) h (surfaceRemainder K H h (Φ.map 1).symm) ρ ρ₀ := by funext q simp only [surfaceInterpolatedLayer,sub_self,zero_mul,one_mul,zero_add] rw [he] exact baseShear_weighted_pullback_local hΩ hskew Φ hS hU ha hb hw (he ▸ hG) p hp end variable {V E : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup E] [NormedSpace ℝ E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] {Ω : V →L[ℝ] V →L[ℝ] ℝ} omit [NormedAddCommGroup V] [NormedSpace ℝ V] in theorem annular_normalForm_cover (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,E) HandleTorus M ∞) (a b : ℝ) (f : Circle → ℝ) (H : V → ℝ) (Γ : V → ManifoldOneForm E M) (γ : ManifoldOneForm E M) {W : Set M} (hN : ∀ v x,x∈W→Γ v x=γ x+ (intervalClock (-b) b ((handleAnnularChart e a).symm x).1*H v) • globalHandleForm e f x) (v : V) {q : Plane} (hq : q∈annularCoverDomain e a) (hx : handleAnnularCover e a q∈W) : Γ v (handleAnnularCover e a q)=γ (handleAnnularCover e a q)+ (intervalClock (-b) b q.1*H v) • globalHandleForm e f (handleAnnularCover e a q) := by simpa only [handleAnnularCover_inverse e a hq,cylinderCover] using hN v _ hx theorem globalSurfaceFirstPrimitive_cover_germ (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,E) HandleTorus M ∞) (a b : ℝ) (f : Circle → ℝ) (Φ : CompactHamiltonianIsotopy Ω) (H : V → ℝ) (Γ : V → ManifoldOneForm E M) (γ : ManifoldOneForm E M) {W : Set M} (hW : IsOpen W) (hN : ∀ v x,x∈W→Γ v x=γ x+ (intervalClock (-b) b ((handleAnnularChart e a).symm x).1*H v) • globalHandleForm e f x) (ℓ : ℝ) {p : Plane × V} (hp : p.1∈annularCoverDomain e a) (hx : handleAnnularCover e a p.1∈W) : (fun y => euclideanPullbackOneForm (fun _ => productHorizontalLift (fun v => globalSurfaceFirstPrimitive e a b f Φ H Γ (ℓ,v))) (flatProductMap (handleAnnularCover e a)) (0,y)) =ᶠ[𝓝 p] (fun y => surfaceFirstPrimitive Φ (intervalClock (-b) b) H (annularCoverA e a γ) (annularCoverB e a γ) (fun q => f (circleTurn q.2)) (ℓ,y)) := by have hs := (annularCoverDomain_open e a).mem_nhds hp have hw := (handleAnnularCover_smoothAt e a hp).continuousAt.preimage_mem_nhds (hW.mem_nhds hx) filter_upwards [continuousAt_fst.preimage_mem_nhds hs, continuousAt_fst.preimage_mem_nhds hw] with y hy hyW exact globalSurfaceFirstPrimitive_cover e a b f Φ H Γ γ ℓ y hy (annular_normalForm_cover e a b f H Γ γ hN y.2 hy hyW) theorem globalSurfaceSecondPrimitive_cover_germ {ι : Type*} [Fintype ι] (e : PartialDiffeomorph 𝓘(ℝ,TorusModel) 𝓘(ℝ,E) HandleTorus M ∞) (a b : ℝ) (f : Circle → ℝ) (Φ : CompactHamiltonianIsotopy Ω) (K H : V → ℝ) (h : ι → V → ℝ) (ρ : ι → ℝ → ℝ) (ρ₀ : ℝ → ℝ) (Γ : V → ManifoldOneForm E M) (γ : ManifoldOneForm E M) {W : Set M} (hW : IsOpen W) (hN : ∀ v x,x∈W→Γ v x=γ x+ (intervalClock (-b) b ((handleAnnularChart e a).symm x).1*H v) • globalHandleForm e f x) (τ : ℝ) {p : Plane × V} (hp : p.1∈annularCoverDomain e a) (hx : handleAnnularCover e a p.1∈W) : (fun y => euclideanPullbackOneForm (fun _ => productHorizontalLift (fun v => globalSurfaceSecondPrimitive e a b f Φ K H h ρ ρ₀ Γ (τ,v))) (flatProductMap (handleAnnularCover e a)) (0,y)) =ᶠ[𝓝 p] (fun y => surfaceSecondPrimitive Φ (intervalClock (-b) b) K H h ρ ρ₀ (annularCoverA e a γ) (annularCoverB e a γ) (fun q => f (circleTurn q.2)) (τ,y)) := by have hs := (annularCoverDomain_open e a).mem_nhds hp have hw := (handleAnnularCover_smoothAt e a hp).continuousAt.preimage_mem_nhds (hW.mem_nhds hx) filter_upwards [continuousAt_fst.preimage_mem_nhds hs, continuousAt_fst.preimage_mem_nhds hw] with y hy hyW exact globalSurfaceSecondPrimitive_cover e a b f Φ K H h ρ ρ₀ Γ γ τ y hy (annular_normalForm_cover e a b f H Γ γ hN y.2 hy hyW) theorem circleWeight_radial_deriv {f : Circle → ℝ} (hf : ContMDiff 𝓘(ℝ,CircleModel) 𝓘(ℝ,ℝ) ∞ f) (q : Plane) : fderiv ℝ (fun y : Plane => f (circleTurn y.2)) q (1,0)=0 := by have ht := ((hf.comp circleTurn_smooth).contDiff.differentiable (by simp) q.2).hasFDerivAt have hd := (ht.comp q (hasFDerivAt_snd (𝕜 := ℝ) (p := q))).fderiv change (fderiv ℝ ((f ∘ circleTurn) ∘ Prod.snd) q) (1,0)=0 rw [hd] simp only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.coe_snd',map_zero] end PackingSufficiencySupport.Hamiltonian end end OAI