Download data/lean/OAI/Geometry/BallPacking/Layers/SmoothFormTransport.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 26.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/BallPacking/Layers/SmoothFormTransport.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/BallPacking/Layers/SmoothFormTransport.lean
-
curl -L -o SmoothFormTransport.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/BallPacking/Layers/SmoothFormTransport.lean
26.1 kB
| import Mathlib | |
| import OAI.Geometry.BallPacking.Moments.RearrangementBounds | |
| namespace OAI | |
| noncomputable section | |
| namespace PackingSufficiencySupport.Hamiltonian | |
| section | |
| open scoped ContDiff Topology | |
| open Set Function | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| theorem smooth_fderiv_apply_const {D G : Type*} [NormedAddCommGroup D] | |
| [NormedSpace β D] [NormedAddCommGroup G] [NormedSpace β G] {f : D β G} | |
| (hf : ContDiff β β f) (p v w : D) : | |
| fderiv β (fun q => fderiv β f q v) p w = fderiv β (fderiv β f) p w v := by | |
| have hfd : ContDiff β β (fderiv β f) := hf.fderiv_right (by simp) | |
| have hh := (hfd.differentiable (by simp) p).hasFDerivAt.clm_apply | |
| (hasFDerivAt_const v p) | |
| rw [hh.fderiv] | |
| simp | |
| theorem joint_spatial_fderiv {F : β Γ E β E} (hF : ContDiff β β F) (t : β) (x v : E) : | |
| fderiv β (fun y => F (t,y)) x v = fderiv β F (t,x) (0,v) := by | |
| have hd := (hF.differentiable (by simp) (t,x)).hasFDerivAt.comp x | |
| ((hasFDerivAt_const (c := t) x).prodMk (hasFDerivAt_id (π := β) x)) | |
| exact congrArg (fun A : E βL[β] E => A v) hd.fderiv | |
| theorem joint_time_fderiv {F X : β Γ E β E} (hF : ContDiff β β F) | |
| (hflow : β t x, HasDerivAt (fun s => F (s,x)) (X (t,F (t,x))) t) (p : β Γ E) : | |
| fderiv β F p (1,0) = X (p.1,F p) := by | |
| have hd := (hF.differentiable (by simp) p).hasFDerivAt.comp_hasDerivAt p.1 | |
| ((hasDerivAt_id p.1).prodMk (hasDerivAt_const p.1 p.2)) | |
| exact hd.unique (hflow p.1 p.2) | |
| theorem joint_flow_variation {F X : β Γ E β E} (hF : ContDiff β β F) | |
| (hX : ContDiff β β X) | |
| (hflow : β t x, HasDerivAt (fun s => F (s,x)) (X (t,F (t,x))) t) | |
| (t : β) (x v : E) : | |
| HasDerivAt (fun s => fderiv β F (s,x) (0,v)) | |
| (fderiv β X (t,F (t,x)) (0,fderiv β F (t,x) (0,v))) t := by | |
| have hFd : ContDiff β β (fderiv β F) := hF.fderiv_right (by simp) | |
| have hV : ContDiff β β (fun p => fderiv β F p (0,v)) := hFd.clm_apply contDiff_const | |
| have hd := (hV.differentiable (by simp) (t,x)).hasFDerivAt.comp_hasDerivAt t | |
| ((hasDerivAt_id t).prodMk (hasDerivAt_const t x)) | |
| have he : (fun p => fderiv β F p (1,0)) = fun p => X (p.1,F p) := | |
| funext (joint_time_fderiv hF hflow) | |
| have hchain := (hX.differentiable (by simp) (t,F (t,x))).hasFDerivAt.comp (t,x) | |
| ((hasFDerivAt_fst (π := β) (p := (t,x))).prodMk | |
| (hF.differentiable (by simp) (t,x)).hasFDerivAt) | |
| have hc := congrArg (fun A : (β Γ E) βL[β] E => A (0,v)) hchain.fderiv | |
| change fderiv β (fun p => X (p.1,F p)) (t,x) (0,v) = _ at hc | |
| have he' := congrArg (fun g : β Γ E β E => fderiv β g (t,x) (0,v)) he | |
| rw [smooth_fderiv_apply_const hF] at he' | |
| rw [hc] at he' | |
| simp only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply] at he' | |
| have hs := (hF.contDiffAt (x := (t,x))).isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top) | |
| apply hd.congr_deriv | |
| rw [smooth_fderiv_apply_const hF,hs.eq (1,0) (0,v)] | |
| exact he' | |
| theorem smooth_flow_form_transport_on {F X : β Γ E β E} (hF : ContDiff β β F) | |
| (hX : ContDiff β β X) | |
| (hflow : β t x, HasDerivAt (fun s => F (s,x)) (X (t,F (t,x))) t) | |
| {Ξ© : β Γ E β E βL[β] E βL[β] β} (hΞ© : ContDiff β β Ξ©) | |
| {a b : β} (hab : a β€ b) (x v w : E) | |
| (hPDE : β t β Ioo a b, β u z, | |
| fderiv β Ξ© (t,F (t,x)) (1,X (t,F (t,x))) u z + | |
| Ξ© (t,F (t,x)) (fderiv β X (t,F (t,x)) (0,u)) z + | |
| Ξ© (t,F (t,x)) u (fderiv β X (t,F (t,x)) (0,z)) = 0) : | |
| Ξ© (b,F (b,x)) (fderiv β (fun y => F (b,y)) x v) | |
| (fderiv β (fun y => F (b,y)) x w) = | |
| Ξ© (a,F (a,x)) (fderiv β (fun y => F (a,y)) x v) | |
| (fderiv β (fun y => F (a,y)) x w) := by | |
| let V (s : β) := fderiv β F (s,x) (0,v) | |
| let W (s : β) := fderiv β F (s,x) (0,w) | |
| let G (s : β) := Ξ© (s,F (s,x)) (V s) (W s) | |
| have hpath : Continuous (fun s => (s,F (s,x))) := | |
| continuous_id.prodMk (hF.continuous.comp (continuous_id.prodMk continuous_const)) | |
| have hFd : ContDiff β β (fderiv β F) := hF.fderiv_right (by simp) | |
| have hVc : Continuous V := ((hFd.continuous.comp | |
| (continuous_id.prodMk continuous_const)).clm_apply continuous_const) | |
| have hWc : Continuous W := ((hFd.continuous.comp | |
| (continuous_id.prodMk continuous_const)).clm_apply continuous_const) | |
| have hGc : Continuous G := ((hΞ©.continuous.comp hpath).clm_apply hVc).clm_apply hWc | |
| have hGd (s : β) (hs : s β Ioo a b) : HasDerivAt G 0 s := by | |
| have hdΞ© := (hΞ©.differentiable (by simp) (s,F (s,x))).hasFDerivAt.comp_hasDerivAt s | |
| ((hasDerivAt_id s).prodMk (hflow s x)) | |
| have hd := (hdΞ©.clm_apply (joint_flow_variation hF hX hflow s x v)).clm_apply | |
| (joint_flow_variation hF hX hflow s x w) | |
| apply hd.congr_deriv | |
| simpa only [add_apply,Function.comp_apply,id_eq,V,W] using hPDE s hs (V s) (W s) | |
| have hi := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hab | |
| hGc.continuousOn hGd (intervalIntegrable_const (c := (0:β))) | |
| have he : G b = G a := sub_eq_zero.mp (by simpa using hi.symm) | |
| simpa only [G,V,W,joint_spatial_fderiv hF] using he | |
| end | |
| section | |
| open scoped ContDiff BigOperators | |
| open Set Function | |
| @[simp] theorem planeRotate_comp (s t : β) (z : Plane) : | |
| planeRotate s (planeRotate t z) = planeRotate (s+t) z := by | |
| apply Prod.ext <;> dsimp [planeRotate] <;> rw [Real.cos_add,Real.sin_add] <;> ring | |
| variable {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] | |
| def toricFlow (F : (ΞΉ β β) β β) (t : β) (z : PlanePhase ΞΉ) : PlanePhase ΞΉ := | |
| fun i => planeRotate (t*toricAngularSpeed F z i) (z i) | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricFlow_zero (F : (ΞΉ β β) β β) (z : PlanePhase ΞΉ) : toricFlow F 0 z = z := by | |
| funext i | |
| simp [toricFlow] | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricFlow_moments (F : (ΞΉ β β) β β) (t : β) (z : PlanePhase ΞΉ) : | |
| planeMoments (toricFlow F t z) = planeMoments z := by | |
| funext i | |
| exact radialArea_planeRotate _ _ | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricAngularSpeed_flow (F : (ΞΉ β β) β β) (t : β) (z : PlanePhase ΞΉ) (i : ΞΉ) : | |
| toricAngularSpeed F (toricFlow F t z) i = toricAngularSpeed F z i := by | |
| simp [toricAngularSpeed] | |
| omit [Fintype ΞΉ] in | |
| theorem toricFlow_add (F : (ΞΉ β β) β β) (s t : β) (z : PlanePhase ΞΉ) : | |
| toricFlow F s (toricFlow F t z) = toricFlow F (s+t) z := by | |
| funext i | |
| change planeRotate (s*toricAngularSpeed F (toricFlow F t z) i) | |
| (planeRotate (t*toricAngularSpeed F z i) (z i)) = _ | |
| rw [toricAngularSpeed_flow,planeRotate_comp] | |
| simp only [toricFlow,add_mul] | |
| omit [DecidableEq ΞΉ] in | |
| theorem phase_rotation_smooth {a : β Γ PlanePhase ΞΉ β (ΞΉ β β)} | |
| (ha : ContDiff β β a) : | |
| ContDiff β β (fun p : β Γ PlanePhase ΞΉ => fun i => planeRotate (a p i) (p.2 i)) := by | |
| apply contDiff_pi.mpr | |
| intro i | |
| have hi : ContDiff β β (fun p : β Γ PlanePhase ΞΉ => a p i) := | |
| (contDiff_apply β β i).comp ha | |
| have hz : ContDiff β β (fun p : β Γ PlanePhase ΞΉ => p.2 i) := | |
| (contDiff_apply β Plane i).comp contDiff_snd | |
| convert! planeRotate_smooth.comp (hi.prodMk hz) using 1 | |
| theorem toric_flow_angles_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| ContDiff β β (fun p : β Γ PlanePhase ΞΉ => fun i => p.1*toricAngularSpeed F p.2 i) := by | |
| apply contDiff_pi.mpr | |
| intro i | |
| have ha : ContDiff β β (fun p : β Γ PlanePhase ΞΉ => toricAngularSpeed F p.2 i) := | |
| (toricAngularSpeed_smooth hF i).comp contDiff_snd | |
| exact contDiff_fst.mul ha | |
| @[fun_prop] theorem toricFlow_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| ContDiff β β (fun p : β Γ PlanePhase ΞΉ => toricFlow F p.1 p.2) := by | |
| exact phase_rotation_smooth (toric_flow_angles_smooth hF) | |
| theorem toricFlow_time_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) (t : β) : | |
| ContDiff β β (toricFlow F t) := by | |
| convert! (toricFlow_smooth hF).comp (contDiff_const.prodMk contDiff_id) using 1 | |
| def toricFlowHomeomorph {F : (ΞΉ β β) β β} (hF : ContDiff β β F) (t : β) : | |
| PlanePhase ΞΉ ββ PlanePhase ΞΉ where | |
| toFun := toricFlow F t | |
| invFun := toricFlow F (-t) | |
| left_inv z := by rw [toricFlow_add,neg_add_cancel,toricFlow_zero] | |
| right_inv z := by rw [toricFlow_add,add_neg_cancel,toricFlow_zero] | |
| continuous_toFun := (toricFlow_time_smooth hF t).continuous | |
| continuous_invFun := (toricFlow_time_smooth hF (-t)).continuous | |
| theorem toricFlow_hasDerivAt {F : (ΞΉ β β) β β} (hF : ContDiff β β F) | |
| (t : β) (z : PlanePhase ΞΉ) : | |
| HasDerivAt (fun s => toricFlow F s z) | |
| (hamiltonianField phaseArea (toricHamiltonian F) (t,toricFlow F t z)) t := by | |
| apply hasDerivAt_pi.mpr | |
| intro i | |
| have hd := planeRotate_hasDerivAt ((hasDerivAt_id t).mul_const (toricAngularSpeed F z i)) (z i) | |
| apply hd.congr_deriv | |
| rw [toricHamiltonian_field hF,toricAngularSpeed_flow] | |
| simp only [one_mul,toricFlow,id_eq] | |
| theorem toricFlow_symplectic {F : (ΞΉ β β) β β} (hF : ContDiff β β F) | |
| (t : β) (z v w : PlanePhase ΞΉ) : | |
| phaseArea (fderiv β (toricFlow F t) z v) (fderiv β (toricFlow F t) z w) = phaseArea v w := by | |
| have hHs := toricHamiltonian_smooth hF | |
| have hXs := hamiltonianField_smooth phaseArea_isInvertible hHs | |
| have he (a b : β) (hab : a β€ b) : | |
| phaseArea (fderiv β (toricFlow F b) z v) (fderiv β (toricFlow F b) z w) = | |
| phaseArea (fderiv β (toricFlow F a) z v) (fderiv β (toricFlow F a) z w) := by | |
| apply smooth_flow_form_transport_on (toricFlow_smooth hF) hXs (toricFlow_hasDerivAt hF) | |
| (Ξ© := fun _ => phaseArea) contDiff_const hab z v w | |
| intro s _ u q | |
| simpa only [fderiv_const_apply,zero_apply,zero_add] using | |
| hamiltonianField_transport_equation phaseArea_isInvertible phaseArea_skew hHs | |
| (s,toricFlow F s z) u q | |
| have hzero : toricFlow F 0 = id := funext (toricFlow_zero F) | |
| by_cases ht : 0 β€ t | |
| Β· simpa only [hzero,fderiv_id,ContinuousLinearMap.id_apply] using he 0 t ht | |
| Β· simpa only [hzero,fderiv_id,ContinuousLinearMap.id_apply] using (he t 0 (le_of_not_ge ht)).symm | |
| end | |
| section | |
| open scoped ContDiff | |
| open Set Function | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| theorem joint_flow_fderiv {F X : β Γ E β E} (hF : ContDiff β β F) | |
| (hflow : β t x, HasDerivAt (fun s => F (s,x)) (X (t,F (t,x))) t) | |
| (t Ο : β) (x v : E) : | |
| fderiv β F (t,x) (Ο,v) = Ο β’ X (t,F (t,x)) + | |
| fderiv β (fun y => F (t,y)) x v := by | |
| rw [show (Ο,v) = Ο β’ ((1,0) : β Γ E) + (0,v) by ext <;> simp, | |
| map_add,map_smul,joint_time_fderiv hF hflow,joint_spatial_fderiv hF] | |
| theorem suspension_form_identity {A : E βL[β] E βL[β] β} | |
| (hskew : β v w, A v w = -A w v) {D : E βL[β] E} {X : E} {Ξ· : E βL[β] β} | |
| (hsp : β v w, A (D v) (D w) = A v w) | |
| (hX : β v, A X (D v) = -Ξ· v) (v w : Plane Γ E) : | |
| productForm A (v.1,v.1.2 β’ X + D v.2) (w.1,w.1.2 β’ X + D w.2) = | |
| oneCovectorForm A 1 Ξ· v w := by | |
| have hXX : A X X = 0 := by have hh := hskew X X; linarith | |
| have hright : A (D v.2) X = Ξ· v.2 := by rw [hskew,hX,neg_neg] | |
| simp only [productForm_apply,oneCovectorForm_apply,planarArea_apply,map_add,map_smul, | |
| add_apply,smul_apply,smul_eq_mul,hXX,hsp,hX,hright] | |
| ring | |
| variable {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] | |
| def toricFunction (F : (ΞΉ β β) β β) (z : PlanePhase ΞΉ) : β := F (planeMoments z) | |
| omit [DecidableEq ΞΉ] in | |
| @[fun_prop] theorem toricFunction_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| ContDiff β β (toricFunction F) := hF.comp planeMoments_smooth | |
| theorem toricFlow_energy_differential {F : (ΞΉ β β) β β} (hF : ContDiff β β F) | |
| (t : β) (z v : PlanePhase ΞΉ) : | |
| fderiv β (toricFunction F) (toricFlow F t z) (fderiv β (toricFlow F t) z v) = | |
| fderiv β (toricFunction F) z v := by | |
| have hs : ContDiff β β (toricFlow F t) := toricFlow_time_smooth hF t | |
| have he : toricFunction F β toricFlow F t = toricFunction F := by | |
| funext z; simp [toricFunction] | |
| have hd := fderiv_comp z ((toricFunction_smooth hF).differentiable (by simp) _) | |
| (hs.differentiable (by simp) _) | |
| rw [he] at hd | |
| exact (congrArg (fun L : PlanePhase ΞΉ βL[β] β => L v) hd).symm | |
| def toricSuspension (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : Plane Γ PlanePhase ΞΉ := | |
| (p.1,toricFlow F p.1.2 p.2) | |
| @[fun_prop] theorem toricSuspension_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| ContDiff β β (toricSuspension F) := by | |
| have ht : ContDiff β β (fun p : Plane Γ PlanePhase ΞΉ => p.1.2) := | |
| contDiff_snd.comp contDiff_fst | |
| have hz : ContDiff β β (fun p : Plane Γ PlanePhase ΞΉ => toricFlow F p.1.2 p.2) := by | |
| convert! (toricFlow_smooth hF).comp (ht.prodMk contDiff_snd) using 1 | |
| exact contDiff_fst.prodMk hz | |
| theorem toricSuspension_fderiv {F : (ΞΉ β β) β β} (hF : ContDiff β β F) | |
| (p v : Plane Γ PlanePhase ΞΉ) : | |
| fderiv β (toricSuspension F) p v = | |
| (v.1,v.1.2 β’ hamiltonianField phaseArea (toricHamiltonian F) | |
| (p.1.2,toricFlow F p.1.2 p.2) + fderiv β (toricFlow F p.1.2) p.2 v.2) := by | |
| have hg := (toricFlow_smooth hF).differentiable (by simp) | |
| have hc := (hg (p.1.2,p.2)).hasFDerivAt.comp p | |
| (((hasFDerivAt_snd (π := β) (p := p.1)).comp p | |
| (hasFDerivAt_fst (π := β) (p := p))).prodMk | |
| (hasFDerivAt_snd (π := β) (p := p))) | |
| have hd := (hasFDerivAt_fst (π := β) (p := p)).prodMk hc | |
| change HasFDerivAt (toricSuspension F) _ p at hd | |
| rw [hd.fderiv] | |
| change (v.1,fderiv β (fun q : β Γ PlanePhase ΞΉ => toricFlow F q.1 q.2) | |
| (p.1.2,p.2) (v.1.2,v.2)) = _ | |
| rw [joint_flow_fderiv (toricFlow_smooth hF) (toricFlow_hasDerivAt hF)] | |
| theorem toricSuspension_pullback {F : (ΞΉ β β) β β} (hF : ContDiff β β F) | |
| (p v w : Plane Γ PlanePhase ΞΉ) : | |
| productForm phaseArea (fderiv β (toricSuspension F) p v) | |
| (fderiv β (toricSuspension F) p w) = | |
| oneCovectorForm phaseArea 1 (fderiv β (toricFunction F) p.2) v w := by | |
| rw [toricSuspension_fderiv hF,toricSuspension_fderiv hF] | |
| apply suspension_form_identity phaseArea_skew (toricFlow_symplectic hF p.1.2 p.2) | |
| intro u | |
| rw [hamiltonianField_contraction phaseArea_isInvertible] | |
| have hh : fderiv β (toricHamiltonian F) (p.1.2,toricFlow F p.1.2 p.2) | |
| (0,fderiv β (toricFlow F p.1.2) p.2 u) = | |
| fderiv β (toricFunction F) (toricFlow F p.1.2 p.2) | |
| (fderiv β (toricFlow F p.1.2) p.2 u) := by | |
| have hd := ((toricFunction_smooth hF).differentiable (by simp) _).hasFDerivAt.comp | |
| (p.1.2,toricFlow F p.1.2 p.2) (hasFDerivAt_snd (π := β)) | |
| exact congrArg (fun L : (β Γ PlanePhase ΞΉ) βL[β] β => | |
| L (0,fderiv β (toricFlow F p.1.2) p.2 u)) hd.fderiv | |
| rw [hh,toricFlow_energy_differential hF] | |
| end | |
| section | |
| open scoped ContDiff | |
| open Set Function | |
| variable {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] | |
| def toricSuspensionInverse (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : Plane Γ PlanePhase ΞΉ := | |
| (p.1,toricFlow F (-p.1.2) p.2) | |
| @[fun_prop] theorem toricSuspensionInverse_smooth {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| ContDiff β β (toricSuspensionInverse F) := by | |
| have ht : ContDiff β β (fun p : Plane Γ PlanePhase ΞΉ => -p.1.2) := | |
| (contDiff_snd.comp contDiff_fst).neg | |
| have hz : ContDiff β β (fun p : Plane Γ PlanePhase ΞΉ => toricFlow F (-p.1.2) p.2) := by | |
| convert! (toricFlow_smooth hF).comp (ht.prodMk contDiff_snd) using 1 | |
| exact contDiff_fst.prodMk hz | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricSuspensionInverse_left (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : | |
| toricSuspensionInverse F (toricSuspension F p) = p := by | |
| simp only [toricSuspensionInverse,toricSuspension,toricFlow_add,neg_add_cancel,toricFlow_zero] | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricSuspensionInverse_right (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : | |
| toricSuspension F (toricSuspensionInverse F p) = p := by | |
| simp only [toricSuspensionInverse,toricSuspension,toricFlow_add,add_neg_cancel,toricFlow_zero] | |
| def toricSuspensionHomeomorph {F : (ΞΉ β β) β β} (hF : ContDiff β β F) : | |
| (Plane Γ PlanePhase ΞΉ) ββ (Plane Γ PlanePhase ΞΉ) where | |
| toFun := toricSuspension F | |
| invFun := toricSuspensionInverse F | |
| left_inv := toricSuspensionInverse_left F | |
| right_inv := toricSuspensionInverse_right F | |
| continuous_toFun := (toricSuspension_smooth hF).continuous | |
| continuous_invFun := (toricSuspensionInverse_smooth hF).continuous | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricSuspension_moments (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : | |
| planeMoments (toricSuspension F p).2 = planeMoments p.2 := toricFlow_moments F _ _ | |
| omit [Fintype ΞΉ] in | |
| @[simp] theorem toricSuspensionInverse_moments (F : (ΞΉ β β) β β) (p : Plane Γ PlanePhase ΞΉ) : | |
| planeMoments (toricSuspensionInverse F p).2 = planeMoments p.2 := toricFlow_moments F _ _ | |
| end | |
| section | |
| open scoped ContDiff Topology | |
| open Set Function | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| def layerOrder : (Plane Γ E) βL[β] ((β Γ E) Γ β) := | |
| (ContinuousLinearEquiv.prodAssoc β β β E).trans (ContinuousLinearEquiv.prodComm β β (β Γ E)) | |
| omit [CompleteSpace E] in | |
| @[simp] theorem layerOrder_apply (p : Plane Γ E) : layerOrder p = ((p.1.2,p.2),p.1.1) := rfl | |
| omit [CompleteSpace E] in | |
| @[simp] theorem layerOrder_symm_apply (p : (β Γ E) Γ β) : layerOrder.symm p = ((p.2,p.1.1),p.1.2) := rfl | |
| def stripChart (f : Plane Γ E β β) (p : Plane Γ E) : Plane Γ E := ((f p,p.1.2),p.2) | |
| omit [CompleteSpace E] in | |
| @[fun_prop] theorem stripChart_smooth {f : Plane Γ E β β} (hf : ContDiff β β f) : | |
| ContDiff β β (stripChart f) := (hf.prodMk (contDiff_snd.comp contDiff_fst)).prodMk contDiff_snd | |
| theorem stripChart_inverse {f : Plane Γ E β β} (hf : ContDiff β β f) | |
| {V : Set E} (hV : IsOpen V) {a b : β} (hab : a < b) (H : E β β) | |
| (hderiv : β T β Ioo (0:β) 1, β v β V, β s β Ioo a b, | |
| 0 < deriv (fun r => f ((r,T),v)) s) | |
| (hlo : β T β Ioo (0:β) 1, β v β V, f ((a,T),v) = 0) | |
| (hhi : β T β Ioo (0:β) 1, β v β V, H v < f ((b,T),v)) : | |
| β (W : Set (Plane Γ E)) (g : Plane Γ E β Plane Γ E), | |
| IsOpen W β§ ContDiffOn β β g W β§ | |
| W = stripChart f '' ((Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ V) β§ | |
| (β p, p.1.2 β Ioo (0:β) 1 β p.2 β V β 0 < p.1.1 β p.1.1 < H p.2 β p β W) β§ | |
| (β p β (Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ V, g (stripChart f p) = p) β§ | |
| (β p β W, g p β (Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ V β§ stripChart f (g p) = p) := by | |
| let e : (Plane Γ E) βL[β] ((β Γ E) Γ β) := layerOrder | |
| let f' : (β Γ E) Γ β β β := f β e.symm | |
| have hf' : ContDiff β β f' := hf.comp e.symm.contDiff | |
| obtain β¨W,g,hWo,hgs,hWe,havailable,hleft,hrightβ© := monotone_strip_inverse hf' | |
| (isOpen_Ioo.prod hV) hab (h := fun q : β Γ E => H q.2) | |
| (fun q hq s hs => hderiv q.1 hq.1 q.2 hq.2 s hs) | |
| (fun q hq => hlo q.1 hq.1 q.2 hq.2) | |
| (fun q hq => hhi q.1 hq.1 q.2 hq.2) | |
| let G : Plane Γ E β Plane Γ E := fun p => ((g (e p),p.1.2),p.2) | |
| refine β¨e β»ΒΉ' W,G,hWo.preimage e.continuous,?_,?_,?_,?_,?_β© | |
| Β· have hg : ContDiffOn β β (fun p => g (e p)) (e β»ΒΉ' W) := | |
| hgs.comp e.contDiff.contDiffOn (fun _ hp => hp) | |
| exact (hg.prodMk (contDiff_snd.comp contDiff_fst).contDiffOn).prodMk contDiff_snd.contDiffOn | |
| Β· ext p | |
| constructor | |
| Β· intro hp | |
| obtain β¨q,hq,hqeβ© := by simpa only [hWe] using hp | |
| refine β¨e.symm q,β¨β¨hq.2,hq.1.1β©,hq.1.2β©,?_β© | |
| apply e.injective | |
| change (q.1,f' q) = e p | |
| exact hqe | |
| Β· rintro β¨q,hq,rflβ© | |
| change e (stripChart f q) β W | |
| rw [hWe] | |
| exact β¨e q,β¨β¨hq.1.2,hq.2β©,hq.1.1β©,rflβ© | |
| Β· intro p hpT hpV hp0 hpH | |
| exact havailable (p.1.2,p.2) β¨hpT,hpVβ© p.1.1 hp0 hpH | |
| Β· intro p hp | |
| have hh := hleft (p.1.2,p.2) β¨hp.1.2,hp.2β© p.1.1 hp.1.1 | |
| change ((g ((p.1.2,p.2),f p),p.1.2),p.2) = p | |
| change g ((p.1.2,p.2),f p) = p.1.1 at hh | |
| rw [hh] | |
| Β· intro p hp | |
| have hh := hright (e p) hp | |
| refine β¨β¨β¨hh.2.1,hh.1.1β©,hh.1.2β©,?_β© | |
| change ((f ((g (e p),p.1.2),p.2),p.1.2),p.2) = p | |
| have he : f ((g (e p),p.1.2),p.2) = p.1.1 := hh.2.2 | |
| rw [he] | |
| end | |
| open scoped ContDiff Topology | |
| open Set Function | |
| variable {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] | |
| def layerChart (F : (ΞΉ β β) β β) (f : Plane Γ PlanePhase ΞΉ β β) : | |
| Plane Γ PlanePhase ΞΉ β Plane Γ PlanePhase ΞΉ := toricSuspension F β stripChart f | |
| @[fun_prop] theorem layerChart_smooth {F : (ΞΉ β β) β β} {f : Plane Γ PlanePhase ΞΉ β β} | |
| (hF : ContDiff β β F) (hf : ContDiff β β f) : ContDiff β β (layerChart F f) := | |
| (toricSuspension_smooth hF).comp (stripChart_smooth hf) | |
| def layerForm (F : (ΞΉ β β) β β) (f : Plane Γ PlanePhase ΞΉ β β) | |
| (p : Plane Γ PlanePhase ΞΉ) : | |
| (Plane Γ PlanePhase ΞΉ) βL[β] (Plane Γ PlanePhase ΞΉ) βL[β] β := | |
| let dt := (ContinuousLinearMap.snd β β β).comp (ContinuousLinearMap.fst β Plane (PlanePhase ΞΉ)) | |
| let Ξ² := fderiv β f p + (fderiv β (toricFunction F) p.2).comp (ContinuousLinearMap.snd β Plane (PlanePhase ΞΉ)) | |
| phaseArea.bilinearComp (ContinuousLinearMap.snd β Plane (PlanePhase ΞΉ)) | |
| (ContinuousLinearMap.snd β Plane (PlanePhase ΞΉ)) + Ξ².smulRight dt - dt.smulRight Ξ² | |
| omit [DecidableEq ΞΉ] in | |
| theorem layerForm_apply (F : (ΞΉ β β) β β) (f : Plane Γ PlanePhase ΞΉ β β) | |
| (p v w : Plane Γ PlanePhase ΞΉ) : | |
| layerForm F f p v w = phaseArea v.2 w.2 + | |
| (fderiv β f p v + fderiv β (toricFunction F) p.2 v.2)*w.1.2 - | |
| v.1.2*(fderiv β f p w + fderiv β (toricFunction F) p.2 w.2) := by | |
| simp [layerForm,ContinuousLinearMap.smulRight_apply,smul_eq_mul,mul_add] | |
| omit [DecidableEq ΞΉ] in | |
| theorem stripChart_fderiv {f : Plane Γ PlanePhase ΞΉ β β} (hf : ContDiff β β f) | |
| (p v : Plane Γ PlanePhase ΞΉ) : fderiv β (stripChart f) p v = ((fderiv β f p v,v.1.2),v.2) := by | |
| have hd := (((hf.differentiable (by simp) p).hasFDerivAt).prodMk | |
| ((hasFDerivAt_snd (π := β) (p := p.1)).comp p (hasFDerivAt_fst (π := β) (p := p)))).prodMk | |
| (hasFDerivAt_snd (π := β) (p := p)) | |
| change HasFDerivAt (stripChart f) _ p at hd | |
| rw [hd.fderiv] | |
| rfl | |
| theorem layerChart_pullback {F : (ΞΉ β β) β β} {f : Plane Γ PlanePhase ΞΉ β β} | |
| (hF : ContDiff β β F) (hf : ContDiff β β f) (p v w : Plane Γ PlanePhase ΞΉ) : | |
| productForm phaseArea (fderiv β (layerChart F f) p v) | |
| (fderiv β (layerChart F f) p w) = layerForm F f p v w := by | |
| rw [layerChart,fderiv_comp p ((toricSuspension_smooth hF).differentiable (by simp) _) | |
| ((stripChart_smooth hf).differentiable (by simp) _)] | |
| simp only [ContinuousLinearMap.comp_apply] | |
| rw [toricSuspension_pullback hF,stripChart_fderiv hf,stripChart_fderiv hf, | |
| oneCovectorForm_apply,layerForm_apply] | |
| change phaseArea v.2 w.2 + 1*(fderiv β f p v*w.1.2-v.1.2*fderiv β f p w) + | |
| fderiv β (toricFunction F) p.2 v.2*w.1.2-v.1.2*fderiv β (toricFunction F) p.2 w.2 = _ | |
| ring | |
| theorem layerChart_inverse {F : (ΞΉ β β) β β} {f : Plane Γ PlanePhase ΞΉ β β} | |
| (hF : ContDiff β β F) (hf : ContDiff β β f) | |
| {V : Set (ΞΉ β β)} (hV : IsOpen (planeMoments β»ΒΉ' V)) {a b : β} (hab : a < b) | |
| (H : (ΞΉ β β) β β) | |
| (hderiv : β T β Ioo (0:β) 1, β v, planeMoments v β V β β s β Ioo a b, | |
| 0 < deriv (fun r => f ((r,T),v)) s) | |
| (hlo : β T β Ioo (0:β) 1, β v, planeMoments v β V β f ((a,T),v) = 0) | |
| (hhi : β T β Ioo (0:β) 1, β v, planeMoments v β V β H (planeMoments v) < f ((b,T),v)) : | |
| β (W : Set (Plane Γ PlanePhase ΞΉ)) (g : Plane Γ PlanePhase ΞΉ β Plane Γ PlanePhase ΞΉ), | |
| IsOpen W β§ ContDiffOn β β g W β§ | |
| W = layerChart F f '' ((Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ (planeMoments β»ΒΉ' V)) β§ | |
| (β p, p.1.2 β Ioo (0:β) 1 β planeMoments p.2 β V β | |
| 0 < p.1.1 β p.1.1 < H (planeMoments p.2) β p β W) β§ | |
| (β p β (Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ (planeMoments β»ΒΉ' V), g (layerChart F f p) = p) β§ | |
| (β p β W, g p β (Ioo a b ΓΛ’ Ioo (0:β) 1) ΓΛ’ (planeMoments β»ΒΉ' V) β§ layerChart F f (g p) = p) := by | |
| obtain β¨W,g,hWo,hgs,hWe,hav,hl,hrβ© := stripChart_inverse hf hV hab (H β planeMoments) hderiv hlo hhi | |
| let e := toricSuspensionHomeomorph hF | |
| let G := g β toricSuspensionInverse F | |
| have hpre : e.symm β»ΒΉ' W = e '' W := by | |
| ext p | |
| exact β¨fun hp => β¨e.symm p,hp,e.apply_symm_apply pβ©,by rintro β¨p,hp,rflβ©; simpa using hpβ© | |
| refine β¨e '' W,G,e.isOpen_image.mpr hWo,?_,?_,?_,?_,?_β© | |
| Β· apply hgs.comp (toricSuspensionInverse_smooth hF).contDiffOn | |
| intro p hp | |
| change p β e.symm β»ΒΉ' W | |
| rw [hpre] | |
| exact hp | |
| Β· rw [hWe,βimage_comp] | |
| rfl | |
| Β· intro p hpT hpV hp0 hpH | |
| refine β¨e.symm p,?_,e.apply_symm_apply pβ© | |
| apply hav (e.symm p) hpT | |
| Β· change planeMoments (toricSuspensionInverse F p).2 β V | |
| simpa only [toricSuspensionInverse_moments] using hpV | |
| Β· exact hp0 | |
| Β· change p.1.1 < H (planeMoments (toricSuspensionInverse F p).2) | |
| simpa using hpH | |
| Β· intro p hp | |
| change g (toricSuspensionInverse F (toricSuspension F (stripChart f p))) = p | |
| rw [toricSuspensionInverse_left] | |
| exact hl p hp | |
| Β· rintro p β¨z,hz,rflβ© | |
| have hge : G (e z) = g z := by | |
| change g (toricSuspensionInverse F (toricSuspension F z)) = g z | |
| rw [toricSuspensionInverse_left] | |
| rw [hge] | |
| refine β¨(hr z hz).1,?_β© | |
| change toricSuspension F (stripChart f (g z)) = toricSuspension F z | |
| rw [(hr z hz).2] | |
| end PackingSufficiencySupport.Hamiltonian | |
| end | |
| end OAI | |