Download data/lean/OAI/Geometry/BallPacking/Forms/HorizontalCoupling.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 30.2 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/BallPacking/Forms/HorizontalCoupling.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/BallPacking/Forms/HorizontalCoupling.lean
-
curl -L -o HorizontalCoupling.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/BallPacking/Forms/HorizontalCoupling.lean
30.2 kB
| import Mathlib | |
| import OAI.Geometry.BallPacking.Forms.QuadricInfinityPrimitive | |
| import OAI.Geometry.BallPacking.Forms.ManifoldFormTransport | |
| namespace OAI | |
| noncomputable section | |
| namespace PackingSufficiencySupport.Hamiltonian | |
| section | |
| open scoped ContDiff Manifold Topology | |
| open Set Function Manifold | |
| variable {F E V : Type*} [NormedAddCommGroup F] [NormedSpace β F] | |
| [NormedAddCommGroup E] [NormedSpace β E] [NormedAddCommGroup V] [NormedSpace β V] | |
| {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] | |
| def globalHorizontalCoupling (Ξ© : V βL[β] V βL[β] β) | |
| (Ξ : V β ManifoldOneForm E M) : ManifoldTwoForm (E Γ V) (M Γ V) := fun x => | |
| Ξ©.bilinearComp (ContinuousLinearMap.snd β E V) (ContinuousLinearMap.snd β E V)+ | |
| manifoldExteriorOneForm (productHorizontalLift Ξ) x | |
| theorem globalHorizontalCoupling_pullback {Ξ© : V βL[β] V βL[β] β} | |
| {Ξ : V β ManifoldOneForm E M} (hΞ : SmoothOneFormFamily Ξ) | |
| {g : F β M} {x : F Γ V} (hg : ContMDiffAt π(β,F) π(β,E) β g x.1) : | |
| (globalHorizontalCoupling Ξ© Ξ (flatProductMap g x)).bilinearComp | |
| ((mfderiv π(β,F) π(β,E) g x.1).prodMap (ContinuousLinearMap.id β V)) | |
| ((mfderiv π(β,F) π(β,E) g x.1).prodMap (ContinuousLinearMap.id β V))= | |
| Ξ©.bilinearComp (ContinuousLinearMap.snd β F V) (ContinuousLinearMap.snd β F V)+ | |
| euclideanExteriorOneForm | |
| (fun y => euclideanPullbackOneForm (fun _ => productHorizontalLift Ξ) (flatProductMap g) (0,y)) x := by | |
| rw [productHorizontalLift_exterior_pullback hΞ hg] | |
| apply ContinuousLinearMap.ext | |
| intro v | |
| apply ContinuousLinearMap.ext | |
| intro w | |
| rfl | |
| theorem globalHorizontalCoupling_isInvertible_coordinates {Ξ© : V βL[β] V βL[β] β} | |
| {Ξ : V β ManifoldOneForm E M} (hΞ : SmoothOneFormFamily Ξ) | |
| {g : F β M} {x : F Γ V} (hg : ContMDiffAt π(β,F) π(β,E) β g x.1) | |
| (c : F βL[β] E) (hc : (c : F βL[β] E)=mfderiv π(β,F) π(β,E) g x.1) | |
| (h : (Ξ©.bilinearComp (ContinuousLinearMap.snd β F V) (ContinuousLinearMap.snd β F V)+ | |
| euclideanExteriorOneForm | |
| (fun y => euclideanPullbackOneForm (fun _ => productHorizontalLift Ξ) (flatProductMap g) (0,y)) x).IsInvertible) : | |
| (globalHorizontalCoupling Ξ© Ξ (flatProductMap g x)).IsInvertible := by | |
| apply (bilinearComp_equiv_isInvertible_iff (c.prodCongr (ContinuousLinearEquiv.refl β V))).mp | |
| have he : ((c.prodCongr (ContinuousLinearEquiv.refl β V)) : (F Γ V) βL[β] E Γ V)= | |
| (mfderiv π(β,F) π(β,E) g x.1).prodMap (ContinuousLinearMap.id β V) := by | |
| change (c : F βL[β] E).prodMap (ContinuousLinearMap.id β V)=_ | |
| rw [hc] | |
| rfl | |
| rw [he,globalHorizontalCoupling_pullback hΞ hg] | |
| exact h | |
| end | |
| section | |
| open scoped ContDiff Manifold Topology | |
| open Set Function Manifold | |
| variable {P E : Type*} [NormedAddCommGroup P] [NormedSpace β P] | |
| [NormedAddCommGroup E] [NormedSpace β E] | |
| {M : Type*} [TopologicalSpace M] [ChartedSpace E M] | |
| structure IsPrimitiveFamily (Ξ© : P β ManifoldTwoForm E M) (Ξ± : P β ManifoldOneForm E M) : Prop where | |
| smooth : SmoothOneFormFamily Ξ± | |
| exterior : β p c y, y β (extChartAt π(β,E) c).target β | |
| euclideanExteriorOneForm (chartOneForm (Ξ± p) c) y = chartTwoForm (Ξ© p) c y | |
| namespace IsPrimitiveFamily | |
| theorem zero : IsPrimitiveFamily (0 : P β ManifoldTwoForm E M) 0 := by | |
| constructor | |
| Β· intro c | |
| simpa only [Pi.zero_apply,chartOneForm_zero] using | |
| (contDiffOn_const : ContDiffOn β β (fun _ : P Γ E => (0 : E βL[β] β)) _) | |
| Β· intro p c y _ | |
| change euclideanExteriorOneForm (chartOneForm 0 c) y = chartTwoForm 0 c y | |
| rw [show chartOneForm (0 : ManifoldOneForm E M) c = fun _ => 0 from funext fun z => chartOneForm_zero c z] | |
| simp only [chartTwoForm_zero,euclideanExteriorOneForm,fderiv_const_apply,ContinuousLinearMap.flip_zero] | |
| exact sub_self (0 : E βL[β] E βL[β] β) | |
| theorem add {Ξ© Ξ : P β ManifoldTwoForm E M} {Ξ± Ξ² : P β ManifoldOneForm E M} | |
| (hΞ± : IsPrimitiveFamily Ξ© Ξ±) (hΞ² : IsPrimitiveFamily Ξ Ξ²) : | |
| IsPrimitiveFamily (Ξ©+Ξ) (Ξ±+Ξ²) := by | |
| constructor | |
| Β· intro c | |
| simpa only [Pi.add_apply,chartOneForm_add] using (hΞ±.smooth c).add (hΞ².smooth c) | |
| Β· intro p c y hy | |
| simp only [Pi.add_apply,chartTwoForm_add] | |
| rw [show chartOneForm (Ξ± p + Ξ² p) c = | |
| chartOneForm (Ξ± p) c + chartOneForm (Ξ² p) c from funext fun z => chartOneForm_add _ _ c z] | |
| rw [euclideanExteriorOneForm_add ((hΞ±.smooth.spatial_smooth p c hy).differentiableAt (by simp)) | |
| ((hΞ².smooth.spatial_smooth p c hy).differentiableAt (by simp)),hΞ±.exterior p c y hy,hΞ².exterior p c y hy] | |
| theorem smul {Ξ© : P β ManifoldTwoForm E M} {Ξ± : P β ManifoldOneForm E M} | |
| (hΞ± : IsPrimitiveFamily Ξ© Ξ±) {f : P β β} (hf : ContDiff β β f) : | |
| IsPrimitiveFamily (fun p => f p β’ Ξ© p) (fun p => f p β’ Ξ± p) := by | |
| constructor | |
| Β· intro c | |
| simpa only [chartOneForm_smul,Function.comp_apply,Pi.smul_def'] using | |
| (hf.comp contDiff_fst).contDiffOn.smul (hΞ±.smooth c) | |
| Β· intro p c y hy | |
| simp only [chartTwoForm_smul] | |
| rw [show chartOneForm (f p β’ Ξ± p) c = f p β’ chartOneForm (Ξ± p) c from | |
| funext fun z => chartOneForm_smul _ _ c z] | |
| rw [euclideanExteriorOneForm_smul _ ((hΞ±.smooth.spatial_smooth p c hy).differentiableAt (by simp)), | |
| hΞ±.exterior p c y hy] | |
| theorem sum {I : Type*} (s : Finset I) {Ξ© : I β P β ManifoldTwoForm E M} | |
| {Ξ± : I β P β ManifoldOneForm E M} (hΞ± : β i β s, IsPrimitiveFamily (Ξ© i) (Ξ± i)) : | |
| IsPrimitiveFamily (β i β s, Ξ© i) (β i β s, Ξ± i) := by | |
| classical | |
| induction s using Finset.induction_on with | |
| | empty => simpa only [Finset.sum_empty] using zero (P := P) (E := E) (M := M) | |
| | @insert i s hi ih => | |
| rw [Finset.sum_insert hi,Finset.sum_insert hi] | |
| exact (hΞ± i (Finset.mem_insert_self i s)).add | |
| (ih (fun j hj => hΞ± j (Finset.mem_insert_of_mem hj))) | |
| theorem const_slice {Q : Type*} [NormedAddCommGroup Q] [NormedSpace β Q] | |
| {Ξ© : Q β ManifoldTwoForm E M} {Ξ± : Q β ManifoldOneForm E M} | |
| (hΞ± : IsPrimitiveFamily Ξ© Ξ±) (q : Q) : | |
| IsPrimitiveFamily (fun _ : P => Ξ© q) (fun _ : P => Ξ± q) := by | |
| constructor | |
| Β· intro c | |
| apply (hΞ±.smooth c).comp (f := fun t : P Γ E => (q,t.2)) | |
| (contDiffOn_const.prodMk contDiffOn_snd) | |
| exact fun t ht => β¨mem_univ _,ht.2β© | |
| Β· intro _ c y hy | |
| exact hΞ±.exterior q c y hy | |
| end IsPrimitiveFamily | |
| end | |
| section | |
| open scoped ContDiff | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| def pathSpatialExterior (Ξ : β Γ E β E βL[β] β) (p : β Γ E) : E βL[β] E βL[β] β := | |
| (fderiv β Ξ p).comp (ContinuousLinearMap.inr β β E) - | |
| ((fderiv β Ξ p).comp (ContinuousLinearMap.inr β β E)).flip | |
| def pathTimePrimitive (Ξ : β Γ E β E βL[β] β) (p : β Γ E) : E βL[β] β := | |
| fderiv β Ξ p (1,0) | |
| @[simp] theorem pathSpatialExterior_apply (Ξ : β Γ E β E βL[β] β) (p : β Γ E) (v w : E) : | |
| pathSpatialExterior Ξ p v w = fderiv β Ξ p (0,v) w - fderiv β Ξ p (0,w) v := rfl | |
| @[fun_prop] theorem pathSpatialExterior_smooth {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) : ContDiff β β (pathSpatialExterior Ξ) := by | |
| have hd : ContDiff β β (fun p => (fderiv β Ξ p).comp (ContinuousLinearMap.inr β β E)) := | |
| (hΞ.fderiv_right (by simp)).clm_comp contDiff_const | |
| have hflip : ContDiff β β (fun L : E βL[β] E βL[β] β => L.flip) := | |
| LinearIsometryEquiv.contDiff (π := β) (n := β) (E := E βL[β] E βL[β] β) | |
| (F := E βL[β] E βL[β] β) (ContinuousLinearMap.flipβα΅’ β E E β) | |
| exact hd.sub (hflip.comp hd) | |
| @[fun_prop] theorem pathTimePrimitive_smooth {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) : ContDiff β β (pathTimePrimitive Ξ) := | |
| (hΞ.fderiv_right (by simp)).clm_apply contDiff_const | |
| theorem fderiv_evaluation_const {P F G : Type*} [NormedAddCommGroup P] [NormedSpace β P] | |
| [NormedAddCommGroup F] [NormedSpace β F] [NormedAddCommGroup G] [NormedSpace β G] | |
| {g : P β F βL[β] G} {p : P} (hg : DifferentiableAt β g p) (u : P) (v : F) : | |
| fderiv β (fun q => g q v) p u = fderiv β g p u v := by | |
| rw [(hg.hasFDerivAt.clm_apply (hasFDerivAt_const v p)).fderiv] | |
| simp | |
| theorem pathSpatialExterior_fderiv {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) (p u : β Γ E) (v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p u v w = | |
| fderiv β (fderiv β Ξ) p u (0,v) w - fderiv β (fderiv β Ξ) p u (0,w) v := by | |
| have hD := (hΞ.fderiv_right (m := β) (by simp)).differentiable (by simp) p | |
| have hΞ© := (pathSpatialExterior_smooth hΞ).differentiable (by simp) p | |
| rw [βfderiv_evaluation_const hΞ© u v, | |
| βfderiv_evaluation_const (hΞ©.clm_apply (differentiableAt_const v)) u w] | |
| simp only [pathSpatialExterior_apply] | |
| change fderiv β ((fun q => fderiv β Ξ q (0,v) w)-(fun q => fderiv β Ξ q (0,w) v)) p u = _ | |
| rw [fderiv_sub (hD.clm_apply (differentiableAt_const (0,v)) |>.clm_apply (differentiableAt_const w)) | |
| (hD.clm_apply (differentiableAt_const (0,w)) |>.clm_apply (differentiableAt_const v))] | |
| simp only [sub_apply,fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (0,v))), | |
| fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (0,w))),fderiv_evaluation_const hD] | |
| theorem pathTimePrimitive_fderiv {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) (p u : β Γ E) (v : E) : | |
| fderiv β (pathTimePrimitive Ξ) p u v = fderiv β (fderiv β Ξ) p u (1,0) v := by | |
| have hD := (hΞ.fderiv_right (m := β) (by simp)).differentiable (by simp) p | |
| rw [βfderiv_evaluation_const ((pathTimePrimitive_smooth hΞ).differentiable (by simp) p)] | |
| simp only [pathTimePrimitive,fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (1,0))), | |
| fderiv_evaluation_const hD] | |
| theorem exact_path_time_equation {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) (p : β Γ E) (v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p (1,0) v w = | |
| fderiv β (pathTimePrimitive Ξ) p (0,v) w - | |
| fderiv β (pathTimePrimitive Ξ) p (0,w) v := by | |
| have hs := (hΞ.contDiffAt (x := p)).isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top) | |
| simp only [pathSpatialExterior_fderiv hΞ,pathTimePrimitive_fderiv hΞ] | |
| rw [hs.eq (1,0) (0,v),hs.eq (1,0) (0,w)] | |
| theorem exact_path_closed {Ξ : β Γ E β E βL[β] β} | |
| (hΞ : ContDiff β β Ξ) (p : β Γ E) (u v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p (0,u) v w - | |
| fderiv β (pathSpatialExterior Ξ) p (0,v) u w + | |
| fderiv β (pathSpatialExterior Ξ) p (0,w) u v = 0 := by | |
| have hs := (hΞ.contDiffAt (x := p)).isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top) | |
| simp only [pathSpatialExterior_fderiv hΞ] | |
| rw [hs.eq (0,u) (0,v),hs.eq (0,u) (0,w),hs.eq (0,v) (0,w)] | |
| ring | |
| @[fun_prop] theorem pathSpatialExterior_smoothAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) : ContDiffAt β β (pathSpatialExterior Ξ) p := by | |
| have hd : ContDiffAt β β (fun q => (fderiv β Ξ q).comp (ContinuousLinearMap.inr β β E)) p := | |
| (hΞ.fderiv_right (by simp)).clm_comp contDiffAt_const | |
| have hflip : ContDiff β β (fun L : E βL[β] E βL[β] β => L.flip) := | |
| LinearIsometryEquiv.contDiff (π := β) (n := β) (E := E βL[β] E βL[β] β) | |
| (F := E βL[β] E βL[β] β) (ContinuousLinearMap.flipβα΅’ β E E β) | |
| exact hd.sub (hflip.contDiffAt.comp p hd) | |
| @[fun_prop] theorem pathTimePrimitive_smoothAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) : ContDiffAt β β (pathTimePrimitive Ξ) p := | |
| (hΞ.fderiv_right (by simp)).clm_apply contDiffAt_const | |
| theorem pathSpatialExterior_fderivAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) (u : β Γ E) (v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p u v w = | |
| fderiv β (fderiv β Ξ) p u (0,v) w - fderiv β (fderiv β Ξ) p u (0,w) v := by | |
| have hD := (hΞ.fderiv_right (m := β) (by simp)).differentiableAt (by simp) | |
| have hΞ© := (pathSpatialExterior_smoothAt hΞ).differentiableAt (by simp) | |
| rw [βfderiv_evaluation_const hΞ© u v, | |
| βfderiv_evaluation_const (hΞ©.clm_apply (differentiableAt_const v)) u w] | |
| simp only [pathSpatialExterior_apply] | |
| change fderiv β ((fun q => fderiv β Ξ q (0,v) w)-(fun q => fderiv β Ξ q (0,w) v)) p u = _ | |
| rw [fderiv_sub (hD.clm_apply (differentiableAt_const (0,v)) |>.clm_apply (differentiableAt_const w)) | |
| (hD.clm_apply (differentiableAt_const (0,w)) |>.clm_apply (differentiableAt_const v))] | |
| simp only [sub_apply,fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (0,v))), | |
| fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (0,w))),fderiv_evaluation_const hD] | |
| theorem pathTimePrimitive_fderivAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) (u : β Γ E) (v : E) : | |
| fderiv β (pathTimePrimitive Ξ) p u v = fderiv β (fderiv β Ξ) p u (1,0) v := by | |
| have hD := (hΞ.fderiv_right (m := β) (by simp)).differentiableAt (by simp) | |
| rw [βfderiv_evaluation_const ((pathTimePrimitive_smoothAt hΞ).differentiableAt (by simp))] | |
| simp only [pathTimePrimitive,fderiv_evaluation_const (hD.clm_apply (differentiableAt_const (1,0))), | |
| fderiv_evaluation_const hD] | |
| theorem exact_path_time_equationAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) (v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p (1,0) v w = | |
| fderiv β (pathTimePrimitive Ξ) p (0,v) w - | |
| fderiv β (pathTimePrimitive Ξ) p (0,w) v := by | |
| have hs := hΞ.isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top) | |
| simp only [pathSpatialExterior_fderivAt hΞ,pathTimePrimitive_fderivAt hΞ] | |
| rw [hs.eq (1,0) (0,v),hs.eq (1,0) (0,w)] | |
| theorem exact_path_closedAt {Ξ : β Γ E β E βL[β] β} | |
| {p : β Γ E} (hΞ : ContDiffAt β β Ξ p) (u v w : E) : | |
| fderiv β (pathSpatialExterior Ξ) p (0,u) v w - | |
| fderiv β (pathSpatialExterior Ξ) p (0,v) u w + | |
| fderiv β (pathSpatialExterior Ξ) p (0,w) u v = 0 := by | |
| have hs := hΞ.isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top) | |
| simp only [pathSpatialExterior_fderivAt hΞ] | |
| rw [hs.eq (0,u) (0,v),hs.eq (0,u) (0,w),hs.eq (0,v) (0,w)] | |
| ring | |
| end | |
| section | |
| 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] | |
| def manifoldTimePrimitive (Ξ : β β ManifoldOneForm E M) (t : β) : ManifoldOneForm E M := | |
| fun x => deriv (fun s => Ξ s x) t | |
| theorem chartOneForm_reconstruct_target {Ξ± : ManifoldOneForm E M} {c : M} {y : E} | |
| (hy : y β (extChartAt π(β,E) c).target) : | |
| (chartOneForm Ξ± c y).comp (chartDifferential c ((extChartAt π(β,E) c).symm y)) = | |
| Ξ± ((extChartAt π(β,E) c).symm y) := by | |
| have hC : (chartDifferential (E := E) c ((extChartAt π(β,E) c).symm y)).IsInvertible := by | |
| convert! isInvertible_mfderiv_extChartAt (I := π(β,E)) ((extChartAt π(β,E) c).map_target hy) using 1 | |
| ext v | |
| exact congrArg (Ξ± ((extChartAt π(β,E) c).symm y)) (hC.inverse_apply_self v) | |
| theorem manifoldTimePrimitive_chart {Ξ : β β ManifoldOneForm E M} | |
| (hΞ : SmoothOneFormFamily Ξ) {c : M} {t : β} {y : E} | |
| (hy : y β (extChartAt π(β,E) c).target) : | |
| chartOneForm (manifoldTimePrimitive Ξ t) c y = | |
| pathTimePrimitive (fun q : β Γ E => chartOneForm (Ξ q.1) c q.2) (t,y) := by | |
| let F : β Γ E β E βL[β] β := fun q => chartOneForm (Ξ q.1) c q.2 | |
| let x := (extChartAt π(β,E) c).symm y | |
| have hF : ContDiffAt β β F (t,y) := (hΞ c).contDiffAt ((isOpen_univ.prod (isOpen_extChartAt_target c)).mem_nhds | |
| (show (t,y) β univ ΓΛ’ (extChartAt π(β,E) c).target from β¨mem_univ t,hyβ©)) | |
| have hdf : HasFDerivAt F (fderiv β F (t,y)) (t,y) := | |
| (hF.differentiableAt (by simp)).hasFDerivAt | |
| have hinc : HasDerivAt (fun s : β => (s,y)) (1,0) t := | |
| (hasDerivAt_id t).prodMk (hasDerivAt_const t y) | |
| have hd : HasDerivAt (fun s => F (s,y)) (pathTimePrimitive F (t,y)) t := by | |
| have hh := hdf.comp_hasDerivAt t hinc | |
| simpa only [Function.comp_def,pathTimePrimitive] using hh | |
| have he : (fun s => (F (s,y)).comp (chartDifferential c x)) = fun s => Ξ s x := by | |
| funext s | |
| exact chartOneForm_reconstruct_target hy | |
| have hdn := hd.clm_comp (hasDerivAt_const t (chartDifferential c x)) | |
| rw [he] at hdn | |
| have hC : (chartDifferential (E := E) c x).IsInvertible := by | |
| convert! isInvertible_mfderiv_extChartAt (I := π(β,E)) ((extChartAt π(β,E) c).map_target hy) using 1 | |
| have hdne : deriv (fun s => Ξ s x) t = (pathTimePrimitive F (t,y)).comp (chartDifferential c x) := by | |
| simpa only [ContinuousLinearMap.comp_zero,add_zero] using hdn.deriv | |
| unfold chartOneForm manifoldTimePrimitive | |
| change (deriv (fun s => Ξ s x) t).comp (chartDifferential c x).inverse = _ | |
| rw [hdne] | |
| apply ContinuousLinearMap.ext | |
| intro v | |
| change pathTimePrimitive F (t,y) ((chartDifferential c x) ((chartDifferential c x).inverse v)) = | |
| pathTimePrimitive F (t,y) v | |
| exact congrArg (pathTimePrimitive F (t,y)) (hC.self_apply_inverse v) | |
| theorem pathSpatialExterior_eq_slice {Ξ : β Γ E β E βL[β] β} {p : β Γ E} | |
| (hΞ : DifferentiableAt β Ξ p) : | |
| pathSpatialExterior Ξ p = euclideanExteriorOneForm (fun y => Ξ (p.1,y)) p.2 := by | |
| have hi : HasFDerivAt (fun y : E => (p.1,y)) | |
| ((0 : E βL[β] β).prod (ContinuousLinearMap.id β E)) p.2 := | |
| (hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id p.2) | |
| have hh : HasFDerivAt Ξ (fderiv β Ξ p) (p.1,p.2) := hΞ.hasFDerivAt | |
| have hd := (hh.comp p.2 hi).fderiv | |
| change fderiv β (fun y => Ξ (p.1,y)) p.2 = _ at hd | |
| unfold euclideanExteriorOneForm | |
| rw [hd] | |
| rfl | |
| theorem manifoldExteriorOneForm_path_chart {Ξ : β β ManifoldOneForm E M} | |
| (hΞ : SmoothOneFormFamily Ξ) {c : M} {t : β} {y : E} | |
| (hy : y β (extChartAt π(β,E) c).target) : | |
| chartTwoForm (manifoldExteriorOneForm (Ξ t)) c y = | |
| pathSpatialExterior (fun q : β Γ E => chartOneForm (Ξ q.1) c q.2) (t,y) := by | |
| rw [manifoldExteriorOneForm_chart (fun b z hz => (hΞ.spatial_smooth t b hz).contDiffWithinAt) hy] | |
| exact (pathSpatialExterior_eq_slice ((hΞ c).contDiffAt | |
| ((isOpen_univ.prod (isOpen_extChartAt_target c)).mem_nhds (show (t,y) β univ ΓΛ’ (extChartAt π(β,E) c).target from β¨mem_univ t,hyβ©)) | |
| |>.differentiableAt (by simp))).symm | |
| theorem manifoldExteriorOneForm_path_smooth {Ξ : β β ManifoldOneForm E M} | |
| (hΞ : SmoothOneFormFamily Ξ) : SmoothTwoFormFamily (fun t => manifoldExteriorOneForm (Ξ t)) := by | |
| intro c p hp | |
| have hn := (isOpen_univ.prod (isOpen_extChartAt_target (I := π(β,E)) c)).mem_nhds hp | |
| apply ((pathSpatialExterior_smoothAt ((hΞ c).contDiffAt hn)).congr_of_eventuallyEq ?_).contDiffWithinAt | |
| filter_upwards [hn] with q hq | |
| exact manifoldExteriorOneForm_path_chart hΞ hq.2 | |
| theorem manifoldTimePrimitive_smooth {Ξ : β β ManifoldOneForm E M} | |
| (hΞ : SmoothOneFormFamily Ξ) : SmoothOneFormFamily (manifoldTimePrimitive Ξ) := by | |
| intro c p hp | |
| have hn := (isOpen_univ.prod (isOpen_extChartAt_target (I := π(β,E)) c)).mem_nhds hp | |
| apply ((pathTimePrimitive_smoothAt ((hΞ c).contDiffAt hn)).congr_of_eventuallyEq ?_).contDiffWithinAt | |
| filter_upwards [hn] with q hq | |
| exact manifoldTimePrimitive_chart hΞ hq.2 | |
| end | |
| section | |
| open scoped ContDiff Manifold Topology | |
| open Set Function Manifold | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| {M : Type*} [TopologicalSpace M] [ChartedSpace E M] | |
| def manifoldWedge (Ξ± Ξ² : ManifoldOneForm E M) : ManifoldTwoForm E M := | |
| fun z => (Ξ± z).smulRight (Ξ² z)-(Ξ² z).smulRight (Ξ± z) | |
| @[simp] theorem manifoldWedge_apply (Ξ± Ξ² : ManifoldOneForm E M) (z : M) (v w : E) : | |
| manifoldWedge Ξ± Ξ² z v w=Ξ± z v*Ξ² z w-Ξ² z v*Ξ± z w := rfl | |
| theorem manifoldWedge_skew (Ξ± Ξ² : ManifoldOneForm E M) (z : M) (v w : E) : | |
| manifoldWedge Ξ± Ξ² z v w= -manifoldWedge Ξ± Ξ² z w v := by | |
| simp only [manifoldWedge_apply] | |
| ring | |
| theorem chartTwoForm_wedge (Ξ± Ξ² : ManifoldOneForm E M) (c : M) (y : E) : | |
| chartTwoForm (manifoldWedge Ξ± Ξ²) c y = | |
| (chartOneForm Ξ± c y).smulRight (chartOneForm Ξ² c y)- | |
| (chartOneForm Ξ² c y).smulRight (chartOneForm Ξ± c y) := by | |
| ext v w | |
| rfl | |
| theorem manifoldWedge_smooth {Ξ± Ξ² : ManifoldOneForm E M} | |
| (hΞ± : β c,ContDiffOn β β (chartOneForm Ξ± c) (extChartAt π(β,E) c).target) | |
| (hΞ² : β c,ContDiffOn β β (chartOneForm Ξ² c) (extChartAt π(β,E) c).target) : | |
| SmoothTwoForm (manifoldWedge Ξ± Ξ²) := by | |
| intro c | |
| have he : chartTwoForm (manifoldWedge Ξ± Ξ²) c = fun y => | |
| (chartOneForm Ξ± c y).smulRight (chartOneForm Ξ² c y)- | |
| (chartOneForm Ξ² c y).smulRight (chartOneForm Ξ± c y) := | |
| funext (chartTwoForm_wedge Ξ± Ξ² c) | |
| rw [he] | |
| exact ((hΞ± c).smulRight (hΞ² c)).sub ((hΞ² c).smulRight (hΞ± c)) | |
| end | |
| section | |
| 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] | |
| def manifoldScalarDifferential (f : M β β) : ManifoldOneForm E M := | |
| mfderiv π(β,E) π(β,β) f | |
| theorem manifoldScalarDifferential_chart {f : M β β} | |
| (hf : ContMDiff π(β,E) π(β,β) β f) {c : M} {y : E} | |
| (hy : y β (extChartAt π(β,E) c).target) : | |
| chartOneForm (manifoldScalarDifferential f) c y= | |
| fderiv β (f β (extChartAt π(β,E) c).symm) y := by | |
| have hi := (contMDiffOn_extChartAt_symm (I := π(β,E)) (n := β) c).contMDiffAt | |
| ((isOpen_extChartAt_target (I := π(β,E)) c).mem_nhds hy) | |
| have hd := mfderiv_comp y (hf.mdifferentiableAt (by simp)) (hi.mdifferentiableAt (by simp)) | |
| rw [mfderiv_eq_fderiv] at hd | |
| rw [chartOneForm,chartDifferential_inverse hy] | |
| exact hd.symm | |
| theorem manifoldScalar_chart_smooth {f : M β β} | |
| (hf : ContMDiff π(β,E) π(β,β) β f) (c : M) : | |
| ContDiffOn β β (f β (extChartAt π(β,E) c).symm) | |
| (extChartAt π(β,E) c).target := | |
| (hf.comp_contMDiffOn (contMDiffOn_extChartAt_symm (I := π(β,E)) (n := β) c)).contDiffOn | |
| theorem manifoldScalarDifferential_smooth {f : M β β} | |
| (hf : ContMDiff π(β,E) π(β,β) β f) (c : M) : | |
| ContDiffOn β β (chartOneForm (manifoldScalarDifferential f) c) | |
| (extChartAt π(β,E) c).target := by | |
| intro y hy | |
| have hs := (manifoldScalar_chart_smooth hf c).contDiffAt | |
| ((isOpen_extChartAt_target (I := π(β,E)) c).mem_nhds hy) | |
| have he : chartOneForm (manifoldScalarDifferential f) c =αΆ [π y] | |
| fderiv β (f β (extChartAt π(β,E) c).symm) := by | |
| filter_upwards [(isOpen_extChartAt_target (I := π(β,E)) c).mem_nhds hy] with z hz | |
| exact manifoldScalarDifferential_chart hf hz | |
| exact ((hs.fderiv_right (by simp)).congr_of_eventuallyEq he).contDiffWithinAt | |
| theorem manifoldScalarDifferential_closed {f : M β β} | |
| (hf : ContMDiff π(β,E) π(β,β) β f) (x : M) : | |
| manifoldExteriorOneForm (manifoldScalarDifferential (E := E) f) x=0 := by | |
| have hx : extChartAt π(β,E) x xβ(extChartAt π(β,E) x).target := | |
| (extChartAt π(β,E) x).map_source (mem_extChartAt_source x) | |
| have hn := (isOpen_extChartAt_target (I := π(β,E)) x).mem_nhds hx | |
| have hs := (manifoldScalar_chart_smooth hf x).contDiffAt hn | |
| have he : chartOneForm (manifoldScalarDifferential f) x =αΆ [π (extChartAt π(β,E) x x)] | |
| fderiv β (f β (extChartAt π(β,E) x).symm) := by | |
| filter_upwards [hn] with z hz | |
| exact manifoldScalarDifferential_chart hf hz | |
| apply ContinuousLinearMap.ext | |
| intro u | |
| apply ContinuousLinearMap.ext | |
| intro v | |
| change fderiv β (chartOneForm (manifoldScalarDifferential f) x) | |
| (extChartAt π(β,E) x x) (chartDifferential x x u) (chartDifferential x x v)- | |
| fderiv β (chartOneForm (manifoldScalarDifferential f) x) | |
| (extChartAt π(β,E) x x) (chartDifferential x x v) (chartDifferential x x u)=0 | |
| rw [he.fderiv_eq] | |
| exact sub_eq_zero.mpr ((hs.isSymmSndFDerivAt (by | |
| rw [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ β(β€ : ββ) | |
| exact WithTop.coe_le_coe.mpr le_top)).eq _ _) | |
| omit [IsManifold π(β,E) β M] in | |
| theorem manifoldScalarDifferential_support (f : M β β) : | |
| support (manifoldScalarDifferential (E := E) f) β tsupport f := by | |
| intro x hx | |
| by_contra hn | |
| have he : f =αΆ [π x] fun _ => (0:β) := by | |
| filter_upwards [isClosed_closure.isOpen_compl.mem_nhds hn] with y hy | |
| exact notMem_support.mp (fun hs => hy (subset_closure hs)) | |
| apply hx | |
| exact he.mfderiv_eq.trans (by | |
| rw [mfderiv_const,ContinuousLinearMap.comp_zero] | |
| rfl) | |
| end | |
| open scoped ContDiff Manifold Topology | |
| open Set Function Manifold | |
| variable {P E : Type*} [NormedAddCommGroup P] [NormedSpace β P] | |
| [NormedAddCommGroup E] [NormedSpace β E] | |
| {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] | |
| omit [IsManifold π(β,E) β M] in | |
| @[simp] theorem chartOneForm_sub (Ξ± Ξ² : ManifoldOneForm E M) (c : M) (y : E) : | |
| chartOneForm (Ξ±-Ξ²) c y=chartOneForm Ξ± c y-chartOneForm Ξ² c y := by | |
| apply ContinuousLinearMap.ext | |
| intro v | |
| rfl | |
| def glueManifoldOneForm (U : Set M) (Ξ± Ξ² : ManifoldOneForm E M) : ManifoldOneForm E M := | |
| Ξ² + extendManifoldOneForm U (Ξ±-Ξ²) | |
| omit [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] in | |
| @[simp] theorem glueManifoldOneForm_inside {U : Set M} (Ξ± Ξ² : ManifoldOneForm E M) | |
| {x : M} (hx : x β U) : glueManifoldOneForm U Ξ± Ξ² x=Ξ± x := by | |
| simp [glueManifoldOneForm,extendManifoldOneForm_inside hx] | |
| omit [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] in | |
| @[simp] theorem glueManifoldOneForm_outside {U : Set M} (Ξ± Ξ² : ManifoldOneForm E M) | |
| {x : M} (hx : x β U) : glueManifoldOneForm U Ξ± Ξ² x=Ξ² x := by | |
| simp [glueManifoldOneForm,extendManifoldOneForm_outside hx] | |
| omit [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] in | |
| theorem glueManifoldOneForm_off_support {U K : Set M} (Ξ± Ξ² : ManifoldOneForm E M) | |
| (hmatch : β x β U, x β K β Ξ± x=Ξ² x) {x : M} (hx : x β K) : | |
| glueManifoldOneForm U Ξ± Ξ² x=Ξ² x := by | |
| by_cases hu : x β U | |
| Β· rw [glueManifoldOneForm_inside Ξ± Ξ² hu,hmatch x hu hx] | |
| Β· exact glueManifoldOneForm_outside Ξ± Ξ² hu | |
| theorem glueManifoldOneForm_smooth {U K : Set M} (hU : IsOpen U) (hK : IsClosed K) | |
| (hKU : K β U) {Ξ± Ξ² : P β ManifoldOneForm E M} | |
| (hΞ± : β c, ContDiffOn β β (fun q : P Γ E => chartOneForm (Ξ± q.1) c q.2) | |
| (univ ΓΛ’ ((extChartAt π(β,E) c).target β© (extChartAt π(β,E) c).symm β»ΒΉ' U))) | |
| (hΞ² : SmoothOneFormFamily Ξ²) (hmatch : β p x, x β U β x β K β Ξ± p x=Ξ² p x) : | |
| SmoothOneFormFamily (fun p => glueManifoldOneForm U (Ξ± p) (Ξ² p)) := by | |
| have hs := extendManifoldOneForm_smooth hU hK hKU | |
| (Ξ± := fun p => Ξ± p-Ξ² p) | |
| (fun c => by | |
| simp only [chartOneForm_sub] | |
| exact (hΞ± c).sub ((hΞ² c).mono (fun _ hq => β¨hq.1,hq.2.1β©))) | |
| (fun p x hu hx => sub_eq_zero.mpr (hmatch p x hu hx)) | |
| intro c | |
| simpa only [glueManifoldOneForm,chartOneForm_add] using (hΞ² c).add (hs c) | |
| theorem glueManifoldOneForm_exterior {U K : Set M} (hU : IsOpen U) (hK : IsClosed K) | |
| (Ξ± Ξ² : ManifoldOneForm E M) (hmatch : β x β U, x β K β Ξ± x=Ξ² x) : | |
| (β x β U, manifoldExteriorOneForm (glueManifoldOneForm U Ξ± Ξ²) x=manifoldExteriorOneForm Ξ± x) β§ | |
| (β x, x β K β manifoldExteriorOneForm (glueManifoldOneForm U Ξ± Ξ²) x=manifoldExteriorOneForm Ξ² x) := by | |
| constructor | |
| Β· intro x hx | |
| apply manifoldExteriorOneForm_congr_of_eventuallyEq | |
| filter_upwards [hU.mem_nhds hx] with y hy | |
| exact glueManifoldOneForm_inside Ξ± Ξ² hy | |
| Β· intro x hx | |
| apply manifoldExteriorOneForm_congr_of_eventuallyEq | |
| filter_upwards [hK.isOpen_compl.mem_nhds hx] with y hy | |
| exact glueManifoldOneForm_off_support Ξ± Ξ² hmatch hy | |
| omit [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] in | |
| theorem glueManifoldOneForm_time {U K : Set M} (Ξ± Ξ² : β β ManifoldOneForm E M) | |
| (hmatch : β t x, x β U β x β K β Ξ± t x=Ξ² t x) (t : β) : | |
| (β x β U, manifoldTimePrimitive (fun s => glueManifoldOneForm U (Ξ± s) (Ξ² s)) t x= | |
| manifoldTimePrimitive Ξ± t x) β§ | |
| (β x, x β K β manifoldTimePrimitive (fun s => glueManifoldOneForm U (Ξ± s) (Ξ² s)) t x= | |
| manifoldTimePrimitive Ξ² t x) := by | |
| constructor | |
| Β· intro x hx | |
| unfold manifoldTimePrimitive | |
| congr 1 | |
| funext s | |
| exact glueManifoldOneForm_inside (Ξ± s) (Ξ² s) hx | |
| Β· intro x hx | |
| unfold manifoldTimePrimitive | |
| congr 1 | |
| funext s | |
| exact glueManifoldOneForm_off_support (Ξ± s) (Ξ² s) (hmatch s) hx | |
| omit [TopologicalSpace M] [ChartedSpace E M] [IsManifold π(β,E) β M] in | |
| theorem glueManifoldOneForm_initial {U : Set M} {Ξ± Ξ² : β β ManifoldOneForm E M} | |
| (hzero : β x β U, Ξ± 0 x=Ξ² 0 x) : glueManifoldOneForm U (Ξ± 0) (Ξ² 0)=Ξ² 0 := by | |
| funext x | |
| by_cases hx : x β U | |
| Β· rw [glueManifoldOneForm_inside _ _ hx,hzero x hx] | |
| Β· exact glueManifoldOneForm_outside _ _ hx | |
| end PackingSufficiencySupport.Hamiltonian | |
| end | |
| end OAI | |