Download data/lean/OAI/Analysis/HardSphere/Paths/Index.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 17.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Paths/Index.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Paths/Index.lean
-
curl -L -o Index.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Paths/Index.lean
17.5 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal BigOperators Topology | |
| namespace HardSphere.DyadicSkeleton | |
| abbrev Index := Fin 2 Γ β Γ β | |
| abbrev Noise := Index β unitInterval | |
| def law : Measure Noise := Measure.infinitePi (fun _ : Index β¦ volume) | |
| instance : IsProbabilityMeasure law := by unfold law; infer_instance | |
| def uniform (Ο : Noise) (j : Fin 2) (β k : β) : β := | |
| 2 * (Ο (j,β,k) : β) - 1 | |
| lemma uniform_abs_le (Ο : Noise) (j : Fin 2) (β k : β) : | |
| |uniform Ο j β k| β€ 1 := by | |
| have h := (Ο (j,β,k)).property | |
| simp only [uniform, abs_le] | |
| constructor <;> linarith [h.1,h.2] | |
| @[fun_prop] lemma measurable_uniform (j : Fin 2) (β k : β) : | |
| Measurable (fun Ο β¦ uniform Ο j β k) := by | |
| unfold uniform | |
| fun_prop | |
| def decay : β := (2:β)^(-(1:β)/4) | |
| def cvel : β := (1-decay)/2 | |
| lemma decay_pos : 0 < decay := Real.rpow_pos_of_pos (by norm_num) _ | |
| lemma decay_lt_one : decay < 1 := by | |
| exact Real.rpow_lt_one_of_one_lt_of_neg (by norm_num) (by norm_num) | |
| lemma cvel_pos : 0 < cvel := by unfold cvel; linarith [decay_lt_one] | |
| def velocity (Ο : Noise) (j : Fin 2) (i : β) : β := | |
| cvel * β' β : β, decay^β * uniform Ο j β (i/2^β) | |
| def position (Ο : Noise) (j : Fin 2) (t : β) : β := | |
| β i β Finset.range t, velocity Ο j i | |
| lemma summable_velocity (Ο : Noise) (j : Fin 2) (i : β) : | |
| Summable (fun β : β β¦ decay^β * uniform Ο j β (i/2^β)) := by | |
| apply Summable.of_norm_bounded (summable_geometric_of_lt_one decay_pos.le decay_lt_one) | |
| intro β | |
| rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (pow_nonneg decay_pos.le _)] | |
| exact (mul_le_mul_of_nonneg_left (uniform_abs_le Ο j β _) (pow_nonneg decay_pos.le _)).trans_eq (mul_one _) | |
| lemma velocity_abs_le (Ο : Noise) (j : Fin 2) (i : β) : | |
| |velocity Ο j i| β€ 1/2 := by | |
| have hsum : |β' β : β, decay^β * uniform Ο j β (i/2^β)| β€ | |
| β' β : β, decay^β := by | |
| apply (norm_tsum_le_tsum_norm (summable_velocity Ο j i).norm).trans | |
| apply Summable.tsum_le_tsum _ (summable_velocity Ο j i).norm | |
| (summable_geometric_of_lt_one decay_pos.le decay_lt_one) | |
| intro β | |
| rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (pow_nonneg decay_pos.le _)] | |
| simpa using mul_le_mul_of_nonneg_left (uniform_abs_le Ο j β _) (pow_nonneg decay_pos.le _) | |
| rw [tsum_geometric_of_lt_one decay_pos.le decay_lt_one] at hsum | |
| rw [velocity,abs_mul,abs_of_pos cvel_pos] | |
| calc | |
| _ β€ cvel * (1-decay)β»ΒΉ := mul_le_mul_of_nonneg_left hsum cvel_pos.le | |
| _ = 1/2 := by | |
| unfold cvel | |
| have hd : 1-decay β 0 := ne_of_gt (sub_pos.mpr decay_lt_one) | |
| field_simp | |
| @[fun_prop] lemma measurable_velocity (j : Fin 2) (i : β) : | |
| Measurable (fun Ο β¦ velocity Ο j i) := by | |
| unfold velocity | |
| apply Measurable.const_mul | |
| exact Measurable.tsum (fun β β¦ measurable_const.mul (measurable_uniform j β _)) | |
| @[fun_prop] lemma measurable_position (j : Fin 2) (t : β) : | |
| Measurable (fun Ο β¦ position Ο j t) := by | |
| unfold position | |
| fun_prop | |
| lemma position_succ (Ο : Noise) (j : Fin 2) (t : β) : | |
| position Ο j (t+1) = position Ο j t + velocity Ο j t := by | |
| exact Finset.sum_range_succ _ _ | |
| lemma exists_fresh_block (t k : β) (hk : 0 < k) : | |
| β β b : β, t β€ b*2^β β§ (b+1)*2^β β€ t+k β§ k β€ 4*2^β := by | |
| by_cases hk1 : k=1 | |
| Β· subst k | |
| exact β¨0,t,by simp,by simp,by norm_numβ© | |
| have hk2 : 1 β€ k/2 := by omega | |
| let β := Nat.log 2 (k/2) | |
| let d := 2^β | |
| have hd : 0 < d := by dsimp [d]; positivity | |
| have hdle : d β€ k/2 := Nat.pow_log_le_self 2 (by omega) | |
| have hdgt : k/2 < 2*d := by | |
| have h := Nat.lt_pow_succ_log_self (by decide : 1 < 2) (k/2) | |
| simpa only [Nat.pow_succ,Nat.mul_comm] using h | |
| refine β¨β,t/d+1,?_,?_,?_β© | |
| Β· change t β€ (t/d+1)*d | |
| have hβ := Nat.mod_lt t hd | |
| have hβ := Nat.mod_add_div t d | |
| nlinarith | |
| Β· change (t/d+1+1)*d β€ t+k | |
| have h := Nat.div_mul_le_self t d | |
| have hβ : 2*d β€ k := by omega | |
| nlinarith | |
| Β· change k β€ 4*d | |
| omega | |
| lemma resample_preserving (q : Index) : | |
| MeasurePreserving (fun z : Noise Γ unitInterval β¦ Function.update z.1 q z.2) | |
| (law.prod volume) law := by | |
| classical | |
| refine β¨measurable_update', ?_β© | |
| apply Measure.eq_infinitePi | |
| intro s A hA | |
| rw [Measure.map_apply measurable_update' (.pi s.countable_toSet fun i _ β¦ hA i)] | |
| by_cases hq : q β s | |
| Β· have he : (fun z : Noise Γ unitInterval β¦ Function.update z.1 q z.2) β»ΒΉ' | |
| ((s : Set Index).pi A) = ((s.erase q : Set Index).pi A) ΓΛ’ A q := by | |
| ext z | |
| simp only [mem_preimage,Set.mem_pi,Finset.mem_coe,mem_prod,Finset.mem_erase] | |
| constructor | |
| Β· intro h | |
| refine β¨fun i hi β¦ ?_, ?_β© | |
| Β· simpa [Function.update_of_ne hi.1] using h i hi.2 | |
| Β· simpa using h q hq | |
| Β· rintro β¨h,h'β© i hi | |
| by_cases hiq : i=q | |
| Β· subst i; simpa using h' | |
| Β· simpa [Function.update_of_ne hiq] using h i β¨hiq,hiβ© | |
| rw [he,Measure.prod_prod,law,Measure.infinitePi_pi _ (fun i _ β¦ hA i)] | |
| exact Finset.prod_erase_mul s (fun i β¦ volume (A i)) hq | |
| Β· have he : (fun z : Noise Γ unitInterval β¦ Function.update z.1 q z.2) β»ΒΉ' | |
| ((s : Set Index).pi A) = ((s : Set Index).pi A) ΓΛ’ univ := by | |
| ext z | |
| simp only [mem_preimage,Set.mem_pi,Finset.mem_coe,mem_prod,mem_univ,and_true] | |
| apply forall_congr' | |
| intro i | |
| apply forall_congr' | |
| intro hi | |
| have hiq : iβ q := by intro he; subst i; exact hq hi | |
| rw [Function.update_of_ne hiq] | |
| rw [he,Measure.prod_prod,measure_univ,mul_one,law, | |
| Measure.infinitePi_pi _ (fun i _ β¦ hA i)] | |
| lemma lintegral_resample (q : Index) (f : Noise β ββ₯0β) (hf : Measurable f) : | |
| (β«β» Ο, f Ο βlaw) = | |
| β«β» Ο, β«β» x : unitInterval, f (Function.update Ο q x) βvolume βlaw := by | |
| rw [β (resample_preserving q).lintegral_comp hf] | |
| exact lintegral_prod _ (hf.comp measurable_update').aemeasurable | |
| lemma velocity_update_sub (Ο : Noise) (j : Fin 2) (β b i : β) | |
| (x : unitInterval) : | |
| velocity (Function.update Ο (j,β,b) x) j i - velocity Ο j i = | |
| if i/2^β=b then cvel * decay^β * (2*((x:β)-(Ο (j,β,b):β))) else 0 := by | |
| classical | |
| rw [velocity,velocity,βmul_sub,β (summable_velocity _ j i).tsum_sub | |
| (summable_velocity Ο j i)] | |
| have he : (fun a β¦ decay^a * uniform (Function.update Ο (j,β,b) x) j a (i/2^a) - | |
| decay^a * uniform Ο j a (i/2^a)) = | |
| (fun a β¦ if a=β then decay^β * | |
| (if i/2^β=b then 2*((x:β)-(Ο (j,β,b):β)) else 0) else 0) := by | |
| funext a | |
| by_cases ha : a=β | |
| Β· subst a | |
| by_cases hi : i/2^β=b | |
| Β· simp [hi,uniform] | |
| ring | |
| Β· simp [hi,uniform] | |
| Β· simp [ha,uniform] | |
| rw [he,tsum_ite_eq] | |
| split_ifs <;> ring | |
| lemma position_update_past (Ο : Noise) (j : Fin 2) (β b t : β) | |
| (ht : t β€ b*2^β) (x : unitInterval) : | |
| position (Function.update Ο (j,β,b) x) j t = position Ο j t := by | |
| classical | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| have hi' : i < b*2^β := (Finset.mem_range.mp hi).trans_le ht | |
| have hn : i/2^β β b := by | |
| intro he | |
| have hd := Nat.div_mul_le_self i (2^β) | |
| rw [he] at hd | |
| omega | |
| have h := velocity_update_sub Ο j β b i x | |
| rw [ite_eq_right hn] at h | |
| linarith | |
| lemma block_filter (β b n : β) (hn : (b+1)*2^β β€ n) : | |
| (Finset.range n).filter (fun i β¦ i/2^β=b) = | |
| Finset.Ico (b*2^β) ((b+1)*2^β) := by | |
| ext i | |
| simp only [Finset.mem_filter,Finset.mem_range,Finset.mem_Ico] | |
| constructor | |
| Β· rintro β¨hi,hdβ© | |
| have hlo := Nat.div_mul_le_self i (2^β) | |
| have hhi := Nat.mod_lt i (by positivity : 0 < 2^β) | |
| have he := Nat.mod_add_div i (2^β) | |
| rw [hd] at hlo he | |
| constructor | |
| Β· exact hlo | |
| Β· nlinarith | |
| Β· rintro β¨hlo,hhiβ© | |
| exact β¨hhi.trans_le hn,Nat.div_eq_of_lt_le hlo hhiβ© | |
| lemma position_update_future (Ο : Noise) (j : Fin 2) (β b n : β) | |
| (hn : (b+1)*2^β β€ n) (x : unitInterval) : | |
| position (Function.update Ο (j,β,b) x) j n - position Ο j n = | |
| (2^β:β) * cvel * decay^β * (2*((x:β)-(Ο (j,β,b):β))) := by | |
| classical | |
| rw [position,position,β Finset.sum_sub_distrib] | |
| simp_rw [velocity_update_sub] | |
| rw [β Finset.sum_filter,block_filter β b n hn] | |
| simp only [Finset.sum_const,Nat.card_Ico,nsmul_eq_mul] | |
| have he : (b+1)*2^β-b*2^β=2^β := by rw [Nat.add_mul,one_mul,Nat.add_sub_cancel_left] | |
| rw [he] | |
| ring | |
| lemma position_update_other (Ο : Noise) (j j' : Fin 2) (hjj : j' β j) | |
| (β b n : β) (x : unitInterval) : | |
| position (Function.update Ο (j,β,b) x) j' n = position Ο j' n := by | |
| unfold position velocity | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| congr 1 | |
| apply tsum_congr | |
| intro a | |
| have hn : (j',a,i/2^a) β (j,β,b) := by | |
| intro h; exact hjj (congrArg Prod.fst h) | |
| simp only [uniform,Function.update_of_ne hn] | |
| lemma affine_interval_volume (A B y R : β) (hA : 0 < A) : | |
| volume {x : unitInterval | |A*(x:β)+B-y| β€ R} β€ ENNReal.ofReal (2*R/A) := by | |
| rw [unitInterval.volume_apply] | |
| have hs : Subtype.val '' {x : unitInterval | |A*(x:β)+B-y| β€ R} β | |
| Icc ((y-B-R)/A) ((y-B+R)/A) := by | |
| rintro z β¨x,hx,rflβ© | |
| change |A*(x:β)+B-y| β€ R at hx | |
| have hx' := abs_le.mp hx | |
| constructor | |
| Β· rw [div_le_iffβ hA] | |
| nlinarith | |
| Β· rw [le_div_iffβ hA] | |
| nlinarith | |
| refine (measure_mono hs).trans_eq ?_ | |
| rw [Real.volume_Icc] | |
| congr 1 | |
| ring | |
| def coordinateTest (j : Fin 2) (n : β) (y R : β) (Ο : Noise) : ββ₯0β := | |
| {Ο | |position Ο j n-y| β€ R}.indicator (fun _ β¦ 1) Ο | |
| @[fun_prop] lemma measurable_coordinateTest (j : Fin 2) (n : β) (y R : β) : | |
| Measurable (coordinateTest j n y R) := by | |
| apply measurable_const.indicator | |
| exact measurableSet_le ((measurable_position j n).sub_const y).abs measurable_const | |
| lemma coordinateTest_update_other (Ο : Noise) (j j' : Fin 2) (hjj : j' β j) | |
| (β b n : β) (y R : β) (x : unitInterval) : | |
| coordinateTest j' n y R (Function.update Ο (j,β,b) x) = | |
| coordinateTest j' n y R Ο := by | |
| simp only [coordinateTest,Set.indicator_apply,Set.mem_ofPred_eq, | |
| position_update_other Ο j j' hjj β b n x] | |
| lemma coordinateTest_update_past (Ο : Noise) (j j' : Fin 2) | |
| (β b n : β) (hn : n β€ b*2^β) (y R : β) (x : unitInterval) : | |
| coordinateTest j' n y R (Function.update Ο (j,β,b) x) = | |
| coordinateTest j' n y R Ο := by | |
| by_cases hjj : j'=j | |
| Β· subst j' | |
| simp only [coordinateTest,Set.indicator_apply,Set.mem_ofPred_eq, | |
| position_update_past Ο j β b n hn x] | |
| Β· exact coordinateTest_update_other Ο j j' hjj β b n y R x | |
| def freshScale (β : β) : β := (2^β:β) * cvel * decay^β | |
| lemma freshScale_pos (β : β) : 0 < freshScale β := by | |
| unfold freshScale | |
| exact mul_pos (mul_pos (by positivity) cvel_pos) (pow_pos decay_pos _) | |
| lemma fresh_coordinate_integral (Ο : Noise) (j : Fin 2) (β b n : β) | |
| (hn : (b+1)*2^β β€ n) (y R : β) : | |
| (β«β» x : unitInterval, coordinateTest j n y R (Function.update Ο (j,β,b) x)) β€ | |
| ENNReal.ofReal (R/freshScale β) := by | |
| let A := 2*freshScale β | |
| let B := position Ο j n - 2*freshScale β*(Ο (j,β,b):β) | |
| have he (x : unitInterval) : position (Function.update Ο (j,β,b) x) j n = | |
| A*(x:β)+B := by | |
| have h := position_update_future Ο j β b n hn x | |
| change _ = freshScale β * (2*((x:β)-(Ο (j,β,b):β))) at h | |
| dsimp only [A,B] | |
| linarith | |
| have hm : MeasurableSet {x : unitInterval | |A*(x:β)+B-y| β€ R} := by | |
| apply measurableSet_le _ measurable_const | |
| fun_prop | |
| simp only [coordinateTest,Set.indicator_apply,Set.mem_ofPred_eq,he] | |
| change (β«β» x : unitInterval, | |
| {x : unitInterval | |A*(x:β)+B-y| β€ R}.indicator (fun _ β¦ 1) x) β€ _ | |
| rw [lintegral_indicator hm] | |
| simp only [lintegral_const,Measure.restrict_apply_univ,one_mul] | |
| refine (affine_interval_volume A B y R (mul_pos (by norm_num) (freshScale_pos β))).trans_eq ?_ | |
| congr 1 | |
| dsimp only [A] | |
| field_simp | |
| lemma fresh_weighted_coordinate (j : Fin 2) (β b n : β) | |
| (hn : (b+1)*2^β β€ n) (y R : β) (H : Noise β ββ₯0β) (hH : Measurable H) | |
| (hinv : β Ο x, H (Function.update Ο (j,β,b) x) = H Ο) : | |
| (β«β» Ο, H Ο * coordinateTest j n y R Ο βlaw) β€ | |
| ENNReal.ofReal (R/freshScale β) * β«β» Ο, H Ο βlaw := by | |
| rw [lintegral_resample (j,β,b) (fun Ο β¦ H Ο * coordinateTest j n y R Ο) | |
| (hH.mul (measurable_coordinateTest j n y R))] | |
| simp_rw [hinv] | |
| calc | |
| _ = β«β» Ο, H Ο * β«β» x : unitInterval, | |
| coordinateTest j n y R (Function.update Ο (j,β,b) x) βvolume βlaw := by | |
| apply lintegral_congr | |
| intro Ο | |
| exact lintegral_const_mul _ ((measurable_coordinateTest j n y R).comp | |
| (measurable_update Ο)) | |
| _ β€ β«β» Ο, H Ο * ENNReal.ofReal (R/freshScale β) βlaw := by | |
| apply lintegral_mono | |
| intro Ο | |
| exact mul_le_mul_right (fresh_coordinate_integral Ο j β b n hn y R) (H Ο) | |
| _ = _ := by rw [lintegral_mul_const _ hH,mul_comm] | |
| def nearTest (n : β) (y : Fin 2 β β) (R : β) (Ο : Noise) : ββ₯0β := | |
| coordinateTest 0 n (y 0) R Ο * coordinateTest 1 n (y 1) R Ο | |
| @[fun_prop] lemma measurable_nearTest (n : β) (y : Fin 2 β β) (R : β) : | |
| Measurable (nearTest n y R) := | |
| (measurable_coordinateTest 0 n (y 0) R).mul (measurable_coordinateTest 1 n (y 1) R) | |
| lemma nearTest_le_one (n : β) (y : Fin 2 β β) (R : β) (Ο : Noise) : | |
| nearTest n y R Ο β€ 1 := by | |
| unfold nearTest coordinateTest | |
| simp only [Set.indicator_apply] | |
| split_ifs <;> simp_all | |
| def PastInvariant (t : β) (H : Noise β ββ₯0β) : Prop := | |
| β (j : Fin 2) (β b : β), t β€ b*2^β β β Ο x, | |
| H (Function.update Ο (j,β,b) x) = H Ο | |
| lemma nearTest_pastInvariant (n t : β) (hnt : n β€ t) (y : Fin 2 β β) (R : β) : | |
| PastInvariant t (nearTest n y R) := by | |
| intro j β b hb Ο x | |
| simp only [nearTest,coordinateTest_update_past Ο j 0 β b n (hnt.trans hb), | |
| coordinateTest_update_past Ο j 1 β b n (hnt.trans hb)] | |
| lemma fresh_weighted_pair (β b n : β) (hn : (b+1)*2^β β€ n) | |
| (y : Fin 2 β β) (R : β) (H : Noise β ββ₯0β) (hH : Measurable H) | |
| (hinv : β j : Fin 2, β Ο x, H (Function.update Ο (j,β,b) x) = H Ο) : | |
| (β«β» Ο, H Ο * nearTest n y R Ο βlaw) β€ | |
| ENNReal.ofReal (R/freshScale β)^2 * β«β» Ο, H Ο βlaw := by | |
| let a := ENNReal.ofReal (R/freshScale β) | |
| calc | |
| _ = β«β» Ο, (H Ο * coordinateTest 1 n (y 1) R Ο) * | |
| coordinateTest 0 n (y 0) R Ο βlaw := by | |
| apply lintegral_congr; intro Ο; simp only [nearTest]; ring | |
| _ β€ a * β«β» Ο, H Ο * coordinateTest 1 n (y 1) R Ο βlaw := | |
| fresh_weighted_coordinate 0 β b n hn (y 0) R _ | |
| (hH.mul (measurable_coordinateTest 1 n (y 1) R)) (by | |
| intro Ο x | |
| rw [hinv 0,coordinateTest_update_other Ο 0 1 (by decide)]) | |
| _ β€ a * (a * β«β» Ο, H Ο βlaw) := | |
| mul_le_mul_right (fresh_weighted_coordinate 1 β b n hn (y 1) R H hH (hinv 1)) a | |
| _ = _ := by ring | |
| lemma freshScale_eq_rpow (β : β) : | |
| freshScale β = cvel * ((2:β)^β)^((3:β)/4) := by | |
| have hd : decay^β = ((2:β)^β)^(-(1:β)/4) := by | |
| rw [decay,β Real.rpow_mul_natCast (by norm_num : (0:β) β€ 2), | |
| β Real.rpow_natCast_mul (by norm_num : (0:β) β€ 2)] | |
| congr 1 | |
| ring | |
| rw [freshScale,Nat.cast_pow,Nat.cast_ofNat,hd] | |
| calc | |
| _ = cvel * (((2:β)^β)^((1:β)) * ((2:β)^β)^(-(1:β)/4)) := by | |
| rw [Real.rpow_one]; ring | |
| _ = cvel * ((2:β)^β)^((1:β)+(-(1:β)/4)) := by | |
| rw [Real.rpow_add (by positivity)] | |
| _ = _ := by norm_num | |
| lemma freshScale_sq (β : β) : | |
| freshScale β ^ 2 = cvel^2 * ((2:β)^β)^((3:β)/2) := by | |
| rw [freshScale_eq_rpow,mul_pow,β Real.rpow_mul_natCast (by positivity)] | |
| norm_num | |
| lemma freshScale_gap_bound (k β : β) (hk : 0 < k) (hkβ : k β€ 4*2^β) (R : β) : | |
| (R/freshScale β)^2 β€ (16*R^2/cvel^2) * (k:β)^(-(3:β)/2) := by | |
| have hd : 0 < (2:β)^β := by positivity | |
| have hk' : 0 < (k:β) := by exact_mod_cast hk | |
| have hpow : (k:β)^((3:β)/2) β€ 16*((2:β)^β)^((3:β)/2) := by | |
| have hg : (k:β) β€ 4*(2:β)^β := by exact_mod_cast hkβ | |
| calc | |
| _ β€ (4*(2:β)^β)^((3:β)/2) := | |
| Real.rpow_le_rpow hk'.le hg (by norm_num) | |
| _ = (4:β)^((3:β)/2) * ((2:β)^β)^((3:β)/2) := | |
| Real.mul_rpow (by norm_num) hd.le | |
| _ β€ 16 * ((2:β)^β)^((3:β)/2) := by | |
| apply mul_le_mul_of_nonneg_right _ (Real.rpow_nonneg hd.le _) | |
| have h := Real.rpow_le_rpow_of_exponent_le (by norm_num : (1:β) β€ 4) | |
| (by norm_num : (3:β)/2 β€ 2) | |
| norm_num at h β’ | |
| have hc2 : 0 < cvel^2 := sq_pos_of_pos cvel_pos | |
| have hd2 : 0 < ((2:β)^β)^((3:β)/2) := Real.rpow_pos_of_pos hd _ | |
| have hk2 : 0 < (k:β)^((3:β)/2) := Real.rpow_pos_of_pos hk' _ | |
| rw [div_pow,freshScale_sq] | |
| rw [show -(3:β)/2 = -((3:β)/2) by ring,Real.rpow_neg hk'.le,β div_eq_mul_inv] | |
| apply (div_le_div_iffβ (mul_pos hc2 hd2) hk2).mpr | |
| calc | |
| _ β€ R^2 * (16*((2:β)^β)^((3:β)/2)) := | |
| mul_le_mul_of_nonneg_left hpow (sq_nonneg R) | |
| _ = _ := by field_simp [ne_of_gt cvel_pos] | |
| end HardSphere.DyadicSkeleton | |
| end | |
| end | |
| end OAI | |