Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

IID one-way key distillation (98)–(99)

Open
QAlgorithms.Papers.Independent.Advance50.P28.iid_one_way_key_distillation

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

prove2quantum

Take n≥1n\ge1n≥1 iid copies of a normalized source (A,B,E)(A,B,E)(A,B,E) with finite abelian AAA and measurable side information. Write ϕB(t)\phi_B(t)ϕB​(t) and ϕE(t)\phi_E(t)ϕE​(t) for its conditional phi functions. For all positive integers M,LM,LM,L, there is a single one-way protocol with a uniform MMM-valued Alice key and public transcript X+AnX+A^nX+An such that

ϵB≤3inf⁡0≤s≤1(ML)s∣A∣−nsenϕB(−s),d1≤9inf⁡0≤t≤1/2∣A∣ntenϕE(t)Lt.\epsilon_B\le3\inf_{0\le s\le1}(ML)^s|A|^{-ns}e^{n\phi_B(-s)},\qquad d_1\le9\inf_{0\le t\le1/2}\frac{|A|^{nt}e^{n\phi_E(t)}}{L^t}.ϵB​≤30≤s≤1inf​(ML)s∣A∣−nsenϕB​(−s),d1​≤90≤t≤1/2inf​Lt∣A∣ntenϕE​(t)​.

Bob and Eve observe the whole transcript together with their respective original side information. Both guarantees concern the same stochastic protocol and the actual iid source, without an unrelated input distribution. For side variable V=BV=BV=B or EEE, ϕV(t)=log⁡EV[(∑aP(a∣V)1/(1−t))1−t]\phi_V(t)=\log\mathbb E_V[(\sum_aP(a|V)^{1/(1-t)})^{1-t}]ϕV​(t)=logEV​[(∑a​P(a∣V)1/(1−t))1−t]; zero-probability letters contribute zero.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P28
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped BigOperators ENNReal Topology

namespace QAlgorithms.Papers.Independent.Advance50.P28

open QAlgorithms.Papers.Independent.Information100.P56 (IsLaw)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- Hayashi, PDF p.16, (98)–(99): ONE protocol meets both iid bounds; no unrelated
input law p is introduced. The decoder and Eve both receive the whole public mask. -/
theorem iid_one_way_key_distillation {A B E : Type*} [AddCommGroup A] [Fintype A]
    [MeasurableSpace A] [MeasurableSingletonClass A]
    [MeasurableSpace B] [MeasurableSpace E]
    (muB : Measure B) (muE : Measure E) [IsProbabilityMeasure muB] [IsProbabilityMeasure muE]
    (pB : B → A → ℝ) (pE : E → A → ℝ)
    (hp : CompatibleMarginals muB pB muE pE)
    (n M L : ℕ) (hn : 0 < n) (hM : 0 < M) (hL : 0 < L) :
    ∃ C : WiretapCode (Fin n → A) ((Fin n → A) × (Fin n → B)) M,
      wiretapDecodingError (Measure.count.prod (Measure.pi (fun _ : Fin n => muB)))
        (generalAdditiveDensity (conditionalIid pB n)) C ≤
        3 * sInf ((fun s : ℝ => (M * L : ℝ≥0∞) ^ s * ENNReal.ofReal (Real.exp
          ((n : ℝ) * (-s * Real.log (Fintype.card A : ℝ) + conditionalPhi muB pB (-s))))) ''
            Set.Icc 0 1) ∧
      codeLeakage (Measure.count.prod (Measure.pi (fun _ : Fin n => muE)))
        (generalAdditiveDensity (conditionalIid pE n)) C ≤
        9 * sInf ((fun t : ℝ => ENNReal.ofReal (Real.exp
          ((n : ℝ) * (t * Real.log (Fintype.card A : ℝ) + conditionalPhi muE pE t))) /
            (L : ℝ≥0∞) ^ t) '' Set.Icc 0 (1 / 2)) := by sorry

end QAlgorithms.Papers.Independent.Advance50.P28

end
Source
Tight exponential analysis of universally composable privacy amplification and its applications, arXiv:1010.1358v5, PDF p. 16, IID one-way key distillation (98)–(99)
Read-back

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

Let AAA be a finite abelian group with a measurable structure in which singletons are measurable, and let B,EB,EB,E be measurable spaces with probability measures μB,μE\mu_B,\mu_EμB​,μE​. Suppose pB:B×A→Rp_B:B\times A\to\mathbb RpB​:B×A→R and pE:E×A→Rp_E:E\times A\to\mathbb RpE​:E×A→R are nonnegative probability vectors on AAA at every point, have measurable coordinate functions, and obey

∫BpB(b,a) dμB(b)=∫EpE(e,a) dμE(e)(a∈A).\int_B p_B(b,a)\,d\mu_B(b)=\int_E p_E(e,a)\,d\mu_E(e) \qquad(a\in A).∫B​pB​(b,a)dμB​(b)=∫E​pE​(e,a)dμE​(e)(a∈A).

For V=B,EV=B,EV=B,E, define, using natural logarithms and real powers,

ΦV(t)=log⁡ ⁣(∫V(∑a∈ApV(v,a)1/(1−t))1−tdμV(v)).\Phi_V(t)=\log\!\left(\int_V \left(\sum_{a\in A}p_V(v,a)^{1/(1-t)}\right)^{1-t}d\mu_V(v)\right).ΦV​(t)=log​∫V​(a∈A∑​pV​(v,a)1/(1−t))1−tdμV​(v)​.

For every choice of positive integers n,M,Ln,M,Ln,M,L, there exist encoder masses cm:An→[0,∞]c_m:A^n\to[0,\infty]cm​:An→[0,∞], with ∑x∈Ancm(x)=1\sum_{x\in A^n}c_m(x)=1∑x∈An​cm​(x)=1 for each m=1,…,Mm=1,\ldots,Mm=1,…,M, and measurable, pairwise disjoint decoding sets Dm⊆An×BnD_m\subseteq A^n\times B^nDm​⊆An×Bn. Put

νV=count⁡An⊗μV⊗n,qmV(z,v)=∑x∈Ancm(x)[∏i=1npV(vi,zi−xi)]+,qˉE=1M∑mqmE,\nu_V=\operatorname{count}_{A^n}\otimes\mu_V^{\otimes n}, \qquad q_m^V(z,v)=\sum_{x\in A^n}c_m(x) \left[\prod_{i=1}^n p_V(v_i,z_i-x_i)\right]_+, \qquad \bar q^E=\frac1M\sum_m q_m^E,νV​=countAn​⊗μV⊗n​,qmV​(z,v)=x∈An∑​cm​(x)[i=1∏n​pV​(vi​,zi​−xi​)]+​,qˉ​E=M1​m∑​qmE​,

where [r]+=max⁡(r,0)[r]_+=\max(r,0)[r]+​=max(r,0) is regarded as an extended nonnegative real and subtraction in AnA^nAn is coordinatewise. Define

Err⁡=1M∑m∫(An×Bn)∖DmqmB dνB,Leak⁡=1M∑m∫((qmE\dotminusqˉE)+(qˉE\dotminusqmE)) dνE,\operatorname{Err}=\frac1M\sum_m \int_{(A^n\times B^n)\setminus D_m}q_m^B\,d\nu_B, \qquad \operatorname{Leak}=\frac1M\sum_m\int \bigl((q_m^E\mathbin{\dotminus}\bar q^E)+ (\bar q^E\mathbin{\dotminus}q_m^E)\bigr)\,d\nu_E,Err=M1​m∑​∫(An×Bn)∖Dm​​qmB​dνB​,Leak=M1​m∑​∫((qmE​\dotminusqˉ​E)+(qˉ​E\dotminusqmE​))dνE​,

where \dotminus\dotminus\dotminus denotes truncated subtraction. The encoder and decoding sets can be chosen so that, simultaneously in the extended nonnegative reals,

Err⁡≤3inf⁡0≤s≤1(ML)s[e n(−slog⁡∣A∣+ΦB(−s))]+,Leak⁡≤9inf⁡0≤t≤1/2[e n(tlog⁡∣A∣+ΦE(t))]+Lt.\operatorname{Err}\le 3\inf_{0\le s\le1}(ML)^s \left[e^{\,n(-s\log|A|+\Phi_B(-s))}\right]_+, \qquad \operatorname{Leak}\le 9\inf_{0\le t\le1/2} \frac{\left[e^{\,n(t\log|A|+\Phi_E(t))}\right]_+}{L^t}.Err≤30≤s≤1inf​(ML)s[en(−slog∣A∣+ΦB​(−s))]+​,Leak≤90≤t≤1/2inf​Lt[en(tlog∣A∣+ΦE​(t))]+​​.

Both infima include their endpoints; the decoding sets need not cover the output space, and no restriction ML≤∣A∣nML\le|A|^nML≤∣A∣n is assumed.

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

    Confirmed by the moderator at approval.

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