Download data/lean/OAI/Probability/Ballisticity/Entropy/CanonicalLogExcess.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.71 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Ballisticity/Entropy/CanonicalLogExcess.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/Ballisticity/Entropy/CanonicalLogExcess.lean
-
curl -L -o CanonicalLogExcess.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Ballisticity/Entropy/CanonicalLogExcess.lean
3.71 kB
| import Mathlib | |
| import OAI.Probability.Ballisticity.Model | |
| namespace OAI | |
| section | |
| section | |
| open MeasureTheory ProbabilityTheory Filter Function | |
| open scoped ENNReal NNReal BigOperators Topology Classical | |
| namespace DirectionalTransience | |
| noncomputable def canonicalLogExcess {Ξ© : Type*} (A : β) (p : β β Ξ© β β) (Ο : Ξ©) : β := | |
| (β¨ n : β, ENNReal.ofReal (-Real.log (p n Ο)-2*A*Real.log ((n:β)+2))).toReal | |
| lemma measurable_canonicalLogExcess {Ξ© : Type*} [MeasurableSpace Ξ©] | |
| (A : β) (p : β β Ξ© β β) (hp : β n, Measurable (p n)) : | |
| Measurable (canonicalLogExcess A p) := by | |
| unfold canonicalLogExcess | |
| apply Measurable.ennreal_toReal | |
| apply Measurable.iSup | |
| intro n | |
| exact ((hp n).log.neg.sub_const _).ennreal_ofReal | |
| lemma canonicalLogExcess_nonneg {Ξ© : Type*} (A : β) (p : β β Ξ© β β) (Ο : Ξ©) : | |
| 0 β€ canonicalLogExcess A p Ο := ENNReal.toReal_nonneg | |
| lemma canonicalLogExcess_bounds {Ξ© : Type*} {A D W : β} (hA : 0 β€ A) (hD : 0 β€ D) | |
| (hW : 0 β€ W) (p : β β Ξ© β β) (Ο : Ξ©) | |
| (hp : β n, -Real.log (p n Ο) β€ A*Real.log ((n:β)+2)+D*(W+1)) : | |
| canonicalLogExcess A p Ο β€ D*(W+1) β§ | |
| (β n, -Real.log (p n Ο) β€ 2*A*Real.log ((n:β)+2)+canonicalLogExcess A p Ο) := by | |
| let S := β¨ n : β, ENNReal.ofReal (-Real.log (p n Ο)-2*A*Real.log ((n:β)+2)) | |
| have hS : S β€ ENNReal.ofReal (D*(W+1)) := by | |
| apply iSup_le | |
| intro n | |
| apply ENNReal.ofReal_le_ofReal | |
| have hn := hp n | |
| have hl : 0 β€ Real.log ((n:β)+2) := Real.log_nonneg (by have := Nat.cast_nonneg (Ξ±:=β) n; linarith) | |
| have hm : 0 β€ A*Real.log ((n:β)+2) := mul_nonneg hA hl | |
| linarith | |
| have hSt : S β β€ := ne_top_of_le_ne_top ENNReal.ofReal_ne_top hS | |
| constructor | |
| Β· have hh := ENNReal.toReal_mono ENNReal.ofReal_ne_top hS | |
| simpa only [canonicalLogExcess,S,ENNReal.toReal_ofReal (show 0 β€ D*(W+1) by positivity)] using hh | |
| Β· intro n | |
| have hn : ENNReal.ofReal (-Real.log (p n Ο)-2*A*Real.log ((n:β)+2)) β€ S := le_iSup (fun k : β => ENNReal.ofReal (-Real.log (p k Ο)-2*A*Real.log ((k:β)+2))) n | |
| have hr := (ENNReal.ofReal_le_iff_le_toReal hSt).mp hn | |
| change -Real.log (p n Ο)-2*A*Real.log ((n:β)+2) β€ canonicalLogExcess A p Ο at hr | |
| linarith | |
| noncomputable def finiteLogExcess {Ξ© : Type*} (A : β) (p : β β Ξ© β β) (N : β) (Ο : Ξ©) : β := | |
| (β¨ n : Fin (N+1), ENNReal.ofReal (-Real.log (p n Ο)-2*A*Real.log ((n:β)+2))).toReal | |
| lemma canonicalLogExcess_eq_finite {Ξ© : Type*} {A D W M : β} (hA : 0 β€ A) (hD : 0 β€ D) | |
| (hWM : W β€ M) (p : β β Ξ© β β) (Ο : Ξ©) | |
| (hp : β n, -Real.log (p n Ο) β€ A*Real.log ((n:β)+2)+D*(W+1)) | |
| (N : β) (hN : D*(M+1) β€ A*Real.log ((N:β)+2)) : | |
| canonicalLogExcess A p Ο = finiteLogExcess A p N Ο := by | |
| unfold canonicalLogExcess finiteLogExcess | |
| congr 1 | |
| apply le_antisymm | |
| Β· apply iSup_le | |
| intro n | |
| by_cases hn : n β€ N | |
| Β· exact le_iSup (fun k : Fin (N+1) => ENNReal.ofReal (-Real.log (p k Ο)-2*A*Real.log ((k:β)+2))) β¨n,by omegaβ© | |
| Β· have hlog : Real.log ((N:β)+2) β€ Real.log ((n:β)+2) := | |
| Real.log_le_log (by positivity) (by exact_mod_cast (show N+2 β€ n+2 by omega)) | |
| have hAl := mul_le_mul_of_nonneg_left hlog hA | |
| have hDW := mul_le_mul_of_nonneg_left (add_le_add_right hWM 1) hD | |
| have hp' := hp n | |
| have hzero : -Real.log (p n Ο)-2*A*Real.log ((n:β)+2) β€ 0 := by linarith | |
| rw [ENNReal.ofReal_eq_zero.mpr hzero] | |
| exact zero_le | |
| Β· apply iSup_le | |
| intro n | |
| exact le_iSup (fun k : β => ENNReal.ofReal (-Real.log (p k Ο)-2*A*Real.log ((k:β)+2))) n.val | |
| end DirectionalTransience | |
| end | |
| end | |
| end OAI | |