Download data/lean/OAI/Analysis/HardSphere/FormDomain/Basic.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.25 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/FormDomain/Basic.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/FormDomain/Basic.lean
-
curl -L -o Basic.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/FormDomain/Basic.lean
7.25 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Model | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology BigOperators | |
| namespace HardSphere | |
| lemma coordDerivative_add {N : β} {L : Length} {a : β} | |
| (f g : SmoothTest N L a) (p : Direction N) : | |
| coordDerivative N L (f.toFun + g.toFun) p = | |
| coordDerivative N L f.toFun p + coordDerivative N L g.toFun p := by | |
| funext X | |
| simp only [coordDerivative, Pi.add_apply] | |
| rw [fderiv_fun_add (f.smooth.differentiable (by simp)).differentiableAt | |
| (g.smooth.differentiable (by simp)).differentiableAt] | |
| rfl | |
| lemma coordDerivative_smul {N : β} {L : Length} {a : β} | |
| (c : β) (f : SmoothTest N L a) (p : Direction N) : | |
| coordDerivative N L (c β’ f.toFun) p = c β’ coordDerivative N L f.toFun p := by | |
| funext X | |
| simp only [coordDerivative, Pi.smul_apply] | |
| rw [fderiv_fun_const_smul (f.smooth.differentiable (by simp)).differentiableAt c] | |
| rfl | |
| lemma coordDerivative_zero (N : β) (L : Length) (p : Direction N) : | |
| coordDerivative N L 0 p = 0 := by | |
| funext X | |
| simp [coordDerivative] | |
| def SmoothTest.zero (N : β) (L : Length) (a : β) : SmoothTest N L a where | |
| toFun := 0 | |
| smooth := contDiff_const | |
| compact := HasCompactSupport.zero | |
| support_allowed := by simp | |
| memLp := MemLp.zero | |
| partial_memLp := by | |
| intro p | |
| rw [coordDerivative_zero] | |
| exact MemLp.zero | |
| def SmoothTest.add {N : β} {L : Length} {a : β} | |
| (f g : SmoothTest N L a) : SmoothTest N L a where | |
| toFun := f.toFun + g.toFun | |
| smooth := f.smooth.add g.smooth | |
| compact := f.compact.add g.compact | |
| support_allowed := (tsupport_add _ _).trans (union_subset f.support_allowed g.support_allowed) | |
| memLp := f.memLp.add g.memLp | |
| partial_memLp := by | |
| intro p | |
| rw [coordDerivative_add] | |
| exact (f.partial_memLp p).add (g.partial_memLp p) | |
| def SmoothTest.smul {N : β} {L : Length} {a : β} | |
| (c : β) (f : SmoothTest N L a) : SmoothTest N L a where | |
| toFun := c β’ f.toFun | |
| smooth := f.smooth.const_smul c | |
| compact := f.compact.smul_left | |
| support_allowed := (tsupport_smul_subset_right (fun _ β¦ c) f.toFun).trans f.support_allowed | |
| memLp := f.memLp.const_smul c | |
| partial_memLp := by | |
| intro p | |
| rw [coordDerivative_smul] | |
| exact (f.partial_memLp p).const_smul c | |
| @[simp] lemma SmoothTest.jet_zero (N : β) (L : Length) (a : β) : | |
| (SmoothTest.zero N L a).jet = 0 := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· funext p | |
| change MemLp.toLp (coordDerivative N L 0 p) ((SmoothTest.zero N L a).partial_memLp p) = 0 | |
| simp only [coordDerivative_zero, MemLp.toLp_zero] | |
| @[simp] lemma SmoothTest.jet_add {N : β} {L : Length} {a : β} | |
| (f g : SmoothTest N L a) : (f.add g).jet = f.jet + g.jet := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· funext p | |
| change _ = (f.partial_memLp p).toLp _ + (g.partial_memLp p).toLp _ | |
| rw [β MemLp.toLp_add] | |
| refine MemLp.toLp_congr ((f.add g).partial_memLp p) | |
| ((f.partial_memLp p).add (g.partial_memLp p)) ?_ | |
| exact Filter.Eventually.of_forall (congrFun (coordDerivative_add f g p)) | |
| @[simp] lemma SmoothTest.jet_smul {N : β} {L : Length} {a : β} | |
| (c : β) (f : SmoothTest N L a) : (f.smul c).jet = c β’ f.jet := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· funext p | |
| change _ = c β’ (f.partial_memLp p).toLp _ | |
| rw [β MemLp.toLp_const_smul] | |
| refine MemLp.toLp_congr ((f.smul c).partial_memLp p) | |
| ((f.partial_memLp p).const_smul c) ?_ | |
| exact Filter.Eventually.of_forall (congrFun (coordDerivative_smul c f p)) | |
| def smoothGraph (N : β) (L : Length) (a : β) : Submodule β (Jet N L) where | |
| carrier := Set.range (SmoothTest.jet (N := N) (L := L) (a := a)) | |
| zero_mem' := β¨SmoothTest.zero N L a, SmoothTest.jet_zero N L aβ© | |
| add_mem' := by | |
| rintro _ _ β¨f, rflβ© β¨g, rflβ© | |
| exact β¨f.add g, f.jet_add gβ© | |
| smul_mem' := by | |
| rintro c _ β¨f, rflβ© | |
| exact β¨f.smul c, f.jet_smul cβ© | |
| def dirichletSubmodule (N : β) (L : Length) (a : β) : Submodule β (Jet N L) := | |
| (smoothGraph N L a).topologicalClosure | |
| @[simp] lemma mem_dirichletSubmodule {N : β} {L : Length} {a : β} {u : Jet N L} : | |
| u β dirichletSubmodule N L a β u β dirichletDomain N L a := Iff.rfl | |
| def permuteConfiguration {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) | |
| (X : Configuration N L) : Configuration N L := fun i β¦ X (Ο i) | |
| lemma measurePreserving_permute {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) : | |
| MeasurePreserving (permuteConfiguration (L := L) Ο) volume volume := by | |
| have h := volume_measurePreserving_piCongrLeft (fun _ : Fin N β¦ Torus L) Ο.symm | |
| convert h using 1 | |
| funext X i | |
| simp [permuteConfiguration, MeasurableEquiv.coe_piCongrLeft, Equiv.piCongrLeft_apply] | |
| section | |
| attribute [local instance] scalarL2_addCommMonoid scalarL2_module | |
| def permutationPullback {N : β} {L : Length} (Ο : Equiv.Perm (Fin N)) : | |
| ScalarL2 N L ββ[β] ScalarL2 N L := | |
| Lp.compMeasurePreservingβ β _ (measurePreserving_permute Ο) | |
| end | |
| lemma bosonic_iff_pullback {N : β} {L : Length} (Ο : ScalarL2 N L) : | |
| bosonic Ο β β Ο, permutationPullback Ο Ο = Ο := by | |
| have hae (Ο : Equiv.Perm (Fin N)) : | |
| (permutationPullback Ο Ο : Configuration N L β β) =α΅[volume] | |
| fun X β¦ Ο (permuteConfiguration Ο X) := | |
| Lp.coeFn_compMeasurePreserving Ο (measurePreserving_permute Ο) | |
| constructor | |
| Β· intro h Ο | |
| exact Lp.ext ((hae Ο).trans (h Ο)) | |
| Β· intro h Ο | |
| have hh := hae Ο | |
| rw [h Ο] at hh | |
| exact hh.symm | |
| section | |
| attribute [local instance] scalarL2_normedAddCommGroup scalarL2_module | |
| def bosonicSubmodule (N : β) (L : Length) : Submodule β (ScalarL2 N L) := | |
| β¨ Ο : Equiv.Perm (Fin N), | |
| @LinearMap.ker β β (ScalarL2 N L) (ScalarL2 N L) | |
| Complex.instSemiring Complex.instSemiring | |
| (scalarL2_normedAddCommGroup N L).toAddCommMonoid | |
| (scalarL2_normedAddCommGroup N L).toAddCommMonoid | |
| (scalarL2_module N L) (scalarL2_module N L) (RingHom.id β) | |
| (@HSub.hSub _ _ _ | |
| (@instHSub _ (@LinearMap.instSub β β (ScalarL2 N L) (ScalarL2 N L) | |
| Complex.instSemiring Complex.instSemiring | |
| (scalarL2_normedAddCommGroup N L).toAddCommMonoid | |
| (scalarL2_normedAddCommGroup N L).toAddCommGroup | |
| (scalarL2_module N L) (scalarL2_module N L) (RingHom.id β))) | |
| (permutationPullback Ο) | |
| (@LinearMap.id β (ScalarL2 N L) Complex.instSemiring | |
| (scalarL2_normedAddCommGroup N L).toAddCommMonoid (scalarL2_module N L))) | |
| @[simp] lemma mem_bosonicSubmodule {N : β} {L : Length} {Ο : ScalarL2 N L} : | |
| Ο β bosonicSubmodule N L β bosonic Ο := by | |
| simp only [bosonicSubmodule, Submodule.mem_iInf, LinearMap.mem_ker, | |
| LinearMap.sub_apply, LinearMap.id_apply, sub_eq_zero] | |
| exact (bosonic_iff_pullback Ο).symm | |
| end | |
| def groundFormSubmodule (N : β) (L : Length) (a : β) : Submodule β (Jet N L) := | |
| dirichletSubmodule N L a β | |
| (bosonicSubmodule N L).comap (LinearMap.fst β (ScalarL2 N L) (Direction N β ScalarL2 N L)) | |
| @[simp] lemma mem_groundFormSubmodule {N : β} {L : Length} {a : β} {u : Jet N L} : | |
| u β groundFormSubmodule N L a β u β dirichletDomain N L a β§ bosonic u.1 := by | |
| simp [groundFormSubmodule] | |
| end HardSphere | |
| end | |
| end OAI | |