InformationTheory

InformationTheory.Shannon.MaxEntropy.Basic

source

Maximum entropy (Gibbs inequality) #

For a finite-alphabet random variable X : Ω → α under an arbitrary probability measure μ, entropy μ X ≤ Real.log (Fintype.card α), with equality if and only if μ.map X = uniformOn Set.univ.

Main statements #

Implementation notes #

The main results follow directly from concavity of negMulLog on Set.Ici 0 via the finite-sum Jensen inequality (ConcaveOn.le_map_sum and StrictConcaveOn.map_sum_eq_iff), with uniform weights 1/N (N = |α|). No KL-divergence machinery is needed; klDiv_uniformOn_univ_toReal_eq is a secondary identity derived from the same computation.

No uniformity assumption is placed on the law of X: the bound holds for an arbitrary probability measure μ, which is what makes entropy_le_log_card usable as the log-cardinality bound on the entropy of an arbitrary encoder output. entropy_le_log_image_card (LoomisWhitney.lean) is the counterpart specialized to μ = uniformOn A, where the bound is the image cardinality #(A.image f) instead of |α|.

KL-divergence identity #

theorem

InformationTheory.Shannon.MaxEntropy.klDiv_uniformOn_univ_toReal_eq

source

(klDiv (μ.map X) (uniformOn univ)).toReal = log |α| - entropy μ X.

Used by

    Main theorem via Jensen's inequality #

    theorem

    InformationTheory.Shannon.MaxEntropy.entropy_le_log_card

    source

    Gibbs' inequality (uniform bound): the Shannon entropy of a finite-alphabet random variable is at most log |α|, for an arbitrary probability measure μ.

    Used by

      Equality condition #

      theorem

      InformationTheory.Shannon.MaxEntropy.entropy_eq_log_card_iff

      source

      Gibbs' inequality (equality condition): equality entropy μ X = log |α| holds if and only if μ.map X = uniformOn univ.

      Used by