Subadditivity of Shannon entropy
ProvedshannonEntropy_prod_leSubadditivity of Shannon entropy. Let and be two random variables on the same finite, nonempty sample space (uniformly distributed, as throughout Definitions.DiscreteEntropy). Then the entropy of the pair is at most the sum of the individual entropies:
Equality holds exactly when and are independent under the uniform measure on ; the inequality in general reflects that correlation between and can only decrease the joint entropy relative to the independent case.
This is one of the two basic structural facts about entropy (alongside non-negativity) used throughout information theory and its combinatorial applications. In particular, it is the tool that lets the entropy method in combinatorics (Spencer's partial coloring lemma, and Beck-Fiala type arguments) bound the entropy of a vector of many "row" statistics of a random coloring by the sum of each row's individual entropy, one row at a time, rather than having to reason about their joint distribution directly.
The proof reduces to Gibbs' inequality (gibbs_inequality) applied to the joint distribution against the product-of-marginals distribution : the resulting bound unwinds, after taking marginals, to exactly (up to the constant base-2-versus-natural-log rescaling factor , which is positive and so preserves the inequality's direction).
Formalization Note The joint variable is represented as fun ω => (Z1 ω, Z2 ω) : Ω → β1 × β2, and its entropy shannonEntropy uses the same base-2 convention as Definitions.DiscreteEntropy.
import Definitions.Def_DiscreteEntropy
import Theorems.Thm_gibbs_inequality
import Mathlib
open Finset
variable {Ω β1 β2 : Type*} [Fintype Ω] [Fintype β1] [Fintype β2]
[DecidableEq β1] [DecidableEq β2] [Nonempty Ω]theorem shannonEntropy_prod_le (Z1 : Ω → β1) (Z2 : Ω → β2) :
shannonEntropy (fun ω => (Z1 ω, Z2 ω)) ≤ shannonEntropy Z1 + shannonEntropy Z2 := by sorry