Eq. (2.70) — Shannon inequality , with equality iff
ProvedFuchsThesis.Coding.eq_2_70information-theoryp2o-gran-per-chapterp2o-plan-bookp2o-v1source-coding
Let and be probability distributions, with whenever . Then
with equality if and only if for all . Here .
This is the Shannon (or Gibbs) inequality, the nonnegativity of the Kullback–Leibler information with its equality case. In the proof of Theorem 2.8 it is applied to to show that every instantaneous code has expected length at least .
Differences from the source:
- encoding: for -point distributions → the hypothesis wherever ; reason: it excludes exactly the terms with , where is not a real number, a nondegeneracy condition met by every pair of positive distributions and by the pair used in (2.138).
- encoding: terms with → and (Mathlib's ); reason: the source's convention (p.32); no instance changes.
- encoding: points → an arbitrary finite type; reason: Lean convention, same instances up to relabelling.
Preamble
import Mathlib
Formal statement
namespace FuchsThesis.Coding
/-- Fuchs, *Distinguishability and Accessible Information in Quantum Theory*,
arXiv:quant-ph/9601020v1, eq. (2.70), p.24 (PDF p.33), the Shannon inequality as invoked in the
proof of Theorem 2.8 (p.39): for probability distributions `p`, `q` on `n` points,
`∑ₖ pₖ ln qₖ ≤ ∑ₖ pₖ ln pₖ`, "with equality if and only if `pₖ = qₖ` for all `k`".
**Formalization Note.** Points form an arbitrary finite type. Zero entries are allowed, with the
convention `0 ln 0 = 0` (`Real.log 0 = 0` in Mathlib). The hypothesis `hsupp` (`qₖ > 0` wherever
`pₖ > 0`) excludes exactly the terms `pₖ ln qₖ` with `pₖ > 0 = qₖ`, where `ln qₖ` is not a real
number; every pair of strictly positive distributions satisfies it, and so does the pair `(p, q)` of
(2.138)–(2.139), where `q > 0` everywhere. -/
theorem eq_2_70 {ι : Type*} [Fintype ι] (p q : ι → ℝ)
(hp0 : ∀ k, 0 ≤ p k) (hp1 : ∑ k, p k = 1)
(hq0 : ∀ k, 0 ≤ q k) (hq1 : ∑ k, q k = 1)
(hsupp : ∀ k, 0 < p k → 0 < q k) :
(∑ k, p k * Real.log (q k) ≤ ∑ k, p k * Real.log (p k)) ∧
(∑ k, p k * Real.log (q k) = ∑ k, p k * Real.log (p k) ↔ ∀ k, p k = q k) := by sorry
end FuchsThesis.Coding
Source
Fuchs, Distinguishability and Accessible Information in Quantum Theory, arXiv:quant-ph/9601020v1, eq. (2.70), p.24 (PDF p.33); invoked in the proof of Theorem 2.8, p.39 (PDF p.48)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.