Buckets:
| import Mathlib | |
| import OAI.Probability.SphericalField.Quantiles.Entropy | |
| import OAI.Probability.SphericalField.Fields.BoundedPressure | |
| import OAI.Probability.SphericalField.Quantiles.Stationary | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace SphericalPerceptron | |
| lemma BoundedField.round_tendsto {B : β} (q : BoundedField B) (u : Time) : | |
| Tendsto (fun N => q.round N u) atTop (π (q u)) := by | |
| apply tendsto_iff_dist_tendsto_zero.mpr | |
| refine squeeze_zero (g := fun N => (1:β)/(N+1:β)) (fun N => dist_nonneg) ?_ ?_ | |
| Β· intro N; rw [Real.dist_eq]; exact q.round_error N u | |
| Β· exact_mod_cast tendsto_one_div_add_atTop_nhds_zero_nat (π := β) | |
| lemma quantileTail_tendsto {B : β} (qN : β β BoundedField B) (q : BoundedField B) | |
| (hB : B < 1) (hq : β u, Tendsto (fun N => qN N u) atTop (π (q u))) {t : β} (ht : t β€ B) : | |
| Tendsto (fun N => quantileTail ((qN N).toQuantile hB.le) t) atTop | |
| (π (quantileTail (q.toQuantile hB.le) t)) := by | |
| unfold quantileTail | |
| apply tendsto_integral_of_dominated_convergence (fun _ => (1:β)) | |
| Β· intro N | |
| exact (measurable_const.sub ((qN N).measurable.max measurable_const)).aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro N | |
| exact ae_of_all _ fun u => by | |
| change β1-max (qN N u) tβ β€ 1 | |
| rw [Real.norm_eq_abs,abs_of_nonneg (sub_nonneg.mpr (max_le ((qN N).le_bound u |>.trans hB.le) (ht.trans hB.le)))] | |
| linarith [le_max_left (qN N u) t,(qN N).nonneg u] | |
| Β· exact ae_of_all _ fun u => ((hq u).max tendsto_const_nhds).const_sub 1 | |
| lemma quantileA_tendsto_fixed {B r : β} (qN : β β BoundedField B) (q : BoundedField B) | |
| (hB : B < 1) (hq : β u, Tendsto (fun N => qN N u) atTop (π (q u))) (hr : r β Icc 0 B) : | |
| Tendsto (fun N => quantileA ((qN N).toQuantile hB.le) r) atTop | |
| (π (quantileA (q.toQuantile hB.le) r)) := by | |
| unfold quantileA | |
| simp_rw [intervalIntegral.integral_of_le hr.1] | |
| apply tendsto_integral_of_dominated_convergence (fun _ => 1/(1-B)^2) | |
| Β· intro N | |
| exact (measurable_const.div (((quantileTail_lipschitz _ ((qN N).toQuantile_measurable hB.le)).continuous.measurable).pow_const 2)).aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro N | |
| filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht | |
| rw [Real.norm_eq_abs,abs_of_nonneg (by positivity : 0 β€ 1/(quantileTail ((qN N).toQuantile hB.le) t)^2)] | |
| exact quantileA_integrand_bound _ ((qN N).toQuantile_measurable hB.le) hB | |
| (ae_of_all _ (qN N).le_bound) (ht.2.trans hr.2) | |
| Β· filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht | |
| exact tendsto_const_nhds.div ((quantileTail_tendsto qN q hB hq (ht.2.trans hr.2)).pow 2) | |
| (pow_ne_zero _ (ne_of_gt ((sub_pos.mpr hB).trans_le (quantileTail_lower _ | |
| (q.toQuantile_measurable hB.le) (ae_of_all _ q.le_bound) (ht.2.trans hr.2))))) | |
| lemma quantileA_tendsto_moving {B : β} (qN : β β BoundedField B) (q : BoundedField B) | |
| (hB : B < 1) (hq : β u, Tendsto (fun N => qN N u) atTop (π (q u))) (u : Time) : | |
| Tendsto (fun N => quantileA ((qN N).toQuantile hB.le) (qN N u)) atTop | |
| (π (quantileA (q.toQuantile hB.le) (q u))) := by | |
| have hd : Tendsto (fun N => quantileA ((qN N).toQuantile hB.le) (qN N u)- | |
| quantileA ((qN N).toQuantile hB.le) (q u)) atTop (π 0) := by | |
| rw [tendsto_zero_iff_norm_tendsto_zero] | |
| simp only [Real.norm_eq_abs] | |
| refine squeeze_zero (g := fun N => (1/(1-B)^2)*|qN N u-q u|) (fun _ => abs_nonneg _) (fun N => quantileA_abs_sub_le _ | |
| ((qN N).toQuantile_measurable hB.le) hB (ae_of_all _ (qN N).le_bound) | |
| β¨(qN N).nonneg u,(qN N).le_bound uβ© β¨q.nonneg u,q.le_bound uβ©) ?_ | |
| have ht := (((hq u).sub (tendsto_const_nhds (x := q u))).abs.const_mul (1/(1-B)^2)) | |
| simpa only [sub_self,abs_zero,mul_zero] using ht | |
| have hf := quantileA_tendsto_fixed qN q hB hq β¨q.nonneg u,q.le_bound uβ© | |
| simpa only [sub_add_cancel,zero_add] using hd.add hf | |
| lemma BoundedField.stationary_tendsto {B : β} (qN : β β BoundedField B) (q : BoundedField B) | |
| (hB : B < 1) (hq : β u, Tendsto (fun N => qN N u) atTop (π (q u))) (u : Time) : | |
| Tendsto (fun N => (qN N).stationary hB u) atTop (π (q.stationary hB u)) := | |
| (quantileA_tendsto_moving qN q hB hq u).div_const 2 | |
| lemma BoundedField.L1_tendsto {H : β} (fN : β β BoundedField H) (f : BoundedField H) | |
| (hf : β u, Tendsto (fun N => fN N u) atTop (π (f u))) : | |
| Tendsto (fun N => fieldL1 (fN N) f) atTop (π 0) := by | |
| have ht : Tendsto (fun N => β« u, |fN N u-f u| βtimeLaw) atTop | |
| (π (β« _u : Time, (0:β) βtimeLaw)) := by | |
| apply tendsto_integral_of_dominated_convergence (fun _ => H) | |
| Β· intro N; exact (((fN N).measurable.sub f.measurable).abs).aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro N | |
| exact ae_of_all _ fun u => by | |
| rw [Real.norm_eq_abs,abs_abs,abs_le] | |
| constructor <;> linarith [(fN N).nonneg u,(fN N).le_bound u,f.nonneg u,f.le_bound u] | |
| Β· exact ae_of_all _ fun u => by simpa using ((hf u).sub (tendsto_const_nhds (x := f u))).abs | |
| simpa [fieldL1] using ht | |
| lemma boundedSphericalFieldValue_tendsto_L1 {H : β} (fN : β β BoundedField H) (f : BoundedField H) | |
| (hf : Tendsto (fun N => fieldL1 (fN N) f) atTop (π 0)) (n : β) : | |
| Tendsto (fun N => boundedSphericalFieldValue (fN N) n) atTop (π (boundedSphericalFieldValue f n)) := by | |
| apply tendsto_iff_dist_tendsto_zero.mpr | |
| apply squeeze_zero (g := fun N => sphericalContinuityConstant n H*fieldL1 (fN N) f) (fun N => dist_nonneg) (fun N => ?_) (by simpa using hf.const_mul (sphericalContinuityConstant n H)) | |
| simpa only [Real.dist_eq] using boundedSphericalFieldValue_L1_continuous (fN N) f n | |
| lemma entropy_quantileTrial_tendsto {B : β} (qN : β β BoundedField B) (q : BoundedField B) | |
| (hB : B < 1) (hq : β u, Tendsto (fun N => qN N u) atTop (π (q u))) : | |
| Tendsto (fun N => (entropy (quantileTrial ((qN N).toQuantile hB.le))).toReal) atTop | |
| (π (entropy (quantileTrial (q.toQuantile hB.le))).toReal) := by | |
| have hI : Tendsto (fun N => β« t in (0:β)..B, (quantileTail ((qN N).toQuantile hB.le) t)β»ΒΉ) | |
| atTop (π (β« t in (0:β)..B, (quantileTail (q.toQuantile hB.le) t)β»ΒΉ)) := by | |
| simp_rw [intervalIntegral.integral_of_le q.bound_nonneg] | |
| apply tendsto_integral_of_dominated_convergence (fun _ => (1-B)β»ΒΉ) | |
| Β· intro N | |
| exact (((quantileTail_lipschitz _ ((qN N).toQuantile_measurable hB.le)).continuous.measurable).inv).aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro N | |
| filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht | |
| have hd := quantileTail_lower _ ((qN N).toQuantile_measurable hB.le) (ae_of_all _ (qN N).le_bound) ht.2 | |
| rw [Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr ((sub_pos.mpr hB).le.trans hd))] | |
| exact inv_antiβ (sub_pos.mpr hB) hd | |
| Β· filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht | |
| exact (quantileTail_tendsto qN q hB hq ht.2).invβ (ne_of_gt ((sub_pos.mpr hB).trans_le | |
| (quantileTail_lower _ (q.toQuantile_measurable hB.le) (ae_of_all _ q.le_bound) ht.2))) | |
| have he (f : BoundedField B) : (entropy (quantileTrial (f.toQuantile hB.le))).toReal = | |
| max (((β« t in (0:β)..B, (quantileTail (f.toQuantile hB.le) t)β»ΒΉ)+Real.log (1-B))/2) 0 := by | |
| rw [entropy_quantileTrial _ (f.toQuantile_measurable hB.le) B f.bound_nonneg hB | |
| (ae_of_all _ f.le_bound),ENNReal.toReal_ofReal'] | |
| simp_rw [he] | |
| exact ((hI.add tendsto_const_nhds).div_const 2).max tendsto_const_nhds | |
| lemma BoundedField.integral_mul_tendsto {H K : β} (fN : β β BoundedField H) (f : BoundedField H) | |
| (gN : β β BoundedField K) (g : BoundedField K) | |
| (hf : β u, Tendsto (fun N => fN N u) atTop (π (f u))) | |
| (hg : β u, Tendsto (fun N => gN N u) atTop (π (g u))) : | |
| Tendsto (fun N => β« u, fN N u*gN N u βtimeLaw) atTop (π (β« u, f u*g u βtimeLaw)) := by | |
| apply tendsto_integral_of_dominated_convergence (fun _ => H*K) | |
| Β· intro N; exact ((fN N).measurable.mul (gN N).measurable).aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro N | |
| exact ae_of_all _ fun u => by | |
| rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg ((fN N).nonneg u) ((gN N).nonneg u))] | |
| exact mul_le_mul ((fN N).le_bound u) ((gN N).le_bound u) ((gN N).nonneg u) f.bound_nonneg | |
| Β· exact ae_of_all _ fun u => (hf u).mul (hg u) | |
| end SphericalPerceptron | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 8.54 kB
- Xet hash:
- cb18a14111e9386aa742d67a7e9530482e31b3435a4e86ddce980844b333a6ea
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.