Documentation

CslibFrontier.Foundations.Analysis.SpecialFunctions.LogSum

The log-sum inequality with uniform weights #

For nonnegative reals x i over a finite set s with total T, Jensen's inequality for the convex function x ↦ x log x (Mathlib's Real.convexOn_mul_log) gives T log (T / #s) ≤ ∑ x log x. Equivalently, the entropy of the distribution x / T is at most log #s. No nonemptiness or positivity hypothesis is needed: an empty s or a zero total makes the left side 0.

Main results #

theorem Real.sum_mul_log_div_card_le {ι : Type u_1} (s : Finset ι) {x : ι → ℝ} (hx : ∀ i ∈ s, 0 ≤ x i) :
(∑ i ∈ s, x i) * log ((∑ i ∈ s, x i) / ↑s.card) ≤ ∑ i ∈ s, x i * log (x i)

Log-sum inequality with uniform weights, from Jensen's inequality for x log x: for nonnegative x over s with total T = ∑ i ∈ s, x i, T log (T / #s) ≤ ∑ i ∈ s, x i log (x i).