Download data/lean/OAI/Analysis/HardSphere/Bridges/Geometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Bridges/Geometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Bridges/Geometry.lean
-
curl -L -o Geometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Bridges/Geometry.lean
6.24 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped Topology | |
| namespace HardSphere.Bridge | |
| lemma power_div_identity {D : β} (hD : 0 < D) (p : β) : | |
| D^p/D = D^(p-1) := by | |
| rw [Real.rpow_sub hD,Real.rpow_one] | |
| lemma source_geometry_eventually {A b t : β} (hA : 0 < A) (hb : 0 < b) (ht : 0 < t) : | |
| βαΆ D : β in atTop, | |
| 1 β€ D β§ A/D β€ 1 β§ (A/D)^2 β€ t β§ | |
| (A/D)*D^(1/12:β) β€ 1 β§ 2*A^2 β€ D β§ 8*A^2 β€ D β§ | |
| 26*(A/D) β€ t β§ (13+Real.sqrt (2*t)*D^(1/12:β))*(A/D) β€ t β§ | |
| (Dβ»ΒΉ/t)*13 β€ (b*D^(-(1/3):β)/8)/12 β§ | |
| 3*(1+D^(1/12:β)/6) β€ D^(1/12:β) β§ | |
| A/D+2*(b*D^(-(1/3):β)/8) < b*D^(-(1/3):β) := by | |
| have h1 : Tendsto (fun D : β β¦ A/D) atTop (π 0) := by | |
| simpa [div_eq_mul_inv] using tendsto_inv_atTop_zero.const_mul A | |
| have h2 : Tendsto (fun D : β β¦ A*D^(-(11/12):β)) atTop (π 0) := by | |
| simpa using (tendsto_rpow_neg_atTop (by norm_num : (0:β) < 11/12)).const_mul A | |
| have h3 : Tendsto (fun D : β β¦ 13*(A/D)+Real.sqrt (2*t)*(A*D^(-(11/12):β))) atTop (π 0) := by | |
| simpa using (h1.const_mul 13).add (h2.const_mul (Real.sqrt (2*t))) | |
| have h4 : Tendsto (fun D : β β¦ D^(-(2/3):β)) atTop (π 0) := | |
| tendsto_rpow_neg_atTop (by norm_num) | |
| have h5 : Tendsto (fun D : β β¦ D^(1/12:β)) atTop atTop := | |
| tendsto_rpow_atTop (by norm_num) | |
| filter_upwards [eventually_ge_atTop (1:β),h1.eventually (gt_mem_nhds (by norm_num : (0:β) < 1)), | |
| (h1.pow 2).eventually (gt_mem_nhds (by simpa using ht)), | |
| h2.eventually (gt_mem_nhds (by norm_num : (0:β) < 1)), | |
| eventually_ge_atTop (8*A^2), | |
| (h1.const_mul 26).eventually (gt_mem_nhds (by simpa using ht)), | |
| h3.eventually (gt_mem_nhds ht), | |
| h4.eventually (gt_mem_nhds (by positivity : (0:β) < b*t/(96*13))), | |
| h5.eventually (eventually_ge_atTop (6:β)), | |
| h4.eventually (gt_mem_nhds (by positivity : (0:β) < 3*b/(4*A)))] with D hD hd1 hd2 hd3 hd4 hd5 hd6 hd7 hd8 hd9 | |
| have hDp : 0 < D := zero_lt_one.trans_le hD | |
| have hp : (A/D)*D^(1/12:β)=A*D^(-(11/12):β) := by | |
| calc | |
| _ = A*(D^(1/12:β)/D) := by ring | |
| _ = _ := by rw [power_div_identity hDp]; norm_num | |
| have hq : Dβ»ΒΉ = D^(-(2/3):β)*D^(-(1/3):β) := by | |
| rw [βReal.rpow_add hDp] | |
| norm_num [Real.rpow_neg_one] | |
| refine β¨hD,hd1.le,hd2.le,by rw [hp]; exact hd3.le,by nlinarith,hd4,hd5.le,?_,?_,by linarith,?_β© | |
| Β· have he : (13+Real.sqrt (2*t)*D^(1/12:β))*(A/D)= | |
| 13*(A/D)+Real.sqrt (2*t)*(A*D^(-(11/12):β)) := by rw [βhp]; ring | |
| rw [he] | |
| exact hd6.le | |
| Β· have hh := (lt_div_iffβ (by norm_num : (0:β) < 96*13)).mp hd7 | |
| rw [hq] | |
| rw [div_mul_eq_mul_div] | |
| apply (div_le_iffβ ht).mpr | |
| have hmul := mul_le_mul_of_nonneg_right hh.le (by positivity : 0 β€ D^(-(1/3):β)) | |
| nlinarith | |
| Β· have hh := (lt_div_iffβ (by positivity : (0:β) < 4*A)).mp hd9 | |
| have hmul := mul_lt_mul_of_pos_right hh (by positivity : 0 < D^(-(1/3):β)) | |
| rw [div_eq_mul_inv,hq] | |
| nlinarith | |
| lemma source_trial_geometry {A b t : β} (hA : 0 < A) (hb : 0 < b) (ht : 0 < t) : | |
| βαΆ D : β in atTop, βΞ± : β,0 < Ξ± β Ξ± β€ A β | |
| let r := Ξ±/D | |
| let n := βt/r^2ββ | |
| 1 β€ D β§ 0 < n β§ r β€ 1 β§ r*D^(1/12:β) β€ 1 β§ | |
| t/(n:β) β€ r^2 β§ (n:β)*r^2 β€ 2*t β§ | |
| 0 β€ Dβ»ΒΉ/t β§ Dβ»ΒΉ/t β€ 1 β§ | |
| 2*(t/(n:β)) β€ Dβ»ΒΉ β§ 8*t β€ (n:β)*Dβ»ΒΉ β§ | |
| 2*13/(n:β) β€ r β§ (13+Real.sqrt (2*t)*D^(1/12:β))/(n:β) β€ r β§ | |
| (Dβ»ΒΉ/t)*13 β€ (b*D^(-(1/3):β)/8)/12 β§ | |
| 3*(1+D^(1/12:β)/6) β€ D^(1/12:β) β§ | |
| r+2*(b*D^(-(1/3):β)/8) < b*D^(-(1/3):β) := by | |
| filter_upwards [source_geometry_eventually hA hb ht,eventually_ge_atTop tβ»ΒΉ] with D h hd | |
| rcases h with β¨hD,hA1,hAsq,hAR,hD2,hD8,h26,hQ,hwin,hrelax,hisoβ© | |
| intro Ξ± hΞ± hΞ±A | |
| dsimp only | |
| let r := Ξ±/D | |
| let n := βt/r^2ββ | |
| have hDp : 0 < D := zero_lt_one.trans_le hD | |
| have hr : 0 < r := by dsimp [r]; positivity | |
| have hrA : r β€ A/D := div_le_div_of_nonneg_right hΞ±A hDp.le | |
| have hn : 0 < n := Nat.ceil_pos.mpr (by positivity : 0 < t/r^2) | |
| have hnp : 0 < (n:β) := by exact_mod_cast hn | |
| have hnr : t β€ (n:β)*r^2 := by | |
| have hh := (div_le_iffβ (sq_pos_of_pos hr)).mp (Nat.le_ceil (t/r^2)) | |
| exact hh | |
| have hΟ : t/(n:β) β€ r^2 := (div_le_iffβ hnp).mpr (by nlinarith [hnr]) | |
| have hrs : r^2 β€ t := (pow_le_pow_leftβ hr.le hrA 2).trans hAsq | |
| have hup : (n:β)*r^2 β€ 2*t := by | |
| have hh := mul_le_mul_of_nonneg_right (Nat.ceil_lt_add_one (by positivity : 0 β€ t/r^2)).le (sq_nonneg r) | |
| have he : (t/r^2+1)*r^2=t+r^2 := by field_simp | |
| rw [he] at hh | |
| nlinarith | |
| have hsq : r^2 β€ Dβ»ΒΉ/8 := by | |
| calc | |
| _ β€ (A/D)^2 := pow_le_pow_leftβ hr.le hrA 2 | |
| _ β€ (1/8)/D := by | |
| apply (le_div_iffβ hDp).mpr | |
| have he : (A/D)^2*D=A^2/D := by field_simp | |
| rw [he] | |
| exact (div_le_iffβ hDp).mpr (by linarith) | |
| _ = _ := by ring | |
| have htime : Dβ»ΒΉ/t β€ 1 := by | |
| apply (div_le_iffβ ht).mpr | |
| simp only [one_mul] | |
| rw [βone_div] | |
| apply (div_le_iffβ hDp).mpr | |
| have hh := mul_le_mul_of_nonneg_left hd ht.le | |
| simpa [mul_inv_cancelβ ht.ne'] using hh | |
| have hsmall : r*D^(1/12:β) β€ 1 := (mul_le_mul_of_nonneg_right hrA (by positivity)).trans hAR | |
| have hdr : 26/(n:β) β€ r := by | |
| apply (div_le_iffβ hnp).mpr | |
| have hh : 26*r β€ t := (mul_le_mul_of_nonneg_left hrA (by norm_num)).trans h26 | |
| nlinarith | |
| have hdr' : (13+Real.sqrt (2*t)*D^(1/12:β))/(n:β) β€ r := by | |
| apply (div_le_iffβ hnp).mpr | |
| have hq : 0 β€ 13+Real.sqrt (2*t)*D^(1/12:β) := by positivity | |
| have hh := (mul_le_mul_of_nonneg_left hrA hq).trans hQ | |
| nlinarith | |
| refine β¨hD,hn,hrA.trans hA1,hsmall,hΟ,hup,by positivity,htime,?_,?_,?_,hdr',hwin,hrelax,?_β© | |
| Β· change 2*(t/(n:β)) β€ Dβ»ΒΉ | |
| nlinarith [inv_pos.mpr hDp] | |
| Β· change 8*t β€ (n:β)*Dβ»ΒΉ | |
| have hh := mul_le_mul_of_nonneg_left hsq hnp.le | |
| nlinarith | |
| Β· change 2*13/(n:β) β€ r | |
| convert hdr using 1 | |
| norm_num | |
| Β· change r+2*(b*D^(-(1/3):β)/8) < b*D^(-(1/3):β) | |
| linarith | |
| end HardSphere.Bridge | |
| end | |
| end | |
| end | |
| end OAI | |