Download data/lean/OAI/Analysis/HardSphere/Paths/SkeletonHitConstant.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.32 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Paths/SkeletonHitConstant.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Paths/SkeletonHitConstant.lean
-
curl -L -o SkeletonHitConstant.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Paths/SkeletonHitConstant.lean
6.32 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Paths.LevelList | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal BigOperators Topology | |
| namespace HardSphere.DyadicSkeleton | |
| lemma occurrenceHit_le (K n : β) (hn : 0 < n) (hnK : 8*n β€ K) | |
| (d : Fin 2 β β€) (hd : βj, |d j| β€ n) (Ο Ο' : Noise) (R : β) : | |
| occurrenceHit K R (occurrenceList n d Ο) (occurrenceList n d Ο') β€ | |
| 20*β u β Finset.range (n/2+1), | |
| nearPotential u (fun j β¦ position Ο' j u) (3*R+5) Ο := by | |
| have h := oneSideHit_le K n hn hnK d hd Ο Ο' R | |
| have h' := oneSideHit_le K n hn hnK d hd Ο' Ο R | |
| simp_rw [nearPotential_swap _ _ Ο Ο'] at h' | |
| unfold occurrenceHit | |
| linarith | |
| lemma occurrenceSoft_le (K n : β) (hn : 0 < n) (hnK : 8*n β€ K) | |
| (d : Fin 2 β β€) (hd : βj, |d j| β€ n) (Ο Ο' : Noise) (B : β) (hB : 0 < B) : | |
| occurrenceSoft K B (occurrenceList n d Ο) (occurrenceList n d Ο') β€ | |
| (10*Real.exp (5/(3*B)))*β u β Finset.range (n/2+1), | |
| Real.exp (-twoCopyDistance u (Ο,Ο')/(3*B)) := by | |
| have h := level_sum_le n hn d hd Ο | |
| (fun x β¦ Real.exp (-distanceToList K x (occurrenceList n d Ο')/B)) | |
| (fun t β¦ Real.exp (5/(3*B))*Real.exp (-twoCopyDistance (min t (n-t)) (Ο,Ο')/(3*B))) | |
| (fun _ β¦ by positivity) (by | |
| intro t ht x hx | |
| rw [β Real.exp_add] | |
| apply Real.exp_le_exp.mpr | |
| have hdev := distanceToList_deviation_le K n hn hnK d hd Ο Ο' t ht x hx | |
| have hBp : 0 < 3*B := by positivity | |
| rw [β add_div] | |
| apply (le_div_iffβ hBp).mpr | |
| have he : (-distanceToList K x (occurrenceList n d Ο')/B)*(3*B) = | |
| -3*distanceToList K x (occurrenceList n d Ο') := by field_simp | |
| rw [he] | |
| linarith) | |
| have hf := folded_sum_le n | |
| (fun u β¦ Real.exp (-twoCopyDistance u (Ο,Ο')/(3*B))) (fun _ β¦ (Real.exp_pos _).le) | |
| change occurrenceSoft K B _ _ β€ _ at h | |
| simp_rw [β Finset.mul_sum] at h | |
| have hpos : 0 < Real.exp (5/(3*B)) := Real.exp_pos _ | |
| nlinarith | |
| def skeletonHitConstant : β := hitConstant/720 | |
| lemma skeletonHitConstant_pos : 0 < skeletonHitConstant := div_pos hitConstant_pos (by norm_num) | |
| theorem skeleton_hit_moment (K n : β) (hn : 0 < n) (hnK : 8*n β€ K) | |
| (d : Fin 2 β β€) (hd : βj, |d j| β€ n) (R : β) : | |
| (β«β» z : Noise Γ Noise, ENNReal.ofReal (Real.exp | |
| ((skeletonHitConstant/(1+(R:β))^2) * | |
| occurrenceHit K (R:β) (occurrenceList n d z.1) (occurrenceList n d z.2))) | |
| βlaw.prod law) β€ 2 := by | |
| have hcoeff : skeletonHitConstant/(1+(R:β))^2*20 β€ | |
| hitConstant/(1+((3*R+5:β):β))^2 := by | |
| have hR : 0 β€ (R:β) := by positivity | |
| have hden : (1+((3*R+5:β):β))^2 β€ 36*(1+(R:β))^2 := by | |
| push_cast | |
| nlinarith | |
| calc | |
| _ = hitConstant/(36*(1+(R:β))^2) := by | |
| unfold skeletonHitConstant | |
| field_simp | |
| ring | |
| _ β€ _ := div_le_div_of_nonneg_left hitConstant_pos.le (by positivity) hden | |
| refine le_trans (lintegral_mono (fun z β¦ ?_)) (two_copy_hit_moment (n/2) (3*R+5)) | |
| apply ENNReal.ofReal_le_ofReal | |
| apply Real.exp_le_exp.mpr | |
| have h := occurrenceHit_le K n hn hnK d hd z.1 z.2 (R:β) | |
| have ha : 0 β€ skeletonHitConstant/(1+(R:β))^2 := by | |
| exact div_nonneg skeletonHitConstant_pos.le (sq_nonneg _) | |
| calc | |
| _ β€ (skeletonHitConstant/(1+(R:β))^2) * | |
| (20*β u β Finset.range (n/2+1), | |
| nearPotential u (fun j β¦ position z.2 j u) (3*(R:β)+5) z.1) := | |
| mul_le_mul_of_nonneg_left h ha | |
| _ = (skeletonHitConstant/(1+(R:β))^2*20) * | |
| β u β Finset.range (n/2+1), | |
| nearPotential u (fun j β¦ position z.2 j u) ((3*R+5:β):β) z.1 := by | |
| push_cast | |
| ring | |
| _ β€ _ := mul_le_mul_of_nonneg_right hcoeff | |
| (Finset.sum_nonneg (fun u _ β¦ nearPotential_nonneg _ _ _ _)) | |
| theorem skeleton_soft_moment (B : β) (hB : 0 < B) : | |
| β ΞΎ : β, 0 < ΞΎ β§ β K n : β, 0 < n β 8*n β€ K β | |
| β d : Fin 2 β β€, (βj, |d j| β€ n) β | |
| (β«β» z : Noise Γ Noise, ENNReal.ofReal (Real.exp | |
| (ΞΎ*occurrenceSoft K B (occurrenceList n d z.1) (occurrenceList n d z.2))) | |
| βlaw.prod law) β€ 2 := by | |
| obtain β¨Ξ·,hΞ·,hmβ© := two_copy_soft_moment (3*B) (by positivity) | |
| let C : β := 10*Real.exp (5/(3*B)) | |
| have hC : 0 < C := by dsimp [C]; positivity | |
| refine β¨Ξ·/C,div_pos hΞ· hC,fun K n hn hnK d hd β¦ ?_β© | |
| refine le_trans (lintegral_mono (fun z β¦ ?_)) (hm (n/2)) | |
| apply ENNReal.ofReal_le_ofReal | |
| apply Real.exp_le_exp.mpr | |
| calc | |
| _ β€ (Ξ·/C)*(C*β u β Finset.range (n/2+1), | |
| Real.exp (-twoCopyDistance u z/(3*B))) := | |
| mul_le_mul_of_nonneg_left (occurrenceSoft_le K n hn hnK d hd z.1 z.2 B hB) | |
| (div_pos hΞ· hC).le | |
| _ = _ := by field_simp | |
| instance listVertexMeasurableSpace : MeasurableSpace (List Vertex) := β€ | |
| instance listVertexDiscreteMeasurableSpace : DiscreteMeasurableSpace (List Vertex) := β¨fun _ β¦ trivialβ© | |
| @[fun_prop] lemma measurable_levelList (n : β) (d : Fin 2 β β€) (t : β) : | |
| Measurable (fun Ο β¦ levelList n d Ο t) := by | |
| cases t with | |
| | zero => | |
| exact (measurable_of_countable (fun a : Vertex β¦ [a])).comp | |
| (measurable_baseVertex n d 0) | |
| | succ t => | |
| exact (measurable_of_countable (fun a : Vertex Γ Vertex β¦ refineStep a.1 a.2)).comp | |
| ((measurable_baseVertex n d t).prodMk (measurable_baseVertex n d (t+1))) | |
| @[fun_prop] lemma measurable_occurrenceList (n : β) (d : Fin 2 β β€) : | |
| Measurable (occurrenceList n d) := by | |
| have hl (ts : List β) : Measurable (fun Ο β¦ ts.flatMap (levelList n d Ο)) := by | |
| induction ts with | |
| | nil => exact measurable_const | |
| | cons t ts ih => | |
| simpa only [List.flatMap_cons,Function.comp_def] using | |
| (measurable_of_countable (fun p : List Vertex Γ List Vertex β¦ p.1 ++ p.2)).comp | |
| ((measurable_levelList n d t).prodMk ih) | |
| exact hl (List.range (n+1)) | |
| def skeletonLaw (n : β) (d : Fin 2 β β€) : Measure (List Vertex) := | |
| law.map (occurrenceList n d) | |
| instance skeletonLaw_isProbability (n : β) (d : Fin 2 β β€) : | |
| IsProbabilityMeasure (skeletonLaw n d) := | |
| (Measure.isProbabilityMeasure_map_iff | |
| (measurable_occurrenceList n d).aemeasurable).mpr inferInstance | |
| end HardSphere.DyadicSkeleton | |
| end | |
| end | |
| end OAI | |