InformationTheory.Shannon.CsiszarProjection
Csiszár I-projection and the Pythagorean inequality #
For a finite alphabet α, a full-support reference pmf Q : α → ℝ, and a closed convex
set K ⊆ stdSimplex ℝ α:
- Existence: there is
Q* ∈ KminimizingklDivPmf · QoverK. - Uniqueness: the minimizer is unique.
- The Pythagorean inequality (Cover-Thomas): for all
P ∈ K,klDivPmf P Q ≥ klDivPmf P Q* + klDivPmf Q* Q.
Main definitions #
klDivPmf P Q := ∑ a, Q a * klFun (P a / Q a)— real-valued finite-alphabet KL divergence.
Main statements #
csiszar_projection_exists— existence via extreme value theorem.csiszar_projection_unique— uniqueness via strict convexity.csiszar_pythagoras_inequality— Pythagorean inequality via the first-order condition.
Implementation notes #
Proof strategy for the Pythagorean inequality: the first-order condition
∑ (P - Q*)(log Q* - log Q) ≥ 0 is derived from the right derivative of
t ↦ klDivPmf ((1-t)Q* + tP) Q at t = 0 being non-negative (minimality of Q*).
Combined with the algebraic identity
klDivPmf P Q = klDivPmf P Q* + ∑ P·(log Q* - log Q) and the expansion of
klDivPmf Q* Q, this gives the inequality.
References #
- T. M. Cover and J. A. Thomas, Elements of Information Theory (2nd ed.), Wiley, 2006.
InformationTheory.Shannon.CsiszarProjection.klDivPmf
sourceThe real-valued finite-alphabet KL divergence as a pmf functional:
klDivPmf P Q := ∑ a, Q a * klFun (P a / Q a) where
klFun x = x * log x + 1 - x (Mathlib InformationTheory.klFun).
Equivalent to (klDiv P Q).toReal under support hypotheses (bridge in Sanov/Basic.lean),
but we work Real-only here to leverage strictConvexOn_klFun + finite-sum API directly.
Equations
- InformationTheory.Shannon.CsiszarProjection.klDivPmf P Q = ∑ a : α, Q a * InformationTheory.klFun (P a / Q a)
Instances For
Used by
InformationTheory.Shannon.CsiszarProjection.klDivPmf_nonneg
sourceklDivPmf is non-negative on the simplex when Q is a pmf (full support not required:
each summand is Q a * klFun (P a / Q a) ≥ 0 whenever Q a ≥ 0, since klFun ≥ 0 on [0, ∞)
and P a / Q a ≥ 0 follows from P a ≥ 0 and Q a ≥ 0).
Used by
InformationTheory.Shannon.CsiszarProjection.continuous_klDivPmf_left
sourceklFun is continuous on [0, ∞) (Mathlib continuous_klFun). The composition
fun P => klFun (P a / Q a) is continuous in P when Q a > 0.
Used by
InformationTheory.Shannon.CsiszarProjection.klDivPmf_strictConvexOn_left
sourceklDivPmf · Q is strictly convex on stdSimplex ℝ α (full support Q + Π ⊆ simplex).
Per-coordinate: klFun is strictly convex on [0, ∞) (strictConvexOn_klFun).
The map P ↦ P a / Q a is affine (when Q a > 0 is fixed), and Q a * (·) preserves
strict convexity. Sum of strictly convex (in at least one coordinate where P ≠ P')
gives strict convexity of the sum.
(But care: if P = P' they agree in every coordinate; if P ≠ P' then there is at least
one coordinate a where P a ≠ P' a, and at that coordinate klFun strict convexity fires.)
Used by
Existence via extreme value theorem #
InformationTheory.Shannon.CsiszarProjection.isCompact_of_subset_stdSimplex
sourceUsed by
InformationTheory.Shannon.CsiszarProjection.csiszar_projection_exists
sourceExistence of the Csiszár I-projection: for a nonempty closed set
K ⊆ stdSimplex ℝ α and full-support Q, there exists Q* ∈ K minimizing klDivPmf · Q
over K.
Used by
Uniqueness via strict convexity #
InformationTheory.Shannon.CsiszarProjection.csiszar_projection_unique
sourceUniqueness of the Csiszár I-projection: the minimizer of klDivPmf · Q on a
convex K ⊆ stdSimplex ℝ α is unique.
Used by
Pythagorean inequality #
InformationTheory.Shannon.CsiszarProjection.klDivPmf_eq_log_diff_sum
sourceThe standard sum form of klDivPmf under probability measure hypotheses:
klDivPmf P Q = ∑ a, P a * (log (P a) - log (Q a)) when ∑ P = ∑ Q = 1 and both
positive. (klFun(t) = t log t + 1 - t ⟹ Q * klFun(P/Q) = P log(P/Q) + Q - P,
sum collapses 1 - 1 = 0.)
Used by
InformationTheory.Shannon.CsiszarProjection.klDivPmf_decomp_via_intermediate
sourceAlgebraic identity: for full-support P, Q*, Q,
klDivPmf P Q = klDivPmf P Q* + ∑ a, P a * (log (Q* a) - log (Q a)).
Used by
InformationTheory.Shannon.CsiszarProjection.klDivPmf_self_expand
sourceUsed by
InformationTheory.Shannon.CsiszarProjection.csiszar_segment_hasDerivAt
sourceDerivative of the segment functional t ↦ klDivPmf ((1-t) • Qstar + t • P) Q at t = 0,
equal to ∑ a, (P a - Qstar a) * (log (Qstar a) - log (Q a)).
Used by
InformationTheory.Shannon.CsiszarProjection.csiszar_first_order_condition
sourceThe first-order optimality condition: if Q* minimizes klDivPmf · Q over K, then for all
P ∈ K, ∑ a, (P a - Q* a) * (log (Q* a) - log (Q a)) ≥ 0.
Proof: the right derivative of t ↦ klDivPmf ((1-t)Q* + tP) Q at t = 0 equals the sum,
and non-negativity follows from minimality (φ(0) ≤ φ(t) for small t > 0).
Used by
InformationTheory.Shannon.CsiszarProjection.csiszar_pythagoras_inequality
sourceCsiszár's Pythagorean inequality: for the I-projection Q* and any P ∈ K,
klDivPmf P Q ≥ klDivPmf P Q* + klDivPmf Q* Q.