Eqs. (2.138)–(2.140) — every instantaneous code has
ProvedFuchsThesis.Coding.eq_2_140information-theoryp2o-gran-per-chapterp2o-plan-bookp2o-v1source-coding
Let messages occur with probabilities , and let be any binary instantaneous (prefix-free) code for them, with codeword lengths . Then its expected length is at least the Shannon information in bits:
This is the lower half of Shannon's noiseless coding theorem (Theorem 2.8), stated for each code separately; taking the infimum over codes gives .
Differences from the source:
- encoding: messages → an arbitrary finite type; reason: Lean convention, same instances up to relabelling.
- encoding: to base 2 with → Mathlib's
Real.logb 2, which has ; reason: same values on every probability distribution.
Preamble
import Mathlib import Definitions.Def_FuchsThesis_Coding_IsInstantaneous import Definitions.Def_FuchsThesis_Coding_expLength import Definitions.Def_BBPSSW_Distill_shannonBits
Formal statement
namespace FuchsThesis.Coding
/-- Fuchs, *Distinguishability and Accessible Information in Quantum Theory*,
arXiv:quant-ph/9601020v1, eqs. (2.138)–(2.140), p.39 (PDF p.48): "for any instantaneous code"
for messages occurring with probabilities `p(xᵢ)`, the expected codeword length
`l̄ = ∑ᵢ p(xᵢ) l(xᵢ)` and the Shannon information in bits satisfy `l̄ − H(p) ≥ 0` (2.140).
**Formalization Note.** Messages form an arbitrary finite type `ι`; `p` is a probability
distribution (nonnegative, total mass one; zero probabilities allowed); `H(p)` is the published
`BBPSSW.Distill.shannonBits p = −∑ᵢ pᵢ log₂ pᵢ` (eq. (2.113) with `C = 1`, p.32; `0 log 0 = 0`). -/
theorem eq_2_140 {ι : Type*} [Fintype ι] (p : ι → ℝ)
(hp0 : ∀ i, 0 ≤ p i) (hp1 : ∑ i, p i = 1)
(c : ι → List Bool) (hc : IsInstantaneous c) :
expLength p c - BBPSSW.Distill.shannonBits p ≥ 0 := by sorry
end FuchsThesis.Coding
Source
Fuchs, Distinguishability and Accessible Information in Quantum Theory, arXiv:quant-ph/9601020v1, eqs. (2.138)–(2.140), p.39 (PDF p.48)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.