InformationTheory.Fano
Fano's inequality: a mathlib-current core formalization #
Mathlib currently provides Real.binEntropy and Real.qaryEntropy. The theorem
Real.qaryEntropy is exactly the textbook Fano right-hand side
binEntropy Pe + Pe * log (q - 1).
This file packages that identity as Fano's inequality, plus a monotone inverse
corollary on the standard range Pe ≤ 1 - 1 / q.
For finite joint probability mass functions we also define the usual finite entropy quantities and provide a ready-to-use wrapper: once the information- theoretic core estimate
H(X | Y) ≤ Real.qaryEntropy |X| Pe
has been proved for your model, the theorem below rewrites it to the standard Fano bound.
InformationTheory.fanoBoundRHS
sourceThe textbook right-hand side in Fano's inequality, measured in nats.
Equations
- InformationTheory.fanoBoundRHS q Pe = Real.binEntropy Pe + Pe * Real.log ↑(↑q - 1)
Instances For
Used by
InformationTheory.qaryEntropy_eq_fanoBoundRHS
sourceReal.qaryEntropy is the Fano right-hand side.
Used by
InformationTheory.fanoBoundRHS_eq_qaryEntropy
sourceThe reverse rewrite, sometimes more convenient for rw.
Used by
InformationTheory.qaryEntropy_eq_binEntropy_add_log
sourceqaryEntropy written as the textbook sum binEntropy Pe + Pe · log (q - 1),
without going through the intermediate fanoBoundRHS definition.
Used by
InformationTheory.fano_inequality_of_le_qaryEntropy
sourceFano's inequality (q-ary form).
The hypothesis is the information-theoretic estimate
Hxy ≤ qaryEntropy q Pe; the conclusion is the usual textbook display
Hxy ≤ h(Pe) + Pe log(q - 1).
Used by
InformationTheory.fanoBoundRHSOfAlphabet
sourceFano's right-hand side for a finite alphabet.
Equations
Instances For
Used by
InformationTheory.fano_inequality_of_alphabet
sourceFano's inequality (finite alphabet).
Used by
InformationTheory.fano_error_lower_bound_of_lt_qaryEntropy
sourceStrict inverse form of the Fano bound on the increasing branch of
qaryEntropy.
If a candidate lower bound a already has qaryEntropy q a < Hxy, and Fano gives
Hxy ≤ qaryEntropy q Pe, then a < Pe, provided both a and Pe lie in the
standard monotonicity interval [0, 1 - 1/q].
Used by
InformationTheory.fano_error_lower_bound_of_lt_fanoBoundRHS
sourceSame inverse form, but stated with the textbook Fano right-hand side.
Used by
InformationTheory.fano_error_lower_bound_of_alphabet
sourceAlphabet-indexed inverse form of Fano's inequality.
Used by
Finite PMF interface #
InformationTheory.FiniteJointPMF
sourceA finite joint probability mass function on X × Y, stored as real masses.
Instances For
Used by
InformationTheory.FiniteJointPMF.marginalY
sourceMarginal mass of Y = y.
Instances For
Used by
InformationTheory.FiniteJointPMF.jointEntropy
sourceJoint Shannon entropy H(X,Y) in nats.
Equations
- P.jointEntropy = ∑ x : X, ∑ y : Y, (P.mass x y).negMulLog
Instances For
Used by
InformationTheory.FiniteJointPMF.yEntropy
sourceMarginal Shannon entropy H(Y) in nats.
Instances For
Used by
InformationTheory.FiniteJointPMF.condEntropy
sourceConditional entropy H(X | Y) = H(X,Y) - H(Y) in nats.
Equations
- P.condEntropy = P.jointEntropy - P.yEntropy
Instances For
Used by
InformationTheory.FiniteJointPMF.errorProb
sourceError probability of a Markov-form joint PMF on (X, Xh) where the
second coordinate plays the role of the estimator Xh. The error event is
{(x, xh) : x ≠ xh}.
Instances For
Used by
InformationTheory.FiniteJointPMF.fano_inequality_of_core
sourceFinite-PMF Fano wrapper, Markov form on (X, Xh).
After proving the model-specific core estimate
P.condEntropy ≤ Real.qaryEntropy (Fintype.card X) P.errorProb, this theorem
returns the standard Fano inequality.
Used by
InformationTheory.FiniteJointPMF.error_lower_bound_of_core
sourceFinite-PMF inverse Fano wrapper on the increasing branch, Markov form.