Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

One-way key distillation (95)–(97)

Open
QAlgorithms.Papers.Independent.Advance50.P28.one_way_key_distillation

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

prove2quantum

Let AAA be a finite abelian group and let (A,B,E)(A,B,E)(A,B,E) be a normalized classical source, with measurable side information. Represent its compatible marginals by probability measures μB,μE\mu_B,\mu_EμB​,μE​ and conditional vectors pbB(a),peE(a)p^B_b(a),p^E_e(a)pbB​(a),peE​(a) with the same AAA marginal. For positive M,LM,LM,L, one protocol chooses an independent uniform MMM-valued Alice key, samples a codeword XXX conditional on it, and publicly sends X′=X+AX'=X+AX′=X+A. Bob uses (X′,B)(X',B)(X′,B) and Eve sees (X′,E)(X',E)(X′,E). The actual induced channels are WxB(x′,b)=pbB(x′−x)W_x^B(x',b)=p^B_b(x'-x)WxB​(x′,b)=pbB​(x′−x) and WxE(x′,e)=peE(x′−x)W_x^E(x',e)=p^E_e(x'-x)WxE​(x′,e)=peE​(x′−x). One protocol satisfies

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

The full L1L^1L1 secrecy includes the entire public mask. The conditional phi function is the integral of the conditional-vector norm, rather than a conditional-Renyi replacement. 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, (95)–(97): an actual one-way mask protocol. The code's
uniform key is independent of the source; Alice samples X from its stochastic
encoder and publicly sends X+A. Bob uses (X+A,B), Eve observes (X+A,E). -/
theorem 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)
    (M L : ℕ) (hM : 0 < M) (hL : 0 < L) :
    ∃ C : WiretapCode A (A × B) M,
      wiretapDecodingError (Measure.count.prod muB) (generalAdditiveDensity pB) C ≤
        3 * sInf ((fun s : ℝ => (M * L : ℝ≥0∞) ^ s * ENNReal.ofReal
          (Real.exp (-s * Real.log (Fintype.card A : ℝ) + conditionalPhi muB pB (-s)))) ''
            Set.Icc 0 1) ∧
      codeLeakage (Measure.count.prod muE) (generalAdditiveDensity pE) C ≤
        9 * sInf ((fun t : ℝ => ENNReal.ofReal (Real.exp
          (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, One-way key distillation (95)–(97)
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 pointwise nonnegative probability vectors on AAA, have measurable coordinate functions, and satisfy

∫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, write

Φ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)​,

using natural logarithms and real powers. For every pair of positive integers M,LM,LM,L, there exist encoder masses cm:A→[0,∞]c_m:A\to[0,\infty]cm​:A→[0,∞], indexed by m=1,…,Mm=1,\ldots,Mm=1,…,M, with ∑acm(a)=1\sum_a c_m(a)=1∑a​cm​(a)=1, and measurable, pairwise disjoint decoding sets Dm⊆A×BD_m\subseteq A\times BDm​⊆A×B. Define, with [r]+=max⁡(r,0)[r]_+=\max(r,0)[r]+​=max(r,0) embedded in the extended nonnegative reals,

qmV(z,v)=∑a∈Acm(a)[pV(v,z−a)]+,qˉE=1M∑m=1MqmE,q_m^V(z,v)=\sum_{a\in A}c_m(a)[p_V(v,z-a)]_+, \qquad \bar q^E=\frac1M\sum_{m=1}^M q_m^E,qmV​(z,v)=a∈A∑​cm​(a)[pV​(v,z−a)]+​,qˉ​E=M1​m=1∑M​qmE​,

and

Err⁡=1M∑m∫(A×B)∖DmqmB d(count⁡A⊗μB),Leak⁡=1M∑m∫((qmE\dotminusqˉE)+(qˉE\dotminusqmE)) d(count⁡A⊗μE),\operatorname{Err}=\frac1M\sum_m \int_{(A\times B)\setminus D_m}q_m^B\,d(\operatorname{count}_A\otimes\mu_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(\operatorname{count}_A\otimes\mu_E),Err=M1​m∑​∫(A×B)∖Dm​​qmB​d(countA​⊗μB​),Leak=M1​m∑​∫((qmE​\dotminusqˉ​E)+(qˉ​E\dotminusqmE​))d(countA​⊗μE​),

where \dotminus\dotminus\dotminus is truncated subtraction. These choices satisfy simultaneously, in the extended nonnegative reals,

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

The decoding sets need not cover the output space. Both infima include their endpoints, and no restriction ML≤∣A∣ML\le|A|ML≤∣A∣ is imposed.

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