Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite-population tail probability conditioned on passing parameter estimation

Open
QAlgorithms.Papers.Independent.Intakethird100.P01.samplingTailS14

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let n,kn,kn,k be positive integers and N=n+kN=n+kN=n+k. Let (Ztot,Ztot′)(Z_{\mathrm{tot}},Z'_{\mathrm{tot}})(Ztot​,Ztot′​) have any normalized joint probability distribution on two NNN-bit strings. Independently of these strings, draw a uniformly random kkk-element subset TTT of the positions. Let Λ\LambdaΛ be the relative Hamming distance on TTT and let Λkey\Lambda_{\mathrm{key}}Λkey​ be the relative Hamming distance on its complement. Fix 0≤Qtol≤10\le Q_{\mathrm{tol}}\le10≤Qtol​≤1, define the event pass={Λ≤Qtol}\mathrm{pass}=\{\Lambda\le Q_{\mathrm{tol}}\}pass={Λ≤Qtol​}, and assume ppass=Pr⁡[pass]>0p_{\mathrm{pass}}=\Pr[\mathrm{pass}]>0ppass​=Pr[pass]>0. For any μ≥0\mu\ge0μ≥0, put

ε=exp⁡ ⁣(−knNkk+1μ2).\varepsilon=\exp\!\left(-\frac{kn}{N}\frac{k}{k+1}\mu^2\right).ε=exp(−Nkn​k+1k​μ2).

Then

Pr⁡[Λkey≥Λ+μ∣pass]≤ε2ppass.\Pr[\Lambda_{\mathrm{key}}\ge\Lambda+\mu\mid\mathrm{pass}] \le\frac{\varepsilon^2}{p_{\mathrm{pass}}}.Pr[Λkey​≥Λ+μ∣pass]≤ppass​ε2​.

This is a sampling-without-replacement estimate for arbitrary correlated strings. Applying it to an interactive QKD execution requires separately deriving the stated independent uniform sampling experiment.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P01
Formal statement
namespace QAlgorithms.Papers.Independent.Intakethird100.P01

open scoped BigOperators ComplexConjugate ComplexOrder

-- Accepted extended entropy: the finite-real smoothing helper excludes radius >= 1.

open QAlgorithms.Papers.Independent.Information100.P67
  (IsSubnormalized purifiedDistance conditionalMaxEntropy smoothConditionalMaxEntropyExtended)

noncomputable section

/-- PDF p.13, Eqs.(S11)--(S14): the pass-conditioned finite-population tail bound.
The sample is drawn independently of an arbitrary normalized joint law of the total strings. -/
theorem samplingTailS14 (n k : ℕ) (hn : 0 < n) (hk : 0 < k)
    (P : StringPair (n + k) → ℝ) (hP : ∀ z, 0 ≤ P z) (hPsum : ∑ z, P z = 1)
    (Q : ℝ) (hQ0 : 0 ≤ Q) (hQ1 : Q ≤ 1) (hpass : 0 < passProbability P Q)
    (mu : ℝ) (hmu : 0 ≤ mu) :
    probabilityGivenPass P Q (fun w => complementErrorFraction w ≥ sampleError w + mu) ≤
      (samplingFailureParameter n k mu) ^ 2 / passProbability P Q := by sorry

end

end QAlgorithms.Papers.Independent.Intakethird100.P01
Source
Tight Finite-Key Analysis for Quantum Cryptography, arXiv:1103.4130v2, PDF p. 13, Supplementary Note 2, Eqs. (S11)–(S14)
Read-back

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

For all positive natural numbers n,kn,kn,k, let PPP be a nonnegative real function on ordered pairs (u,v)(u,v)(u,v) of Boolean strings of length n+kn+kn+k, with ∑u,vP(u,v)=1\sum_{u,v}P(u,v)=1∑u,v​P(u,v)=1. Consider outcomes (u,v,s)(u,v,s)(u,v,s), where s⊆{0,…,n+k−1}s\subseteq\{0,\ldots,n+k-1\}s⊆{0,…,n+k−1} has cardinality kkk, assigning each outcome weight P(u,v)/(n+kk)P(u,v)/\binom{n+k}{k}P(u,v)/(kn+k​). Define

es(u,v,s)=∣{i∈s:ui≠vi}∣k,ec(u,v,s)=∣{i∉s:ui≠vi}∣n.e_s(u,v,s)=\frac{|\{i\in s:u_i\ne v_i\}|}{k}, \qquad e_c(u,v,s)=\frac{|\{i\notin s:u_i\ne v_i\}|}{n}.es​(u,v,s)=k∣{i∈s:ui​=vi​}∣​,ec​(u,v,s)=n∣{i∈/s:ui​=vi​}∣​.

For every real QQQ with 0≤Q≤10\le Q\le10≤Q≤1, assume that the total weight ppassp_{\mathrm{pass}}ppass​ of outcomes satisfying es≤Qe_s\le Qes​≤Q is strictly positive. Then, for every real μ≥0\mu\ge0μ≥0, the total weight of outcomes satisfying both es≤Qe_s\le Qes​≤Q and ec≥es+μe_c\ge e_s+\muec​≥es​+μ, divided by ppassp_{\mathrm{pass}}ppass​, satisfies

∑u,v,ses≤Q, ec≥es+μP(u,v)/(n+kk)ppass≤[exp⁡ ⁣(−knn+kkk+1μ2)]2ppass.\frac{\displaystyle\sum_{\substack{u,v,s\\e_s\le Q,\ e_c\ge e_s+\mu}} P(u,v)/\binom{n+k}{k}}{p_{\mathrm{pass}}} \le \frac{\left[\exp\!\left(-\frac{kn}{n+k}\frac{k}{k+1}\mu^2\right)\right]^2} {p_{\mathrm{pass}}}.ppass​u,v,ses​≤Q, ec​≥es​+μ​∑​P(u,v)/(kn+k​)​≤ppass​[exp(−n+kkn​k+1k​μ2)]2​.

The deviation event uses a non-strict inequality and includes μ=0\mu=0μ=0.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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