Buckets:
| import OAI.Probability.ContinuumTransition.CanonicalLimit | |
| namespace OAI | |
| section | |
| open scoped Topology BigOperators | |
| open Filter Set | |
| namespace ContinuumTemperature | |
| theorem tsum_le_low_sector_add_tail {w b : ℕ → ℝ} (hw : Summable w) (hb : Summable b) | |
| (hb0 : ∀ n, 0 ≤ b n) {M : ℕ} {A : ℝ} | |
| (hlow : ∀ n, n < M → w n ≤ A) (hhigh : ∀ n, M ≤ n → w n ≤ b n) : | |
| ∑' n, w n ≤ (M : ℝ)*A + ∑' n, b n := by | |
| have hst : Summable (fun n : ℕ => w (n+M)) := | |
| hw.comp_injective (fun _ _ h => Nat.add_right_cancel h) | |
| have hbt : Summable (fun n : ℕ => b (n+M)) := | |
| hb.comp_injective (fun _ _ h => Nat.add_right_cancel h) | |
| have ht : (∑' n : ℕ, w (n+M)) ≤ ∑' n : ℕ, b (n+M) := | |
| hst.tsum_le_tsum (fun n => hhigh _ (Nat.le_add_left M n)) hbt | |
| have htail : (∑' n : ℕ, b (n+M)) ≤ ∑' n, b n := by | |
| rw [← hb.sum_add_tsum_nat_add M] | |
| exact le_add_of_nonneg_left (Finset.sum_nonneg (fun n _ => hb0 n)) | |
| have hsum : (∑ n ∈ Finset.range M, w n) ≤ (M : ℝ)*A := by | |
| calc | |
| (∑ n ∈ Finset.range M, w n) ≤ ∑ n ∈ Finset.range M, A := | |
| Finset.sum_le_sum (fun n hn => hlow n (Finset.mem_range.mp hn)) | |
| _ = _ := by simp | |
| rw [← hw.sum_add_tsum_nat_add M] | |
| exact add_le_add hsum (ht.trans htail) | |
| theorem log_affine_cube_div_tendsto_zero {D C : ℝ} (hD : 0 < D) : | |
| Tendsto (fun L : ℝ => Real.log (D*L^3+C)/L^3) atTop (𝓝 0) := by | |
| have hv : Tendsto (fun L : ℝ => L^3) atTop atTop := tendsto_pow_atTop (by norm_num) | |
| have hz : Tendsto (fun L : ℝ => D*L^3+C) atTop atTop := | |
| Filter.tendsto_atTop_add_const_right atTop C (hv.const_mul_atTop hD) | |
| have hlog := Real.isLittleO_log_id_atTop.tendsto_div_nhds_zero.comp hz | |
| have hi : Tendsto (fun L : ℝ => (L^3)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp hv | |
| have hr : Tendsto (fun L : ℝ => D+C*(L^3)⁻¹) atTop (𝓝 D) := by | |
| simpa only [mul_zero, add_zero] using tendsto_const_nhds.add (hi.const_mul C) | |
| have hh := hlog.mul hr | |
| simp only [zero_mul] at hh | |
| apply hh.congr' | |
| filter_upwards [hv.eventually (eventually_gt_atTop 0), hz.eventually (eventually_gt_atTop 0)] with L hL hzL | |
| change Real.log (D*L^3+C)/(D*L^3+C)*(D+C*(L^3)⁻¹) = _ | |
| have hn : L ≠ 0 := by rintro rfl; simp at hL | |
| field_simp [hn, ne_of_gt hzL] | |
| theorem log_tsum_div_le {w b : ℕ → ℝ} (hw : Summable w) (hb : Summable b) | |
| (hb0 : ∀ n, 0 ≤ b n) (hpos : 0 < ∑' n, w n) {M : ℕ} (hM : 0 < M) | |
| {V c : ℝ} (hV : 0 < V) (hc : 0 ≤ c) | |
| (hlow : ∀ n, n < M → w n ≤ Real.exp (V*c)) | |
| (hhigh : ∀ n, M ≤ n → w n ≤ b n) : | |
| Real.log (∑' n, w n)/V ≤ c + Real.log ((M : ℝ)+∑' n, b n)/V := by | |
| have hbS : 0 ≤ ∑' n, b n := tsum_nonneg hb0 | |
| have he : 1 ≤ Real.exp (V*c) := Real.one_le_exp (mul_nonneg hV.le hc) | |
| have hbound := tsum_le_low_sector_add_tail hw hb hb0 hlow hhigh | |
| have hbound' : ∑' n, w n ≤ ((M : ℝ)+∑' n, b n)*Real.exp (V*c) := by | |
| have hh := mul_le_mul_of_nonneg_left he hbS | |
| nlinarith only [hbound, hh] | |
| have hp : 0 < (M : ℝ)+∑' n, b n := by positivity | |
| have hlog := Real.log_le_log hpos hbound' | |
| rw [Real.log_mul hp.ne' (Real.exp_pos _).ne', Real.log_exp] at hlog | |
| calc | |
| Real.log (∑' n, w n)/V ≤ (Real.log ((M : ℝ)+∑' n, b n)+V*c)/V := | |
| div_le_div_of_nonneg_right hlog hV.le | |
| _ = _ := by field_simp; ring | |
| end ContinuumTemperature | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 3.39 kB
- Xet hash:
- f6450dae18c4a6fd5d2f1036f04a48435dfbd3efb9f7ac2ecd15441a92ae1f8d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.