Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 3: equivalence of NSDI security criteria

Open
QAlgorithms.Papers.Independent.Intakethird100.P22.security_criteria

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

prove2quantum

Let PSASBTE∣ZpassP^{\rm pass}_{S_A S_B T E\mid Z}PSA​SB​TE∣Zpass​ be a normalized classical-device law with a common finite nonempty key alphabet K\mathcal KK and finite nonempty transcript, Eve-output and Eve-input alphabets. The (SA,SB,T)(S_A,S_B,T)(SA​,SB​,T) marginal is independent of ZZZ. The ideal pass law replaces the keys by a uniform perfectly correlated pair, independent of the actual (T,E∣Z)(T,E\mid Z)(T,E∣Z) marginal. The intermediate law copies Alice's key into Bob's register and preserves (SA,T,E∣Z)(S_A,T,E\mid Z)(SA​,T,E∣Z). Let r∈[0,1]r\in[0,1]r∈[0,1] be the abort probability, with an identical normalized abort branch in all three systems. Write dNSd_{\rm NS}dNS​ for the operational NS distance, and s,c,ks,c,ks,c,k for the pass-weighted secrecy, disagreement and security errors, respectively. Thus s=(1−r)dNS(PSATE∣Zpass,PSATE∣Zideal,pass)s=(1-r)d_{\rm NS}(P_{S_A T E\mid Z}^{\rm pass},P_{S_A T E\mid Z}^{\rm ideal,pass})s=(1−r)dNS​(PSA​TE∣Zpass​,PSA​TE∣Zideal,pass​), c=(1−r)Pr⁡[SA≠SB∣pass]c=(1-r)\Pr[S_A\ne S_B\mid\mathrm{pass}]c=(1−r)Pr[SA​=SB​∣pass], and k=(1−r)dNS(Ppass,Pideal,pass)k=(1-r)d_{\rm NS}(P^{\rm pass},P^{\rm ideal,pass})k=(1−r)dNS​(Ppass,Pideal,pass).

The following two implications hold for all nonnegative budgets:

s≤εsec, c≤εcor ⟹ k≤εsec+εcor,s\le\varepsilon_{\rm sec},\ c\le\varepsilon_{\rm cor}\ \Longrightarrow\ k\le\varepsilon_{\rm sec}+\varepsilon_{\rm cor},s≤εsec​, c≤εcor​ ⟹ k≤εsec​+εcor​, k≤ε ⟹ c≤ε and s≤ε.k\le\varepsilon\ \Longrightarrow\ c\le\varepsilon\ \text{and}\ s\le\varepsilon.k≤ε ⟹ c≤ε and s≤ε.

These parameter-independent constants express the security-criterion equivalence proved by the paper.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P22
Formal statement
noncomputable section

open scoped BigOperators

namespace QAlgorithms.Papers.Independent.Intakethird100.P22

attribute [local instance] Classical.propDecidable Classical.decEq

open QAlgorithms.Papers.Independent.Advance50.P47
  (Box IsCorrelation IsNoSignaling HasLocalModel correlationMixture prBox)

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

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

open QAlgorithms.Papers.Independent.Gap48.P25 (classicalMI)

/-- PDF pp.36–37, Theorem 3: the exact two implications (148),(149).
The printed arbitrary prescribed split-budget iff (147) is not asserted: it is
unjustified when one assigned budget is zero. Independent moderation is required. -/
theorem security_criteria {K T E Z : Type}
    [Fintype K] [Fintype T] [Fintype E] [Fintype Z]
    [Nonempty K] [Nonempty T] [Nonempty E] [Nonempty Z]
    (r : KeyOutput K T E Z) (z : Z) :
    (∀ es ec : ℝ, 0 ≤ es → 0 ≤ ec → cdSecrecyError r ≤ es → correctnessError r z ≤ ec →
      securityError r ≤ es + ec) ∧
    (∀ e : ℝ, 0 ≤ e → securityError r ≤ e →
      correctnessError r z ≤ e ∧ cdSecrecyError r ≤ e) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P22

end
Source
Limitations on device independent key secure against non signaling adversary via the squashed non-locality, arXiv:1903.12154v7, PDF p. 36, Theorem 3 / equations (148), (149)
Read-back

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

For all finite nonempty types K,T,E,ZK,T,E,ZK,T,E,Z, every rrr consisting of α∈[0,1]\alpha\in[0,1]α∈[0,1] and pass and abort arrays P,QP,QP,Q, and every z0∈Zz_0\in Zz0​∈Z, assume each array is nonnegative, normalized over a,b,t,ea,b,t,ea,b,t,e for every zzz, and has its marginal after summing over eee independent of zzz. Define

Iz(a,b,t,e)=1{a=b}∑u,vPz(u,v,t,e)∣K∣,PzA(a,t,e)=∑bPz(a,b,t,e),IzA(a,t,e)=∑bIz(a,b,t,e).I_z(a,b,t,e)=\mathbf1_{\{a=b\}}\frac{\sum_{u,v}P_z(u,v,t,e)}{|K|}, \qquad P^A_z(a,t,e)=\sum_bP_z(a,b,t,e), \qquad I^A_z(a,t,e)=\sum_bI_z(a,b,t,e).Iz​(a,b,t,e)=1{a=b}​∣K∣∑u,v​Pz​(u,v,t,e)​,PzA​(a,t,e)=b∑​Pz​(a,b,t,e),IzA​(a,t,e)=b∑​Iz​(a,b,t,e).

For arrays on Z×C×EZ\times C\times EZ×C×E, define d(R,S)d(R,S)d(R,S) as the supremum of

12∑j=0m−1∣∑c,z,eu(c,z)(Rz(c,e)−Sz(c,e))v(c,z,e,j)∣\frac12\sum_{j=0}^{m-1} \left|\sum_{c,z,e}u(c,z)(R_z(c,e)-S_z(c,e))v(c,z,e,j)\right|21​j=0∑m−1​​c,z,e∑​u(c,z)(Rz​(c,e)−Sz​(c,e))v(c,z,e,j)​

over positive integers mmm and nonnegative kernels satisfying ∑zu(c,z)=1\sum_z u(c,z)=1∑z​u(c,z)=1 and ∑jv(c,z,e,j)=1\sum_jv(c,z,e,j)=1∑j​v(c,z,e,j)=1. Put

s=(1−α)d(PA,IA),c=(1−α)∑a,ba≠b∑t,ePz0(a,b,t,e),e=(1−α)d(P,I),s=(1-\alpha)d(P^A,I^A),\qquad c=(1-\alpha)\sum_{\substack{a,b\\a\ne b}}\sum_{t,e}P_{z_0}(a,b,t,e),\qquad e=(1-\alpha)d(P,I),s=(1−α)d(PA,IA),c=(1−α)a,ba=b​∑​t,e∑​Pz0​​(a,b,t,e),e=(1−α)d(P,I),

using C=K×TC=K\times TC=K×T for sss and C=K×K×TC=K\times K\times TC=K×K×T for eee. The assertion is the conjunction of these two statements: for every pair of nonnegative real bounds εs,εc\varepsilon_s,\varepsilon_cεs​,εc​, s≤εss\le\varepsilon_ss≤εs​ and c≤εcc\le\varepsilon_cc≤εc​ imply e≤εs+εce\le\varepsilon_s+\varepsilon_ce≤εs​+εc​; and for every nonnegative real ε\varepsilonε, e≤εe\le\varepsilone≤ε implies both c≤εc\le\varepsilonc≤ε and s≤εs\le\varepsilons≤ε.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me