File size: 1,700 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 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
|