Kraft–Gibbs Compression Bounds for Shannon Entropy #
This module connects Mathlib's InformationTheory.IsPrefixFree and Kraft inequality
(Mathlib/InformationTheory/Coding/Kraft.lean) to finite-distribution Shannon entropy and
conditional entropy (CslibFrontier/Probability/Entropy.lean,
CslibFrontier/Probability/Divergence.lean). Deterministic prefix-free concatenation combinators
and
basic binary codes (finIdxBits, eliasGamma) live in
CslibFrontier/Foundations/Data/BitString/List/PrefixFree.lean.
Main results #
Cslib.Probability.Coding.entropy_le_expected_length_of_isPrefixFree: for any finitep : PMF αand prefix-free encodingencinjective onp.support,entropy pis at most the expected codeword length underp([CT06], Theorem 5.3.1).Cslib.Probability.Coding.conditionalEntropy_le_expected_length_of_isPrefixFree: fiberwise Kraft–Gibbs lower bound forconditionalEntropy joint.Cslib.Probability.Coding.conditionalEntropy_map_le_expected_length_of_isPrefixFree: transcript compression form boundingH(target(ω) | obs(ω))by expected message lengthE[|msg(ω)|].Cslib.Probability.Coding.logb_prob_add_logb_card_le_conditionalEntropy,Cslib.Probability.Coding.logb_prob_add_logb_le_conditionalEntropy_of_fiber_le,Cslib.Probability.Coding.logb_le_conditionalEntropy_of_fiber_le: lower bounds on conditional entropyH(target | obs)(conditioned on an eventWor unconditioned) from joint or fiberwise point-mass upper bounds.
References #
Kraft–Gibbs source coding lower bound ([CT06], Theorem 5.3.1): if enc is
injective on p.support and its image on p.support is prefix-free, then entropy p is at most
the expected codeword length under p.
Conditional Kraft–Gibbs compression bound: if for each observable obs, enc obs is
injective on (conditionalSnd joint obs).support with prefix-free image, then
conditionalEntropy joint is at most the expected codeword length under joint.
Communication transcript compression bound: if a message msg ω sent over an outcome space
p : PMF Ω is prefix-free on each observation fiber {ω ∈ p.support | obs ω = o} and uniquely
determines target ω given obs ω on p.support, then H(target(ω) | obs(ω)) ≤ E[|msg(ω)|].
Lower bound on conditional entropy under an event W of conditional probability
(μ.map W) true, when the prior joint distribution on (obs, target) has point masses
bounded by 1 / |ObsT × TgtT|.
Fiberwise event-conditioned conditional entropy lower bound: if under prior μ : PMF Ω, every
observation-target pair (o, t) has joint probability at most ((μ.map obs) o).toReal / M, then
conditioning on any event W with (μ.map W) true ≠ 0 leaves at least log₂ Pr[W] + log₂ M bits
of conditional entropy H_p(target | obs) (by fiberwise min-entropy plus non-negativity of KL
divergence D(P(obs | W) ‖ P(obs)) ≥ 0).
Unconditioned specialization of logb_prob_add_logb_le_conditionalEntropy_of_fiber_le: if
((μ.map fun ω => (obs ω, target ω)) (o, t)).toReal ≤ ((μ.map obs) o).toReal / M for all (o, t),
then Real.logb 2 M ≤ PMF.conditionalEntropy (μ.map fun ω => (obs ω, target ω)).