InformationTheory.Shannon.Entropy
Entropy chain rule and conditioning monotonicity #
Two-variable Shannon inequalities: chain rule, conditional mutual information formula, and the fact that conditioning never increases entropy.
Main statements #
entropy_pair_eq_entropy_add_condEntropy—H(X, Y) = H(X) + H(Y | X).condEntropy_tower— disintegration form ofH(X | Y, Z).condMutualInfo_eq_condEntropy_sub_condEntropy—I(X; Z | Y) = H(X | Y) - H(X | Y, Z).condEntropy_le_condEntropy_of_pair—H(X | Y, Z) ≤ H(X | Y).
Implementation notes #
condMutualInfo_eq_condEntropy_sub_condEntropy uses the Mathlib mutual-information
chain rule mutualInfo_chain_rule plus mutualInfo_comm/condMutualInfo_comm to
put Xs on the left, then lifts to .toReal using finiteness from mutualInfo_ne_top
and condMutualInfo_ne_top.
InformationTheory.Shannon.entropy_pair_eq_entropy_add_condEntropy
sourceChain rule for Shannon entropy: H(X, Y) = H(X) + H(Y | X).
Used by
InformationTheory.Shannon.condEntropy_tower
sourceTower of conditional entropy: disintegrating the joint conditioner (Y, Z) into
Z given Y followed by Y,
H(X | Y, Z) = ∫ y, ∫ z, Σ x, negMulLog (condDistrib X (Y,Z) μ (y,z) {x}) d(condDistrib Z Y μ y) d P_Y.
The inner expression Σ x, negMulLog (condDistrib X (Y,Z) μ (y,z) {x}) is the slice-wise
Shannon entropy of X conditioned on the simultaneous value of Y and Z. The two
outer integrals build back up to H(X | Y, Z). Required as a lemma for the middle
result condMutualInfo_eq_condEntropy_sub_condEntropy.
Used by
InformationTheory.Shannon.condMutualInfo_eq_condEntropy_sub_condEntropy
sourceConditional mutual information formula: I(X; Z | Y) = H(X | Y) - H(X | Y, Z).
Used by
InformationTheory.Shannon.condEntropy_le_condEntropy_of_pair
sourceConditioning never increases entropy: H(X | Y, Z) ≤ H(X | Y). Direct corollary of
the middle lemma condMutualInfo_eq_condEntropy_sub_condEntropy and
condMutualInfo_nonneg. The n-variable Han inequality reduces to iterating this
on prefixes of Fin n.