Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§VII.A, equations (59)–(61): dual-universal privacy amplification on an iid Pauli wire-tap channel

Open
QAlgorithms.Papers.Independent.Intake100.P31.iid_security

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

prove2quantum

Let n≥1n\ge1n≥1 and let Cr≤F2nC_r\le\mathbb F_2^nCr​≤F2n​ be indexed by a finite nonempty seed set III, sampled uniformly and independently of inputs. Repeated codes at distinct seeds retain their multiplicity. Write tmin⁡=min⁡rdim⁡Crt_{\min}=\min_r\dim C_rtmin​=minr​dimCr​ and tmax⁡=max⁡rdim⁡Crt_{\max}=\max_r\dim C_rtmax​=maxr​dimCr​. A dimension-ttt universality bound means Pr⁡r[x∈Cr]≤ε2t−n\Pr_r[x\in C_r]\le\varepsilon 2^{t-n}Prr​[x∈Cr​]≤ε2t−n for every nonzero xxx. Use n≥1n\ge1n≥1 independent uses of the qubit Pauli channel ZxXzZ^xX^zZxXz, with independent single-qubit phase and bit probabilities pph,pbit∈[0,1]p_{\rm ph},p_{\rm bit}\in[0,1]pph​,pbit​∈[0,1]. Eve holds the entire complementary environment. A uniform message is a coset of L/KL/KL/K, with K≤L≤F2nK\le L\le\mathbb F_2^nK≤L≤F2n​; Alice sends the uniform mixture of words in that coset. Bob uses maximum-likelihood word decoding in LLL followed by projection modulo KKK. Let D(K,L)D(K,L)D(K,L) be the full trace norm between the actual cq state and the independent uniform-key state, and let χ(K,L)\chi(K,L)χ(K,L) be its Holevo information in bits. Let Pph(K,L)P_{\rm ph}(K,L)Pph​(K,L) be the actual ML quotient decoding error for K⊥/L⊥K^\perp/L^\perpK⊥/L⊥ under the phase marginal of this same Pauli law. The environment, decoder, and both leakage quantities are computed explicitly, rather than supplied as unrelated data. Set ηl(u)=h(u)+lu\eta_l(u)=h(u)+luηl​(u)=h(u)+lu for 0≤u≤1/20\le u\le1/20≤u≤1/2, and ηl(u)=1+lu\eta_l(u)=1+luηl​(u)=1+lu for u>1/2u>1/2u>1/2, where hhh is binary entropy in bits. For s∈[0,1]s\in[0,1]s∈[0,1] and p∈[0,1]p\in[0,1]p∈[0,1], define E0(s,p)=s−(1+s)log⁡2(p1/(1+s)+(1−p)1/(1+s))E_0(s,p)=s-(1+s)\log_2(p^{1/(1+s)}+(1-p)^{1/(1+s)})E0​(s,p)=s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s)) and E(R,p)=max⁡0≤s≤1[−sR+E0(s,p)]E(R,p)=\max_{0\le s\le1}[-sR+E_0(s,p)]E(R,p)=max0≤s≤1​[−sR+E0​(s,p)]. Fix LLL and a subcode family Kr≤LK_r\le LKr​≤L whose dual extended-code family is ε\varepsilonε-almost universal at its maximum dimension, with ε>0\varepsilon>0ε>0. Set t=min⁡rdim⁡Krt=\min_r\dim K_rt=minr​dimKr​, S=t/nS=t/nS=t/n, lr=dim⁡L−dim⁡Krl_r=\dim L-\dim K_rlr​=dimL−dimKr​, lmax⁡=dim⁡L−tl_{\max}=\dim L-tlmax​=dimL−t, and B=2−nE(1−S,pph)max⁡{ε,1}B=2^{-nE(1-S,p_{\rm ph})}\max\{\varepsilon,1\}B=2−nE(1−S,pph​)max{ε,1}. Then

D(Kr,L)≤22Pph(Kr,L),χ(Kr,L)≤ηlr(Pph(Kr,L)),D(K_r,L)\le2\sqrt{2P_{\rm ph}(K_r,L)},\quad\chi(K_r,L)\le\eta_{l_r}(P_{\rm ph}(K_r,L)),D(Kr​,L)≤22Pph​(Kr​,L)​,χ(Kr​,L)≤ηlr​​(Pph​(Kr​,L)), ErPph(Kr,L)≤B,ErD(Kr,L)≤2−nE(1−S,pph)/2+3/2max⁡{ε,1},Erχ(Kr,L)≤ηlmax⁡(B).\mathbb E_rP_{\rm ph}(K_r,L)\le B,\qquad\mathbb E_rD(K_r,L)\le2^{-nE(1-S,p_{\rm ph})/2+3/2}\max\{\sqrt\varepsilon,1\},\qquad\mathbb E_r\chi(K_r,L)\le\eta_{l_{\max}}(B).Er​Pph​(Kr​,L)≤B,Er​D(Kr​,L)≤2−nE(1−S,pph​)/2+3/2max{ε​,1},Er​χ(Kr​,L)≤ηlmax​​(B).

The public seed is retained in Eve's cq blocks. These finite physical inequalities do not identify coherent and incoherent complementary outputs.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P31
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P31

open scoped BigOperators Matrix ComplexConjugate

open QAlgorithms

local instance {n : ℕ} (C : BinaryLinearCode n) : Fintype C := Fintype.ofFinite C

/-- PDF pp.13--14, (54),(55),(59)--(61): finite physical iid wire-tap security.
S=min dim(C2)/n; the swapped dimensions below (59) are corrected using (56).
Each seed has its own quotient and message length, bounded by l_max.
The seed is public: the uniform average is the cq block sum with Eve's seed record. -/
theorem iid_security {n : ℕ} (hn : 0 < n) {I : Type*} [Fintype I] [Nonempty I]
    (large : BinaryLinearCode n) (small : I → BinaryLinearCode n) (hsub : ∀ r, small r ≤ large)
    (eps : ℝ) (heps : 0 < eps)
    (hu : ExtUniversalAt (binDual large) (fun r => binDual (small r))
      (maxDim (fun r => binDual (small r))) eps)
    (pPhase pBit : ℝ) (hp : pPhase ∈ Set.Icc 0 1) (hb : pBit ∈ Set.Icc 0 1) :
    (∀ r, traceLeak (small r) large (iidPauli pPhase pBit) ≤
      2 * Real.sqrt (2 * phaseError (small r) large (iidPauli pPhase pBit))) ∧
    (∀ r, holevoLeak (small r) large (iidPauli pPhase pBit) ≤
      entropyEnvelope (messageLength (small r) large) (phaseError (small r) large (iidPauli pPhase pBit))) ∧
    avg (fun r => phaseError (small r) large (iidPauli pPhase pBit)) ≤
      iidPhaseBound n (minDim small) pPhase eps ∧
    avg (fun r => traceLeak (small r) large (iidPauli pPhase pBit)) ≤
      (2 : ℝ) ^ (-(1 / 2 : ℝ) * n * gallagerExponent (1 - (minDim small : ℝ) / n) pPhase + 3 / 2) *
        max (Real.sqrt eps) 1 ∧
    avg (fun r => holevoLeak (small r) large (iidPauli pPhase pBit)) ≤
      entropyEnvelope (Module.finrank (ZMod 2) large - minDim small)
        (iidPhaseBound n (minDim small) pPhase eps) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P31

end
Source
Dual universality of hash functions and its applications to quantum cryptography, arXiv:1101.0064v4, PDF p. 14, §VII.A, equations (59)–(61): dual-universal privacy amplification on an iid Pauli wire-tap channel
Read-back

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

Let n>0n>0n>0, let III be a finite nonempty seed type, let L⊆Bn=(F2)nL\subseteq B_n=(\mathbb F_2)^nL⊆Bn​=(F2​)n be a binary linear code, and let Sr⊆LS_r\subseteq LSr​⊆L be a binary linear code for every r∈Ir\in Ir∈I. Write C⊥={v:∀c∈C, c⋅v=0}C^\perp=\{v:\forall c\in C,\ c\cdot v=0\}C⊥={v:∀c∈C, c⋅v=0}, t∗=min⁡rdim⁡Srt_*=\min_r\dim S_rt∗​=minr​dimSr​, and d∗=max⁡rdim⁡Sr⊥d_*=\max_r\dim S_r^\perpd∗​=maxr​dimSr⊥​. Suppose ε>0\varepsilon>0ε>0, every L⊥⊆Sr⊥L^\perp\subseteq S_r^\perpL⊥⊆Sr⊥​, and, for every v∉L⊥v\notin L^\perpv∈/L⊥,

∣{r∈I:v∈Sr⊥}∣∣I∣≤ε 2d∗−n.\frac{|\{r\in I:v\in S_r^\perp\}|}{|I|} \le\varepsilon\,2^{d_*-n}.∣I∣∣{r∈I:v∈Sr⊥​}∣​≤ε2d∗​−n.

For any pph,pbit∈[0,1]p_{\rm ph},p_{\rm bit}\in[0,1]pph​,pbit​∈[0,1], including their endpoints, set

bp(x)=∏i=0n−1{1−p,xi=0,p,xi=1,W(x,z)=bpph(x)bpbit(z),μ(x)=∑zW(x,z).b_p(x)=\prod_{i=0}^{n-1} \begin{cases}1-p,&x_i=0,\\p,&x_i=1,\end{cases} \qquad W(x,z)=b_{p_{\rm ph}}(x)b_{p_{\rm bit}}(z), \qquad \mu(x)=\sum_zW(x,z).bp​(x)=i=0∏n−1​{1−p,p,​xi​=0,xi​=1,​W(x,z)=bpph​​(x)bpbit​​(z),μ(x)=z∑​W(x,z).

For each code CCC, let dC(y)=y−eyd_C(y)=y-e_ydC​(y)=y−ey​, where eye_yey​ is a chosen maximizer of μ(e)\mu(e)μ(e) subject to y−e∈Cy-e\in Cy−e∈C, with unspecified tie choices. Define

qr=1∣Sr⊥∣∑a∈Sr⊥∑x∈Bnμ(x)1{dSr⊥(a+x)−a∉L⊥}.q_r=\frac1{|S_r^\perp|} \sum_{a\in S_r^\perp}\sum_{x\in B_n} \mu(x)\mathbf1_{\{d_{S_r^\perp}(a+x)-a\notin L^\perp\}}.qr​=∣Sr⊥​∣1​a∈Sr⊥​∑​x∈Bn​∑​μ(x)1{dSr⊥​​(a+x)−a∈/L⊥}​.

To define the other quantities, let ρS,a\rho_{S,a}ρS,a​ be diagonal with entry ∣S∣−11{b−a∈S}|S|^{-1}\mathbf1_{\{b-a\in S\}}∣S∣−11{b−a∈S}​ at bbb, and put

(DW)(b,(x,z)),c=W(x,z) 1{b=c+z}(−1)x⋅b,EW(ρ)e,e′=∑b(DWρDW†)(b,e),(b,e′),σr,a=EW(ρSr,a),σˉ=1∣L∣∑a∈LEW(∣a⟩⟨a∣).(D_W)_{(b,(x,z)),c} =\sqrt{W(x,z)}\,\mathbf1_{\{b=c+z\}}(-1)^{x\cdot b}, \quad \mathcal E_W(\rho)_{e,e'}=\sum_b(D_W\rho D_W^\dagger)_{(b,e),(b,e')}, \quad \sigma_{r,a}=\mathcal E_W(\rho_{S_r,a}), \quad \bar\sigma=\frac1{|L|}\sum_{a\in L}\mathcal E_W(|a\rangle\langle a|).(DW​)(b,(x,z)),c​=W(x,z)​1{b=c+z}​(−1)x⋅b,EW​(ρ)e,e′​=b∑​(DW​ρDW†​)(b,e),(b,e′)​,σr,a​=EW​(ρSr​,a​),σˉ=∣L∣1​a∈L∑​EW​(∣a⟩⟨a∣).

Here ∣a⟩|a\rangle∣a⟩ is the coordinate vector at aaa, and binary dot products in exponents are represented by 000 or 111. Set

Tr=1∣L∣∑a∈L∥σr,a−σˉ∥1,Jr=H(σˉ)−1∣L∣∑a∈LH(σr,a),T_r=\frac1{|L|}\sum_{a\in L}\|\sigma_{r,a}-\bar\sigma\|_1, \qquad J_r=\mathcal H(\bar\sigma)-\frac1{|L|}\sum_{a\in L}\mathcal H(\sigma_{r,a}),Tr​=∣L∣1​a∈L∑​∥σr,a​−σˉ∥1​,Jr​=H(σˉ)−∣L∣1​a∈L∑​H(σr,a​),

where ∥M∥1=Re⁡tr⁡M†M\|M\|_1=\operatorname{Re}\operatorname{tr}\sqrt{M^\dagger M}∥M∥1​=RetrM†M​ and H(Q)=−Re⁡tr⁡(u↦ulog⁡2u)(Q)\mathcal H(Q)=-\operatorname{Re}\operatorname{tr}(u\mapsto u\log_2u)(Q)H(Q)=−Retr(u↦ulog2​u)(Q), with matrix functions defined by continuous functional calculus. Finally, define

G(R,p)=sup⁡0≤s≤1[−sR+s−(1+s)log⁡2 ⁣(p1/(1+s)+(1−p)1/(1+s))],B=2−nG(1−t∗/n,pph)max⁡{ε,1},G(R,p)=\sup_{0\le s\le1} \left[-sR+s-(1+s)\log_2\!\left(p^{1/(1+s)}+(1-p)^{1/(1+s)}\right)\right], \quad B=2^{-nG(1-t_*/n,p_{\rm ph})}\max\{\varepsilon,1\},G(R,p)=0≤s≤1sup​[−sR+s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s))],B=2−nG(1−t∗​/n,pph​)max{ε,1},

and, for natural ℓ\ellℓ and real uuu,

Fℓ(u)={h2(u)+ℓu,u≤12,1+ℓu,u>12,h2(u)=−ulog⁡u−(1−u)log⁡(1−u)log⁡2,F_\ell(u)= \begin{cases} h_2(u)+\ell u,&u\le\tfrac12,\\ 1+\ell u,&u>\tfrac12, \end{cases} \qquad h_2(u)=\frac{-u\log u-(1-u)\log(1-u)}{\log2},Fℓ​(u)={h2​(u)+ℓu,1+ℓu,​u≤21​,u>21​,​h2​(u)=log2−ulogu−(1−u)log(1−u)​,

using the total real logarithm, whose value at zero is zero. The theorem asserts all five bounds

∀r∈I,Tr≤22qr,∀r∈I,Jr≤Fdim⁡L−dim⁡Sr(qr),1∣I∣∑rqr≤B,1∣I∣∑rTr≤2−12nG(1−t∗/n,pph)+32max⁡{ε,1},1∣I∣∑rJr≤Fdim⁡L−t∗(B).\begin{aligned} &\forall r\in I,\quad T_r\le2\sqrt{2q_r},\\ &\forall r\in I,\quad J_r\le F_{\dim L-\dim S_r}(q_r),\\ &\frac1{|I|}\sum_rq_r\le B,\\ &\frac1{|I|}\sum_rT_r \le2^{-\frac12nG(1-t_*/n,p_{\rm ph})+\frac32} \max\{\sqrt\varepsilon,1\},\\ &\frac1{|I|}\sum_rJ_r\le F_{\dim L-t_*}(B). \end{aligned}​∀r∈I,Tr​≤22qr​​,∀r∈I,Jr​≤FdimL−dimSr​​(qr​),∣I∣1​r∑​qr​≤B,∣I∣1​r∑​Tr​≤2−21​nG(1−t∗​/n,pph​)+23​max{ε​,1},∣I∣1​r∑​Jr​≤FdimL−t∗​​(B).​
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

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