Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Cryptographic security of quantum key distribution

Definition
QAlgorithms_Papers_Independent_Bridge50_P44

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

prove2quantum

The objects the formalized statements of Cryptographic security of quantum key distribution (arXiv:1409.3525) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • IsDiscreteLaw: PDF pp.36,40: normalized discrete mass function; absolute convergence is explicit.
  • discreteTV: PDF p.36, Definition A.1: total variation for arbitrary discrete alphabets. Uses below are on normalized, absolutely summable laws.
  • IsCoupling: PDF p.40, Eqs.(26)--(27): a normalized joint law with both specified marginals.
  • binaryTestSuccess: PDF pp.38--39: one-sample, equal-prior success of an arbitrary randomized rule; g(z) is its probability of guessing the first law. This differs from the frozen Information100.P53.classicalSuccess (finite-message MAP decoding).
  • optimalBinaryTestSuccess: PDF p.39: optimal equal-prior one-sample success. For probability laws the feasible set contains constant rules and is bounded by one. This differs from the frozen Information100.P58.classicalOptimum (erasure-code optimization).
  • IsDiscretePOVM: PDF pp.37--38: extension of the finite frozen POVM to discrete outcome families. Matrix-series convergence avoids default values of divergent sums.
  • ClassicalFirst: PDF p.38: classicality on the first factor in its designated basis.
  • xorWord: PDF pp.11--13: bitwise XOR, for arbitrary message length including zero.
  • otpReal: PDF pp.11--13: actual joint Bob/ciphertext output under a uniform shared key and a faithfully forwarding authentic channel.
  • otpIdeal: PDF pp.12--13: ideal channel delivers x; its simulator samples a uniform ciphertext given only the public length n.
  • verifyTag: PDF pp.49--50: tag verification. An honest forwarding filter returns exactly the pair (x,h_k(x)); no property of the hash family is assumed.
  • honestAuthentication: PDF p.50: the honest filtered tag-and-verify channel, after uniform-key sampling.
  • Interface: PDF pp.14--15: named interfaces; only Alice and Bob are honest.
  • ACModel: PDF pp.13--15, Eqs.(3)--(7): abstract compatible resources and converters, with named-interface attachment. This is the source's axiomatic AC layer, not an implementation of quantum protocols. Parallel distance contractivity is required in each argument, as for arbitrary compatible resource contexts.
  • honest: PDF p.15: the honest converter pair attached to A and B.
  • Filtered: PDF p.14: a filtered resource is the same resource together with an E-filter.
  • Constructs: PDF p.15, Definition 2.1: both availability and existence of a single E-simulator. The adversarial distance is the model's resource distance, covering all contexts.
  • serialProtocol: PDF pp.14,46: componentwise serial wiring of the honest converter pair.
  • parallelProtocol: PDF pp.14,47: componentwise parallel wiring of the honest converter pair.
  • parallelFiltered: PDF p.47: parallel filtered resources retain both honest filters.
  • distinguishingAdvantage: PDF p.45: signed distinguishing advantage from actual abstract test execution laws. A nonempty test class and PMF probabilities make this supremum bounded.
  • ClosedTests: PDF p.45, Eq.(30): every composite test is represented in the same class, with its entire binary output law preserved on every resource.
  • nuclearDistance: PDF pp.36,44--45: half the nuclear trace norm on full coefficient arrays. State-domain theorems below guarantee finiteness. Extended nonnegative values retain infinity, including on arrays without a nuclear expansion.
  • uniformReference: PDF pp.43--45: uniform d-dimensional key, independent of the given memory operator. The uniform finite matrix is reused from the accepted library.
  • optimizedSecrecy: PDF pp.44--45, Appendix B: optimize over all normalized reference states. The extended infimum is defined without compactness of infinite-dimensional state space; the actual marginal supplies a feasible reference in its uses.
  • PositiveMemoryOperator: PDF p.43, Eq.(28): positivity of an actual bounded operator on full l² memory, expressed by its quadratic form. This is not positivity of a finite truncation.
  • IsMemoryPOVM: PDF p.43, Eq.(28): K-outcome POVMs of bounded operators on arbitrary memory. Each operator is positive and their finite sum is exactly the identity.
  • memoryTracePair: PDF p.43: Re Tr(M rho), written in the full countable basis. On bounded M and trace-class rho each inner coefficient sum and the outer diagonal sum converge absolutely. The order is M_(i,j) rho_(j,i).
  • memoryGuess: PDF p.43, Eq.(28): optimal finite classical-key guessing with unrestricted countable quantum memory. Normalized ensembles make the feasible values nonempty and bounded in [0,1].
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_QuantumOutputMetrics
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P76
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier18_P08
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P24

/-!
Portmann--Renner, arXiv:1409.3525v1. Only the elementary matrix interpretation
is used for the appendix's matrix statements. The operational QKD statements
are explicitly deferred in HARD.md. The guessing and optimized-secrecy
statements use positive trace-class states on arbitrary countable memory. Abstract AC theorems below quantify over the source's
axiomatic resource models; they do not supply a concrete QKD execution model.
Accepted paper imports above are pinned libraries, used under the independent
paper workflow override. Compilation is pending the mechanical batch stage.
-/

noncomputable section

open scoped BigOperators Matrix ComplexOrder

namespace QAlgorithms.Papers.Independent.Bridge50.P44

open QAlgorithms
open QAlgorithms.RealRegisters (Hilbert)
open QAlgorithms.Papers.Independent.Dependency50.P33 (State traceSize)
open QAlgorithms.Papers.Independent.Dependency50.P24 (cqState)
open QAlgorithms.Papers.Independent.Frontier18.P08 (partialTraceFirst)
open QAlgorithms.Papers.Independent.Information100.P76 (maximallyMixed)
open QAlgorithms.Papers.Independent.Frontier18.P08 (conditionalEntropyNats)

attribute [local instance] Classical.propDecidable
attribute [local instance] Classical.decEq

/-- PDF pp.36,40: normalized discrete mass function; absolute convergence is explicit. -/
def IsDiscreteLaw {Z : Type*} (p : Z → ℝ) : Prop :=
  (∀ z, 0 ≤ p z) ∧ Summable p ∧ (∑' z, p z) = 1

/-- PDF p.36, Definition A.1: total variation for arbitrary discrete alphabets.
Uses below are on normalized, absolutely summable laws. -/
def discreteTV {Z : Type*} (p q : Z → ℝ) : ℝ :=
  (1 / 2 : ℝ) * ∑' z, |p z - q z|

/-- PDF p.40, Eqs.(26)--(27): a normalized joint law with both specified marginals. -/
def IsCoupling {Z : Type*} (p q : Z → ℝ) (j : Z × Z → ℝ) : Prop :=
  IsDiscreteLaw j ∧ (∀ z, (∑' w, j (z,w)) = p z) ∧
    (∀ w, (∑' z, j (z,w)) = q w)

/-- PDF pp.38--39: one-sample, equal-prior success of an arbitrary randomized rule;
g(z) is its probability of guessing the first law. This differs from the frozen
Information100.P53.classicalSuccess (finite-message MAP decoding). -/
def binaryTestSuccess {Z : Type*} (p q : Z → ℝ) (g : Z → Set.Icc (0 : ℝ) 1) : ℝ :=
  (1 / 2 : ℝ) * tsum (fun z => p z * (g z).val + q z * (1 - (g z).val))

/-- PDF p.39: optimal equal-prior one-sample success. For probability laws the
feasible set contains constant rules and is bounded by one. This differs from
the frozen Information100.P58.classicalOptimum (erasure-code optimization). -/
def optimalBinaryTestSuccess {Z : Type*} (p q : Z → ℝ) : ℝ :=
  sSup (Set.range (binaryTestSuccess p q))

/-- PDF pp.37--38: extension of the finite frozen POVM to discrete outcome
families. Matrix-series convergence avoids default values of divergent sums. -/
def IsDiscretePOVM {O I : Type*} [Fintype I] [DecidableEq I]
    (M : O → Matrix I I ℂ) : Prop :=
  (∀ o, (M o).PosSemidef) ∧ HasSum M 1

/-- PDF p.38: classicality on the first factor in its designated basis. -/
def ClassicalFirst {Z B : Type*} (rho : Matrix (Z × B) (Z × B) ℂ) : Prop :=
  ∀ z zprime b bprime, z ≠ zprime → rho (z,b) (zprime,bprime) = 0

/-- PDF pp.11--13: bitwise XOR, for arbitrary message length including zero. -/
def xorWord {n : ℕ} (x k : Fin n → Bool) : Fin n → Bool :=
  fun i => Bool.xor (x i) (k i)

/-- PDF pp.11--13: actual joint Bob/ciphertext output under a uniform shared key
and a faithfully forwarding authentic channel. -/
def otpReal {n : ℕ} (x : Fin n → Bool)
    (out : (Fin n → Bool) × (Fin n → Bool)) : ℝ :=
  ∑ k : Fin n → Bool,
    if out = (xorWord (xorWord x k) k, xorWord x k)
      then (Fintype.card (Fin n → Bool) : ℝ)⁻¹ else 0

/-- PDF pp.12--13: ideal channel delivers x; its simulator samples a uniform
ciphertext given only the public length n. -/
def otpIdeal {n : ℕ} (x : Fin n → Bool)
    (out : (Fin n → Bool) × (Fin n → Bool)) : ℝ :=
  if out.1 = x then (Fintype.card (Fin n → Bool) : ℝ)⁻¹ else 0

/-- PDF pp.49--50: tag verification. An honest forwarding filter returns exactly
the pair (x,h_k(x)); no property of the hash family is assumed. -/
def verifyTag {K X T : Type*} [DecidableEq T] (h : K → X → T)
    (k : K) (received : X × T) : Option X :=
  if received.2 = h k received.1 then some received.1 else none

/-- PDF p.50: the honest filtered tag-and-verify channel, after uniform-key sampling. -/
def honestAuthentication {K X T : Type*} [Fintype K] [DecidableEq X] [DecidableEq T]
    (h : K → X → T) (x : X) (out : Option X) : ℝ :=
  ∑ k, if verifyTag h k (x, h k x) = out then (Fintype.card K : ℝ)⁻¹ else 0

/-- PDF pp.14--15: named interfaces; only Alice and Bob are honest. -/
inductive Interface where
  | alice
  | bob
  | eve
  deriving DecidableEq

/-- PDF pp.13--15, Eqs.(3)--(7): abstract compatible resources and converters,
with named-interface attachment. This is the source's axiomatic AC layer, not
an implementation of quantum protocols. Parallel distance contractivity is
required in each argument, as for arbitrary compatible resource contexts. -/
structure ACModel where
  Resource : Type
  Converter : Type
  parallel : Resource → Resource → Resource
  serial : Converter → Converter → Converter
  tensor : Converter → Converter → Converter
  identity : Converter
  attach : Interface → Converter → Resource → Resource
  distance : Resource → Resource → ℝ
  serial_attach : ∀ i a b r, attach i (serial a b) r = attach i a (attach i b r)
  identity_attach : ∀ i r, attach i identity r = r
  distinct_attach : ∀ i j a b r, i ≠ j →
    attach i a (attach j b r) = attach j b (attach i a r)
  parallel_attach : ∀ i a b r s,
    attach i (tensor a b) (parallel r s) = parallel (attach i a r) (attach i b s)
  distance_nonneg : ∀ r s, 0 ≤ distance r s
  distance_self : ∀ r, distance r r = 0
  distance_symm : ∀ r s, distance r s = distance s r
  distance_triangle : ∀ r s t, distance r t ≤ distance r s + distance s t
  attach_contract : ∀ i a r s, distance (attach i a r) (attach i a s) ≤ distance r s
  parallel_contract_right : ∀ r s t, distance (parallel r t) (parallel s t) ≤ distance r s
  parallel_contract_left : ∀ r s t, distance (parallel t r) (parallel t s) ≤ distance r s

/-- PDF p.15: the honest converter pair attached to A and B. -/
def honest (M : ACModel) (p : M.Converter × M.Converter) (r : M.Resource) : M.Resource :=
  M.attach .alice p.1 (M.attach .bob p.2 r)

/-- PDF p.14: a filtered resource is the same resource together with an E-filter. -/
structure Filtered (M : ACModel) where
  resource : M.Resource
  filter : M.Converter

/-- PDF p.15, Definition 2.1: both availability and existence of a single E-simulator.
The adversarial distance is the model's resource distance, covering all contexts. -/
def Constructs (M : ACModel) (p : M.Converter × M.Converter)
    (r s : Filtered M) (epsilon : ℝ) : Prop :=
  M.distance (honest M p (M.attach .eve r.filter r.resource))
      (M.attach .eve s.filter s.resource) ≤ epsilon ∧
  ∃ simulator : M.Converter,
    M.distance (honest M p r.resource) (M.attach .eve simulator s.resource) ≤ epsilon

/-- PDF pp.14,46: componentwise serial wiring of the honest converter pair. -/
def serialProtocol (M : ACModel) (q p : M.Converter × M.Converter) :=
  (M.serial q.1 p.1, M.serial q.2 p.2)

/-- PDF pp.14,47: componentwise parallel wiring of the honest converter pair. -/
def parallelProtocol (M : ACModel) (p q : M.Converter × M.Converter) :=
  (M.tensor p.1 q.1, M.tensor p.2 q.2)

/-- PDF p.47: parallel filtered resources retain both honest filters. -/
def parallelFiltered (M : ACModel) (r s : Filtered M) : Filtered M :=
  ⟨M.parallel r.resource s.resource, M.tensor r.filter s.filter⟩

/-- PDF p.45: signed distinguishing advantage from actual abstract test execution
laws. A nonempty test class and PMF probabilities make this supremum bounded. -/
def distinguishingAdvantage {R D : Type} (run : D → R → PMF Bool) (r s : R) : ℝ :=
  sSup (Set.range (fun d => (run d r true).toReal - (run d s true).toReal))

/-- PDF p.45, Eq.(30): every composite test is represented in the same class,
with its entire binary output law preserved on every resource. -/
def ClosedTests {R D : Type} (run : D → R → PMF Bool) (f : R → R) : Prop :=
  ∀ d, ∃ composite, ∀ r, run composite r = run d (f r)

/-- PDF pp.36,44--45: half the nuclear trace norm on full coefficient arrays.
State-domain theorems below guarantee finiteness. Extended nonnegative values
retain infinity, including on arrays without a nuclear expansion. -/
def nuclearDistance {I : Type} (rho sigma : Matrix I I ℂ) : ENNReal :=
  traceSize (rho - sigma) / 2

/-- PDF pp.43--45: uniform d-dimensional key, independent of the given memory
operator. The uniform finite matrix is reused from the accepted library. -/
def uniformReference {d : ℕ} {E : Type} (sigma : Matrix E E ℂ) :
    Matrix (Fin d × E) (Fin d × E) ℂ :=
  Matrix.kronecker (maximallyMixed d) sigma

/-- PDF pp.44--45, Appendix B: optimize over all normalized reference states.
The extended infimum is defined without compactness of infinite-dimensional
state space; the actual marginal supplies a feasible reference in its uses. -/
def optimizedSecrecy {d : ℕ} {E : Type} (rho : State (Fin d × E)) : ENNReal :=
  ⨅ sigma : State E, nuclearDistance rho.coefficients (uniformReference sigma.coefficients)

/-- PDF p.43, Eq.(28): positivity of an actual bounded operator on full l² memory,
expressed by its quadratic form. This is not positivity of a finite truncation. -/
def PositiveMemoryOperator {E : Type} (A : Hilbert E →L[ℂ] Hilbert E) : Prop :=
  ∀ v, (inner ℂ v (A v)).im = 0 ∧ 0 ≤ (inner ℂ v (A v)).re

/-- PDF p.43, Eq.(28): K-outcome POVMs of bounded operators on arbitrary memory.
Each operator is positive and their finite sum is exactly the identity. -/
def IsMemoryPOVM {K E : Type} [Fintype K]
    (M : K → (Hilbert E →L[ℂ] Hilbert E)) : Prop :=
  (∀ k, PositiveMemoryOperator (M k)) ∧ ∑ k, M k = ContinuousLinearMap.id ℂ (Hilbert E)

/-- PDF p.43: Re Tr(M rho), written in the full countable basis. On bounded M
and trace-class rho each inner coefficient sum and the outer diagonal sum
converge absolutely. The order is M_(i,j) rho_(j,i). -/
def memoryTracePair {E : Type} (M : Hilbert E →L[ℂ] Hilbert E)
    (rho : Matrix E E ℂ) : ℝ :=
  (∑' i : E, ∑' j : E, (M (lp.single 2 j (1 : ℂ))) i * rho j i).re

/-- PDF p.43, Eq.(28): optimal finite classical-key guessing with unrestricted
countable quantum memory. Normalized ensembles make the feasible values
nonempty and bounded in [0,1]. -/
def memoryGuess {d : ℕ} {E : Type} (p : Fin d → ℝ) (rho : Fin d → State E) : ℝ :=
  sSup {v | ∃ M : Fin d → (Hilbert E →L[ℂ] Hilbert E), IsMemoryPOVM M ∧
    v = ∑ k, p k * memoryTracePair (M k) (rho k).coefficients}

/-! Sanity checks concern definitions only; source theorem targets remain sorry. -/

example : IsDiscreteLaw (fun _ : Unit => (1 : ℝ)) := by
  refine ⟨fun _ => zero_le_one, (hasSum_fintype _).summable, ?_⟩
  simp

example {Z : Type*} (p : Z → ℝ) : discreteTV p p = 0 := by
  simp [discreteTV]

example : IsCoupling (fun _ : Unit => (1 : ℝ)) (fun _ : Unit => 1)
    (fun _ : Unit × Unit => 1) := by
  refine ⟨?_, ?_, ?_⟩
  · exact ⟨fun _ => zero_le_one, (hasSum_fintype _).summable, by simp⟩
  · intro z; simp
  · intro z; simp

example (p q : Unit → ℝ) (g : Unit → Set.Icc (0 : ℝ) 1) :
    binaryTestSuccess p q g = (1 / 2 : ℝ) *
      (p () * (g ()).val + q () * (1 - (g ()).val)) := by
  simp [binaryTestSuccess]

example {I : Type*} [Fintype I] [DecidableEq I] :
    IsDiscretePOVM (fun _ : Unit => (1 : Matrix I I ℂ)) := by
  exact ⟨fun _ => Matrix.PosSemidef.one, by simpa using hasSum_fintype (fun _ : Unit => (1 : Matrix I I ℂ))⟩

example {Z B : Type*} : ClassicalFirst (0 : Matrix (Z × B) (Z × B) ℂ) := by
  intro z zprime b bprime h; rfl

example {n : ℕ} (x : Fin n → Bool) : xorWord x (fun _ => false) = x := by
  funext i; simp [xorWord]

example (x : Fin 0 → Bool) : otpIdeal x (x,x) = 1 := by
  simp [otpIdeal]

example {K X T : Type*} [DecidableEq T] (h : K → X → T) (k : K) (x : X) :
    verifyTag h k (x,h k x) = some x := by simp [verifyTag]

example {X T : Type*} [DecidableEq X] [DecidableEq T]
    (h : Unit → X → T) (x : X) : honestAuthentication h x (some x) = 1 := by
  simp [honestAuthentication, verifyTag]

example (M : ACModel) (r : M.Resource) : honest M (M.identity,M.identity) r = r := by
  simp [honest, M.identity_attach]

example (M : ACModel) (p : M.Converter × M.Converter) (r s : Filtered M) (epsilon : ℝ)
    (h : Constructs M p r s epsilon) :
    ∃ sim, M.distance (honest M p r.resource) (M.attach .eve sim s.resource) ≤ epsilon := h.2

example {R D : Type} (run : D → R → PMF Bool) : ClosedTests run id := by
  intro d; exact ⟨d, fun _ => rfl⟩

example {E : Type} (sigma : Matrix E E ℂ) (i j : E) :
    uniformReference (d := 1) sigma (0,i) (0,j) = sigma i j := by
  simp [uniformReference, maximallyMixed, Matrix.kronecker]

example {E : Type} (rho : Matrix E E ℂ) : memoryTracePair 0 rho = 0 := by
  simp [memoryTracePair]

example {E : Type} : PositiveMemoryOperator (0 : Hilbert E →L[ℂ] Hilbert E) := by
  intro v; simp

end QAlgorithms.Papers.Independent.Bridge50.P44
Source
Cryptographic security of quantum key distribution, arXiv:1409.3525v1, https://arxiv.org/abs/1409.3525v1
Read-back

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

QAlgorithms.Papers.Independent.Bridge50.P44.ACModel

A model consists of a type R\mathcal RR of resources, a type C\mathcal CC of converters, operations P:R×R→RP:\mathcal R\times\mathcal R\to\mathcal RP:R×R→R, S,T:C×C→CS,T:\mathcal C\times\mathcal C\to\mathcal CS,T:C×C→C, an identity converter e∈Ce\in\mathcal Ce∈C, attachment operations Ai:C×R→RA_i:\mathcal C\times\mathcal R\to\mathcal RAi​:C×R→R for i∈{Alice,Bob,Eve}i\in\{\mathrm{Alice},\mathrm{Bob},\mathrm{Eve}\}i∈{Alice,Bob,Eve}, and a real-valued distance d:R×R→Rd:\mathcal R\times\mathcal R\to\mathbb Rd:R×R→R. These data must satisfy, for every interface iii, converters a,ba,ba,b, and resources r,s,tr,s,tr,s,t,

Ai(S(a,b),r)=Ai(a,Ai(b,r)),Ai(e,r)=r,Ai(T(a,b),P(r,s))=P(Ai(a,r),Ai(b,s)),0≤d(r,s),d(r,r)=0,d(r,s)=d(s,r),d(r,t)≤d(r,s)+d(s,t),d(Ai(a,r),Ai(a,s))≤d(r,s),d(P(r,t),P(s,t))≤d(r,s),d(P(t,r),P(t,s))≤d(r,s).\begin{aligned} A_i(S(a,b),r)&=A_i(a,A_i(b,r)),& A_i(e,r)&=r,\\ A_i(T(a,b),P(r,s))&=P(A_i(a,r),A_i(b,s)),\\ 0&\le d(r,s),& d(r,r)&=0,\\ d(r,s)&=d(s,r),& d(r,t)&\le d(r,s)+d(s,t),\\ d(A_i(a,r),A_i(a,s))&\le d(r,s),\\ d(P(r,t),P(s,t))&\le d(r,s),& d(P(t,r),P(t,s))&\le d(r,s). \end{aligned}Ai​(S(a,b),r)Ai​(T(a,b),P(r,s))0d(r,s)d(Ai​(a,r),Ai​(a,s))d(P(r,t),P(s,t))​=Ai​(a,Ai​(b,r)),=P(Ai​(a,r),Ai​(b,s)),≤d(r,s),=d(s,r),≤d(r,s),≤d(r,s),​Ai​(e,r)d(r,r)d(r,t)d(P(t,r),P(t,s))​=r,=0,≤d(r,s)+d(s,t),≤d(r,s).​

Additionally, for every pair of distinct interfaces i,ji,ji,j, converters a,ba,ba,b, and resource rrr, Ai(a,Aj(b,r))=Aj(b,Ai(a,r))A_i(a,A_j(b,r))=A_j(b,A_i(a,r))Ai​(a,Aj​(b,r))=Aj​(b,Ai​(a,r)). Distinct resources are permitted to have distance zero, and the resource type may be empty; the identity converter ensures that the converter type is nonempty.

QAlgorithms.Papers.Independent.Bridge50.P44.ClassicalFirst

For any types Z,BZ,BZ,B and arbitrary complex matrix ρ\rhoρ indexed by (Z×B)×(Z×B)(Z\times B)\times(Z\times B)(Z×B)×(Z×B), this predicate requires

ρ(z,b),(z′,b′)=0for every z,z′∈Z, b,b′∈B with z≠z′.\rho_{(z,b),(z',b')}=0 \quad\text{for every }z,z'\in Z,\ b,b'\in B\text{ with }z\ne z'.ρ(z,b),(z′,b′)​=0for every z,z′∈Z, b,b′∈B with z=z′.

No positivity, normalization, or other condition is imposed on ρ\rhoρ. The requirement is vacuous if BBB is empty or ZZZ has at most one element.

QAlgorithms.Papers.Independent.Bridge50.P44.ClosedTests

For arbitrary resource and test types R,DR,DR,D, a function run⁡:D×R→PMF⁡({false,true})\operatorname{run}:D\times R\to\operatorname{PMF}(\{\mathrm{false},\mathrm{true}\})run:D×R→PMF({false,true}), and a resource transformation f:R→Rf:R\to Rf:R→R, the closure condition means that for every test d∈Dd\in Dd∈D, there exists a test c∈Dc\in Dc∈D such that

run⁡(c,r)=run⁡(d,f(r))for every r∈R.\operatorname{run}(c,r)=\operatorname{run}(d,f(r)) \qquad\text{for every }r\in R.run(c,r)=run(d,f(r))for every r∈R.

The equality is equality of the entire Boolean probability distributions. The test ccc may depend on ddd but must work for every resource; uniqueness is not required. The condition is vacuous when DDD is empty.

QAlgorithms.Papers.Independent.Bridge50.P44.Constructs

For any model MMM, converter pair p=(pA,pB)p=(p_A,p_B)p=(pA​,pB​), filtered resources r=(R,F)r=(R,F)r=(R,F) and s=(S,G)s=(S,G)s=(S,G), and real number ϵ\epsilonϵ, the construction condition means that both

dM ⁣(attach⁡M(Alice,pA,attach⁡M(Bob,pB,attach⁡M(Eve,F,R))),attach⁡M(Eve,G,S))≤ϵd_M\!\left( \operatorname{attach}_M(\mathrm{Alice},p_A, \operatorname{attach}_M(\mathrm{Bob},p_B, \operatorname{attach}_M(\mathrm{Eve},F,R))), \operatorname{attach}_M(\mathrm{Eve},G,S)\right)\le\epsilondM​(attachM​(Alice,pA​,attachM​(Bob,pB​,attachM​(Eve,F,R))),attachM​(Eve,G,S))≤ϵ

and

∃ c∈M.Converter,dM ⁣(attach⁡M(Alice,pA,attach⁡M(Bob,pB,R)),attach⁡M(Eve,c,S))≤ϵ\exists\,c\in M.\mathrm{Converter},\quad d_M\!\left( \operatorname{attach}_M(\mathrm{Alice},p_A, \operatorname{attach}_M(\mathrm{Bob},p_B,R)), \operatorname{attach}_M(\mathrm{Eve},c,S)\right)\le\epsilon∃c∈M.Converter,dM​(attachM​(Alice,pA​,attachM​(Bob,pB​,R)),attachM​(Eve,c,S))≤ϵ

hold. The converter ccc, called the simulator, need not be unique. Although ϵ\epsilonϵ is initially arbitrary, the condition cannot hold for negative ϵ\epsilonϵ, because the model’s distances are nonnegative.

QAlgorithms.Papers.Independent.Bridge50.P44.Filtered

For any model MMM, a filtered resource is a pair consisting of one resource of MMM and one converter of MMM, called its filter. No additional condition relates the resource and the filter.

QAlgorithms.Papers.Independent.Bridge50.P44.Interface

The type of interfaces has exactly three distinct elements, named Alice, Bob, and Eve. Equality between interfaces is decidable.

QAlgorithms.Papers.Independent.Bridge50.P44.IsCoupling

For any type ZZZ, functions p,q:Z→Rp,q:Z\to\mathbb Rp,q:Z→R, and function j:Z×Z→Rj:Z\times Z\to\mathbb Rj:Z×Z→R, this predicate means that j(z,w)≥0j(z,w)\ge0j(z,w)≥0 for all z,wz,wz,w, the family jjj is summable with ∑(z,w)∈Z×Zj(z,w)=1\sum_{(z,w)\in Z\times Z}j(z,w)=1∑(z,w)∈Z×Z​j(z,w)=1, and its marginals satisfy ∑w∈Zj(z,w)=p(z)\sum_{w\in Z}j(z,w)=p(z)∑w∈Z​j(z,w)=p(z) for every zzz and ∑z∈Zj(z,w)=q(w)\sum_{z\in Z}j(z,w)=q(w)∑z∈Z​j(z,w)=q(w) for every www. There are no separate assumptions on ppp or qqq, and ZZZ need not be finite or countable. For empty ZZZ, the normalization condition cannot hold.

QAlgorithms.Papers.Independent.Bridge50.P44.IsDiscreteLaw

For any type ZZZ and function p:Z→Rp:Z\to\mathbb Rp:Z→R, this predicate means that p(z)≥0p(z)\ge0p(z)≥0 for every zzz, the family ppp is summable, and ∑z∈Zp(z)=1\sum_{z\in Z}p(z)=1∑z∈Z​p(z)=1. No finiteness or countability assumption is imposed on ZZZ. If ZZZ is empty, the predicate cannot hold, since the empty sum is 000.

QAlgorithms.Papers.Independent.Bridge50.P44.IsDiscretePOVM

For arbitrary types OOO and III, with a specified finite enumeration of III and decidable equality on III, and a family MoM_oMo​ of complex matrices indexed by I×II\times II×I, this predicate means that every MoM_oMo​ is positive semidefinite and that the finite partial sums ∑o∈FMo\sum_{o\in F}M_o∑o∈F​Mo​, indexed by finite subsets F⊆OF\subseteq OF⊆O, converge to the identity matrix. No finiteness or countability assumption is imposed on OOO. If III is empty, the condition holds for every such family; if OOO is empty and III is nonempty, it cannot hold.

QAlgorithms.Papers.Independent.Bridge50.P44.IsMemoryPOVM

For an arbitrary finite outcome type KKK, equipped with a finite enumeration, an arbitrary index type EEE, and a family MkM_kMk​ of continuous complex-linear operators on ℓ2(E;C)\ell^2(E;\mathbb C)ℓ2(E;C), this predicate means that ⟨v,Mkv⟩\langle v,M_kv\rangle⟨v,Mk​v⟩ is real and nonnegative for every k∈Kk\in Kk∈K and every v∈ℓ2(E;C)v\in\ell^2(E;\mathbb C)v∈ℓ2(E;C), and that ∑k∈KMk\sum_{k\in K}M_k∑k∈K​Mk​ equals the identity operator. No finiteness or countability assumption is imposed on EEE. Empty KKK is included: its sum is the zero operator, so the identity condition then requires ℓ2(E;C)\ell^2(E;\mathbb C)ℓ2(E;C) to be the zero space.

QAlgorithms.Papers.Independent.Bridge50.P44.PositiveMemoryOperator

For an arbitrary index type EEE and a continuous complex-linear operator AAA on the Hilbert space ℓ2(E;C)\ell^2(E;\mathbb C)ℓ2(E;C), this predicate means that, for every vector v∈ℓ2(E;C)v\in\ell^2(E;\mathbb C)v∈ℓ2(E;C), the scalar ⟨v,Av⟩\langle v,Av\rangle⟨v,Av⟩ has imaginary part zero and nonnegative real part. The quantifier includes the zero vector and all vectors without a normalization requirement; if EEE is empty, the predicate is satisfied by the unique operator on the zero-dimensional space.

QAlgorithms.Papers.Independent.Bridge50.P44.binaryTestSuccess

For any type ZZZ, arbitrary functions p,q:Z→Rp,q:Z\to\mathbb Rp,q:Z→R, and function g:Z→[0,1]g:Z\to[0,1]g:Z→[0,1], this defines

12∑z∈Z(p(z)g(z)+q(z)(1−g(z))).\frac12\sum_{z\in Z}\bigl(p(z)g(z)+q(z)(1-g(z))\bigr).21​z∈Z∑​(p(z)g(z)+q(z)(1−g(z))).

No distribution assumptions are imposed on ppp or qqq. The sum equals 000 if the summand family is not summable, and the empty sum is 000.

QAlgorithms.Papers.Independent.Bridge50.P44.discreteTV

For any type ZZZ and arbitrary functions p,q:Z→Rp,q:Z\to\mathbb Rp,q:Z→R, this defines the real number 12∑z∈Z∣p(z)−q(z)∣\frac12\sum_{z\in Z}|p(z)-q(z)|21​∑z∈Z​∣p(z)−q(z)∣. Neither function is required to be nonnegative, summable, or normalized. The sum is the totalized infinite sum, which equals 000 when its summand family is not summable; it also equals 000 when ZZZ is empty.

QAlgorithms.Papers.Independent.Bridge50.P44.distinguishingAdvantage

For arbitrary types R,DR,DR,D, a function assigning a probability mass function on the two Boolean values to every test d∈Dd\in Dd∈D and resource r∈Rr\in Rr∈R, and resources r,s∈Rr,s\in Rr,s∈R, define pd(r)p_d(r)pd​(r) to be the real probability that this function returns true. The distinguishing advantage is

sup⁡{pd(r)−pd(s):d∈D}.\sup\{p_d(r)-p_d(s):d\in D\}.sup{pd​(r)−pd​(s):d∈D}.

This uses the signed difference in the displayed order, without an absolute value. If DDD is empty, the real supremum convention used here gives zero; otherwise, the value may be negative.

QAlgorithms.Papers.Independent.Bridge50.P44.honest

For any model MMM, ordered pair p=(pA,pB)p=(p_A,p_B)p=(pA​,pB​) of its converters, and resource rrr, the resulting resource is defined by first attaching pBp_BpB​ at Bob’s interface and then attaching pAp_ApA​ at Alice’s interface:

honest⁡M(p,r)=attach⁡M ⁣(Alice,pA,attach⁡M(Bob,pB,r)).\operatorname{honest}_M(p,r) =\operatorname{attach}_M\!\left(\mathrm{Alice},p_A, \operatorname{attach}_M(\mathrm{Bob},p_B,r)\right).honestM​(p,r)=attachM​(Alice,pA​,attachM​(Bob,pB​,r)).

QAlgorithms.Papers.Independent.Bridge50.P44.honestAuthentication

For arbitrary types K,X,TK,X,TK,X,T, with a specified finite enumeration of KKK and decidable equality on XXX and TTT, a function h:K×X→Th:K\times X\to Th:K×X→T, a message x∈Xx\in Xx∈X, and optional output ooo, this defines the sum over k∈Kk\in Kk∈K of 1/∣K∣1/|K|1/∣K∣ when verification of (x,h(k,x))(x,h(k,x))(x,h(k,x)) returns ooo, and 000 otherwise; verification returns the received message exactly when its tag equals h(k,x)h(k,x)h(k,x). Consequently, for nonempty KKK the value is 111 when ooo contains xxx and 000 otherwise. If KKK is empty, the sum is 000 for every output.

QAlgorithms.Papers.Independent.Bridge50.P44.memoryGuess

For every natural number ddd, arbitrary index type EEE, arbitrary real weights p0,…,pd−1p_0,\ldots,p_{d-1}p0​,…,pd−1​, and family of states ρk\rho_kρk​ indexed by EEE, this defines the real supremum of all values ∑k=0d−1pk Re⁡(∑i∈E∑j∈E(Mkej)(i)(ρk)ji)\sum_{k=0}^{d-1}p_k\,\operatorname{Re}\bigl(\sum_{i\in E}\sum_{j\in E}(M_ke_j)(i)(\rho_k)_{ji}\bigr)∑k=0d−1​pk​Re(∑i∈E​∑j∈E​(Mk​ej​)(i)(ρk​)ji​), as M0,…,Md−1M_0,\ldots,M_{d-1}M0​,…,Md−1​ range over continuous complex-linear operators on ℓ2(E;C)\ell^2(E;\mathbb C)ℓ2(E;C) such that every ⟨v,Mkv⟩\langle v,M_kv\rangle⟨v,Mk​v⟩ is real and nonnegative and ∑kMk\sum_kM_k∑k​Mk​ is the identity. Here eje_jej​ is the coordinate unit vector; the nested infinite sums use the total convention assigning zero to nonsummable families. Each state ρk\rho_kρk​ admits an expansion (ρk)ij=∑nun(i)vn(j)‾(\rho_k)_{ij}=\sum_nu_n(i)\overline{v_n(j)}(ρk​)ij​=∑n​un​(i)vn​(j)​ with un,vn∈ℓ2(E;C)u_n,v_n\in\ell^2(E;\mathbb C)un​,vn​∈ℓ2(E;C) and ∑n∥un∥2∥vn∥2<∞\sum_n\|u_n\|_2\|v_n\|_2<\infty∑n​∥un​∥2​∥vn​∥2​<∞, has real nonnegative quadratic forms on all finite coordinate subsets, and has summable real diagonal with sum 111. The weights pkp_kpk​ are not required to be nonnegative or to sum to 111. The supremum is taken in R\mathbb RR, whose total supremum convention returns zero for an empty or unbounded-above set; d=0d=0d=0 is included and gives value zero.

QAlgorithms.Papers.Independent.Bridge50.P44.memoryTracePair

For an arbitrary index type EEE, a continuous complex-linear operator MMM on ℓ2(E;C)\ell^2(E;\mathbb C)ℓ2(E;C), and an arbitrary complex coefficient matrix ρ:E×E→C\rho:E\times E\to\mathbb Cρ:E×E→C, this defines the real number Re⁡(∑i∈E∑j∈E(Mej)(i)ρji)\operatorname{Re}\bigl(\sum_{i\in E}\sum_{j\in E}(Me_j)(i)\rho_{ji}\bigr)Re(∑i∈E​∑j∈E​(Mej​)(i)ρji​), where eje_jej​ is the square-summable vector equal to 111 at jjj and zero elsewhere. These are nested sums, with the jjj-sum taken first. No positivity, normalization, trace-class, countability, or summability hypothesis is imposed; each sum uses the total infinite-sum convention, which assigns zero when its summand family is not summable. For empty EEE, the value is zero.

QAlgorithms.Papers.Independent.Bridge50.P44.nuclearDistance

For any type III, without a finiteness or countability assumption, and arbitrary complex matrices ρ,σ\rho,\sigmaρ,σ indexed by I×II\times II×I, their nuclear distance is the extended nonnegative number

12inf⁡(un,vn)(∑n=0∞∥un∥2∥vn∥2),\frac12\inf_{(u_n,v_n)} \left(\sum_{n=0}^{\infty}\|u_n\|_2\|v_n\|_2\right),21​(un​,vn​)inf​(n=0∑∞​∥un​∥2​∥vn​∥2​),

where the infimum ranges over sequences un,vn∈ℓ2(I;C)u_n,v_n\in\ell^2(I;\mathbb C)un​,vn​∈ℓ2(I;C) for which the series of norm products is summable and

(ρ−σ)ij=∑n=0∞un(i) vn(j)‾for every i,j∈I.(\rho-\sigma)_{ij} =\sum_{n=0}^{\infty}u_n(i)\,\overline{v_n(j)} \qquad\text{for every }i,j\in I.(ρ−σ)ij​=n=0∑∞​un​(i)vn​(j)​for every i,j∈I.

The real sum is embedded into the extended nonnegative reals before taking the infimum. If no such expansion exists, the infimum and the distance are +∞+\infty+∞. No positivity or normalization condition is imposed on either matrix.

QAlgorithms.Papers.Independent.Bridge50.P44.optimalBinaryTestSuccess

For any type ZZZ and arbitrary functions p,q:Z→Rp,q:Z\to\mathbb Rp,q:Z→R, this defines the real supremum of the values

12∑z∈Z(p(z)g(z)+q(z)(1−g(z)))(g:Z→[0,1]).\frac12\sum_{z\in Z}\bigl(p(z)g(z)+q(z)(1-g(z))\bigr) \qquad(g:Z\to[0,1]).21​z∈Z∑​(p(z)g(z)+q(z)(1−g(z)))(g:Z→[0,1]).

Each infinite sum is interpreted as 000 if its summand family is not summable. No distribution assumptions on p,qp,qp,q, boundedness assumption on these values, or attainment assertion is included. The set of values is nonempty; if it is unbounded above, the totalized real supremum is 000. For empty ZZZ, the value is 000.

QAlgorithms.Papers.Independent.Bridge50.P44.optimizedSecrecy

For every natural number ddd, arbitrary index type EEE, and state ρ\rhoρ indexed by {0,…,d−1}×E\{0,\ldots,d-1\}\times E{0,…,d−1}×E, this defines the extended nonnegative real number inf⁡σ12 ν(ρ−Uσ)\inf_{\sigma}\frac12\,\nu(\rho-U_\sigma)infσ​21​ν(ρ−Uσ​), where the infimum ranges over all states σ\sigmaσ indexed by EEE, and Uσ((a,e),(b,f))=δabσ(e,f)/dU_\sigma((a,e),(b,f))=\delta_{ab}\sigma(e,f)/dUσ​((a,e),(b,f))=δab​σ(e,f)/d. Here ν(X)\nu(X)ν(X) is the infimum, over all sequences of square-summable complex vectors un,vnu_n,v_nun​,vn​ satisfying ∑n∥un∥2∥vn∥2<∞\sum_n\|u_n\|_2\|v_n\|_2<\infty∑n​∥un​∥2​∥vn​∥2​<∞ and Xij=∑nun(i)vn(j)‾X_{ij}=\sum_n u_n(i)\overline{v_n(j)}Xij​=∑n​un​(i)vn​(j)​, of ofReal⁡(∑n∥un∥2∥vn∥2)\operatorname{ofReal}(\sum_n\|u_n\|_2\|v_n\|_2)ofReal(∑n​∥un​∥2​∥vn​∥2​); an infimum over no such expansions is +∞+\infty+∞. A state indexed by any type FFF is a coefficient matrix admitting such an expansion, whose quadratic form on every finite subset of FFF is real and nonnegative, and whose real diagonal entries are summable with sum 111. No finiteness or countability assumption is imposed on EEE. The supplied state ρ\rhoρ rules out d=0d=0d=0 and empty EEE.

QAlgorithms.Papers.Independent.Bridge50.P44.otpIdeal

For every natural number nnn, Boolean word xxx of length nnn, and ordered pair out=(u,v)\mathrm{out}=(u,v)out=(u,v) of Boolean words of length nnn, this defines 2−n2^{-n}2−n if u=xu=xu=x, and 000 otherwise, with no condition on vvv. For n=0n=0n=0, its value on the unique output pair is 111.

QAlgorithms.Papers.Independent.Bridge50.P44.otpReal

For every natural number nnn, Boolean word xxx of length nnn, and ordered pair of Boolean words out=(u,v)\mathrm{out}=(u,v)out=(u,v) of length nnn, this defines

∑k∈{false,true}n{2−n,(u,v)=((x⊕k)⊕k, x⊕k),0,otherwise,\sum_{k\in\{\mathrm{false},\mathrm{true}\}^n} \begin{cases} 2^{-n},& (u,v)=((x\oplus k)\oplus k,\ x\oplus k),\\ 0,&\text{otherwise}, \end{cases}k∈{false,true}n∑​{2−n,0,​(u,v)=((x⊕k)⊕k, x⊕k),otherwise,​

where ⊕\oplus⊕ denotes coordinatewise exclusive OR. The case n=0n=0n=0 is included: there is one empty key and one output pair, and its value is 111.

QAlgorithms.Papers.Independent.Bridge50.P44.parallelFiltered

For any model MMM and filtered resources r=(R,F)r=(R,F)r=(R,F) and s=(S,G)s=(S,G)s=(S,G), their parallel filtered resource has resource parallel⁡M(R,S)\operatorname{parallel}_M(R,S)parallelM​(R,S) and filter tensor⁡M(F,G)\operatorname{tensor}_M(F,G)tensorM​(F,G).

QAlgorithms.Papers.Independent.Bridge50.P44.parallelProtocol

For any model MMM and ordered converter pairs p=(pA,pB)p=(p_A,p_B)p=(pA​,pB​) and q=(qA,qB)q=(q_A,q_B)q=(qA​,qB​), their parallel protocol is defined componentwise using the model’s converter tensor operation:

(tensor⁡M(pA,qA),tensor⁡M(pB,qB)).\bigl(\operatorname{tensor}_M(p_A,q_A), \operatorname{tensor}_M(p_B,q_B)\bigr).(tensorM​(pA​,qA​),tensorM​(pB​,qB​)).

QAlgorithms.Papers.Independent.Bridge50.P44.serialProtocol

For any model MMM and ordered converter pairs q=(qA,qB)q=(q_A,q_B)q=(qA​,qB​) and p=(pA,pB)p=(p_A,p_B)p=(pA​,pB​), their serial protocol is the pair

(serial⁡M(qA,pA),serial⁡M(qB,pB)).\bigl(\operatorname{serial}_M(q_A,p_A), \operatorname{serial}_M(q_B,p_B)\bigr).(serialM​(qA​,pA​),serialM​(qB​,pB​)).

Thus, at either interface, attaching the resulting converter attaches the corresponding ppp-converter first and the corresponding qqq-converter afterward, by the model’s serial attachment law.

QAlgorithms.Papers.Independent.Bridge50.P44.uniformReference

For every natural number ddd, arbitrary type EEE, and complex matrix σ\sigmaσ indexed by E×EE\times EE×E, the uniform reference is the matrix on {0,…,d−1}×E\{0,\ldots,d-1\}\times E{0,…,d−1}×E defined by

uniformReference⁡(σ)(i,e),(j,f)={1d σef,i=j,0,i≠j.\operatorname{uniformReference}(\sigma)_{(i,e),(j,f)} = \begin{cases} \dfrac{1}{d}\,\sigma_{ef},&i=j,\\ 0,&i\ne j. \end{cases}uniformReference(σ)(i,e),(j,f)​=⎩⎨⎧​d1​σef​,0,​i=j,i=j.​

Equivalently, it is the Kronecker product of d−1Idd^{-1}I_dd−1Id​ with σ\sigmaσ. No finiteness assumption on EEE, or positivity or normalization assumption on σ\sigmaσ, is required. The case d=0d=0d=0 is included and gives the matrix on the empty index set; complex division by zero is defined to be zero.

QAlgorithms.Papers.Independent.Bridge50.P44.verifyTag

For arbitrary types K,X,TK,X,TK,X,T, with decidable equality on TTT, a function h:K×X→Th:K\times X\to Th:K×X→T, a key k∈Kk\in Kk∈K, and received pair (x,t)∈X×T(x,t)\in X\times T(x,t)∈X×T, this returns the optional value containing xxx if t=h(k,x)t=h(k,x)t=h(k,x), and returns no value otherwise. No further property of hhh is assumed.

QAlgorithms.Papers.Independent.Bridge50.P44.xorWord

For every natural number nnn, including 000, and two Boolean words x,k:{0,…,n−1}→{false,true}x,k:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}x,k:{0,…,n−1}→{false,true}, this defines the word whose coordinate iii is the exclusive OR of xix_ixi​ and kik_iki​. For n=0n=0n=0, it is the unique empty word.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

  • Endorsed by mikedeng1 · Nov 8, 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