Documentation

CslibFrontier.Foundations.Data.Nat.Choose.Entropy

Entropy bounds for partial binomial sums #

For q ≥ 2, 0 ≤ α ≤ 1 - 1 / q and r ≤ α n, ∑_{j ≤ r} C(n, j) (q - 1) ^ j ≤ exp (n H_q(α)), where H_q = Real.qaryEntropy q is the q-ary entropy in nats. The left side is the number of words over q letters within Hamming distance r of a fixed word of length n, so this is the entropy bound on the volume of a Hamming ball Guruswami, Rudra and Sudan, Proposition 3.3.3. The proof compares each term with the binomial expansion of (α + (1 - α)) ^ n = 1: since α ≤ (q - 1) (1 - α), every term of weight j ≤ α n satisfies (q - 1) ^ j exp (-n H_q(α)) ≤ α ^ j (1 - α) ^ (n - j). In base q this reads Vol_q(n, α n) ≤ q ^ (H_q(α) n) with H_q measured in base q, the form in the source. The binary case q = 2 is Cslib.sum_choose_le_exp_mul_binEntropy.

Conversely, a single binomial coefficient is within a factor n + 1 of the entropy bound: exp (n h(w / n)) ≤ (n + 1) C(n, w) (Cslib.exp_mul_binEntropy_le_succ_mul_choose), because the term C(n, w) p ^ w (1 - p) ^ (n - w) with p = w / n is the largest of the n + 1 terms of the binomial expansion of (p + (1 - p)) ^ n = 1 (Cslib.choose_mul_pow_le_mode).

Main results #

References #

theorem Cslib.sum_choose_mul_pow_le_exp_mul_qaryEntropy {q n r : ℕ} {α : ℝ} (hq : 2 ≤ q) (hα₀ : 0 ≤ α) (hα : α ≤ 1 - 1 / ↑q) (hr : ↑r ≤ α * ↑n) :
↑(∑ j ∈ Finset.range (r + 1), n.choose j * (q - 1) ^ j) ≤ Real.exp (↑n * Real.qaryEntropy q α)

The entropy bound on the volume of a Hamming ball Guruswami, Rudra and Sudan, Proposition 3.3.3: for q ≥ 2, 0 ≤ α ≤ 1 - 1 / q and r ≤ α n, ∑_{j ≤ r} C(n, j) (q - 1) ^ j ≤ exp (n H_q(α)), where H_q = Real.qaryEntropy q is the q-ary entropy in nats.

theorem Cslib.sum_choose_le_exp_mul_binEntropy {n r : ℕ} {α : ℝ} (hα₀ : 0 ≤ α) (hα : α ≤ 1 / 2) (hr : ↑r ≤ α * ↑n) :
∑ j ∈ Finset.range (r + 1), ↑(n.choose j) ≤ Real.exp (↑n * Real.binEntropy α)

The entropy bound on the volume of a binary Hamming ball: for 0 ≤ α ≤ 1 / 2 and r ≤ α n, ∑_{j ≤ r} C(n, j) ≤ exp (n h(α)), where h = Real.binEntropy is the binary entropy in nats. This is the case q = 2 of sum_choose_mul_pow_le_exp_mul_qaryEntropy.

theorem Cslib.exp_mul_binEntropy_le_succ_mul_choose {n w : ℕ} (hw : w ≤ n) :
Real.exp (↑n * Real.binEntropy (↑w / ↑n)) ≤ (↑n + 1) * ↑(n.choose w)

The entropy lower bound on a binomial coefficient: for w ≤ n, exp (n h(w / n)) ≤ (n + 1) C(n, w), where h = Real.binEntropy is the binary entropy in nats. The weight C(n, w) p ^ w (1 - p) ^ (n - w) with p = w / n is the largest of the n + 1 terms of the binomial expansion of (p + (1 - p)) ^ n = 1, and p ^ w (1 - p) ^ (n - w) = exp (-n h(p)).

theorem Cslib.binEntropy_le_mul_log_exp_one_div {y : ℝ} (h0 : 0 < y) (h1 : y < 1) :

A simple upper bound on the binary entropy: h(y) ≤ y log (e / y) for 0 < y < 1, because -(1 - y) log (1 - y) ≤ y.

theorem Cslib.exp_mul_qaryEntropy_le_succ_mul_choose_mul_pow {q n e : ℕ} (hq : 2 ≤ q) (hen : e ≤ n) :
Real.exp (↑n * Real.qaryEntropy q (↑e / ↑n)) ≤ (↑n + 1) * (↑(n.choose e) * (↑q - 1) ^ e)

The q-ary entropy lower bound on a single weighted binomial coefficient: for q ≥ 2 and e ≤ n, exp (n * H_q(e / n)) ≤ (n + 1) * (C(n, e) * (q - 1) ^ e), where H_q = Real.qaryEntropy q is the q-ary entropy in nats. Combines Cslib.exp_mul_binEntropy_le_succ_mul_choose with H_q(p) = h(p) + p * log (q - 1).

theorem Cslib.qaryEntropy_le_log {q : ℕ} (hq : 2 ≤ q) {p : ℝ} (hp0 : 0 ≤ p) (hp1 : p ≤ 1) :

Upper bound on the q-ary entropy: for q ≥ 2 and 0 ≤ p ≤ 1, H_q(p) ≤ log q (in nats), via Gibbs' inequality log x ≤ x - 1.