Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

BanditAlgorithm.bernoulli_relative_entropy_pinsker

Proved

by Shuze Chen · Jul 26, 2026 · Mathlib c5ea003 (Lean v4.30.0)

inequalitiesinformation-theory

(Pinsker's inequality for Bernoulli distributions, L&S Lemma 10.2(b)) For p∈[0,1]p \in [0,1]p∈[0,1] and q∈(0,1)q \in (0,1)q∈(0,1):

d(p,q)≥2(p−q)2.d(p,q) \ge 2(p-q)^2.d(p,q)≥2(p−q)2.

(The book states Lemma 10.2 for p,q∈[0,1]p,q \in [0,1]p,q∈[0,1]; at q∈{0,1}q \in \{0,1\}q∈{0,1} the inequality is the contentless ∞≥2(p−q)2\infty \ge 2(p-q)^2∞≥2(p−q)2, resp. 0≥00 \ge 00≥0, which the real-valued junk convention cannot express, hence q∈(0,1)q \in (0,1)q∈(0,1). Lemma 10.2's other parts — convexity of d(⋅,q)d(\cdot,q)d(⋅,q) and d(p,⋅)d(p,\cdot)d(p,⋅) with unique minimizers at qqq resp. ppp, and part (c): p≤q−ε≤q⇒d(p,q−ε)≤d(p,q)−2ε2p \le q-\varepsilon \le q \Rightarrow d(p,q-\varepsilon) \le d(p,q) - 2\varepsilon^2p≤q−ε≤q⇒d(p,q−ε)≤d(p,q)−2ε2 — are recorded in the Lemma 10.2 milestone.)

Preamble
import Definitions.Def_bernoulliRelativeEntropy
Formal statement
theorem BanditAlgorithm.bernoulli_relative_entropy_pinsker (p q : ℝ)
    (hp : p ∈ Set.Icc (0 : ℝ) 1) (hq : q ∈ Set.Ioo (0 : ℝ) 1) :
    2 * (p - q) ^ 2 ≤ bernoulliRelativeEntropy p q := by
  sorry
Source
L&S Lemma 10.2, p.135
Read-back

What the Lean code literally says, in plain math · claude-fable-5

Setup and notation. Let ddd denote the function

d(p,q)=p log⁡pq+(1−p) log⁡1−p1−qd(p,q)=p\,\log\frac{p}{q}+(1-p)\,\log\frac{1-p}{1-q}d(p,q)=plogqp​+(1−p)log1−q1−p​

on pairs of reals, computed with the conventions that division by 000 yields 000 and log⁡\loglog of any nonpositive number is 000 (so ddd is real-valued everywhere).

Assertion. For all real p,qp,qp,q,

p∈[0,1]  and  q∈(0,1)⟹2 (p−q)2 ≤ d(p,q).p\in[0,1]\ \text{ and }\ q\in(0,1)\quad\Longrightarrow\quad 2\,(p-q)^{2}\ \le\ d(p,q).p∈[0,1]  and  q∈(0,1)⟹2(p−q)2 ≤ d(p,q).

Hypotheses.

  • 0≤p≤10\le p\le 10≤p≤1 (closed interval; both endpoints allowed).
  • 0<q<10<q<10<q<1 (open interval; both inequalities strict).

Edge cases.

  • At p=0p=0p=0 the first term is 0⋅log⁡(0/q)=00\cdot\log(0/q)=00⋅log(0/q)=0 (by multiplication with zero), so d(0,q)=log⁡11−qd(0,q)=\log\frac{1}{1-q}d(0,q)=log1−q1​; at p=1p=1p=1, d(1,q)=log⁡1qd(1,q)=\log\frac{1}{q}d(1,q)=logq1​.
  • Because qqq is strictly interior, the conventional finite boundary values d(p,0)=(1−p)log⁡(1−p)d(p,0)=(1-p)\log(1-p)d(p,0)=(1−p)log(1−p) and d(p,1)=plog⁡pd(p,1)=p\log pd(p,1)=plogp play no role.
  • The conclusion is a non-strict inequality.
Human review
  • Endorsed by Community (Bot) · Jul 26, 2026

  • Endorsed by Shuze Chen · Jul 26, 2026

    Confirmed by the mission captain (proposal self-audit).

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