import Mathlib import OAI.Geometry.BallPacking.Moser.AnnularFinalPacking namespace OAI noncomputable section namespace PackingSufficiencySupport.Hamiltonian section open scoped ContDiff Manifold Topology open Set Function Manifold MeasureTheory variable {E F : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π“˜(ℝ,E) ∞ M] theorem contMDiff_fixed_integral {f : ℝ Γ— M β†’ F} (hf : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,F) ∞ f) : ContMDiff π“˜(ℝ,E) π“˜(ℝ,F) ∞ (fun x => ∫ s in (0:ℝ)..1, f (s,x)) := by intro x let c := extChartAt π“˜(ℝ,E) x let g : ℝ Γ— E β†’ F := fun q => f (q.1,c.symm q.2) have hg : ContDiffOn ℝ ∞ g (univ Γ—Λ’ c.target) := by intro p hp have hi := (contMDiffOn_extChartAt_symm (I := π“˜(ℝ,E)) (n := ∞) x).contMDiffAt ((isOpen_extChartAt_target (I := π“˜(ℝ,E)) x).mem_nhds hp.2) exact ((hf.contMDiffAt.comp p (contDiffAt_fst.contMDiffAt.prodMk (hi.comp p contDiffAt_snd.contMDiffAt))).contDiffAt).contDiffWithinAt have hs := (contDiffOn_fixed_integral (isOpen_extChartAt_target (I := π“˜(ℝ,E)) x) hg).contDiffAt ((isOpen_extChartAt_target (I := π“˜(ℝ,E)) x).mem_nhds (mem_extChartAt_target x)) have hh := hs.contMDiffAt.comp x (contMDiffAt_extChartAt (I := π“˜(ℝ,E)) (n := ∞)) apply hh.congr_of_eventuallyEq filter_upwards [(isOpen_extChartAt_source (I := π“˜(ℝ,E)) x).mem_nhds (mem_extChartAt_source x)] with y hy change (∫ s in (0:ℝ)..1, f (s,y)) = ∫ s in (0:ℝ)..1, f (s,c.symm (c y)) rw [c.left_inv hy] end section open scoped ContDiff Manifold Topology open Set Function Manifold MeasureTheory variable (E : Type) (M : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] [TopologicalSpace M] [ChartedSpace E M] structure SmoothCircleAction where toFun : ℝ Γ— M β†’ M smooth : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,E) ∞ toFun zero : βˆ€ x, toFun (0,x) = x add : βˆ€ s t x, toFun (s+t,x) = toFun (s,toFun (t,x)) period : βˆ€ s x, toFun (s+1,x) = toFun (s,x) variable {E M} namespace SmoothCircleAction variable (A : SmoothCircleAction E M) def slice (s : ℝ) (x : M) : M := A.toFun (s,x) theorem slice_smooth (s : ℝ) : ContMDiff π“˜(ℝ,E) π“˜(ℝ,E) ∞ (A.slice s) := A.smooth.comp (contMDiff_const.prodMk contMDiff_id) def differential (s : ℝ) (x : M) : E β†’L[ℝ] E := manifoldMapDifferential (A.slice s) x theorem differential_add (s t : ℝ) (x : M) : A.differential (s+t) x = (A.differential s (A.slice t x)).comp (A.differential t x) := by have he : A.slice (s+t) = A.slice s ∘ A.slice t := funext (A.add s t) change mfderiv π“˜(ℝ,E) π“˜(ℝ,E) (A.slice (s+t)) x = _ rw [he] exact ((A.slice_smooth s).mdifferentiable (by simp) _).hasMFDerivAt.comp x ((A.slice_smooth t).mdifferentiable (by simp) x).hasMFDerivAt |>.mfderiv @[simp] theorem differential_zero (x : M) : A.differential 0 x = ContinuousLinearMap.id ℝ E := by have he : A.slice 0 = id := funext A.zero change mfderiv π“˜(ℝ,E) π“˜(ℝ,E) (A.slice 0) x = _ rw [he] exact mfderiv_id @[simp] theorem differential_period (s : ℝ) (x : M) : A.differential (s+1) x = A.differential s x := by have he : A.slice (s+1) = A.slice s := funext (A.period s) change mfderiv π“˜(ℝ,E) π“˜(ℝ,E) (A.slice (s+1)) x = _ rw [he] rfl theorem slice_inverse (s : ℝ) (x : M) : A.slice (-s) (A.slice s x) = x := by change A.toFun (-s,A.toFun (s,x)) = x rw [←A.add,neg_add_cancel,A.zero] theorem differential_invertible (s : ℝ) (x : M) : (A.differential s x).IsInvertible := by refine ContinuousLinearMap.IsInvertible.of_inverse (g := A.differential (-s) (A.slice s x)) ?_ ?_ Β· have h := A.differential_add s (-s) (A.slice s x) rw [add_neg_cancel,A.differential_zero,A.slice_inverse] at h exact h.symm Β· rw [←A.differential_add,neg_add_cancel,A.differential_zero] def average (f : ℝ Γ— M β†’ ℝ) (p : ℝ Γ— M) : ℝ := ∫ s in (0:ℝ)..1, f (p.1,A.slice s p.2) variable [FiniteDimensional ℝ E] [IsManifold π“˜(ℝ,E) ∞ M] theorem average_smooth {f : ℝ Γ— M β†’ ℝ} (hf : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,ℝ) ∞ f) : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,ℝ) ∞ (A.average f) := by have hprod : IsManifold ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) ∞ (ℝ Γ— M) := inferInstance let instProd : ChartedSpace (ℝ Γ— E) (ℝ Γ— M) := prodChartedSpace ℝ ℝ E M have : IsManifold π“˜(ℝ,ℝ Γ— E) ∞ (ℝ Γ— M) := by simpa only [modelWithCornersSelf_prod,instProd] using hprod have hg : ContMDiff ((π“˜(ℝ,ℝ)).prod ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E))) π“˜(ℝ,ℝ) ∞ (fun q : ℝ Γ— (ℝ Γ— M) => f (q.2.1,A.slice q.1 q.2.2)) := hf.comp (contMDiff_snd.fst.prodMk (A.smooth.comp (contMDiff_fst.prodMk contMDiff_snd.snd))) have hg' : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,ℝ Γ— E)) π“˜(ℝ,ℝ) ∞ (fun q : ℝ Γ— (ℝ Γ— M) => f (q.2.1,A.slice q.1 q.2.2)) := by simpa only [modelWithCornersSelf_prod,instProd] using hg convert! contMDiff_fixed_integral hg' using 1 Β· simp only [modelWithCornersSelf_prod] omit [FiniteDimensional ℝ E] [IsManifold π“˜(ℝ,E) ∞ M] in theorem average_invariant (f : ℝ Γ— M β†’ ℝ) (t s : ℝ) (x : M) : A.average f (t,A.slice s x) = A.average f (t,x) := by have hp : Function.Periodic (fun r => f (t,A.slice r x)) 1 := by intro r change f (t,A.toFun (r+1,x)) = f (t,A.toFun (r,x)) rw [A.period] change (∫ r in (0:ℝ)..1, f (t,A.toFun (r,A.toFun (s,x)))) = _ simp_rw [←A.add] rw [intervalIntegral.integral_comp_add_right (fun r => f (t,A.toFun (r,x))) s] simpa only [zero_add,add_comm (1:ℝ) s,average,slice] using hp.intervalIntegral_add_eq s 0 end SmoothCircleAction end section open scoped ContDiff Manifold Topology open Set Function Manifold MeasureTheory variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π“˜(ℝ,E) ∞ M] theorem chartOneForm_reconstruct (Ξ± : ManifoldOneForm E M) {c x : M} (hc : x ∈ (extChartAt π“˜(ℝ,E) c).source) : (chartOneForm Ξ± c (extChartAt π“˜(ℝ,E) c x)).comp (chartDifferential c x) = Ξ± x := by have hC : (chartDifferential (E := E) c x).IsInvertible := by convert! isInvertible_mfderiv_extChartAt (I := π“˜(ℝ,E)) hc using 1 unfold chartOneForm rw [(extChartAt π“˜(ℝ,E) c).left_inv hc] ext v exact congrArg (Ξ± x) (hC.inverse_apply_self v) namespace SmoothCircleAction variable (A : SmoothCircleAction E M) def averageOneForm (Ξ± : ℝ β†’ ManifoldOneForm E M) (t : ℝ) (x : M) : E β†’L[ℝ] ℝ := ∫ s in (0:ℝ)..1, parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun s t x theorem pullbackOneForm_continuous {Ξ± : ℝ β†’ ManifoldOneForm E M} (hΞ± : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) (t : ℝ) (x : M) : Continuous (fun s => parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun s t x) := by have hs := parameterPullbackOneForm_smooth (E := E) (F := E) A.smooth hΞ± x have hc : Continuous (fun s : ℝ => chartOneForm (parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun s t) x (extChartAt π“˜(ℝ,E) x x)) := by apply continuous_iff_continuousAt.mpr intro s have hfull : ContinuousAt (fun q : ℝ Γ— (ℝ Γ— E) => chartOneForm (parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun q.1 q.2.1) x q.2.2) (s,(t,extChartAt π“˜(ℝ,E) x x)) := (hs.contDiffAt ((isOpen_univ.prod (isOpen_univ.prod (isOpen_extChartAt_target (I := π“˜(ℝ,E)) x))).mem_nhds ⟨mem_univ _,mem_univ _,mem_extChartAt_target x⟩)).continuousAt have hmap : ContinuousAt (fun r : ℝ => (r,(t,extChartAt π“˜(ℝ,E) x x))) s := continuousAt_id.prodMk continuousAt_const exact hfull.comp (f := fun r : ℝ => (r,(t,extChartAt π“˜(ℝ,E) x x))) hmap have hh := hc.clm_comp (continuous_const (y := chartDifferential (E := E) x x)) convert! hh using 1 funext s exact (chartOneForm_reconstruct _ (mem_extChartAt_source x)).symm theorem chart_averageOneForm {Ξ± : ℝ β†’ ManifoldOneForm E M} (hΞ± : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) (t : ℝ) (c : M) (y : E) : chartOneForm (A.averageOneForm Ξ± t) c y = ∫ s in (0:ℝ)..1, chartOneForm (parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun s t) c y := by let x := (extChartAt π“˜(ℝ,E) c).symm y let L := (ContinuousLinearMap.compL ℝ E E ℝ).flip (chartDifferential (E := E) c x).inverse exact (L.intervalIntegral_comp_comm ((A.pullbackOneForm_continuous hΞ± t x).intervalIntegrable 0 1)).symm variable [FiniteDimensional ℝ E] theorem averageOneForm_smooth {Ξ± : ℝ β†’ ManifoldOneForm E M} (hΞ± : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) (c : M) : ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (A.averageOneForm Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target) := by have hs := contDiffOn_fixed_integral (isOpen_univ.prod (isOpen_extChartAt_target (I := π“˜(ℝ,E)) c)) (parameterPullbackOneForm_smooth (E := E) (F := E) A.smooth hΞ± c) apply hs.congr intro p _ exact A.chart_averageOneForm hΞ± p.1 c p.2 omit [FiniteDimensional ℝ E] [IsManifold π“˜(ℝ,E) ∞ M] in theorem pullbackOneForm_add (Ξ± : ℝ β†’ ManifoldOneForm E M) (s r t : ℝ) (x : M) : parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun (r+s) t x = (parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t (A.slice s x)).comp (A.differential s x) := by change (Ξ± t (A.slice (r+s) x)).comp (A.differential (r+s) x) = _ rw [A.differential_add] have he : A.slice (r+s) x = A.slice r (A.slice s x) := A.add r s x rw [he] rfl omit [FiniteDimensional ℝ E] [IsManifold π“˜(ℝ,E) ∞ M] in theorem pullbackOneForm_periodic (Ξ± : ℝ β†’ ManifoldOneForm E M) (t : ℝ) (x : M) : Function.Periodic (fun r => parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t x) 1 := by intro r change (Ξ± t (A.slice (r+1) x)).comp (A.differential (r+1) x) = _ rw [A.differential_period] change (Ξ± t (A.toFun (r+1,x))).comp _ = _ rw [A.period] rfl omit [FiniteDimensional ℝ E] in theorem averageOneForm_invariant {Ξ± : ℝ β†’ ManifoldOneForm E M} (hΞ± : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) (s t : ℝ) (x : M) : (A.averageOneForm Ξ± t (A.slice s x)).comp (A.differential s x) = A.averageOneForm Ξ± t x := by let L := (ContinuousLinearMap.compL ℝ E E ℝ).flip (A.differential s x) have hi : IntervalIntegrable (fun r => parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t (A.slice s x)) volume 0 1 := (A.pullbackOneForm_continuous hΞ± t (A.slice s x)).intervalIntegrable 0 1 change L (∫ r in (0:ℝ)..1, parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t (A.slice s x)) = _ rw [←L.intervalIntegral_comp_comm hi] change (∫ r in (0:ℝ)..1, (parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t (A.slice s x)).comp (A.differential s x)) = _ simp_rw [←A.pullbackOneForm_add] rw [intervalIntegral.integral_comp_add_right (fun r => parameterPullbackOneForm (E := E) (F := E) Ξ± A.toFun r t x) s] simpa only [zero_add,add_comm (1:ℝ) s,averageOneForm] using (A.pullbackOneForm_periodic Ξ± t x).intervalIntegral_add_eq s 0 end SmoothCircleAction end section open scoped ContDiff Topology open Set Function variable {S P F : Type*} [NormedAddCommGroup S] [NormedSpace ℝ S] [NormedAddCommGroup P] [NormedSpace ℝ P] [NormedAddCommGroup F] [NormedSpace ℝ F] theorem contDiffOn_fiber_derivative {U : Set P} (hU : IsOpen U) {f : S Γ— P β†’ F} (hf : ContDiffOn ℝ ∞ f (univ Γ—Λ’ U)) : ContDiffOn ℝ ∞ (fun q : S Γ— P => fderiv ℝ (fun p => f (q.1,p)) q.2) (univ Γ—Λ’ U) := by have hD := (hf.fderiv_of_isOpen (m := ∞) (isOpen_univ.prod hU) (by simp)).clm_comp (contDiffOn_const (c := ContinuousLinearMap.inr ℝ S P)) apply hD.congr intro q hq have hc : HasFDerivAt (fun p : P => (q.1,p)) (ContinuousLinearMap.inr ℝ S P) q.2 := by convert! (hasFDerivAt_const (π•œ := ℝ) q.1 q.2).prodMk (hasFDerivAt_id (π•œ := ℝ) q.2) using 1 have hh := ((hf.contDiffAt ((isOpen_univ.prod hU).mem_nhds hq)).differentiableAt (by simp)).hasFDerivAt.comp q.2 hc exact hh.fderiv theorem continuous_at_fixed_fiber_derivative {U : Set P} (hU : IsOpen U) {f : S Γ— P β†’ F} (hf : ContDiffOn ℝ ∞ f (univ Γ—Λ’ U)) {x : P} (hx : x ∈ U) : Continuous (fun s : S => fderiv ℝ (fun p => f (s,p)) x) := by apply continuous_iff_continuousAt.mpr intro s exact ((contDiffOn_fiber_derivative hU hf).contDiffAt ((isOpen_univ.prod hU).mem_nhds ⟨mem_univ _,hx⟩)).continuousAt.comp (continuousAt_id.prodMk continuousAt_const) end section open scoped ContDiff Topology open Set Function variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] def timePullbackOneForm (Ξ± : ℝ Γ— E β†’ E β†’L[ℝ] ℝ) (g : F β†’ E) (p : ℝ Γ— F) : F β†’L[ℝ] ℝ := (Ξ± (p.1,g p.2)).comp (fderiv ℝ g p.2) def timePullbackTwoForm (Ξ© : ℝ Γ— E β†’ E β†’L[ℝ] E β†’L[ℝ] ℝ) (g : F β†’ E) (p : ℝ Γ— F) : F β†’L[ℝ] F β†’L[ℝ] ℝ := (Ξ© (p.1,g p.2)).bilinearComp (fderiv ℝ g p.2) (fderiv ℝ g p.2) theorem timePullbackOneForm_contDiffAt {Ξ± : ℝ Γ— E β†’ E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ± : ContDiffAt ℝ ∞ Ξ± (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) : ContDiffAt ℝ ∞ (timePullbackOneForm Ξ± g) p := (hΞ±.comp p (contDiffAt_fst.prodMk (hg.comp p contDiffAt_snd))).clm_comp ((hg.fderiv_right (by simp)).comp p contDiffAt_snd) theorem timePullbackTwoForm_contDiffAt {Ξ© : ℝ Γ— E β†’ E β†’L[ℝ] E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ© : ContDiffAt ℝ ∞ Ξ© (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) : ContDiffAt ℝ ∞ (timePullbackTwoForm Ξ© g) p := by have hval := hΞ©.comp p (contDiffAt_fst.prodMk (hg.comp p contDiffAt_snd)) have hd := (hg.fderiv_right (m := ∞) (by simp)).comp p contDiffAt_snd exact smooth_bilinear_flip ((smooth_bilinear_flip (hval.clm_comp hd)).clm_comp hd) theorem timePullbackOneForm_fderiv {Ξ± : ℝ Γ— E β†’ E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ± : ContDiffAt ℝ ∞ Ξ± (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) (v : ℝ Γ— F) (w : F) : fderiv ℝ (timePullbackOneForm Ξ± g) p v w = fderiv ℝ Ξ± (p.1,g p.2) (v.1,fderiv ℝ g p.2 v.2) (fderiv ℝ g p.2 w) + Ξ± (p.1,g p.2) (fderiv ℝ (fderiv ℝ g) p.2 v.2 w) := by have hmap := (hasFDerivAt_fst (p := p)).prodMk ((hg.differentiableAt (by simp)).hasFDerivAt.comp p (hasFDerivAt_snd (p := p))) have hd := ((hΞ±.differentiableAt (by simp)).hasFDerivAt.comp p hmap).clm_comp (((hg.fderiv_right (m := ∞) (by simp)).differentiableAt (by simp)).hasFDerivAt.comp p (hasFDerivAt_snd (p := p))) rw [show fderiv ℝ (timePullbackOneForm Ξ± g) p = _ from hd.fderiv] simp only [add_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.compL_apply, ContinuousLinearMap.flip_apply,ContinuousLinearMap.prod_apply] exact add_comm _ _ theorem timePullbackOneForm_exterior {Ξ± : ℝ Γ— E β†’ E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ± : ContDiffAt ℝ ∞ Ξ± (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) (v w : F) : fderiv ℝ (timePullbackOneForm Ξ± g) p (0,v) w - fderiv ℝ (timePullbackOneForm Ξ± g) p (0,w) v = fderiv ℝ Ξ± (p.1,g p.2) (0,fderiv ℝ g p.2 v) (fderiv ℝ g p.2 w) - fderiv ℝ Ξ± (p.1,g p.2) (0,fderiv ℝ g p.2 w) (fderiv ℝ g p.2 v) := by rw [timePullbackOneForm_fderiv hΞ± hg,timePullbackOneForm_fderiv hΞ± hg] have hs := hg.isSymmSndFDerivAt (by rw [minSmoothness_of_isRCLikeNormedField] change ((2 : β„•βˆž) : WithTop β„•βˆž) ≀ ↑(⊀ : β„•βˆž) exact WithTop.coe_le_coe.mpr le_top) rw [hs.eq v w] simp only ring theorem timePullbackTwoForm_time {Ξ© : ℝ Γ— E β†’ E β†’L[ℝ] E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ© : ContDiffAt ℝ ∞ Ξ© (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) (v w : F) : fderiv ℝ (timePullbackTwoForm Ξ© g) p (1,0) v w = fderiv ℝ Ξ© (p.1,g p.2) (1,0) (fderiv ℝ g p.2 v) (fderiv ℝ g p.2 w) := by have hL := (((timePullbackTwoForm_contDiffAt hΞ© hg).differentiableAt (by simp)).hasFDerivAt.clm_apply (hasFDerivAt_const v p)).clm_apply (hasFDerivAt_const w p) have hLt := hL.comp_hasDerivAt p.1 ((hasDerivAt_id p.1).prodMk (hasDerivAt_const p.1 p.2)) have hR := (((hΞ©.differentiableAt (by simp)).hasFDerivAt.clm_apply (hasFDerivAt_const (fderiv ℝ g p.2 v) (p.1,g p.2))).clm_apply (hasFDerivAt_const (fderiv ℝ g p.2 w) (p.1,g p.2))).comp_hasDerivAt p.1 ((hasDerivAt_id p.1).prodMk (hasDerivAt_const p.1 (g p.2))) have he := hLt.unique hR simpa only [add_apply,ContinuousLinearMap.comp_apply, ContinuousLinearMap.flip_apply,ContinuousLinearMap.apply_apply, zero_apply,map_zero,zero_add] using he theorem timePullback_exact_time {Ξ© : ℝ Γ— E β†’ E β†’L[ℝ] E β†’L[ℝ] ℝ} {Ξ± : ℝ Γ— E β†’ E β†’L[ℝ] ℝ} {g : F β†’ E} {p : ℝ Γ— F} (hΞ© : ContDiffAt ℝ ∞ Ξ© (p.1,g p.2)) (hΞ± : ContDiffAt ℝ ∞ Ξ± (p.1,g p.2)) (hg : ContDiffAt ℝ ∞ g p.2) (he : βˆ€ v w, fderiv ℝ Ξ© (p.1,g p.2) (1,0) v w = fderiv ℝ Ξ± (p.1,g p.2) (0,v) w - fderiv ℝ Ξ± (p.1,g p.2) (0,w) v) (v w : F) : fderiv ℝ (timePullbackTwoForm Ξ© g) p (1,0) v w = fderiv ℝ (timePullbackOneForm Ξ± g) p (0,v) w - fderiv ℝ (timePullbackOneForm Ξ± g) p (0,w) v := by rw [timePullbackTwoForm_time hΞ© hg,timePullbackOneForm_exterior hΞ± hg] exact he _ _ end section open scoped ContDiff Manifold Topology open Set Function Manifold variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π“˜(ℝ,E) ∞ M] theorem exists_localized_manifold_moser_field {Ξ© : ℝ β†’ ManifoldTwoForm E M} {Ξ± : ℝ β†’ ManifoldOneForm E M} (hΞ© : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) (hΞ± : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target)) {U : Set ℝ} (hU : IsOpen U) (hI : Icc (0:ℝ) 1 βŠ† U) (hinv : βˆ€ t ∈ U, βˆ€ x, (Ξ© t x).IsInvertible) : βˆƒ V : (p : ℝ Γ— M) β†’ TangentSpace π“˜(ℝ,E) p.2, ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) (π“˜(ℝ,E)).tangent ∞ (fun p => (⟨p.2,V p⟩ : TangentBundle π“˜(ℝ,E) M)) ∧ (βˆ€αΆ  t in 𝓝˒ (Icc (0:ℝ) 1), βˆ€ x, V (t,x) = manifoldMoserField Ξ© Ξ± (t,x)) ∧ (βˆ€ t x, Ξ± t x = 0 β†’ V (t,x) = 0) := by obtain βŸ¨Ο‡,hΟ‡,_,hΟ‡U,hΟ‡1,_⟩ := exists_smooth_cutoff isCompact_Icc hU hI let V : (p : ℝ Γ— M) β†’ TangentSpace π“˜(ℝ,E) p.2 := fun p => Ο‡ p.1 β€’ manifoldMoserField Ξ© Ξ± p have he (c : M) (q : ℝ Γ— E) : timeChartField V c q = Ο‡ q.1 β€’ timeChartField (manifoldMoserField Ξ© Ξ±) c q := by dsimp only [timeChartField,V] exact (chartDifferential c _).map_smul _ _ refine ⟨V,?_,?_,?_⟩ Β· apply timeField_smooth_of_coordinates intro p let q : ℝ Γ— E := (p.1,extChartAt π“˜(ℝ,E) p.2 p.2) have hq : q.2 ∈ (extChartAt π“˜(ℝ,E) p.2).target := mem_extChartAt_target p.2 have hn : (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) p.2).target) ∈ 𝓝 q := (isOpen_univ.prod (isOpen_extChartAt_target (I := π“˜(ℝ,E)) p.2)).mem_nhds ⟨mem_univ _,hq⟩ by_cases hp : p.1 ∈ U Β· have hni : βˆ€αΆ  z : ℝ Γ— E in 𝓝 q, (Ξ© z.1 ((extChartAt π“˜(ℝ,E) p.2).symm z.2)).IsInvertible := by filter_upwards [continuousAt_fst.preimage_mem_nhds (hU.mem_nhds hp)] with z hz exact hinv z.1 hz _ have hs := timeChartField_moser_contDiffAt hq ((hΞ© p.2).contDiffAt hn) ((hΞ± p.2).contDiffAt hn) hni exact ((hΟ‡.contDiffAt.comp q contDiffAt_fst).smul hs).congr_of_eventuallyEq (Filter.Eventually.of_forall (he p.2)) Β· have hp' : p.1 βˆ‰ tsupport Ο‡ := fun h => hp (hΟ‡U h) apply (contDiffAt_const (c := (0:E))).congr_of_eventuallyEq have hzero : βˆ€αΆ  t in 𝓝 p.1, Ο‡ t = 0 := (isClosed_tsupport Ο‡).isOpen_compl.eventually_mem hp' |>.mono (fun _ ht => image_eq_zero_of_notMem_tsupport ht) filter_upwards [continuousAt_fst.preimage_mem_nhds hzero] with z hz rw [he, hz,zero_smul] Β· filter_upwards [hΟ‡1] with t ht intro x change Ο‡ t β€’ _ = _ rw [ht,one_smul] Β· intro t x hx change Ο‡ t β€’ (-((Ξ© t x).inverse (Ξ± t x))) = (0:E) rw [hx,map_zero,neg_zero,smul_zero] end open scoped ContDiff Manifold Topology open Set Function Manifold variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π“˜(ℝ,E) ∞ M] theorem manifold_moser_PDE {Ξ© : ℝ β†’ ManifoldTwoForm E M} {Ξ± : ℝ β†’ ManifoldOneForm E M} {V : (p : ℝ Γ— M) β†’ TangentSpace π“˜(ℝ,E) p.2} (hV : ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) (π“˜(ℝ,E)).tangent ∞ (fun p => (⟨p.2,V p⟩ : TangentBundle π“˜(ℝ,E) M))) {U : Set ℝ} (hU : IsOpen U) {t : ℝ} (ht : t ∈ U) (hinv : βˆ€ s ∈ U, βˆ€ x, (Ξ© s x).IsInvertible) (heq : βˆ€αΆ  s in 𝓝 t, βˆ€ x, V (s,x) = manifoldMoserField Ξ© Ξ± (s,x)) {c : M} {y : E} (hy : y ∈ (extChartAt π“˜(ℝ,E) c).target) (hΞ© : ContDiffAt ℝ ∞ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y)) (hΞ± : ContDiffAt ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (t,y)) (hskew : βˆ€ u v, chartTwoForm (Ξ© t) c y u v = -chartTwoForm (Ξ© t) c y v u) (hclosed : βˆ€ u v w, fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,u) v w - fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,v) u w + fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,w) u v = 0) (htime : βˆ€ v w, fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (1,0) v w = fderiv ℝ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (t,y) (0,v) w - fderiv ℝ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (t,y) (0,w) v) (v w : E) : fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (1,timeChartField V c (t,y)) v w + chartTwoForm (Ξ© t) c y (fderiv ℝ (timeChartField V c) (t,y) (0,v)) w + chartTwoForm (Ξ© t) c y v (fderiv ℝ (timeChartField V c) (t,y) (0,w)) = 0 := by have hn : (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target) ∈ 𝓝 (t,y) := (isOpen_univ.prod (isOpen_extChartAt_target (I := π“˜(ℝ,E)) c)).mem_nhds ⟨mem_univ _,hy⟩ have hX := ((timeChartField_contDiffOn hV c).contDiffAt hn).differentiableAt (by simp) apply local_moser_transport_equation (hΞ©.differentiableAt (by simp)) (hΞ±.differentiableAt (by simp)) hX _ hskew hclosed htime have htimeU : βˆ€αΆ  q : ℝ Γ— E in 𝓝 (t,y), q.1 ∈ U := continuousAt_fst.preimage_mem_nhds (hU.mem_nhds ht) have htarg : βˆ€αΆ  q : ℝ Γ— E in 𝓝 (t,y), q.2 ∈ (extChartAt π“˜(ℝ,E) c).target := continuousAt_snd.preimage_mem_nhds ((isOpen_extChartAt_target (I := π“˜(ℝ,E)) c).mem_nhds hy) filter_upwards [htimeU,htarg,continuousAt_fst.preimage_mem_nhds heq] with q hq hqt hqe have hVe : timeChartField V c q = timeChartField (manifoldMoserField Ξ© Ξ±) c q := by dsimp only [timeChartField] rw [hqe ((extChartAt π“˜(ℝ,E) c).symm q.2)] rw [hVe] exact chart_moser_contraction hqt (hinv q.1 hq _) structure ManifoldMoserData (Ξ© : ℝ β†’ ManifoldTwoForm E M) (Ξ± : ℝ β†’ ManifoldOneForm E M) : Prop where smooth_two : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target) smooth_one : βˆ€ c, ContDiffOn ℝ ∞ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target) nondegenerate : βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ x, (Ξ© t x).IsInvertible skew : βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ c y, y ∈ (extChartAt π“˜(ℝ,E) c).target β†’ βˆ€ u v, chartTwoForm (Ξ© t) c y u v = -chartTwoForm (Ξ© t) c y v u closed : βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ c y, y ∈ (extChartAt π“˜(ℝ,E) c).target β†’ βˆ€ u v w, fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,u) v w - fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,v) u w + fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (0,w) u v = 0 exact_time : βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ c y, y ∈ (extChartAt π“˜(ℝ,E) c).target β†’ βˆ€ v w, fderiv ℝ (fun q : ℝ Γ— E => chartTwoForm (Ξ© q.1) c q.2) (t,y) (1,0) v w = fderiv ℝ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (t,y) (0,v) w - fderiv ℝ (fun q : ℝ Γ— E => chartOneForm (Ξ± q.1) c q.2) (t,y) (0,w) v variable [FiniteDimensional ℝ E] [T2Space M] [CompactSpace M] theorem exists_compact_manifold_moser {Ξ© : ℝ β†’ ManifoldTwoForm E M} {Ξ± : ℝ β†’ ManifoldOneForm E M} (h : ManifoldMoserData Ξ© Ξ±) : βˆƒ Ξ¦ Ξ¨ : ℝ Γ— M β†’ M, ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,E) ∞ Ξ¦ ∧ ContMDiff ((π“˜(ℝ,ℝ)).prod π“˜(ℝ,E)) π“˜(ℝ,E) ∞ Ξ¨ ∧ (βˆ€ x, Ξ¦ (0,x) = x) ∧ (βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ x, Ξ¨ (t,Ξ¦ (t,x)) = x ∧ Ξ¦ (t,Ξ¨ (t,x)) = x) ∧ (βˆ€ t ∈ Icc (0:ℝ) 1, βˆ€ x v w, manifoldPullback Ξ¦ Ξ© t x v w = Ξ© 0 x v w) ∧ (βˆ€ x, (βˆ€ t, Ξ± t x = 0) β†’ βˆ€ t, Ξ¦ (t,x) = x) := by let U : Set ℝ := {t | βˆ€ x, (Ξ© t x).IsInvertible} have hU : IsOpen U := manifoldTwoForm_isOpen_nondegenerate_times h.smooth_two have hIU : Icc (0:ℝ) 1 βŠ† U := h.nondegenerate obtain ⟨V,hV,hVe,hVzero⟩ := exists_localized_manifold_moser_field h.smooth_two h.smooth_one hU hIU (fun _ ht => ht) obtain ⟨Φ,Ξ¨,hΞ¦,hΞ¨,hΞ¦0,hinv,hODE,hfix⟩ := exists_nonautonomous_manifold_flow hV refine ⟨Φ,Ξ¨,hΞ¦,hΞ¨,hΞ¦0,hinv,?_,?_⟩ Β· have hd (t : ℝ) (ht : t ∈ Icc (0:ℝ) 1) (x : M) (v w : E) : HasDerivAt (fun s => manifoldPullback Ξ¦ Ξ© s x v w) 0 t := by apply manifold_form_transport_derivative hΞ¦ hV isOpen_Ioo hODE h.smooth_two (show t ∈ Ioo (-2:ℝ) 2 by constructor <;> linarith [ht.1,ht.2]) intro c y hy u z have hn : (univ Γ—Λ’ (extChartAt π“˜(ℝ,E) c).target) ∈ 𝓝 (t,y) := (isOpen_univ.prod (isOpen_extChartAt_target (I := π“˜(ℝ,E)) c)).mem_nhds ⟨mem_univ _,hy⟩ exact manifold_moser_PDE hV hU (hIU ht) (fun _ hs => hs) (hVe.filter_mono (nhds_le_nhdsSet ht)) hy ((h.smooth_two c).contDiffAt hn) ((h.smooth_one c).contDiffAt hn) (h.skew t ht c y hy) (h.closed t ht c y hy) (h.exact_time t ht c y hy) u z intro t ht x v w rw [manifold_form_transport_constant hd ht] have hid : (fun y => Ξ¦ (0,y)) = id := funext hΞ¦0 have hD : preferredDifferential (fun y => Ξ¦ (0,y)) x = ContinuousLinearMap.id ℝ E := by change mfderiv π“˜(ℝ,E) π“˜(ℝ,E) (fun y => Ξ¦ (0,y)) x = _ rw [hid] exact mfderiv_id rw [manifoldPullback,hD] simp only [hΞ¦0,ContinuousLinearMap.bilinearComp_apply,ContinuousLinearMap.id_apply] Β· intro x hx exact hfix x (fun t => hVzero t x (hx t)) end PackingSufficiencySupport.Hamiltonian end end OAI