Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proposition 2: operational NS norm for classical-device states

Open
QAlgorithms.Papers.Independent.Intakethird100.P22.cdNorm_formula

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

prove2quantum

All alphabets are finite and nonempty. Both conditional laws are nonnegative and normalized for every input, and each classical marginal is independent of Eve's input.

For any two compatible classical-device states PCE∣ZP_{CE\mid Z}PCE∣Z​ and QCE∣ZQ_{CE\mid Z}QCE∣Z​, the classical alphabet CCC may be a tuple of arbitrarily many classical subsystems. The operational distance allows a random input ZZZ chosen after seeing CCC and arbitrary stochastic processing of the resulting observation. Then

dNS(P,Q)=12∑cmax⁡z∑e∣P(c,e∣z)−Q(c,e∣z)∣.d_{\rm NS}(P,Q)=\frac12\sum_c\max_z\sum_e|P(c,e\mid z)-Q(c,e\mid z)|.dNS​(P,Q)=21​c∑​zmax​e∑​∣P(c,e∣z)−Q(c,e∣z)∣.

This formula characterizes the source's causal generating operations on classical-device states.

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 p.24, Proposition 2, (33); maximization is inside the classical sum. -/
theorem cdNorm_formula {C E Z : Type}
    [Fintype C] [Fintype E] [Fintype Z] [Nonempty C] [Nonempty E] [Nonempty Z]
    (p q : CDArray C E Z) (hp : IsCD p) (hq : IsCD q) :
    cdDistance p q = (1 / 2 : ℝ) * ∑ c, finiteMax (fun z => ∑ e, |p z c e - q z c 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. 24, Proposition 2 / equation (33)
Read-back

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

For finite, nonempty types C,E,ZC,E,ZC,E,Z and arrays p,q:Z×C×E→Rp,q:Z\times C\times E\to\mathbb Rp,q:Z×C×E→R, assume that both arrays are nonnegative, that each has total mass 111 for every zzz, and that each has a CCC-marginal independent of zzz: for h=ph=ph=p and h=qh=qh=q,

∑c,eh(z,c,e)=1,∑eh(z,c,e)=∑eh(z′,c,e)for all z,z′,c.\sum_{c,e}h(z,c,e)=1,\qquad \sum_e h(z,c,e)=\sum_e h(z',c,e) \quad\text{for all }z,z',c.c,e∑​h(z,c,e)=1,e∑​h(z,c,e)=e∑​h(z′,c,e)for all z,z′,c.

Then

d(p,q)=12∑c∈Cmax⁡z∈Z∑e∈E∣p(z,c,e)−q(z,c,e)∣.d(p,q)=\frac12\sum_{c\in C}\max_{z\in Z} \sum_{e\in E}|p(z,c,e)-q(z,c,e)|.d(p,q)=21​c∈C∑​z∈Zmax​e∈E∑​∣p(z,c,e)−q(z,c,e)∣.

Here d(p,q)d(p,q)d(p,q) is the supremum of 12∑j=0m−1∣g[p](j)−g[q](j)∣\frac12\sum_{j=0}^{m-1}|g[p](j)-g[q](j)|21​∑j=0m−1​∣g[p](j)−g[q](j)∣ over all positive natural numbers mmm and all nonnegative kernels u(c,z)u(c,z)u(c,z), v(c,z,e,j)v(c,z,e,j)v(c,z,e,j) with ∑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, where g[h](j)=∑c,z,eu(c,z)h(z,c,e)v(c,z,e,j)g[h](j)=\sum_{c,z,e}u(c,z)h(z,c,e)v(c,z,e,j)g[h](j)=∑c,z,e​u(c,z)h(z,c,e)v(c,z,e,j). Each maximum on the right is the supremum of the indicated finite, nonempty set of real values.

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