Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2: expected iid empirical-output approximation

Open
QAlgorithms.Papers.Independent.Intake100.P73.iid_approximation_expectations

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

prove2quantum

Let W:x↦WxW:x\mapsto W_xW:x↦Wx​ be a classical discrete stochastic channel from XXX to YYY, and let ppp be a probability mass function on XXX. Write Wp(y)=∑xp(x)Wx(y)W_p(y)=\sum_xp(x)W_x(y)Wp​(y)=∑x​p(x)Wx​(y). All logarithms are natural, d(P,Q)=∑y∣P(y)−Q(y)∣d(P,Q)=\sum_y|P(y)-Q(y)|d(P,Q)=∑y​∣P(y)−Q(y)∣ is the full L1 distance, and D(P∥Q)D(P\|Q)D(P∥Q) is extended nonnegative KL divergence, infinite on a support mismatch. Zero-mass terms in the defining KL expression contribute zero.

For C>0C>0C>0, define δ=Pp(x)Wx(y){Wx(y)/Wp(y)>C}\delta=\mathbb P_{p(x)W_x(y)}\{W_x(y)/W_p(y)>C\}δ=Pp(x)Wx​(y)​{Wx​(y)/Wp​(y)>C} and δ′=∑xp(x)∑y:Wx(y)/Wp(y)≤CWx(y)2/Wp(y)\delta'=\sum_xp(x)\sum_{y:W_x(y)/W_p(y)\le C}W_x(y)^2/W_p(y)δ′=∑x​p(x)∑y:Wx​(y)/Wp​(y)≤C​Wx​(y)2/Wp​(y), excluding null joint-support terms before division. Set η(a)=−alog⁡a\eta(a)=-a\log aη(a)=−aloga, with η(0)=0\eta(0)=0η(0)=0, and

ϕ(t∣W,p)=log⁡∑y(∑xp(x)Wx(y)1/(1+t))1+t.\phi(t\mid W,p)=\log\sum_y\left(\sum_xp(x)W_x(y)^{1/(1+t)}\right)^{1+t}.ϕ(t∣W,p)=logy∑​(x∑​p(x)Wx​(y)1/(1+t))1+t.

Let M≥1M\ge1M≥1, C>0C>0C>0, and let X1,…,XMX_1,\ldots,X_MX1​,…,XM​ be independent with common law ppp. Define WXM=M−1∑iWXiW_{X^M}=M^{-1}\sum_iW_{X_i}WXM​=M−1∑i​WXi​​. Then

E d(WXM,Wp)≤2δ+δ′/M,\mathbb E\,d(W_{X^M},W_p)\le2\delta+\sqrt{\delta'/M},Ed(WXM​,Wp​)≤2δ+δ′/M​,

and, for each −1/2≤t<0-1/2\le t<0−1/2≤t<0,

E D(WXM∥Wp)≤log⁡(1+Mteϕ(t∣W,p))−t.\mathbb E\,D(W_{X^M}\|W_p)\le\frac{\log(1+M^te^{\phi(t\mid W,p)})}{-t}.ED(WXM​∥Wp​)≤−tlog(1+Mteϕ(t∣W,p))​.

If YYY is finite, also

E D(WXM∥Wp)≤η(δ)+δlog⁡∣Y∣+δ′/M.\mathbb E\,D(W_{X^M}\|W_p)\le\eta(\delta)+\delta\log|Y|+\delta'/M.ED(WXM​∥Wp​)≤η(δ)+δlog∣Y∣+δ′/M.

These are expectations under the actual iid tuple law, including repeated samples. They yield code existence bounds without any finite-input or absolute-continuity hypothesis.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P73
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P73

open Filter

open scoped BigOperators ENNReal Topology

attribute [local instance] Classical.propDecidable Classical.decEq

universe u

/-- Hayashi, PDF pp.4–5, Lemma 2, (12)–(14): actual iid EXPECTATIONS.
Only (14) needs finite Y; no input finiteness or absolute continuity is assumed. -/
theorem iid_approximation_expectations {X Y : Type*} (W : X → Y → ℝ≥0∞)
    (hW : IsDiscreteStochastic W) (p : PMF X) (M : ℕ) (hM : 0 < M) (C : ℝ) (hC : 0 < C) :
    iidExpectation p M (fun a => fullL1 (tupleOutput W a) (discreteOutputMixture W p)) ≤
      ENNReal.ofReal (l1Bound W p C M) ∧
    (∀ t : ℝ, -(1 / 2) ≤ t → t < 0 →
      (iidExpectation p M (fun a => discreteKLDivergence (tupleOutput W a) (discreteOutputMixture W p)) : EReal) ≤
        klBound W p M t) ∧
    (Finite Y → iidExpectation p M (fun a => discreteKLDivergence (tupleOutput W a) (discreteOutputMixture W p)) ≤
      ENNReal.ofReal (entropyBound W p M C)) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P73

end
Source
General non-asymptotic and asymptotic formulas in channel resolvability and identification capacity and their application to wire-tap channel, arXiv:cs/0503088v2, PDF p. 4, Lemma 2, (12)–(14): expected iid empirical-output approximation
Read-back

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

For any types X,YX,YX,Y, any W:X×Y→[0,∞]W:X\times Y\to[0,\infty]W:X×Y→[0,∞] with ∑y′W(x,y)=1\sum'_yW(x,y)=1∑y′​W(x,y)=1 for every xxx, any probability mass function ppp on XXX, any positive integer MMM, and any positive real CCC, put q(y)=∑x′p(x)W(x,y)q(y)=\sum'_x p(x)W(x,y)q(y)=∑x′​p(x)W(x,y). For a tuple a=(a1,…,aM)∈XMa=(a_1,\ldots,a_M)\in X^Ma=(a1​,…,aM​)∈XM, allowing repeated entries, define Pa(y)=M−1∑i=1MW(ai,y)P_a(y)=M^{-1}\sum_{i=1}^M W(a_i,y)Pa​(y)=M−1∑i=1M​W(ai​,y) and, for any f:XM→[0,∞]f:X^M\to[0,\infty]f:XM→[0,∞], define

E(f)=∑a∈XM′(∏i=1Mp(ai))f(a).\mathcal E(f)=\sum'_{a\in X^M}\left(\prod_{i=1}^M p(a_i)\right)f(a).E(f)=a∈XM∑′​(i=1∏M​p(ai​))f(a).

Write D1(P,Q)=∑y′((P(y)\dotminusQ(y))+(Q(y)\dotminusP(y)))D_1(P,Q)=\sum'_y((P(y)\mathbin{\dotminus}Q(y))+(Q(y)\mathbin{\dotminus}P(y)))D1​(P,Q)=∑y′​((P(y)\dotminusQ(y))+(Q(y)\dotminusP(y))), using truncated subtraction, and DK(P,Q)=∑y′A(P(y),Q(y))D_K(P,Q)=\sum'_y A(P(y),Q(y))DK​(P,Q)=∑y′​A(P(y),Q(y)), where A(v,w)=wA(v,w)=wA(v,w)=w if v=0v=0v=0, A(v,w)=+∞A(v,w)=+\inftyA(v,w)=+∞ if v≠0,w=0v\ne0,w=0v=0,w=0, and otherwise

A(v,w)=w[ρ(v)ρ(w)log⁡ ⁣(ρ(v)ρ(w))−ρ(v)ρ(w)+1]+.A(v,w)=w\left[ \frac{\rho(v)}{\rho(w)}\log\!\left(\frac{\rho(v)}{\rho(w)}\right) -\frac{\rho(v)}{\rho(w)}+1\right]_+.A(v,w)=w[ρ(w)ρ(v)​log(ρ(w)ρ(v)​)−ρ(w)ρ(v)​+1]+​.

Here ρ\rhoρ converts extended nonnegative numbers to reals, sending +∞+\infty+∞ to 000, and [r]+=max⁡(r,0)[r]_+=\max(r,0)[r]+​=max(r,0) is embedded in [0,∞][0,\infty][0,∞]. Define

u=ρ ⁣(∑x′∑y′1{p(x)>0, q(y)>0, C<W(x,y)/q(y)}p(x)W(x,y)),δ=∑x′∑y′1{p(x)>0, q(y)>0, W(x,y)/q(y)≤C}p(x)W(x,y)2q(y),u=\rho\!\left(\sum'_x\sum'_y \mathbf1_{\{p(x)>0,\ q(y)>0,\ C<W(x,y)/q(y)\}}p(x)W(x,y)\right), \quad \delta=\sum'_x\sum'_y \mathbf1_{\{p(x)>0,\ q(y)>0,\ W(x,y)/q(y)\le C\}} \frac{p(x)W(x,y)^2}{q(y)},u=ρ(x∑′​y∑′​1{p(x)>0, q(y)>0, C<W(x,y)/q(y)}​p(x)W(x,y)),δ=x∑′​y∑′​1{p(x)>0, q(y)>0, W(x,y)/q(y)≤C}​q(y)p(x)W(x,y)2​,

where each indicated summand is zero outside its condition. The theorem asserts all three of the following:

E(a↦D1(Pa,q))≤[2u+ρ(δ)/M]+;\mathcal E\bigl(a\mapsto D_1(P_a,q)\bigr) \le\left[2u+\sqrt{\rho(\delta)/M}\right]_+;E(a↦D1​(Pa​,q))≤[2u+ρ(δ)/M​]+​;

for every real −12≤t<0-\tfrac12\le t<0−21​≤t<0,

E(a↦DK(Pa,q))≤log⁡ ⁣(1+Mt∑y′(∑x′p(x)W(x,y)1/(1+t))1+t)−t;\mathcal E\bigl(a\mapsto D_K(P_a,q)\bigr) \le\frac{\log\!\left(1+M^t \sum'_y\left(\sum'_x p(x)W(x,y)^{1/(1+t)}\right)^{1+t}\right)}{-t};E(a↦DK​(Pa​,q))≤−tlog(1+Mt∑y′​(∑x′​p(x)W(x,y)1/(1+t))1+t)​;

and, if YYY is finite,

E(a↦DK(Pa,q))≤[h(u)+ulog⁡∣Y∣+ρ(δ)M]+.\mathcal E\bigl(a\mapsto D_K(P_a,q)\bigr) \le\left[h(u)+u\log|Y|+\frac{\rho(\delta)}M\right]_+.E(a↦DK​(Pa​,q))≤[h(u)+ulog∣Y∣+Mρ(δ)​]+​.

The middle inequality is in the extended reals with the extended logarithm, and h(v)=0h(v)=0h(v)=0 for v=0v=0v=0, otherwise h(v)=−vlog⁡vh(v)=-v\log vh(v)=−vlogv. The middle assertion has no finiteness hypothesis on YYY. The assumptions exclude zero sample size and nonpositive CCC, and force X,YX,YX,Y to be nonempty; arbitrary infinite types are otherwise allowed.

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