Download data/lean/OAI/Analysis/FreeEntropy/EntropyFiniteness.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.89 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeEntropy/EntropyFiniteness.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/FreeEntropy/EntropyFiniteness.lean
-
curl -L -o EntropyFiniteness.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeEntropy/EntropyFiniteness.lean
3.89 kB
| import OAI.Analysis.FreeEntropy.EntropyIntegral | |
| namespace OAI | |
| universe u1 | |
| noncomputable section | |
| open scoped ENNReal NNReal Topology | |
| open MeasureTheory Filter Set | |
| namespace FiniteEntropySeparation | |
| theorem lintegral_ofReal_finite {Ξ± : Type u1} [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} | |
| {f : Ξ± β β} (hf : Integrable f ΞΌ) : (β«β» x, ENNReal.ofReal (f x) βΞΌ) < β := | |
| (lintegral_ofReal_le_lintegral_enorm _).trans_lt hf.hasFiniteIntegral | |
| theorem reciprocal_posPart_finite {n a : β} (ha : 0 < a) : | |
| (β«β» s in Ioi (0 : β), ENNReal.ofReal (n/(1+s)) - ENNReal.ofReal (n/(a+s))) < β := by | |
| have hh := lintegral_ofReal_finite ((reciprocalDifference_integrable ha).const_mul n) | |
| apply lt_of_le_of_lt _ hh | |
| apply setLIntegral_mono' measurableSet_Ioi | |
| intro s hs | |
| have hs : 0 < s := hs | |
| by_cases hn : 0 β€ n | |
| Β· rw [β ENNReal.ofReal_sub _ (div_nonneg hn (by linarith : 0 β€ a+s))] | |
| apply le_of_eq | |
| congr 1 | |
| simp [reciprocalDifference, mul_sub, div_eq_mul_inv] | |
| Β· have hz : n / (1+s) β€ 0 := div_nonpos_of_nonpos_of_nonneg (le_of_not_ge hn) (by linarith) | |
| rw [ENNReal.ofReal_of_nonpos hz, zero_tsub] | |
| exact bot_le | |
| theorem reciprocal_negPart_finite {n a : β} (ha : 0 < a) : | |
| (β«β» s in Ioi (0 : β), ENNReal.ofReal (n/(a+s)) - ENNReal.ofReal (n/(1+s))) < β := by | |
| have hh := lintegral_ofReal_finite (((reciprocalDifference_integrable ha).const_mul n).neg) | |
| apply lt_of_le_of_lt _ hh | |
| apply setLIntegral_mono' measurableSet_Ioi | |
| intro s hs | |
| have hs : 0 < s := hs | |
| by_cases hn : 0 β€ n | |
| Β· rw [β ENNReal.ofReal_sub _ (div_nonneg hn (by linarith : 0 β€ 1+s))] | |
| apply le_of_eq | |
| congr 1 | |
| simp [reciprocalDifference, mul_sub, div_eq_mul_inv] | |
| Β· have hz : n / (a+s) β€ 0 := div_nonpos_of_nonpos_of_nonneg (le_of_not_ge hn) (by linarith) | |
| rw [ENNReal.ofReal_of_nonpos hz, zero_tsub] | |
| exact bot_le | |
| theorem entropy_parts_finite {f : β β ββ₯0β} {n a b : β} | |
| (ha : 0 < a) (hb : 0 < b) | |
| (hl : β s, 0 < s β ENNReal.ofReal (n/(b+s)) β€ f s) | |
| (hu : β s, 0 < s β f s β€ ENNReal.ofReal (n/(a+s))) : | |
| (β«β» s in Ioi (0 : β), ENNReal.ofReal (n/(1+s)) - f s) < β β§ | |
| (β«β» s in Ioi (0 : β), f s - ENNReal.ofReal (n/(1+s))) < β := by | |
| constructor | |
| Β· apply lt_of_le_of_lt _ (reciprocal_posPart_finite (n := n) hb) | |
| exact setLIntegral_mono' measurableSet_Ioi (fun s hs => tsub_le_tsub_left (hl s hs) _) | |
| Β· apply lt_of_le_of_lt _ (reciprocal_negPart_finite (n := n) ha) | |
| exact setLIntegral_mono' measurableSet_Ioi (fun s hs => tsub_le_tsub_right (hu s hs) _) | |
| theorem finite_entropy_expression (c : β) {P N : ββ₯0β} (hP : P < β) (hN : N < β) : | |
| β r : β, (c : EReal) + (1/2 : EReal) * P.toEReal - (1/2 : EReal) * N.toEReal = r := by | |
| refine β¨c + (1/2 : β) * P.toReal - (1/2 : β) * N.toReal, ?_β© | |
| rw [β EReal.coe_ennreal_toReal hP.ne, β EReal.coe_ennreal_toReal hN.ne] | |
| norm_cast | |
| namespace Model | |
| theorem chiStar_real (p : β) [NeZero p] (hp : 2 β€ p) (h : β) (hh : 0 < h) : | |
| β r : β, chiStar (Ο p) (X p h) (auxiliaryNoise p) = r := by | |
| have hb : 0 < h+4 := by linarith | |
| have hf := entropy_parts_finite (f := fun s => freeFisher (Ο p) (doublyNoised p h s)) | |
| (n := (p+1 : β)) hh hb | |
| (fun s hs => by simpa [add_assoc, add_comm, add_left_comm] using | |
| doublyNoised_fisher_lower p hp h s hh.le hs.le (by linarith)) | |
| (fun s hs => doublyNoised_fisher_le p h s hh.le hs.le (by linarith)) | |
| exact finite_entropy_expression _ hf.1 hf.2 | |
| theorem chiStar_finite (p : β) [NeZero p] (hp : 2 β€ p) (h : β) (hh : 0 < h) : | |
| (β₯ : EReal) < chiStar (Ο p) (X p h) (auxiliaryNoise p) β§ | |
| chiStar (Ο p) (X p h) (auxiliaryNoise p) < β€ := by | |
| obtain β¨r,hrβ© := chiStar_real p hp h hh | |
| rw [hr] | |
| exact β¨EReal.bot_lt_coe r, EReal.coe_lt_top rβ© | |
| end Model | |
| end FiniteEntropySeparation | |
| end | |
| end OAI | |