Download data/lean/OAI/Analysis/HardSphere/PathBounds/LatticeExponentialSum.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.83 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/PathBounds/LatticeExponentialSum.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/PathBounds/LatticeExponentialSum.lean
-
curl -L -o LatticeExponentialSum.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/PathBounds/LatticeExponentialSum.lean
8.83 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Geometry.UnitCenter | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology BigOperators | |
| noncomputable section | |
| open scoped BigOperators ComplexConjugate | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped ENNReal NNReal Topology BigOperators | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Real Complex | |
| open scoped ENNReal ComplexConjugate | |
| open ProbabilityTheory | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology | |
| noncomputable section | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| namespace HardSphere | |
| open MeasureTheory Set Filter SphericalCoordinates | |
| open scoped ENNReal | |
| noncomputable section | |
| def latticeExponentialSum : β := β' z : β€, Real.exp (-|(z:β)|/3) | |
| lemma latticeExponential_summable : Summable (fun z : β€ β¦ Real.exp (-|(z:β)|/3)) := by | |
| have h : Summable (fun n : β β¦ Real.exp (-(n:β)/3)) := by | |
| have hg := summable_geometric_of_abs_lt_one (r:=Real.exp (-1/3)) (by | |
| rw [abs_of_pos (Real.exp_pos _),Real.exp_lt_one_iff]; norm_num) | |
| convert hg using 1 | |
| funext n | |
| rw [βReal.exp_nat_mul] | |
| congr 1 | |
| ring | |
| apply Summable.of_nat_of_neg | |
| Β· simpa using h | |
| Β· simpa using h | |
| lemma latticeExponentialSum_pos : 0<latticeExponentialSum := by | |
| have h := latticeExponential_summable.le_tsum 0 (fun _ _ β¦ (Real.exp_pos _).le) | |
| simp only [Int.cast_zero,abs_zero,neg_zero,zero_div,Real.exp_zero] at h | |
| exact lt_of_lt_of_le zero_lt_one h | |
| def periodicLatticeIndex {K : β} (L : Length) (x : AddCircle L.val) (v : Fin K) : β€ := | |
| (v.val:β€)-round (L.valβ»ΒΉ*((v.val:β)+1/2-((AddCircle.equivIco L.val 0) x).val))*(K:β€)- | |
| β((AddCircle.equivIco L.val 0) x).val-1/2β | |
| lemma periodicLatticeIndex_injective {K : β} {L : Length} (x : AddCircle L.val) : | |
| Function.Injective (periodicLatticeIndex (K:=K) L x) := by | |
| intro v w hvw | |
| have h := congrArg (fun z : β€ β¦ (z+β((AddCircle.equivIco L.val 0) x).val-1/2β)%(K:β€)) hvw | |
| simp only [periodicLatticeIndex,sub_add_cancel,Int.sub_mul_emod_self_right] at h | |
| rw [Int.emod_eq_of_lt (by omega) (by exact_mod_cast v.isLt), | |
| Int.emod_eq_of_lt (by omega) (by exact_mod_cast w.isLt)] at h | |
| exact Fin.ext (by exact_mod_cast h) | |
| lemma periodicLatticeIndex_bound {K : β} {L : Length} (hL : L.val=(K:β)) | |
| (x : AddCircle L.val) (v : Fin K) : | |
| |(periodicLatticeIndex L x v:β)|β€dist (((v.val:β)+1/2:β):AddCircle L.val) x+1 := by | |
| let t := ((AddCircle.equivIco L.val 0) x).val | |
| let Ξ΄ := t-1/2-(βt-1/2β:β) | |
| have hΞ΄0 : 0β€Ξ΄ := Int.fract_nonneg (t-1/2) | |
| have hΞ΄1 : Ξ΄<1 := Int.fract_lt_one (t-1/2) | |
| have hΞ΄ : |Ξ΄|β€1 := by rw [abs_of_nonneg hΞ΄0]; exact hΞ΄1.le | |
| have hd : dist (((v.val:β)+1/2:β):AddCircle L.val) x= | |
| |(periodicLatticeIndex L x v:β)-Ξ΄| := by | |
| conv_lhs => rw [β(show (t:AddCircle L.val)=x from AddCircle.coe_equivIco)] | |
| rw [dist_eq_norm,βQuotientAddGroup.mk_sub,AddCircle.norm_eq] | |
| congr 1 | |
| dsimp [periodicLatticeIndex,Ξ΄,t] | |
| push_cast | |
| rw [βhL] | |
| simp only [Int.fract] | |
| ring | |
| rw [hd] | |
| calc | |
| _ = |((periodicLatticeIndex L x v:β)-Ξ΄)+Ξ΄| := by congr 1; ring | |
| _ β€ |(periodicLatticeIndex L x v:β)-Ξ΄|+|Ξ΄| := abs_add_le _ _ | |
| _ β€ _ := add_le_add le_rfl hΞ΄ | |
| lemma circle_lattice_exponential_bound {K : β} {L : Length} (hL : L.val=(K:β)) | |
| (x : AddCircle L.val) : | |
| (β v : Fin K, Real.exp (-dist (((v.val:β)+1/2:β):AddCircle L.val) x/3))β€ | |
| Real.exp (1/3)*latticeExponentialSum := by | |
| classical | |
| calc | |
| _ β€ β v : Fin K, Real.exp (1/3)*Real.exp (-|(periodicLatticeIndex L x v:β)|/3) := by | |
| apply Finset.sum_le_sum | |
| intro v _ | |
| rw [βReal.exp_add] | |
| apply Real.exp_le_exp.mpr | |
| have h := periodicLatticeIndex_bound hL x v | |
| linarith only [h] | |
| _ = Real.exp (1/3)*β v : Fin K, Real.exp (-|(periodicLatticeIndex L x v:β)|/3) := (Finset.mul_sum ..).symm | |
| _ β€ _ := by | |
| apply mul_le_mul_of_nonneg_left _ (Real.exp_pos _).le | |
| rw [βFinset.sum_image (f:=fun z : β€ β¦ Real.exp (-|(z:β)|/3)) (s:=Finset.univ) (periodicLatticeIndex_injective x).injOn] | |
| exact latticeExponential_summable.sum_le_tsum _ (fun _ _ β¦ (Real.exp_pos _).le) | |
| lemma torus_exp_le_coordinate_exp (L : Length) (x y : Torus L) : | |
| Real.exp (-torusDistance L x y)β€Real.exp (-dist (x 0) (y 0)/3)* | |
| Real.exp (-dist (x 1) (y 1)/3)*Real.exp (-dist (x 2) (y 2)/3) := by | |
| rw [βReal.exp_add,βReal.exp_add] | |
| apply Real.exp_le_exp.mpr | |
| have h0 := coordinate_distance_le L x y 0 | |
| have h1 := coordinate_distance_le L x y 1 | |
| have h2 := coordinate_distance_le L x y 2 | |
| linarith only [h0,h1,h2] | |
| theorem unitGrid_exponential_bound : β C : β, 0<C β§ | |
| β (K : β) (L : Length), L.val=(K:β) β β x : Torus L, | |
| (β v : CubeCell K, Real.exp (-torusDistance L (unitCenter L v) x))β€C := by | |
| let B := Real.exp (1/3)*latticeExponentialSum | |
| have hB : 0<B := mul_pos (Real.exp_pos _) latticeExponentialSum_pos | |
| refine β¨B^3,pow_pos hB _,?_β© | |
| intro K L hL x | |
| let f := fun (j : Fin 3) (v : Fin K) β¦ Real.exp (-dist (((v.val:β)+1/2:β):AddCircle L.val) (x j)/3) | |
| have hb (j : Fin 3) : (β v, f j v)β€B := circle_lattice_exponential_bound hL (x j) | |
| have hn (j : Fin 3) : 0β€β v, f j v := Finset.sum_nonneg (fun _ _ β¦ (Real.exp_pos _).le) | |
| calc | |
| _ β€ β v : CubeCell K, f 0 v.1*f 1 v.2.1*f 2 v.2.2 := by | |
| apply Finset.sum_le_sum | |
| intro v _ | |
| exact torus_exp_le_coordinate_exp L (unitCenter L v) x | |
| _ = (β v, f 0 v)*(β v, f 1 v)*(β v, f 2 v) := by | |
| simp_rw [Fintype.sum_prod_type,βFinset.mul_sum,βFinset.sum_mul] | |
| rw [βFintype.sum_mul_sum] | |
| _ β€ B*B*B := mul_le_mul (mul_le_mul (hb 0) (hb 1) (hn 1) hB.le) (hb 2) (hn 2) (mul_nonneg hB.le hB.le) | |
| _ = B^3 := by ring | |
| end | |
| end HardSphere | |
| namespace HardSphere | |
| open MeasureTheory Set Filter SphericalCoordinates | |
| open scoped ENNReal | |
| noncomputable section | |
| lemma unitGrid_site_exponential_bound : β C : β, 0<C β§ | |
| β (K : β) (L : Length), L.val=(K:β) β β (A : Finset (Torus L)), A.Nonempty β | |
| (β v : CubeCell K, Real.exp (-spatialSiteDistance L A (unitCenter L v)))β€C*(A.card:β) := by | |
| obtain β¨C,hC,hβ© := unitGrid_exponential_bound | |
| refine β¨C,hC,?_β© | |
| intro K L hL A hA | |
| calc | |
| _ β€ β v : CubeCell K, β wβA, Real.exp (-torusDistance L (unitCenter L v) w) := by | |
| apply Finset.sum_le_sum | |
| intro v _ | |
| obtain β¨w,hw,heβ© := spatialSiteDistance_attained L A hA (unitCenter L v) | |
| rw [he] | |
| exact Finset.single_le_sum (f:=fun w β¦ Real.exp (-torusDistance L (unitCenter L v) w)) (fun _ _ β¦ (Real.exp_pos _).le) hw | |
| _ = β wβA, β v : CubeCell K, Real.exp (-torusDistance L (unitCenter L v) w) := Finset.sum_comm | |
| _ β€ β _wβA, C := Finset.sum_le_sum (fun w _ β¦ h K L hL w) | |
| _ = _ := by rw [Finset.sum_const, nsmul_eq_mul,mul_comm] | |
| lemma unitOccupation_full_card {n K : β} {L : Length} (hL : L.val=(K:β)) | |
| (v : CubeCell K) (X : Configuration n L) : | |
| unitOccupation hL (fun _ β¦ True) v X=Fintype.card {i : Fin n // unitSite hL (X i)=v} := by | |
| classical | |
| apply Fintype.card_congr | |
| exact { | |
| toFun := fun i β¦ β¨i.val.val,i.propertyβ© | |
| invFun := fun i β¦ β¨β¨i.val,trivialβ©,i.propertyβ© | |
| left_inv := fun _ β¦ rfl | |
| right_inv := fun _ β¦ rfl } | |
| lemma unitOccupation_sum_weight {n K : β} {L : Length} (hL : L.val=(K:β)) | |
| (a : CubeCell K β β) (X : Configuration n L) : | |
| (β v : CubeCell K, a v*(unitOccupation hL (fun _ β¦ True) v X:β))= | |
| β i : Fin n, a (unitSite hL (X i)) := by | |
| classical | |
| rw [βFintype.sum_fiberwise (fun i : Fin n β¦ unitSite hL (X i)) (fun i β¦ a (unitSite hL (X i)))] | |
| apply Finset.sum_congr rfl | |
| intro v _ | |
| simp only [unitOccupation_full_card] | |
| have he : (fun i : {i : Fin n // unitSite hL (X i)=v} β¦ a (unitSite hL (X i.val)))=fun _ β¦ a v := by | |
| funext i | |
| rw [i.property] | |
| rw [he,Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_comm] | |
| lemma weightedSiteCount_le_cell {n K : β} {L : Length} (hL : L.val=(K:β)) | |
| (A : Finset (Torus L)) (hA : A.Nonempty) (X : Configuration n L) : | |
| weightedSiteCount L A Xβ€Real.exp 1*(β v : CubeCell K, | |
| Real.exp (-spatialSiteDistance L A (unitCenter L v))*(unitOccupation hL (fun _ β¦ True) v X:β)) := by | |
| rw [unitOccupation_sum_weight,Finset.mul_sum,weightedSiteCount,ite_eq_left hA] | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| rw [βReal.exp_add] | |
| apply Real.exp_le_exp.mpr | |
| have hd := spatialSiteDistance_triangle L A (unitCenter L (unitSite hL (X i))) (X i) | |
| have hc := unitSite_dist_center hL (X i) | |
| rw [torusDistance_comm] at hd | |
| linarith only [hd,hc] | |
| end | |
| end HardSphere | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end OAI | |