InformationTheory.Shannon.Sanov.LDP
Sanov's theorem — LDP upper bound (B form) #
Cover-Thomas: for any family E n ⊆ TypeCountIndex α n,
(1/n) log Q^n({x | typeCount x ∈ E n}) ≤ -D* + ε (eventually)
where D* = inf_{c ∈ E n} klDivIndex c n Q.
Main definitions #
TypeCountIndex α n— abbreviation forα → Fin (n+1), the type used to index empirical count vectors.typeClassByCount c— the type class{x | ∀ a, typeCount x a = c a}.klDivIndex c n Q— KL divergence of the rational distributionc/nfromQ, defined as∑ a, (c a / n) * (log (c a / n) - log Q.real {a}).
Main statements #
typeCountIndex_card—|TypeCountIndex α n| = (n+1)^|α|(polynomial cardinality bound).typeClassByCount_Qn_le—Q^n(typeClassByCount c) ≤ exp(-n · klDivIndex c n Q).typeClassByCount_union_Qn_le_inf— union-form bound:Q^n(⋃ c ∈ F, T_c) ≤ |F| · exp(-n · D*).sanov_ldp_upper_bound— LDP upper bound witho(1)slack via|α| log(n+1)/n → 0.
Implementation notes #
- The bound on
typeClassByCount cis proved self-containedly (index form) rather than by reducing to the A-formtypeClass_Qn_le, because the rational distributionc/nmay have zero components whenc a = 0, violating the full-support hypothesis. - The polynomial slack
(|α| log(n+1))/n → 0is extracted fromReal.isLittleO_log_id_atTop.
References #
- T. M. Cover and J. A. Thomas, Elements of Information Theory (2nd ed.), Wiley, 2006.
Type-count index + polynomial bound #
InformationTheory.Shannon.TypeCountIndex
sourceType-count index: α → Fin (n+1), indexing empirical count vectors.
Inconsistent indices (∑ ≠ n) yield an empty type class.
Equations
- InformationTheory.Shannon.TypeCountIndex α n = (α → Fin (n + 1))
Instances For
Used by
InformationTheory.Shannon.instFintypeTypeCountIndex
sourceUsed by
InformationTheory.Shannon.typeCountIndex_card
sourcePolynomial cardinality bound: |TypeCountIndex α n| = (n+1)^|α|.
Used by
Type class by integer counts + Sanov bound #
InformationTheory.Shannon.typeClassByCount
sourceType class by integer counts T(c) := {x | ∀ a, typeCount x a = c a}.
Equations
- InformationTheory.Shannon.typeClassByCount c = {x : Fin n → α | ∀ (a : α), InformationTheory.Shannon.typeCount x a = c a}
Instances For
Used by
InformationTheory.Shannon.klDivIndex
sourceKL divergence at an empirical type (rational form):
klDivIndex c n Q := ∑ a, (c a / n) · (log (c a / n) - log Q.real{a}).
Equations
Instances For
Used by
InformationTheory.Shannon.sum_const_aggr_of_mem_typeClassByCount
sourceUsed by
InformationTheory.Shannon.typeClassByCount_prod_eq
sourcePer-point identity (index form): x ∈ typeClassByCount c implies
∏ i, Q.real {x i} = (∏ a, ((c a : ℝ)/n)^(c a)) · exp(-n · klDivIndex c n Q).
Used by
InformationTheory.Shannon.typeClassByCount_Qn_le
sourceSanov upper bound (index form): for c : α → ℕ with ∑ c a = n,
Q^n(typeClassByCount c) ≤ exp(-n · klDivIndex c n Q).
Used by
Union form upper bound + LDP main statement #
InformationTheory.Shannon.typeClassByCount_empty_of_sum_ne
sourceIf ∑ c a ≠ n then typeClassByCount c = ∅.
Used by
InformationTheory.Shannon.typeClassByCount_union_Qn_le
sourceUnion form upper bound: for any F : Finset (TypeCountIndex α n),
Q^n(⋃ c ∈ F, typeClassByCount c) ≤ ∑ c ∈ F, exp(-n · klDivIndex c n Q).
Used by
InformationTheory.Shannon.typeClassByCount_union_Qn_le_inf
sourceinf-form upper bound: if ∀ c ∈ F, D ≤ klDivIndex c n Q then
Q^n(⋃ c ∈ F, typeClassByCount c) ≤ |F| · exp(-n · D).
Used by
InformationTheory.Shannon.log_succ_div_tendsto_zero
sourceReal.log (n+1) / n → 0 as n → ∞.
Used by
InformationTheory.Shannon.sanov_ldp_upper_bound
sourceSanov's theorem (LDP upper bound):
(1/n) log Q^n({x | typeCount x ∈ E n}) ≤ -D + ε for all large n,
provided every c ∈ E n satisfies D ≤ klDivIndex c n Q.