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