Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 4.2 — D(p∥q)≤∑s(p(s)−q(s))2/q(s)D(p\|q)\le\sum_s (p(s)-q(s))^2/q(s)D(p∥q)≤∑s​(p(s)−q(s))2/q(s)

Proved
RobustDP.ChiSquare.sec42_relEntropy_le_chiSq

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

chi-squareinformation-theoryp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1relative-entropy

Let S\mathcal SS be a finite set and p,q∈M(S)p,q\in\mathcal M(\mathcal S)p,q∈M(S) probability measures with q(s)>0q(s)>0q(s)>0 for every sss. With DDD the relative entropy (natural logarithm, 0log⁡0=00\log 0=00log0=0),

D(p∥q)=∑s∈Sp(s)log⁡p(s)q(s) ≤ ∑s∈Sp(s)⋅p(s)−q(s)q(s) = ∑s∈S(p(s)−q(s))2q(s).D(p\|q)=\sum_{s\in\mathcal S}p(s)\log\frac{p(s)}{q(s)}\ \le\ \sum_{s\in\mathcal S}p(s)\cdot\frac{p(s)-q(s)}{q(s)}\ =\ \sum_{s\in\mathcal S}\frac{(p(s)-q(s))^2}{q(s)} .D(p∥q)=s∈S∑​p(s)logq(s)p(s)​ ≤ s∈S∑​p(s)⋅q(s)p(s)−q(s)​ = s∈S∑​q(s)(p(s)−q(s))2​.

Hence every ppp in the χ² set (46) has D(p∥q)≤tD(p\|q)\le tD(p∥q)≤t: the χ² set is an inner, i.e. conservative, approximation of the relative-entropy confidence region (39).

Formalization Note The page justifies the inequality by "log⁡(1+x)≤x\log(1+x)\le xlog(1+x)≤x for all x∈Rx\in\mathbf Rx∈R", which holds for x>−1x>-1x>−1; terms with p(s)=0p(s)=0p(s)=0 are 000 on both sides. The middle sum is printed over "s∈cSs\in c\mathcal Ss∈cS", a misprint for s∈Ss\in\mathcal Ss∈S. The statement is the two relations of the display; the equality uses ∑sp(s)=∑sq(s)=1\sum_s p(s)=\sum_s q(s)=1∑s​p(s)=∑s​q(s)=1.

Preamble
import Mathlib
import Definitions.Def_RobustDP_ChiSquare_Moments
import Definitions.Def_RobustDP_ChiSquare_ChiSqSet
import Definitions.Def_RobustDP_ChiSquare_RelEntropy
Formal statement
namespace RobustDP.ChiSquare

/-- §4.2, the display before (46) (Iyengar, TR-2002-07, p. 18): for `p, q ∈ M(S)` with
`q(s) > 0`, `D(p‖q) ≤ ∑ p(s) (p(s) − q(s))/q(s) = ∑ (p(s) − q(s))²/q(s)`. -/
theorem sec42_relEntropy_le_chiSq {S : Type*} [Fintype S] (p q : S → ℝ)
    (hp : p ∈ stdSimplex ℝ S) (hq : q ∈ stdSimplex ℝ S) (hq_pos : ∀ s, 0 < q s) :
    relEntropy p q ≤ ∑ s, p s * ((p s - q s) / q s) ∧
      ∑ s, p s * ((p s - q s) / q s) = chiSqDist p q := by sorry

end RobustDP.ChiSquare
Source
Iyengar, Robust dynamic programming, CORC Tech Report TR-2002-07 (rev. May 4, 2004), p. 18, Section 4.2, display before (46)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 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