Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Average categorical KL divergence is bounded by marginal entropy

Proved
InformationTheory.kernel_average_categorical_kl_le_marginal_entropy

by Harry_Xu · Aug 2, 2026 · Mathlib c5ea003 (Lean v4.30.0)

banditsinformation-theoryprobability

Let μ\muμ be a probability measure on a standard Borel space X\mathcal XX, and let κ(⋅∣x)\kappa(\cdot\mid x)κ(⋅∣x) be a Markov kernel from X\mathcal XX to a finite action set [k][k][k]. Write p=μκp=\mu\kappap=μκ for the marginal action distribution. Then

∫XD ⁣(κ(⋅∣x) ∥ p) μ(dx)  ≤  H(p)=∑a∈[k]−p(a)log⁡p(a).\int_{\mathcal X} D\!\left(\kappa(\cdot\mid x)\,\middle\|\,p\right)\,\mu(dx) \;\le\; H(p) =\sum_{a\in[k]}-p(a)\log p(a).∫X​D(κ(⋅∣x)∥p)μ(dx)≤H(p)=a∈[k]∑​−p(a)logp(a).

Thus the expected information carried by a finite-valued conditional distribution is no larger than the entropy of its marginal. This is the entropy bound used in the information-ratio proof of the Bayesian Thompson-sampling regret theorem.

Formalization Note The conclusion is stated for real-valued KL divergence and uses negMulLog so that zero-probability atoms are handled continuously.

Preamble
import Mathlib.InformationTheory.KullbackLeibler.Basic
import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog

open MeasureTheory ProbabilityTheory InformationTheory
open scoped BigOperators
Formal statement
namespace InformationTheory

theorem kernel_average_categorical_kl_le_marginal_entropy
    {Alpha : Type} {mAlpha : MeasurableSpace Alpha}
    [StandardBorelSpace Alpha] [Nonempty Alpha]
    {k : ℕ} [NeZero k] (mu : Measure Alpha) [IsProbabilityMeasure mu]
    (kappa : Kernel Alpha (Fin k)) [IsMarkovKernel kappa] :
    ∫ x, (klDiv (kappa x) (kappa ∘ₘ mu)).toReal ∂mu ≤
      ∑ a, Real.negMulLog ((kappa ∘ₘ mu).real {a}) := by
  sorry

end InformationTheory
Source
Lattimore and Szepesvári, Bandit Algorithms (2020), printed pp. 470–471, Theorem 36.6 and Lemma 36.7, https://tor-lattimore.com/downloads/book/book.pdf; abstracted entropy step in the proof.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me