Download data/lean/OAI/Analysis/HardSphere/FormDomain/HilbertJet.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 14.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/FormDomain/HilbertJet.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/FormDomain/HilbertJet.lean
-
curl -L -o HilbertJet.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/FormDomain/HilbertJet.lean
14.1 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Comparison.PermutationPullbackComp | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology BigOperators | |
| noncomputable section | |
| open scoped BigOperators ComplexConjugate | |
| namespace HardSphere | |
| attribute [local instance] scalarL2_addCommMonoid scalarL2_module scalarL2_completeSpace | |
| def optionJetEquiv (N : β) (L : Length) : | |
| (Option (Direction N) β ScalarL2 N L) βL[β] Jet N L where | |
| toLinearEquiv := LinearEquiv.piOptionEquivProd β | |
| continuous_toFun := (continuous_apply none).prodMk | |
| (continuous_pi fun i β¦ continuous_apply (some i)) | |
| continuous_invFun := continuous_pi fun i β¦ by | |
| cases i with | |
| | none => exact continuous_fst | |
| | some p => exact (continuous_apply p).comp continuous_snd | |
| def hilbertJetEquiv (N : β) (L : Length) : HilbertJet N L βL[β] Jet N L := | |
| (PiLp.continuousLinearEquiv _ β _).trans (optionJetEquiv N L) | |
| @[simp] lemma hilbertJetEquiv_fst {N : β} {L : Length} (u : HilbertJet N L) : | |
| (hilbertJetEquiv N L u).1 = u.ofLp none := rfl | |
| @[simp] lemma hilbertJetEquiv_snd {N : β} {L : Length} (u : HilbertJet N L) (p : Direction N) : | |
| (hilbertJetEquiv N L u).2 p = u.ofLp (some p) := rfl | |
| lemma hilbertJet_inner {N : β} {L : Length} (u v : HilbertJet N L) : | |
| inner β u v = inner β (hilbertJetEquiv N L u).1 (hilbertJetEquiv N L v).1 + | |
| β p : Direction N, inner β ((hilbertJetEquiv N L u).2 p) ((hilbertJetEquiv N L v).2 p) := by | |
| rw [PiLp.inner_apply,Fintype.sum_option] | |
| rfl | |
| lemma hilbertJet_norm_sq {N : β} {L : Length} (u : HilbertJet N L) : | |
| βuβ^2 = β(hilbertJetEquiv N L u).1β^2 + energy (hilbertJetEquiv N L u) := by | |
| rw [PiLp.norm_sq_eq_of_L2,Fintype.sum_option] | |
| rfl | |
| def hilbertDomain (N : β) (L : Length) (a : β) : Submodule β (HilbertJet N L) := | |
| (dirichletSubmodule N L a).comap (hilbertJetEquiv N L).toLinearMap | |
| instance hilbertDomain_closed (N : β) (L : Length) (a : β) : | |
| IsClosed (hilbertDomain N L a : Set (HilbertJet N L)) := | |
| (Submodule.isClosed_topologicalClosure _).preimage (hilbertJetEquiv N L).continuous | |
| instance hilbertDomain_complete (N : β) (L : Length) (a : β) : | |
| CompleteSpace (hilbertDomain N L a) := IsClosed.completeSpace_coe | |
| def scalarEmbedding (N : β) (L : Length) (a : β) : | |
| (hilbertDomain N L a) βL[β] ScalarL2 N L := | |
| (PiLp.proj _ _ none).comp (hilbertDomain N L a).subtypeL | |
| lemma scalarEmbedding_norm_le (N : β) (L : Length) (a : β) : βscalarEmbedding N L aβ β€ 1 := by | |
| apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one | |
| intro u | |
| simpa [scalarEmbedding] using PiLp.norm_apply_le (u : HilbertJet N L) none | |
| def formResolvent (N : β) (L : Length) (a : β) : ScalarL2 N L βL[β] ScalarL2 N L := | |
| (scalarEmbedding N L a).comp (scalarEmbedding N L a).adjoint | |
| lemma formResolvent_isPositive (N : β) (L : Length) (a : β) : | |
| (formResolvent N L a).IsPositive := by | |
| simpa [formResolvent] using | |
| ContinuousLinearMap.isPositive_adjoint_comp_self (scalarEmbedding N L a).adjoint | |
| lemma formResolvent_norm_le_one (N : β) (L : Length) (a : β) : | |
| βformResolvent N L aβ β€ 1 := by | |
| have ha : β(scalarEmbedding N L a).adjointβ = βscalarEmbedding N L aβ := | |
| ContinuousLinearMap.adjoint.norm_map _ | |
| have hadj : β(scalarEmbedding N L a).adjointβ β€ 1 := by | |
| rw [ha] | |
| exact scalarEmbedding_norm_le N L a | |
| calc | |
| _ β€ βscalarEmbedding N L aβ * β(scalarEmbedding N L a).adjointβ := | |
| ContinuousLinearMap.opNorm_comp_le _ _ | |
| _ β€ 1*1 := mul_le_mul (scalarEmbedding_norm_le N L a) | |
| hadj (ContinuousLinearMap.opNorm_nonneg _) zero_le_one | |
| _ = 1 := one_mul 1 | |
| lemma resolvent_weak_equation {N : β} {L : Length} {a : β} (f : ScalarL2 N L) | |
| (v : hilbertDomain N L a) : | |
| let u : Jet N L := hilbertJetEquiv N L ((scalarEmbedding N L a).adjoint f : HilbertJet N L) | |
| inner β u.1 (hilbertJetEquiv N L (v : HilbertJet N L)).1 + | |
| β p : Direction N, inner β (u.2 p) ((hilbertJetEquiv N L (v : HilbertJet N L)).2 p) = | |
| inner β f (scalarEmbedding N L a v) := by | |
| exact (hilbertJet_inner _ _).symm.trans | |
| (ContinuousLinearMap.adjoint_inner_left (scalarEmbedding N L a) v f) | |
| lemma IsGroundVector.resolvent_eigenvector {N : β} {L : Length} {a : β} | |
| {u : Jet N L} (hu : IsGroundVector N L a u) : | |
| formResolvent N L a u.1 = ((1+(energy u:β))β»ΒΉ) β’ u.1 := by | |
| let ug : hilbertDomain N L a := β¨(hilbertJetEquiv N L).symm u, by | |
| change hilbertJetEquiv N L ((hilbertJetEquiv N L).symm u) β dirichletSubmodule N L a | |
| simpa using hu.1β© | |
| have hE : 0 β€ energy u := Finset.sum_nonneg fun _ _ β¦ sq_nonneg _ | |
| have hne : 1+(energy u:β) β 0 := by | |
| have hreal : (1:β)+energy u β 0 := ne_of_gt (by linarith) | |
| exact_mod_cast hreal | |
| have heq : (scalarEmbedding N L a).adjoint u.1 = ((1+(energy u:β))β»ΒΉ) β’ ug := by | |
| apply ext_inner_right β | |
| intro v | |
| rw [ContinuousLinearMap.adjoint_inner_left] | |
| rw [inner_smul_left ug v ((1+(energy u:β))β»ΒΉ)] | |
| have hv : hilbertJetEquiv N L (v : HilbertJet N L) β dirichletDomain N L a := v.property | |
| have hg : inner β ug v = (1+(energy u:β))*inner β u.1 (scalarEmbedding N L a v) := by | |
| change inner β (ug : HilbertJet N L) (v : HilbertJet N L) = _ | |
| rw [hilbertJet_inner] | |
| have hgu : hilbertJetEquiv N L (ug : HilbertJet N L) = u := by simp [ug] | |
| rw [hgu,hu.full_first_variation _ hv] | |
| change inner β u.1 (scalarEmbedding N L a v) + (energy u:β)*inner β u.1 (scalarEmbedding N L a v) = _ | |
| ring | |
| rw [hg] | |
| simp only [map_invβ,map_add,map_one,Complex.conj_ofReal] | |
| rw [β mul_assoc,inv_mul_cancelβ hne,one_mul] | |
| change scalarEmbedding N L a ((scalarEmbedding N L a).adjoint u.1) = _ | |
| rw [heq,map_smul] | |
| congr 1 | |
| lemma strong_projection_limit {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| (K : Submodule β E) (Kseq : β β Submodule β E) | |
| [K.HasOrthogonalProjection] [β n, (Kseq n).HasOrthogonalProjection] | |
| (hmono : Monotone Kseq) (hle : β n, Kseq n β€ K) | |
| (hdense : closure (β n, (Kseq n : Set E)) = K) (x : E) : | |
| Tendsto (fun n β¦ (Kseq n).starProjection x) atTop (π (K.starProjection x)) := by | |
| apply Metric.tendsto_atTop.mpr | |
| intro Ξ΅ hΞ΅ | |
| have hy : K.starProjection x β closure (β n, (Kseq n : Set E)) := by | |
| rw [hdense] | |
| exact K.starProjection_apply_mem x | |
| obtain β¨v, hv, hdistβ© := Metric.mem_closure_iff.mp hy (Ξ΅/2) (half_pos hΞ΅) | |
| obtain β¨m, hmβ© := mem_iUnion.mp hv | |
| refine β¨m, fun n hn β¦ ?_β© | |
| have hvn : (Kseq n).starProjection v = v := | |
| (Kseq n).starProjection_eq_self_iff.mpr (hmono hn hm) | |
| have hcomp : (Kseq n).starProjection (K.starProjection x) = (Kseq n).starProjection x := | |
| DFunLike.congr_fun (Submodule.starProjection_comp_starProjection_of_le (hle n)) x | |
| have hnorm := (Kseq n).norm_starProjection_apply_le (K.starProjection x - v) | |
| rw [map_sub, hcomp, hvn] at hnorm | |
| calc | |
| dist ((Kseq n).starProjection x) (K.starProjection x) = | |
| β(Kseq n).starProjection x - K.starProjection xβ := dist_eq_norm _ _ | |
| _ β€ β(Kseq n).starProjection x - vβ + βv - K.starProjection xβ := norm_sub_le_norm_sub_add_norm_sub _ _ _ | |
| _ β€ βK.starProjection x - vβ + βv - K.starProjection xβ := add_le_add hnorm le_rfl | |
| _ < Ξ΅ := by rw [norm_sub_rev v]; rw [dist_eq_norm] at hdist; linarith | |
| lemma scalarAdjoint_eq_projection {N : β} {L : Length} {a : β} (f : ScalarL2 N L) : | |
| ((scalarEmbedding N L a).adjoint f : HilbertJet N L) = | |
| (hilbertDomain N L a).starProjection (PiLp.single 2 none f) := by | |
| symm | |
| apply Submodule.eq_starProjection_of_mem_of_inner_eq_zero | |
| Β· exact ((scalarEmbedding N L a).adjoint f).property | |
| Β· intro v hv | |
| rw [inner_sub_left] | |
| have hleft : inner β (PiLp.single 2 none f : HilbertJet N L) v = inner β f (v.ofLp none) := by | |
| rw [PiLp.inner_apply, Fintype.sum_option] | |
| simp | |
| rw [hleft] | |
| have hh := ContinuousLinearMap.adjoint_inner_left (scalarEmbedding N L a) β¨v,hvβ© f | |
| change inner β ((scalarEmbedding N L a).adjoint f : HilbertJet N L) v = _ at hh | |
| rw [hh] | |
| change inner β f (v.ofLp none) - inner β f (v.ofLp none) = 0 | |
| exact sub_self _ | |
| lemma formResolvent_eq_projection {N : β} {L : Length} {a : β} (f : ScalarL2 N L) : | |
| formResolvent N L a f = | |
| ((hilbertDomain N L a).starProjection (PiLp.single 2 none f)).ofLp none := by | |
| change (((scalarEmbedding N L a).adjoint f : HilbertJet N L)).ofLp none = _ | |
| rw [scalarAdjoint_eq_projection] | |
| lemma continuous_torusDistance (L : Length) : Continuous (fun p : Torus L Γ Torus L β¦ torusDistance L p.1 p.2) := by | |
| unfold torusDistance | |
| fun_prop | |
| lemma isOpen_allowed (N : β) (L : Length) (a : β) : IsOpen (allowed N L a) := by | |
| let P := {p : Fin N Γ Fin N // p.1 < p.2} | |
| have heq : allowed N L a = β p : P, {X : Configuration N L | a < torusDistance L (X p.1.1) (X p.1.2)} := by | |
| ext X | |
| simp only [allowed, mem_ofPred_eq, mem_iInter] | |
| exact β¨fun h p β¦ h _ _ p.2, fun h i j hij β¦ h β¨(i,j),hijβ©β© | |
| rw [heq] | |
| apply isOpen_iInter_of_finite | |
| intro p | |
| have hc : Continuous (fun X : Configuration N L β¦ torusDistance L (X p.1.1) (X p.1.2)) := by | |
| unfold torusDistance | |
| fun_prop | |
| exact isOpen_lt continuous_const hc | |
| lemma allowed_antitone (N : β) (L : Length) : Antitone (allowed N L) := by | |
| intro a b hab X hX i j hij | |
| exact lt_of_le_of_lt hab (hX i j hij) | |
| def innerRadius (a : β) (n : β) : β := a + 1 / ((n:β)+1) | |
| lemma innerRadius_gt (a : β) (n : β) : a < innerRadius a n := by | |
| unfold innerRadius | |
| have : 0 < 1 / ((n:β)+1) := by positivity | |
| linarith | |
| lemma innerRadius_antitone (a : β) : Antitone (innerRadius a) := by | |
| intro m n hmn | |
| unfold innerRadius | |
| apply add_le_add le_rfl | |
| apply one_div_le_one_div_of_le (by positivity) | |
| exact_mod_cast Nat.add_le_add_right hmn 1 | |
| lemma innerRadius_tendsto (a : β) : Tendsto (innerRadius a) atTop (π a) := by | |
| change Tendsto (fun n : β β¦ a + 1 / ((n:β)+1)) atTop (π a) | |
| simpa only [add_zero] using (tendsto_const_nhds (x := a)).add (tendsto_one_div_add_atTop_nhds_zero_nat (π := β)) | |
| lemma iUnion_allowed_innerRadius (N : β) (L : Length) (a : β) : | |
| (β n, allowed N L (innerRadius a n)) = allowed N L a := by | |
| apply Subset.antisymm | |
| Β· exact iUnion_subset fun n β¦ allowed_antitone N L (innerRadius_gt a n).le | |
| Β· intro X hX | |
| have h : β i j : Fin N, βαΆ n in atTop, i < j β innerRadius a n < torusDistance L (X i) (X j) := by | |
| intro i j | |
| by_cases hij : i < j | |
| Β· exact ((innerRadius_tendsto a).eventually (gt_mem_nhds (hX i j hij))).mono fun _ hn _ β¦ hn | |
| Β· exact Filter.Eventually.of_forall fun _ h β¦ (hij h).elim | |
| have hh : βαΆ n in atTop, β i j : Fin N, i < j β innerRadius a n < torusDistance L (X i) (X j) := by | |
| exact Filter.eventually_all.mpr fun i β¦ Filter.eventually_all.mpr (h i) | |
| obtain β¨n, hnβ© := hh.exists | |
| exact mem_iUnion.mpr β¨n,hnβ© | |
| lemma SmoothTest.exists_innerRadius {N : β} {L : Length} {a : β} (f : SmoothTest N L a) : | |
| β n, tsupport f.toFun β allowed N L (innerRadius a n) := by | |
| apply f.compact.isCompact.elim_directed_cover (fun n β¦ allowed N L (innerRadius a n)) | |
| Β· exact fun n β¦ isOpen_allowed _ _ _ | |
| Β· rw [iUnion_allowed_innerRadius] | |
| exact f.support_allowed | |
| Β· intro m n | |
| exact β¨max m n, allowed_antitone N L (innerRadius_antitone a (le_max_left _ _)), | |
| allowed_antitone N L (innerRadius_antitone a (le_max_right _ _))β© | |
| lemma dirichletDomain_antitone (N : β) (L : Length) : Antitone (dirichletDomain N L) := by | |
| intro a b hab | |
| apply closure_mono | |
| rintro _ β¨f,rflβ© | |
| let g : SmoothTest N L a := {f with support_allowed := fun X hX β¦ allowed_antitone N L hab (f.support_allowed hX)} | |
| exact β¨g,rflβ© | |
| lemma hilbertDomain_antitone (N : β) (L : Length) : Antitone (hilbertDomain N L) := by | |
| intro a b hab u hu | |
| exact dirichletDomain_antitone N L hab hu | |
| lemma hilbertDomain_exhaustion (N : β) (L : Length) (a : β) : | |
| closure (β n, (hilbertDomain N L (innerRadius a n) : Set (HilbertJet N L))) = hilbertDomain N L a := by | |
| apply Subset.antisymm | |
| Β· apply closure_minimal | |
| Β· exact iUnion_subset fun n β¦ hilbertDomain_antitone N L (innerRadius_gt a n).le | |
| Β· exact hilbertDomain_closed N L a | |
| Β· intro u hu | |
| let S := closure (β n, (hilbertDomain N L (innerRadius a n) : Set (HilbertJet N L))) | |
| have hclosed : IsClosed ((hilbertJetEquiv N L).symm β»ΒΉ' S) := | |
| isClosed_closure.preimage (hilbertJetEquiv N L).symm.continuous | |
| have hsub : dirichletDomain N L a β (hilbertJetEquiv N L).symm β»ΒΉ' S := by | |
| apply closure_minimal _ hclosed | |
| rintro _ β¨f,rflβ© | |
| obtain β¨n, hnβ© := f.exists_innerRadius | |
| let g : SmoothTest N L (innerRadius a n) := {f with support_allowed := hn} | |
| apply subset_closure | |
| apply mem_iUnion.mpr | |
| refine β¨n,?_β© | |
| change hilbertJetEquiv N L ((hilbertJetEquiv N L).symm f.jet) β dirichletDomain N L (innerRadius a n) | |
| simp only [ContinuousLinearEquiv.apply_symm_apply] | |
| exact subset_closure β¨g,rflβ© | |
| have hx := hsub hu | |
| change (hilbertJetEquiv N L).symm (hilbertJetEquiv N L u) β S at hx | |
| rwa [ContinuousLinearEquiv.symm_apply_apply] at hx | |
| lemma formResolvent_innerRadius_tendsto (N : β) (L : Length) (a : β) (f : ScalarL2 N L) : | |
| Tendsto (fun n β¦ formResolvent N L (innerRadius a n) f) atTop (π (formResolvent N L a f)) := by | |
| simp only [formResolvent_eq_projection] | |
| apply (PiLp.proj (π := β) 2 (fun _ : Option (Direction N) β¦ ScalarL2 N L) none).continuous.tendsto _ |>.comp | |
| apply strong_projection_limit | |
| Β· exact fun m n hmn β¦ hilbertDomain_antitone N L (innerRadius_antitone a hmn) | |
| Β· exact fun n β¦ hilbertDomain_antitone N L (innerRadius_gt a n).le | |
| Β· exact hilbertDomain_exhaustion N L a | |
| end HardSphere | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped ENNReal NNReal Topology BigOperators | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end OAI | |