Buckets:
| import Mathlib | |
| import OAI.Probability.SKRatio.Dynamics.GaussMoment | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open scoped BigOperators | |
| open Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| namespace SKRatioClock.Clock | |
| lemma gaussianPDF_moment (v : ℝ≥0) (y x : ℝ) : | |
| gaussianPDFReal y v x = (Real.sqrt (2*Real.pi*v))⁻¹ * | |
| gaussMoment (1/(2*(v:ℝ))) 0 (x-y) := by | |
| unfold gaussianPDFReal gaussMoment | |
| simp only [pow_zero,one_mul] | |
| congr 2 | |
| ring | |
| theorem finite_gaussianPDF_approximation {v w : ℝ≥0} (hv : 0 < v) (hw : 0 < w) | |
| (hwv : w ≤ v) {ε : ℝ} (hε : 0 < ε) : | |
| ∃ (s : Finset ℝ) (c : ℝ → ℝ), | |
| (∫ x : ℝ, |gaussianPDFReal 0 w x- | |
| ∑ y ∈ s, c y*gaussianPDFReal (-y) v x|) < ε := by | |
| have hvR : (0:ℝ) < v := hv | |
| have hwR : (0:ℝ) < w := hw | |
| let kv : ℝ := (Real.sqrt (2*Real.pi*v))⁻¹ | |
| let kw : ℝ := (Real.sqrt (2*Real.pi*w))⁻¹ | |
| have hkv : 0 < kv := by dsimp [kv]; positivity | |
| have hkw : 0 < kw := by dsimp [kw]; positivity | |
| have hra : 0 < 1/(2*(v:ℝ)) := by positivity | |
| have hrab : 1/(2*(v:ℝ)) ≤ 1/(2*(w:ℝ)) := by | |
| apply one_div_le_one_div_of_le (by positivity) | |
| exact mul_le_mul_of_nonneg_left (show (w:ℝ) ≤ v from hwv) (by norm_num) | |
| obtain ⟨s,c,hc⟩ := finite_gaussian_approximation hra hrab (show 0 < ε/kw by positivity) | |
| refine ⟨s,fun y => kw*c y/kv,?_⟩ | |
| have he (x : ℝ) : |gaussianPDFReal 0 w x- | |
| ∑ y ∈ s, (kw*c y/kv)*gaussianPDFReal (-y) v x| = | |
| kw*|gaussMoment (1/(2*(w:ℝ))) 0 x- | |
| ∑ y ∈ s, c y*gaussMoment (1/(2*(v:ℝ))) 0 (x+y)| := by | |
| simp only [gaussianPDF_moment,sub_zero,sub_neg_eq_add] | |
| change |kw*gaussMoment (1/(2*(w:ℝ))) 0 x- | |
| ∑ y ∈ s, (kw*c y/kv)*(kv*gaussMoment (1/(2*(v:ℝ))) 0 (x+y))| = _ | |
| have hterm (y : ℝ) : (kw*c y/kv)*(kv*gaussMoment (1/(2*(v:ℝ))) 0 (x+y)) = | |
| kw*(c y*gaussMoment (1/(2*(v:ℝ))) 0 (x+y)) := by field_simp | |
| simp_rw [hterm] | |
| rw [← Finset.mul_sum,← mul_sub,abs_mul,abs_of_pos hkw] | |
| simp_rw [he] | |
| rw [integral_const_mul] | |
| have hh := mul_lt_mul_of_pos_left hc hkw | |
| rwa [mul_div_cancel₀ _ hkw.ne'] at hh | |
| end SKRatioClock.Clock | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 2.47 kB
- Xet hash:
- 4098e382f798e61edddf9976a00df21950f54c4f8b00c15d8b5f3662d9e36296
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.