Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Loose ECC-conditioned parity bound

Open
QAlgorithms.Papers.Independent.Intakenext100.P77.loose_parity_bound

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

prove2quantum

Let n≥1n\ge1n≥1. Fix an unrestricted joint unitary attack on the 2n2n2n ideal two-level signals and a probe initially in a fixed pure basis state. Fix the preparation/measurement bases, a balanced test/information partition, and announced test strings iT,jTi_T,j_TiT​,jT​ whose probability is positive. Symmetrize the attack coherently by Eq. (2), then condition on this test outcome using its actual probability. Write Ei,jE_{i,j}Ei,j​ for the resulting normalized information-register probe coefficients, with Alice's nnn information bits uniform. These coefficients are constructed from the unitary, rather than postulated to have any Fourier or information property. The public classical channel is unjammable and Eve has access only to the quantum channel and the public transcript.

For an information input iii, put ϕi=∑jEi,j⊗∣i⊕j⟩\phi_i=\sum_j E_{i,j}\otimes|i\oplus j\rangleϕi​=∑j​Ei,j​⊗∣i⊕j⟩, ηl=2−n∑i(−1)l⋅iϕi\eta_l=2^{-n}\sum_i(-1)^{l\cdot i}\phi_iηl​=2−n∑i​(−1)l⋅iϕi​, and dl2=∥ηl∥2d_l^2=\|\eta_l\|^2dl2​=∥ηl​∥2. Dot products are modulo two and inner products conjugate the first argument.

Let C⊆F2nC\subseteq\mathbb F_2^nC⊆F2n​ be the binary linear code and let S=C⊥S=C^\perpS=C⊥ be the span of all disclosed parity rows. Equivalently the parity check matrix is a basis of SSS, so is full rank. Fix an announced syndrome coset i0+Ci_0+Ci0​+C and use its uniform distribution, independently of the fixed public code choice. Let v∉Sv\notin Sv∈/S be the PA mask, put v^=min⁡w∈S∣v⊕w∣\widehat v=\min_{w\in S}|v\oplus w|v=minw∈S​∣v⊕w∣, and let SDvSD_vSDv​ be the supremum, over all finite POVMs, of mutual information in bits on the purified states ∣ϕi⟩⟨ϕi∣|\phi_i\rangle\langle\phi_i|∣ϕi​⟩⟨ϕi​∣ about v⋅iv\cdot iv⋅i. Thus both parity classes are nonempty and equally likely. Disclosed other PA bits, when present, are included in SSS.

Put r=dim⁡C⊥r=\dim C^\perpr=dimC⊥. For every real α>0\alpha>0α>0,

SDv≤2r(α+1α∑2∣l∣≥v^dl2).SD_v\le2^r\left(\alpha+\frac1\alpha\sum_{2|l|\ge\widehat v}d_l^2\right).SDv​≤2r​α+α1​2∣l∣≥v∑​dl2​​.

If m−1m-1m−1 other independent PA parities are also disclosed, include their rows in the disclosed span: its dimension is then r+m−1r+m-1r+m−1, giving the factor 2r+m−12^{r+m-1}2r+m−1 of Eq. (25). This is the source's ECC-conditioned version of the earlier BBBGM bound [3].

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P77
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P77

open scoped BigOperators ComplexConjugate ComplexOrder

open QAlgorithms

-- The repair instruction authorizes imports of pinned accepted definitions.
-- These are definitions only; no imported paper theorem is used here.

open QAlgorithms.Papers.Independent.Dependency50.P47 (Law)

open QAlgorithms.Papers.Independent.Information100.P04 (Measurement)

open QAlgorithms.Papers.Independent.Information100.P27 (shannon)

open QAlgorithms.Papers.Independent.Information100.P39 (pushLaw)

open QAlgorithms.Papers.Independent.Support50.P16 (trivialMeasurement)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- Appendix G.1, PDF pp.19--20, Eqs.(23)--(25): loose parity bound. The
ensemble retains the error-labelled purification. The factor 2^r uses
r=dim(C-perp); adding m-1 independent PA disclosures to this
span gives exactly Eq.(25)'s factor 2^(r+m-1). Provenance: BBBGM [3]. -/
theorem loose_parity_bound {n d : ℕ} (hn : 1 ≤ n)
    (U : Matrix.unitaryGroup (Fin d × Qubits (n + n)) ℂ) (e0 : Fin d)
    (iT jT : Qubits n)
    (hpos : 0 < testProbability (coherentBitSymmetrize (attackProbes U e0)) iT jT (fun _ => false))
    (C : Submodule (ZMod 2) (Fin n → ZMod 2)) (i0 v : Fin n → ZMod 2)
    (hv : v ∉ binDual C) (alpha : ℝ) (ha : 0 < alpha) :
    parityInformation (conditionedSymmetric U e0 iT jT) C i0 v ≤
      (2 : ℝ) ^ Module.finrank (ZMod 2) (binDual C) *
        (alpha + fourierTail (conditionedSymmetric U e0 iT jT)
          (distanceToSpan (binDual C) v) / alpha) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P77

end
Source
A Proof of the Security of Quantum Key Distribution, arXiv:quant-ph/9912053v1, PDF p. 19, Appendix G.1 unnumbered lemma, Eqs.(23)–(25): loose parity bound
Read-back

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

Let n,d∈Nn,d\in\mathbb Nn,d∈N, n≥1n\ge1n≥1, let UUU be unitary on the basis {0,…,d−1}×{0,1}2n\{0,\ldots,d-1\}\times\{0,1\}^{2n}{0,…,d−1}×{0,1}2n, choose e0<de_0<de0​<d, and choose iT,jT∈{0,1}ni_T,j_T\in\{0,1\}^niT​,jT​∈{0,1}n. With bitwise XOR +++, concatenation ∥\Vert∥, and χr(a,b)=(−1)∑k<rakbk mod 2\chi_r(a,b)=(-1)^{\sum_{k<r}a_kb_k\bmod2}χr​(a,b)=(−1)∑k<r​ak​bk​mod2, put

Sa,b(h,q)=2−nχ2n(a+b,h)U(q,b+h),(e0,a+h),β=∑j,h,q∣SiT∥0,jT∥j(h,q)∣2,Ei,j=β−1/2SiT∥i,jT∥j,S_{a,b}(h,q)=2^{-n}\chi_{2n}(a+b,h)U_{(q,b+h),(e_0,a+h)},\quad \beta=\sum_{j,h,q}|S_{i_T\Vert0,j_T\Vert j}(h,q)|^2,\quad E_{i,j}=\beta^{-1/2}S_{i_T\Vert i,j_T\Vert j},Sa,b​(h,q)=2−nχ2n​(a+b,h)U(q,b+h),(e0​,a+h)​,β=j,h,q∑​∣SiT​∥0,jT​∥j​(h,q)∣2,Ei,j​=β−1/2SiT​∥i,jT​∥j​,

where i,ji,ji,j are nnn-bit strings, a,b,ha,b,ha,b,h are 2n2n2n-bit strings, and q<dq<dq<d; assume β>0\beta>0β>0. Let C≤F2nC\le\mathbb F_2^nC≤F2n​, let i0,v∈F2ni_0,v\in\mathbb F_2^ni0​,v∈F2n​, and assume v∉C⊥={w:u⋅w=0 for every u∈C}v\notin C^\perp=\{w:u\cdot w=0\text{ for every }u\in C\}v∈/C⊥={w:u⋅w=0 for every u∈C}. For u∈Cu\in Cu∈C, let bub_ubu​ be the bit string for i0+ui_0+ui0​+u, define ρu=∑jEbu,jEbu,j∗\rho_u=\sum_jE_{b_u,j}E_{b_u,j}^{*}ρu​=∑j​Ebu​,j​Ebu​,j∗​, and let K(u)K(u)K(u) be true exactly when (i0+u)⋅v=1(i_0+u)\cdot v=1(i0​+u)⋅v=1 in F2\mathbb F_2F2​. Let IaccI_{\mathrm{acc}}Iacc​ be the real supremum over all finite measurements with a positive number of positive semidefinite effects MxM_xMx​ summing to the identity of the mutual information of

rb,x=∣C∣−1∑u∈CK(u)=bRe⁡tr⁡(Mxρu).r_{b,x}=|C|^{-1}\sum_{\substack{u\in C\\K(u)=b}}\operatorname{Re}\operatorname{tr}(M_x\rho_u).rb,x​=∣C∣−1u∈CK(u)=b​∑​Retr(Mx​ρu​).

Here mutual information is the sum of marginal Shannon entropies minus joint Shannon entropy, using base-two logarithms and 0log⁡20=00\log_2 0=00log2​0=0. Set

D=min⁡w∈C⊥∣{k:vk+wk≠0}∣,Fl(h,q,z)=2−n∑iχn(l,i)Ei,i+z(h,q).D=\min_{w\in C^\perp}|\{k:v_k+w_k\ne0\}|,\qquad F_l(h,q,z)=2^{-n}\sum_i\chi_n(l,i)E_{i,i+z}(h,q).D=w∈C⊥min​∣{k:vk​+wk​=0}∣,Fl​(h,q,z)=2−ni∑​χn​(l,i)Ei,i+z​(h,q).

Then for every real α>0\alpha>0α>0,

Iacc≤2dim⁡F2C⊥(α+1α∑l∈{0,1}nD≤2∣{k:lk=1}∣∑h,q,z∣Fl(h,q,z)∣2).I_{\mathrm{acc}}\le 2^{\dim_{\mathbb F_2}C^\perp} \left(\alpha+\frac1\alpha \sum_{\substack{l\in\{0,1\}^n\\D\le2|\{k:l_k=1\}|}} \sum_{h,q,z}|F_l(h,q,z)|^2\right).Iacc​≤2dimF2​​C⊥​α+α1​l∈{0,1}nD≤2∣{k:lk​=1}∣​∑​h,q,z∑​∣Fl​(h,q,z)∣2​.

The tail threshold is inclusive, and v∉C⊥v\notin C^\perpv∈/C⊥ makes D>0D>0D>0.

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