Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5: two-sided empirical-entropy concentration

Open
QAlgorithms.Papers.Independent.Intake100.P61.iid_empirical_entropy_concentration

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let p be a probability law on an alphabet of size 2^d and let n>=2 independent samples have the product law. Let Hhat be their plug-in entropy in bits, M its actual expectation under this same law, and r=sqrt(2 (log_2 n)^2 ln(2/epsilon)/n). For 0<epsilon<1, Pr[|Hhat-M|>=r]<=epsilon. The source cites Antos and Kontoyiannis. The n=1 endpoint is corrected as recorded below.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P61
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped BigOperators ENNReal Topology

namespace QAlgorithms.Papers.Independent.Intake100.P61

attribute [local instance] Classical.propDecidable Classical.decEq

-- The frozen frequency formula specializes exactly to the source alphabet Fin (2 ^ d).

open QAlgorithms.Papers.Independent.Advance50.P30 (empiricalFrequency)

/-- PDF p.18, Theorem 5 (D28), Antos--Kontoyiannis: two-sided concentration
around the actual iid expectation of empirical entropy. Printed: no n>=2 guard.
Changed: n>=2, since at n=1 the radius is zero and the inclusive event is certain.
No accepted concentration theorem is needed to state this result with sorry. -/
theorem iid_empirical_entropy_concentration
    (d n : ℕ) (hn : 2 ≤ n) (p : Fin (2 ^ d) → ℝ)
    (hp : ∀ a, 0 ≤ p a) (hmass : ∑ a, p a = 1)
    (epsilon : ℝ) (heps : 0 < epsilon) (heps1 : epsilon < 1) :
    let mean := ∑ word : Fin n → Fin (2 ^ d),
      (∏ i, p (word i)) * empiricalEntropy word
    iidWordProbability p n (fun word =>
      |empiricalEntropy word - mean| ≥
        Real.sqrt (2 * (Real.logb 2 n) ^ 2 * Real.log (2 / epsilon) / n)) ≤ epsilon := by sorry

end QAlgorithms.Papers.Independent.Intake100.P61

end
Source
Composable security proof for continuous-variable quantum key distribution with coherent states, arXiv:1408.5689v3, PDF p. 18, Theorem 5, D28
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For every natural number ddd, every natural number n≥2n\ge 2n≥2, every function p:{0,…,2d−1}→Rp:\{0,\ldots,2^d-1\}\to\mathbb Rp:{0,…,2d−1}→R satisfying p(a)≥0p(a)\ge 0p(a)≥0 for all aaa and ∑ap(a)=1\sum_a p(a)=1∑a​p(a)=1, and every real number 0<ϵ<10<\epsilon<10<ϵ<1, define the empirical frequency and empirical entropy of a word w∈{0,…,2d−1}nw\in\{0,\ldots,2^d-1\}^nw∈{0,…,2d−1}n by fa(w)=∣{i:wi=a}∣/nf_a(w)=|\{i:w_i=a\}|/nfa​(w)=∣{i:wi​=a}∣/n and H(w)=−∑afa(w)log⁡2fa(w)H(w)=-\sum_a f_a(w)\log_2 f_a(w)H(w)=−∑a​fa​(w)log2​fa​(w), with zero-frequency terms equal to zero. Define μ=∑w(∏i=0n−1p(wi))H(w)\mu=\sum_w(\prod_{i=0}^{n-1}p(w_i))H(w)μ=∑w​(∏i=0n−1​p(wi​))H(w). Then

∑w∈{0,…,2d−1}n∣H(w)−μ∣≥2(log⁡2n)2ln⁡(2/ϵ)/n∏i=0n−1p(wi)≤ϵ.\sum_{\substack{w\in\{0,\ldots,2^d-1\}^n\\ |H(w)-\mu|\ge \sqrt{\,2(\log_2 n)^2\ln(2/\epsilon)/n\,}}} \prod_{i=0}^{n-1}p(w_i)\le\epsilon.w∈{0,…,2d−1}n∣H(w)−μ∣≥2(log2​n)2ln(2/ϵ)/n​​∑​i=0∏n−1​p(wi​)≤ϵ.

The quantification includes d=0d=0d=0, when the alphabet has one element, and allows some values of ppp to be zero.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

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