InformationTheory.Shannon.Bridge
Bridge: mutual information (KL form) ↔ conditional entropy #
For a finite alphabet X and a probability measure μ,
(mutualInfo μ Xs Yo).toReal = entropy μ Xs - condEntropy μ Xs Yo.
Main statements #
mutualInfo_eq_entropy_sub_condEntropy— the bridge identity.
Implementation notes #
The proof establishes (μ.map (Xs, Yo)) ≪ (μ.map Xs).prod (μ.map Yo) on a
finite alphabet, translates the KL divergence to a Bochner integral via
toReal_klDiv_of_measure_eq, decomposes over the finite alphabet, and separates
into H(X) - H(X|Y) by linearity.
InformationTheory.Shannon.entropy
sourceShannon entropy of a discrete random variable taking values in a finite alphabet.
Equations
- InformationTheory.Shannon.entropy μ Xs = ∑ x : X, ((MeasureTheory.Measure.map Xs μ).real {x}).negMulLog
Instances For
Used by
InformationTheory.Shannon.entropy_nonneg
sourceUsed by
InformationTheory.Shannon.entropy_map_comp
sourceUsed by
Helper lemmas for the bridge #
The bridge proof goes via three independent helpers:
klDiv_compProd_const_eq_lintegral: fiberwise expansion of conditional KL,klDiv (μ ⊗ₘ κ) (μ ⊗ₘ Kernel.const _ ν) = ∫⁻ x, klDiv (κ x) ν ∂μ. The Mathlib chain rule (klDiv_compProd_eq_add) only gives the non-fiberwise form; we need the integral identity to land atcondEntropy.klDiv_discrete_toReal_eq_sum: discreteklDivon a finite alphabet expands as∑ x, Q.real{x} * (log Q.real{x} - log P.real{x}).integral_condDistrib_real_singleton_eq: marginal recovery,∫ y, (condDistrib Xs Yo μ y).real {x} d(μ.map Yo) = (μ.map Xs).real {x}.
InformationTheory.Shannon.mutualInfo_eq_entropy_sub_condEntropy
sourceFor a finite-alphabet source X,
(mutualInfo μ Xs Yo).toReal = entropy μ Xs - condEntropy μ Xs Yo.