Buckets:
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| namespace SharpRamseyFive.ParameterHierarchy | |
| open Filter Asymptotics | |
| open scoped Topology | |
| def beta (η : ℝ) : ℝ := η / 10000000 | |
| def L (η σ D : ℝ) : ℝ := D * σ ^ (8 * beta η) | |
| def P (η σ D R : ℝ) : ℝ := L η σ D * R | |
| structure Range (η σ D R : ℝ) : Prop where | |
| dlo : σ ^ beta η ≤ D | |
| dhi : D ≤ σ ^ (1 - η/2) | |
| rlo : σ ^ beta η ≤ R | |
| rhi : R ≤ 2 * σ ^ beta η + 2 | |
| lemma beta_pos {η : ℝ} (h : 0 < η) : 0 < beta η := by unfold beta; positivity | |
| lemma finite_bounds {η σ D R : ℝ} (hη : 0 < η) (_hη' : η < 1/10) | |
| (hσ : 1 ≤ σ) (h : Range η σ D R) : | |
| 0 < D ∧ 0 < R ∧ 1 ≤ σ ^ beta η ∧ | |
| σ ^ (9 * beta η) ≤ L η σ D ∧ L η σ D ≤ σ ∧ | |
| σ ^ (10 * beta η) ≤ P η σ D R ∧ | |
| P η σ D R ≤ 4 * σ ^ (1 - η/2 + 9 * beta η) := by | |
| have hs : 0 < σ := zero_lt_one.trans_le hσ | |
| have hb : 0 < beta η := beta_pos hη | |
| have hx : 1 ≤ σ ^ beta η := Real.one_le_rpow hσ hb.le | |
| have hd : 0 < D := (Real.rpow_pos_of_pos hs _).trans_le h.dlo | |
| have hr : 0 < R := (Real.rpow_pos_of_pos hs _).trans_le h.rlo | |
| have hlo : σ ^ (9 * beta η) ≤ L η σ D := by | |
| dsimp [L] | |
| calc | |
| _ = σ ^ beta η * σ ^ (8 * beta η) := by rw [← Real.rpow_add hs]; congr 1; ring | |
| _ ≤ _ := mul_le_mul_of_nonneg_right h.dlo (Real.rpow_nonneg hs.le _) | |
| have hhi : L η σ D ≤ σ := by | |
| dsimp [L] | |
| calc | |
| _ ≤ σ ^ (1-η/2) * σ ^ (8*beta η) := mul_le_mul_of_nonneg_right h.dhi (Real.rpow_nonneg hs.le _) | |
| _ = σ ^ (1-η/2+8*beta η) := (Real.rpow_add hs _ _).symm | |
| _ ≤ σ ^ (1:ℝ) := Real.rpow_le_rpow_of_exponent_le hσ (by dsimp [beta]; linarith) | |
| _ = σ := Real.rpow_one _ | |
| refine ⟨hd,hr,hx,hlo,hhi,?_,?_⟩ | |
| · calc | |
| _ = σ ^ (9*beta η) * σ ^ beta η := by rw [← Real.rpow_add hs]; congr 1; ring | |
| _ ≤ L η σ D * R := mul_le_mul hlo h.rlo (Real.rpow_nonneg hs.le _) (by dsimp [L]; positivity) | |
| · have hR : R ≤ 4 * σ ^ beta η := h.rhi.trans (by linarith) | |
| calc | |
| _ ≤ (σ ^ (1-η/2) * σ ^ (8*beta η)) * (4*σ ^ beta η) := by | |
| dsimp [P,L] | |
| exact mul_le_mul (mul_le_mul_of_nonneg_right h.dhi (Real.rpow_nonneg hs.le _)) hR hr.le (by positivity) | |
| _ = 4 * σ ^ (1-η/2+9*beta η) := by | |
| rw [show σ ^ (1-η/2) * σ ^ (8*beta η) * (4*σ ^ beta η) = | |
| 4 * ((σ ^ (1-η/2) * σ ^ (8*beta η)) * σ ^ beta η) by ring, | |
| ← Real.rpow_add hs, ← Real.rpow_add hs] | |
| congr 2 | |
| ring | |
| lemma ratio_bounds {η σ D R b τ : ℝ} (hη : 0 < η) (hη' : η < 1/10) | |
| (hσ : 1 ≤ σ) (h : Range η σ D R) (Cb : ℝ) (_hCb : 0 ≤ Cb) | |
| (hb : b ≤ Cb * D * σ ^ (6*beta η)) (hτ : τ ≤ σ ^ (-200*beta η)) : | |
| P η σ D R / σ ≤ 4*σ ^ (-(η/2-9*beta η)) ∧ | |
| Real.log σ / P η σ D R ≤ Real.log σ / σ ^ (10*beta η) ∧ | |
| R * Real.log (L η σ D) / P η σ D R ≤ Real.log σ / σ ^ (9*beta η) ∧ | |
| (b + P η σ D R * τ) / L η σ D ≤ Cb*σ ^ (-2*beta η) + 4*σ ^ (-199*beta η) ∧ | |
| L η σ D / P η σ D R ≤ σ ^ (-beta η) := by | |
| obtain ⟨hD,hR,hx,hL,hLhi,hP,hPhi⟩ := finite_bounds hη hη' hσ h | |
| have hs : 0 < σ := zero_lt_one.trans_le hσ | |
| have hLp : 0 < L η σ D := (Real.rpow_pos_of_pos hs _).trans_le hL | |
| have hPp : 0 < P η σ D R := (Real.rpow_pos_of_pos hs _).trans_le hP | |
| refine ⟨?_,?_,?_,?_,?_⟩ | |
| · calc | |
| _ ≤ (4*σ ^ (1-η/2+9*beta η))/σ := div_le_div_of_nonneg_right hPhi hs.le | |
| _ = _ := by | |
| rw [mul_div_assoc] | |
| have he : σ ^ (1-η/2+9*beta η) / σ = σ ^ (1-η/2+9*beta η-1) := by | |
| simpa only [Real.rpow_one] using (Real.rpow_sub hs (1-η/2+9*beta η) 1).symm | |
| rw [he] | |
| congr 2 | |
| ring | |
| · exact div_le_div_of_nonneg_left (Real.log_nonneg hσ) (Real.rpow_pos_of_pos hs _) hP | |
| · have he : R * Real.log (L η σ D) / P η σ D R = Real.log (L η σ D) / L η σ D := by | |
| dsimp [P]; field_simp | |
| rw [he] | |
| exact (div_le_div_of_nonneg_right (Real.log_le_log hLp hLhi) hLp.le).trans | |
| (div_le_div_of_nonneg_left (Real.log_nonneg hσ) (Real.rpow_pos_of_pos hs _) hL) | |
| · have hRhi : R ≤ 4*σ ^ beta η := h.rhi.trans (by linarith) | |
| have hf : (b + P η σ D R*τ)/L η σ D = b/L η σ D + R*τ := by | |
| dsimp [P]; field_simp | |
| rw [hf] | |
| have hb' : b/L η σ D ≤ Cb*σ ^ (-2*beta η) := by | |
| apply (div_le_iff₀ hLp).mpr | |
| calc | |
| b ≤ Cb*D*σ ^ (6*beta η) := hb | |
| _ = _ := by | |
| dsimp [L] | |
| rw [show Cb*σ ^ (-2*beta η)*(D*σ ^ (8*beta η)) = | |
| Cb*D*(σ ^ (-2*beta η)*σ ^ (8*beta η)) by ring, ← Real.rpow_add hs] | |
| congr 2 | |
| ring | |
| have ht' : R*τ ≤ 4*σ ^ (-199*beta η) := by | |
| calc | |
| _ ≤ R*σ ^ (-200*beta η) := mul_le_mul_of_nonneg_left hτ hR.le | |
| _ ≤ (4*σ ^ beta η)*σ ^ (-200*beta η) := | |
| mul_le_mul_of_nonneg_right hRhi (Real.rpow_nonneg hs.le _) | |
| _ = _ := by rw [mul_assoc, ← Real.rpow_add hs]; congr 2; ring | |
| exact add_le_add hb' ht' | |
| · apply (div_le_iff₀ hPp).mpr | |
| change L η σ D ≤ σ ^ (-beta η) * (L η σ D * R) | |
| have he : σ ^ (-beta η)*σ ^ beta η = 1 := by rw [← Real.rpow_add hs]; simp | |
| have hh := mul_le_mul_of_nonneg_left h.rlo (Real.rpow_nonneg hs.le (-beta η)) | |
| rw [he] at hh | |
| nlinarith | |
| theorem eventually_hierarchy {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) | |
| (Cb c A : ℝ) (hCb : 0 ≤ Cb) (hc : 0 < c) : | |
| ∀ᶠ σ : ℝ in atTop, ∀ D R b τ : ℝ, Range η σ D R → | |
| b ≤ Cb*D*σ ^ (6*beta η) → τ ≤ σ ^ (-200*beta η) → | |
| A ≤ L η σ D ∧ P η σ D R ≤ c*σ ∧ | |
| Real.log σ ≤ c*P η σ D R ∧ | |
| R*Real.log (L η σ D) ≤ c*P η σ D R ∧ | |
| b+P η σ D R*τ ≤ c*L η σ D ∧ L η σ D ≤ c*P η σ D R := by | |
| have hb : 0 < beta η := beta_pos hη | |
| have he : 0 < η/2-9*beta η := by dsimp [beta]; linarith | |
| have h1 : Tendsto (fun σ : ℝ => 4*σ ^ (-(η/2-9*beta η))) atTop (𝓝 0) := by | |
| simpa using (tendsto_rpow_neg_atTop he).const_mul 4 | |
| have h2 := (isLittleO_log_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) hb)).tendsto_div_nhds_zero | |
| have h3 := (isLittleO_log_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<9) hb)).tendsto_div_nhds_zero | |
| have h4 : Tendsto (fun σ : ℝ => Cb*σ ^ (-2*beta η)+4*σ ^ (-199*beta η)) atTop (𝓝 0) := by | |
| simpa only [neg_mul, mul_zero, zero_add] using | |
| ((tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<2) hb)).const_mul Cb).add | |
| ((tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<199) hb)).const_mul 4) | |
| have h5 := tendsto_rpow_neg_atTop hb | |
| have h6 := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<9) hb)).eventually (eventually_ge_atTop A) | |
| filter_upwards [eventually_ge_atTop (1:ℝ), h1.eventually_lt_const hc, | |
| h2.eventually_lt_const hc, h3.eventually_lt_const hc, h4.eventually_lt_const hc, | |
| h5.eventually_lt_const hc, h6] with σ hσ h1' h2' h3' h4' h5' h6' | |
| intro D R b τ h hb' hτ | |
| obtain ⟨hD,hR,_,hL,_,hP,_⟩ := finite_bounds hη hη' hσ h | |
| obtain ⟨hr1,hr2,hr3,hr4,hr5⟩ := ratio_bounds hη hη' hσ h Cb hCb hb' hτ | |
| have hLp : 0 < L η σ D := by dsimp [L]; positivity | |
| have hPp : 0 < P η σ D R := mul_pos hLp hR | |
| exact ⟨h6'.trans hL, (div_le_iff₀ (zero_lt_one.trans_le hσ)).mp (hr1.trans h1'.le), | |
| (div_le_iff₀ hPp).mp (hr2.trans h2'.le), (div_le_iff₀ hPp).mp (hr3.trans h3'.le), | |
| (div_le_iff₀ hLp).mp (hr4.trans h4'.le), (div_le_iff₀ hPp).mp (hr5.trans h5'.le)⟩ | |
| theorem eventually_power_absorption {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) | |
| (C k c : ℝ) (hC : 0 < C) (_hk : 0 ≤ k) (hc : 0 < c) : | |
| ∀ᶠ σ : ℝ in atTop, ∀ D R : ℝ, Range η σ D R → | |
| C*σ ^ k ≤ Real.exp (c*P η σ D R) := by | |
| have hb : 0 < 10*beta η := mul_pos (by norm_num) (beta_pos hη) | |
| have hlog : Tendsto (fun σ : ℝ => (Real.log C+k*Real.log σ)/σ ^ (10*beta η)) atTop (𝓝 0) := by | |
| have hconst : Tendsto (fun σ : ℝ => Real.log C/σ ^ (10*beta η)) atTop (𝓝 0) := | |
| tendsto_const_nhds.div_atTop (tendsto_rpow_atTop hb) | |
| have hvar := ((isLittleO_log_rpow_atTop hb).tendsto_div_nhds_zero).const_mul k | |
| simpa only [add_div, mul_div_assoc, mul_zero, add_zero] using hconst.add hvar | |
| filter_upwards [eventually_ge_atTop (1:ℝ), hlog.eventually_lt_const hc] with σ hσ hh | |
| intro D R h | |
| have hs : 0 < σ := zero_lt_one.trans_le hσ | |
| have hPs := (finite_bounds hη hη' hσ h).2.2.2.2.2.1 | |
| have hcost : Real.log C+k*Real.log σ ≤ c*P η σ D R := | |
| ((div_le_iff₀ (Real.rpow_pos_of_pos hs _)).mp hh.le).trans | |
| (mul_le_mul_of_nonneg_left hPs hc.le) | |
| apply (Real.log_le_iff_le_exp (mul_pos hC (Real.rpow_pos_of_pos hs _))).mp | |
| rwa [Real.log_mul hC.ne' (Real.rpow_pos_of_pos hs k).ne', Real.log_rpow hs] | |
| end SharpRamseyFive.ParameterHierarchy | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 8.88 kB
- Xet hash:
- 28b192cb3ead0d19c8dbe4da1fa3e883b25352ad424a8942dc987f3dffaacf3f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.