Download data/lean/OAI/Probability/CriticalPercolation/Entropy/FiniteEventEntropy.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Entropy/FiniteEventEntropy.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Entropy/FiniteEventEntropy.lean
-
curl -L -o FiniteEventEntropy.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Entropy/FiniteEventEntropy.lean
1.7 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Modular.PushMass | |
| namespace OAI | |
| section | |
| section | |
| namespace CriticalPercolation.FiniteEntropy | |
| open scoped Classical | |
| variable {X Y : Type*} [Fintype X] [Fintype Y] | |
| omit [Fintype Y] in | |
| lemma supported_event_entropy (P R : X β β) (hP : β x, 0 β€ P x) | |
| (hP1 : β x, P x = 1) (hR : β x, 0 < R x) (A : Set X) | |
| (hs : β x, P x β 0 β x β A) : | |
| 0 < (β x, if x β A then R x else 0) β§ | |
| Real.log (1/(β x, if x β A then R x else 0)) β€ divergence P R := by | |
| let R' : X β β := fun x => if x β A then R x else 0 | |
| have hn : β x, 0 β€ R' x := by | |
| intro x | |
| unfold R' | |
| split_ifs | |
| Β· exact (hR x).le | |
| Β· exact le_rfl | |
| have hp : β x, 0 < P x β 0 < R' x := by | |
| intro x hx | |
| simp only [R',ite_eq_left (hs x hx.ne')] | |
| exact hR x | |
| have ho : 0 < β x, R' x := by | |
| have hh := normalizer_pos P R' hP hn hP1 hp (fun _ => 0) | |
| simpa only [Real.exp_zero,mul_one] using hh | |
| refine β¨ho,?_β© | |
| have hh := log_sum_inequality P R' hP hn hp | |
| rw [hP1,one_mul] at hh | |
| refine hh.trans_eq ?_ | |
| unfold divergence | |
| apply Finset.sum_congr rfl | |
| intro x _ | |
| by_cases hx : P x=0 | |
| Β· simp only [hx,zero_mul] | |
| Β· simp only [R',ite_eq_left (hs x hx)] | |
| omit [Fintype Y] in | |
| lemma pushMass_supported (P : X β β) (f : X β Y) (A : Set Y) | |
| (hs : β x, P x β 0 β f x β A) (y : Y) (hy : pushMass f P y β 0) : y β A := by | |
| by_contra hn | |
| apply hy | |
| unfold pushMass | |
| apply Finset.sum_eq_zero | |
| intro x _ | |
| by_cases hx : f x=y | |
| Β· rw [ite_eq_left hx] | |
| by_contra hp | |
| exact hn (hx βΈ hs x hp) | |
| Β· exact ite_eq_right hx | |
| end CriticalPercolation.FiniteEntropy | |
| end | |
| end | |
| end OAI | |