Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 10.7.1 (Non-Negativity of Relative Entropy): D(p∥q)≥0D(p\|q)\ge0D(p∥q)≥0 for subnormalized qqq, with equality iff p=qp=qp=q

Proved
WildeQIT.ZhangAudenaert.relEntropy_nonneg

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

entropyinformation-theoryp2o-gran-per-chapterp2o-plan-bookp2o-v1wilde-qit

Let ppp be a probability distribution on a finite alphabet X\mathcal XX, and let q:X→[0,1]q:\mathcal X\to[0,1]q:X→[0,1] be a function with ∑xq(x)≤1\sum_x q(x)\le 1∑x​q(x)≤1 (not necessarily a probability distribution). Let

D(p∥q)={∑xp(x)log⁡p(x)q(x)if supp⁡(p)⊆supp⁡(q),+∞otherwiseD(p\|q)=\begin{cases}\sum_x p(x)\log\dfrac{p(x)}{q(x)} & \text{if } \operatorname{supp}(p)\subseteq\operatorname{supp}(q),\\[2pt] +\infty & \text{otherwise}\end{cases}D(p∥q)=⎩⎨⎧​∑x​p(x)logq(x)p(x)​+∞​if supp(p)⊆supp(q),otherwise​

be the relative entropy (Definition 10.5.2, in bits). Then

D(p∥q)≥0,D(p\|q)\ge 0,D(p∥q)≥0,

and D(p∥q)=0D(p\|q)=0D(p∥q)=0 if and only if p=qp=qp=q (as functions on X\mathcal XX).

This is the inequality from which the maximal value of entropy, Theorem 10.2.1, Theorem 10.4.1 and strong subadditivity follow; allowing subnormalized qqq is what the proof of the data-processing inequality (Theorem 10.7.2) needs.

Formalization Note D(p∥q)D(p\|q)D(p∥q) is the published extended-real relative entropy (WildeQIT.relEntropy), so the value +∞+\infty+∞ is represented exactly.

Differences from the source: none.

Preamble
import Mathlib
import Definitions.Def_WildeQIT_relEntropy
Formal statement
namespace WildeQIT.ZhangAudenaert

/-- **Theorem 10.7.1 (Non-Negativity of Relative Entropy).**
Wilde, *From Classical to Quantum Shannon Theory*, arXiv:1106.1445v8, Theorem 10.7.1, (10.44),
p. 299: "Let `p(x)` be a probability distribution over the alphabet `𝒳` and let `q : 𝒳 → [0, 1]`
be a function such that `∑_x q(x) ≤ 1`. Then the relative entropy `D(p‖q)` is non-negative:
`D(p‖q) ≥ 0`, and `D(p‖q) = 0` if and only if `p = q`."

**Formalization Note.** `q` is a real function on the finite alphabet `α` with values in
`[0, 1]` (it need not sum to one); `D(p‖q) = relEntropy p q` is the published extended-real
relative entropy in bits, `+∞` when `supp p ⊄ supp q` (Definition 10.5.2). "`p = q`" is
equality of the functions `p.prob` and `q`. -/
theorem relEntropy_nonneg {α : Type} [Fintype α] (p : FinDist α) (q : α → ℝ)
    (hq : ∀ x, 0 ≤ q x ∧ q x ≤ 1) (hsum : ∑ x, q x ≤ 1) :
    0 ≤ relEntropy p q ∧ (relEntropy p q = 0 ↔ p.prob = q) := by sorry

end WildeQIT.ZhangAudenaert
Source
Wilde, From Classical to Quantum Shannon Theory, arXiv:1106.1445v8, Theorem 10.7.1, eq. (10.44), p. 299
Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 1, 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