Download data/lean/OAI/Analysis/HardSphere/Geometry/FirstVariation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.39 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Geometry/FirstVariation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Geometry/FirstVariation.lean
-
curl -L -o FirstVariation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Geometry/FirstVariation.lean
7.39 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.FormDomain.Basic | |
| import OAI.Analysis.HardSphere.FormDomain.Energy | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology BigOperators | |
| open scoped BigOperators ComplexConjugate | |
| namespace HardSphere | |
| theorem IsGroundVector.first_variation {N : β} {L : Length} {a : β} | |
| {u : Jet N L} (hu : IsGroundVector N L a u) (v : Jet N L) | |
| (hv : v β dirichletDomain N L a) (hb : bosonic v.1) : | |
| (β p : Direction N, inner β (u.2 p) (v.2 p)) = | |
| (energy u : β) * inner β u.1 v.1 := by | |
| apply Variational.ground_pairing (groundFormSubmodule N L a) u | |
| Β· exact mem_groundFormSubmodule.mpr β¨hu.1, hu.2.1β© | |
| Β· exact hu.2.2.1 | |
| Β· intro w hw hn | |
| exact hu.2.2.2 w (mem_groundFormSubmodule.mp hw).1 | |
| (mem_groundFormSubmodule.mp hw).2 hn | |
| Β· exact mem_groundFormSubmodule.mpr β¨hv, hbβ© | |
| theorem IsGroundVector.rayleigh {N : β} {L : Length} {a : β} | |
| {u : Jet N L} (hu : IsGroundVector N L a u) (v : Jet N L) | |
| (hv : v β dirichletDomain N L a) (hb : bosonic v.1) : | |
| energy u * βv.1β ^ 2 β€ energy v := by | |
| exact Variational.rayleigh (groundFormSubmodule N L a) u | |
| (fun w hw hn β¦ hu.2.2.2 w (mem_groundFormSubmodule.mp hw).1 | |
| (mem_groundFormSubmodule.mp hw).2 hn) v | |
| (mem_groundFormSubmodule.mpr β¨hv, hbβ©) | |
| @[simp] lemma torusDistance_comm (L : Length) (x y : Torus L) : | |
| torusDistance L x y = torusDistance L y x := by | |
| simp only [torusDistance, dist_comm] | |
| lemma allowed_iff_ne {N : β} {L : Length} {a : β} {X : Configuration N L} : | |
| X β allowed N L a β β i j, i β j β a < torusDistance L (X i) (X j) := by | |
| constructor | |
| Β· intro h i j hij | |
| rcases lt_or_gt_of_ne hij with hlt | hgt | |
| Β· exact h i j hlt | |
| Β· simpa only [torusDistance_comm] using h j i hgt | |
| Β· intro h i j hij | |
| exact h i j (ne_of_lt hij) | |
| lemma allowed_permute {N : β} {L : Length} {a : β} | |
| (Ο : Equiv.Perm (Fin N)) (X : Configuration N L) : | |
| permuteConfiguration Ο X β allowed N L a β X β allowed N L a := by | |
| simp only [allowed_iff_ne, permuteConfiguration] | |
| constructor | |
| Β· intro h i j hij | |
| simpa using h (Ο.symm i) (Ο.symm j) (Ο.symm.injective.ne hij) | |
| Β· intro h i j hij | |
| exact h (Ο i) (Ο j) (Ο.injective.ne hij) | |
| def permuteLift {N : β} (Ο : Equiv.Perm (Fin N)) : | |
| LiftedConfiguration N βL[β] LiftedConfiguration N where | |
| toFun X := fun i β¦ X (Ο i) | |
| invFun X := fun i β¦ X (Ο.symm i) | |
| left_inv X := by funext i; simp | |
| right_inv X := by funext i; simp | |
| map_add' _ _ := rfl | |
| map_smul' _ _ := rfl | |
| continuous_toFun := continuous_pi fun _ β¦ continuous_apply _ | |
| continuous_invFun := continuous_pi fun _ β¦ continuous_apply _ | |
| lemma permuteLift_direction {N : β} (Ο : Equiv.Perm (Fin N)) (p : Direction N) : | |
| permuteLift Ο (Pi.single p.1 (Pi.single p.2 1)) = | |
| Pi.single (Ο.symm p.1) (Pi.single p.2 1) := by | |
| ext i j | |
| change (Pi.single p.1 (Pi.single p.2 (1 : β)) : LiftedConfiguration N) (Ο i) j = _ | |
| by_cases h : i = Ο.symm p.1 | |
| Β· subst i; simp | |
| Β· have h' : Ο i β p.1 := fun hh β¦ h ((Equiv.eq_symm_apply Ο).mpr hh) | |
| simp [Pi.single_eq_of_ne h, Pi.single_eq_of_ne h'] | |
| lemma coordDerivative_permute {N : β} {L : Length} {a : β} | |
| (f : SmoothTest N L a) (Ο : Equiv.Perm (Fin N)) (p : Direction N) : | |
| coordDerivative N L (f.toFun β permuteConfiguration Ο) p = | |
| coordDerivative N L f.toFun (Ο.symm p.1, p.2) β permuteConfiguration Ο := by | |
| funext X | |
| change (fderiv β ((fun Y β¦ f.toFun (project N L Y)) β permuteLift Ο) | |
| (representative N L X)) (Pi.single p.1 (Pi.single p.2 1)) = _ | |
| rw [fderiv_comp _ (f.smooth.differentiable (by simp)).differentiableAt | |
| (permuteLift Ο).differentiableAt, (permuteLift Ο).fderiv] | |
| simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, | |
| permuteLift_direction] | |
| rfl | |
| def SmoothTest.permute {N : β} {L : Length} {a : β} | |
| (f : SmoothTest N L a) (Ο : Equiv.Perm (Fin N)) : SmoothTest N L a where | |
| toFun := f.toFun β permuteConfiguration Ο | |
| smooth := f.smooth.comp (permuteLift Ο).contDiff | |
| compact := HasCompactSupport.of_compactSpace _ | |
| support_allowed := by | |
| intro X hX | |
| apply (allowed_permute Ο X).mp | |
| exact f.support_allowed | |
| (tsupport_comp_subset_preimage (f := permuteConfiguration Ο) f.toFun (continuous_pi fun i β¦ continuous_apply (Ο i)) hX) | |
| memLp := f.memLp.comp_measurePreserving (measurePreserving_permute Ο) | |
| partial_memLp := by | |
| intro p | |
| rw [coordDerivative_permute] | |
| exact (f.partial_memLp (Ο.symm p.1, p.2)).comp_measurePreserving | |
| (measurePreserving_permute Ο) | |
| section | |
| attribute [local instance] scalarL2_addCommMonoid scalarL2_module | |
| lemma continuous_permutationPullback_jet {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) : | |
| Continuous (fun u : Jet N L β¦ (permutationPullback Ο u.1, | |
| fun direction : Direction N β¦ | |
| permutationPullback Ο (u.2 (Ο.symm direction.1, direction.2)))) := by | |
| let pullback : ScalarL2 N L ββα΅’[β] ScalarL2 N L := | |
| Lp.compMeasurePreservingβα΅’ β (permuteConfiguration Ο) (measurePreserving_permute Ο) | |
| exact (pullback.continuous.comp continuous_fst).prodMk | |
| (continuous_pi fun p β¦ pullback.continuous.comp ((continuous_apply _).comp continuous_snd)) | |
| def permutationJet {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) : | |
| Jet N L βL[β] Jet N L where | |
| toFun u := (permutationPullback Ο u.1, | |
| fun p β¦ permutationPullback Ο (u.2 (Ο.symm p.1, p.2))) | |
| map_add' _ _ := by simp [map_add]; rfl | |
| map_smul' _ _ := by simp [map_smul]; rfl | |
| cont := continuous_permutationPullback_jet Ο | |
| end | |
| lemma SmoothTest.jet_permute {N : β} {L : Length} {a : β} | |
| (f : SmoothTest N L a) (Ο : Equiv.Perm (Fin N)) : | |
| (f.permute Ο).jet = permutationJet Ο f.jet := by | |
| apply Prod.ext | |
| Β· apply Lp.ext | |
| exact (MemLp.coeFn_toLp (f.permute Ο).memLp).trans | |
| ((Lp.coeFn_compMeasurePreserving f.jet.1 (measurePreserving_permute Ο)).trans | |
| ((measurePreserving_permute Ο).quasiMeasurePreserving.ae_eq_comp | |
| (MemLp.coeFn_toLp f.memLp))).symm | |
| Β· funext p | |
| apply Lp.ext | |
| have h := (measurePreserving_permute (L := L) Ο).quasiMeasurePreserving.ae_eq_comp | |
| (MemLp.coeFn_toLp (f.partial_memLp (Ο.symm p.1, p.2))) | |
| refine (MemLp.coeFn_toLp ((f.permute Ο).partial_memLp p)).trans ?_ | |
| change coordDerivative N L (f.toFun β permuteConfiguration Ο) p =α΅[volume] _ | |
| rw [coordDerivative_permute] | |
| exact ((Lp.coeFn_compMeasurePreserving _ (measurePreserving_permute Ο)).trans h).symm | |
| lemma permutationJet_mem_domain {N : β} {L : Length} {a : β} | |
| (Ο : Equiv.Perm (Fin N)) {u : Jet N L} (hu : u β dirichletDomain N L a) : | |
| permutationJet Ο u β dirichletDomain N L a := by | |
| apply map_mem_closure (permutationJet Ο).continuous hu | |
| rintro _ β¨f, rflβ© | |
| exact β¨f.permute Ο, f.jet_permute Οβ© | |
| lemma energy_permutationJet {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) | |
| (u : Jet N L) : energy (permutationJet Ο u) = energy u := by | |
| change (β p : Direction N, βLp.compMeasurePreserving _ (measurePreserving_permute Ο) | |
| (u.2 (Ο.symm p.1, p.2))β ^ 2) = _ | |
| simp only [Lp.norm_compMeasurePreserving] | |
| exact Equiv.sum_comp (Equiv.prodCongr Ο.symm (Equiv.refl (Fin 3))) | |
| (fun p β¦ βu.2 pβ ^ 2) | |
| end HardSphere | |
| end | |
| end OAI | |