lemmaaverage_deficit_lower {ι : Type uIota} [Fintype ι] (w : FinLaw ι)
(a d : ι →ℝ) {a₀ v : ℝ} (ha : ∀ i, a i ∈Set.Icc (0:ℝ) 1)
(ha₀ : 0 < a₀) (hav : a₀ ≤∑ i, w i*a i)
(hv : 2*(1-Real.log a₀) ≤ v)
(hdef : ∀ i, a i*v-Real.binEntropy (a i) ≤ d i) :
a₀*v/2≤∑ i, w i*d i :=by
proof · 22
lines
letA:=∑ i, w i*a i
havehA : 0 < A:= lt_of_lt_of_le ha₀ hav
havehA1 : A≤1:=byhave hh :=Finset.sum_le_sum (s :=Finset.univ) (fun i _ =>
mul_le_mul_of_nonneg_left (ha i).2 (w.nonneg i))
simpa only [mul_one,w.sum_one] using hh
haveha₀1 : a₀ ≤1:= hav.trans hA1
havehl : Real.log a₀ ≤Real.log A:=Real.log_le_log ha₀ hav
havehl0 : Real.log a₀ ≤0:=Real.log_nonpos ha₀.le ha₀1havehv0 : 0≤ v :=by linarith only [hv,hl0]
have hh := w.binEntropy_sum_le a ha
have hp := binEntropy_le_log_inverse hA hA1
have hdl :=Finset.sum_le_sum (s :=Finset.univ) (fun i _ =>
mul_le_mul_of_nonneg_left (hdef i) (w.nonneg i))
rw [show (∑ i, w i*(a i*v-Real.binEntropy (a i))) =
A*v-∑ i, w i*Real.binEntropy (a i) by
simp only [mul_sub,Finset.sum_sub_distrib,← mul_assoc,←Finset.sum_mul,A]] at hdl
have hlog := mul_le_mul_of_nonneg_left hl hA.le
have hmult := mul_le_mul_of_nonneg_left hv hA.le
have ham := mul_le_mul_of_nonneg_right hav hv0
change (∑ i, w i*Real.binEntropy (a i)) ≤Real.binEntropy A at hh
nlinarith only [hdl,hh,hp,hlog,hmult,ham]
letL:=funv : Fin n → Γ => coverageList K n τ δ (fun i => h (v i))
let a :=P.prob (fun v =>Y v.1∈L v.2∧ ((L v.2).card:ℝ)≤b)
δ/(τ+δ)-p.prob Bad-ε ≤ a ∧
a*(Real.log (Fintype.card G)-Real.log b)-Real.binEntropy a ≤Real.log (Fintype.card G)-P.cHf (fun v =>Y v.1) Prod.snd :=by
dsimp only
constructor
· have htrue := p.true_coverageList_probability q Y h K hK hτ hδ hn hp
have hsize := p.coverageList_size_probability q h K hK EBad hτ hτ1 hδ hδ1 hε n hq hE herr
have hi := (p.joint (fun ω => (q ω).iid n)).prob_inter_ge
(fun v =>Y v.1∈ coverageList K n τ δ (fun i => h (v.2 i)))
(fun v => ((coverageList K n τ δ (fun i => h (v.2 i))).card:ℝ)≤b)
simp only [not_le] at hi
linarith only [htrue,hsize,hi]
· exact short_list_probability_deficit (p.joint (fun ω => (q ω).iid n))
(fun v =>Y v.1) Prod.snd
(fun v => coverageList K n τ δ (fun i => h (v i))) hb
lemmasignedEntropy_conditioning (p : FinLaw Ω) (X : (Fin k →Bool) → Ω →Fin k → α)
(C : Ω → β) {b : ℕ} (hb : b ≤ k) :
p.signedEntropy X b-p.HfC≤
b*(𝔼 σ : Fin k →Bool, 𝔼 i : Fin k, p.cHf (fun ω =>X σ ω i) C) :=by
proof · 4
lines
have h :=Finset.expect_le_expect (s :=Finset.univ) (fun σ _ =>
p.orderedEntropy_conditioning (X σ) C hb)
simpa only [signedEntropy,Finset.expect_sub_distrib,Fintype.expect_const,
Finset.mul_expect] using h
theorembackward_coverage_step {Ω : Type uOmega} {Γ : Type uCapitalGamma} {ι : Type uIota} [Fintype Ω] [Fintype Γ] [Fintype ι]
(G : ι →Type uGroup) [∀ i, Fintype (G i)] [∀ i, AddCommGroup (G i)]
(w : FinLaw ι) (p : FinLaw Ω) (q : Ω →FinLaw Γ)
(Y : (i : ι) → Ω →G i) (h : (i : ι) → Γ →G i)
(Bad₀ : ι →Prop) (Bad₁ : ι → Ω →Prop)
(K : (i : ι) →Finset (G i)) (E : (i : ι) → Ω →Finset (G i))
(b : ι →ℝ) {τ δ ε η η' e v : ℝ} {n : ℕ}
(hn : 0 < n) (hτ : 0≤ τ) (hτ1 : τ ≤3/8)
(hδ : 0 < δ) (hδ1 : δ ≤1/64) (hε : 0≤ ε) (hη : 0 < η)
(hnext : ∑ i, w i*p.prob (Bad₁ i) ≤ η')
(hsmall : η'+ε ≤ η*δ/2)
(hscale : 2*(1-Real.log (η*δ/2)) ≤ v)
(hgap : e < η*δ*v/4)
(hdata : (∑ i, w i*(Real.log (Fintype.card (G i))-
(p.joint (fun ω => (q ω).iid n)).cHf (fun x =>Y i x.1) Prod.snd)) ≤ e)
(hK : ∀ i, Bad₀ i → (K i).Nonempty)
(hb : ∀ i, Bad₀ i →1≤ b i)
(hv : ∀ i, Bad₀ i → v ≤Real.log (Fintype.card (G i))-Real.log (b i))
(hp : ∀ i, Bad₀ i → (p.joint q).prob (fun x =>Y i x.1+h i x.2∈K i) ≤
τ*(K i).card/(Fintype.card (G i):ℝ))
(hq : ∀ i, Bad₀ i →∀ ω, ¬Bad₁ i ω →∀ y ∉E i ω,
(τ+4*δ)/(Fintype.card (G i):ℝ) ≤ (q ω).map (h i) y)
(hE : ∀ i, Bad₀ i →∀ ω, ¬Bad₁ i ω → ((E i ω).card:ℝ)/δ ≤ b i)
(herr : ∀ i, Bad₀ i → (Fintype.card (G i):ℝ)*
Real.exp (-(n:ℝ)*δ^2*(K i).card/(2*(Fintype.card (G i):ℝ))) ≤ ε) :
w.prob Bad₀≤ η :=by
proof · 55
lines
letP:= p.joint (fun ω => (q ω).iid n)
letL:=fun i (x : Fin n → Γ) => coverageList (K i) n τ δ (fun j => h i (x j))
let a :=fun i =>ifBad₀ i thenP.prob
(fun x =>Y i x.1∈L i x.2∧ ((L i x.2).card:ℝ) ≤ b i) else0let d :=fun i =>Real.log (Fintype.card (G i))-P.cHf (fun x =>Y i x.1) Prod.snd
have hd (i : ι) : 0≤ d i :=by
exact sub_nonneg.mpr ((P.cHf_le_Hf _ _).trans (P.Hf_le_log_card_type _))
have ha (i : ι) : a i ∈Set.Icc (0:ℝ) 1:=by
dsimp only [a]
split_ifs
· exact ⟨P.prob_nonneg _,P.prob_le_one _⟩
· norm_num
have hstep (i : ι) (hi : Bad₀ i) :
δ-p.prob (Bad₁ i)-ε ≤ a i ∧ a i*v-Real.binEntropy (a i) ≤ d i :=byhave hh := shared_coverage_deficit p q (Y i) (h i) (K i) (hK i hi) (E i) (Bad₁ i)
hn hτ hτ1 hδ hδ1 hε (hb i hi) (hp i hi) (hq i hi) (hE i hi) (herr i hi)
dsimp only at hh
havehh' : δ/(τ+δ)-p.prob (Bad₁ i)-ε ≤ a i ∧
a i*(Real.log (Fintype.card (G i))-Real.log (b i))-Real.binEntropy (a i) ≤ d i :=by
simpa only [a,hi,ite_eq_left,P,L,d] using hh
constructor
· havehtd : 0 < τ+δ :=by linarith only [hτ,hδ]
havehtd1 : τ+δ ≤1:=by linarith only [hτ1,hδ1]
havehfrac : δ ≤ δ/(τ+δ) := (le_div_iff₀ htd).mpr (by nlinarith only [htd1,hδ])
linarith only [hh'.1,hfrac]
· have hm := mul_le_mul_of_nonneg_left (hv i hi) (ha i).1
linarith only [hh'.2,hm]
have hl (i : ι) : δ*(ifBad₀ i then (1:ℝ) else0)-p.prob (Bad₁ i)-ε ≤ a i :=byby_cases hi : Bad₀ i
· simpa only [hi,ite_true,mul_one] using (hstep i hi).1
· simp only [hi,ite_false,mul_zero,a]
linarith only [p.prob_nonneg (Bad₁ i),hε]
have hdef (i : ι) : a i*v-Real.binEntropy (a i) ≤ d i :=byby_cases hi : Bad₀ i
· exact (hstep i hi).2
· simpa only [a,hi,ite_false,Real.binEntropy_zero,zero_mul,sub_zero] using hd i
by_contra hc
havehθη : η < w.prob Bad₀:= lt_of_not_ge hc
have hlavg :=Finset.sum_le_sum (s :=Finset.univ) (fun i _ =>
mul_le_mul_of_nonneg_left (hl i) (w.nonneg i))
haveheq : (∑ i, w i*(δ*(ifBad₀ i then (1:ℝ) else0)-p.prob (Bad₁ i)-ε)) =
δ*w.prob Bad₀-(∑ i, w i*p.prob (Bad₁ i))-ε :=by
simp only [mul_sub,Finset.sum_sub_distrib,←Finset.sum_mul,w.sum_one,one_mul,prob,
Finset.mul_sum]
congr 2
apply Finset.sum_congr rfl
intro i _
split_ifs <;> ring
rw [heq] at hlavg
havehav : η*δ/2≤∑ i, w i*a i :=byhave hm := mul_le_mul_of_nonneg_left hθη.le hδ.le
linarith only [hlavg,hm,hnext,hsmall]
have hbnd := average_deficit_lower w a d ha (bypositivity : 0 < η*δ/2) hav hscale hdef
change (∑ i, w i*d i) ≤ e at hdata
nlinarith only [hbnd,hdata,hgap]
theoremlow_mass_average {ι : Type uIota} [Fintype ι]
(G : ι →Type uGroup) [∀ i, Fintype (G i)]
(w : FinLaw ι) (p : (i : ι) →FinLaw (G i))
(K : (i : ι) →Finset (G i)) (Bad : ι →Prop) {b e : ℝ}
(hb : 0 < b)
(hK : ∀ i, ∀ x ∈K i, p i x ≤ (3/8:ℝ)/(Fintype.card (G i):ℝ))
(hbad : ∀ i, Bad i → b ≤ ((K i).card:ℝ)/(8*(Fintype.card (G i):ℝ)))
(hdef : (∑ i, w i*(Real.log (Fintype.card (G i))-(p i).entropy)) ≤ e) :
w.prob Bad≤ e/b :=by
proof · 19
lines
have h (i : ι) : b*(ifBad i then (1:ℝ) else0) ≤Real.log (Fintype.card (G i))-(p i).entropy :=byby_cases hi : Bad i
· simp only [hi,ite_true,mul_one]
exact (hbad i hi).trans ((p i).low_mass_deficit (K i) (by
intro x hx
convert hK i x hx using1; ring))
· simp only [hi,ite_false,mul_zero]
exact sub_nonneg.mpr (p i).entropy_le_log_card
have hs :=Finset.sum_le_sum (s :=Finset.univ) (fun i _ =>
mul_le_mul_of_nonneg_left (h i) (w.nonneg i))
havehe : (∑ i, w i*(b*(ifBad i then (1:ℝ) else0)))=b*w.prob Bad:=by
rw [prob,Finset.mul_sum]
apply Finset.sum_congr rfl
intro i _
split_ifs <;> ring
rw [he] at hs
apply (le_div_iff₀ hb).mpr
linarith only [hs,hdef]