Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Bounds on quantum nonlocality via partial transposition

Definition
QAlgorithms_Papers_Independent_Intakethird100_P09

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

prove2quantum

The objects the formalized statements of Bounds on quantum nonlocality via partial transposition (arXiv:1407.6999) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • BellScenario: PDF p.2: finite nonempty input and output alphabets, without a bound on their sizes.
  • BellCoefficients: PDF p.2: the real coefficient table of one fixed Bell expression.
  • Measurements: PDF p.2: one complete local POVM for every local setting.
  • measuredBox: PDF p.2: Born probabilities using the same two local POVMs.
  • bellValue: PDF p.2: signed Bell value; no absolute value or input-law weight is implicit.
  • bellOperator: PDF p.2, Eq.(1): Bell operator for the fixed measurement family.
  • bellOperatorNorm
  • deterministicBox: PDF p.2: deterministic local strategies. Their convex hull is the local polytope.
  • classicalBound: PDF p.2: C(S) is the maximum signed local value. This finite nonempty set attains its supremum.
  • stateValue: PDF p.2, Eq.(3): supremum over all complete POVMs on this fixed state.
  • quantumBound: PDF p.2: Q(S) optimizes the signed value over all positive finite local dimensions.
  • sepDistance: PDF p.2, Eq.(4): distance to same-dimensional normalized separable states.
  • sepDistanceUntransposed: PDF p.2, following Eq.(4): equivalent distance without transposing the SEP witness.
  • nearSep: PDF p.2, Eq.(5): an actual separable witness at distance at most epsilon is required.
  • HasFiniteLocalModel: PDF pp.4,8: finite local boxes; shared randomness is independent of both inputs. Finite deterministic mixtures describe the entire finite local polytope.
  • classicalKLBits: PDF p.4, Eq.(12): KL divergence in bits. The sum is formed BEFORE taking ofReal; individual summands may be negative. A positive mass over zero has infinite divergence.
  • boxD: PDF pp.4,8: average conditional divergence, with the input law outside each KL divergence.
  • inputOptimization: PDF p.8: uniform modifies every input-law optimization consistently; false means optimized.
  • boxNonlocality: PDF p.4, Eq.(12): supremum over joint input laws, THEN infimum over all local boxes.
  • asFin: Paper-local basis adapter to the accepted dimension-changing FiniteLOCC endpoints. It preserves each owner's basis and both matrix indices.
  • IsOperationalLOCC: PDF pp.3--4,8: operational LOCC includes finite adaptive protocols and their limits. Pointwise topology on finite-dimensional linear maps equals every channel-norm topology; closure here is taken in the ambient function space, whose linear subspace is closed. No separable-operation relaxation or uniform bound on rounds is imposed.
  • BellExperiment: PDF pp.3--4,8: one LOCC preprocessing channel followed by one finite Bell scenario.
  • rBlock: PDF p.4, Eq.(13): finite-block optimized nonlocality, before division by blocklength.
  • tBlock: PDF pp.4,8, Eqs.(14),(A.1): the infimum is INSIDE every supremum, and the same channel and measurement compare rho^n with sigma^n for a ONE-copy separable sigma.
  • asymptoticR: PDF pp.4,8: asymptotic nonlocality uses limsup and positive copy numbers n+1.
  • asymptoticT: PDF pp.4,8: restricted regularized relative entropy, with the source's iid reference.
  • LocalFilter: PDF pp.4,9: a selected product Kraus leaf of a complete locally realizable filter. The two complete instruments are performed locally and both outcomes are flagged. Every product contraction can be rescaled between its factors to fit this form, so arbitrary single-product successful leaves are included, without nonlocal filters.
  • successfulFilterBranch: PDF pp.4,9: subnormalized successful branch, applied AFTER LOCC.
  • hiddenBlock: PDF pp.4,9: success probability OUTSIDE nonlocality of the normalized branch. A zero-probability branch has score zero directly, with no conditional state evaluated.
  • asymptoticRH: PDF p.4, Eq.(18), and p.9: success-weighted hidden nonlocality per input copy.
  • chshScenario: PDF p.3, Eq.(8): correlator CHSH, classical bound 2 and quantum bound 2 sqrt(2).
  • chshCoefficients: PDF p.3, Eq.(8): plus correlations except at (1,1); outcomes use signs (-1)^a.
  • flatX: PDF p.3, Eq.(9): flat-unitary shield operator, with the printed X prefactor retained.
  • flatY: PDF p.3, Eq.(9): Y = sqrt(d) X^Gamma, with Gamma only on Bob's shield.
  • flatProbability: PDF p.3, Eq.(9): mixing probability, with denominator sqrt(d)+1.
  • pptPrivate: PDF p.3, Eq.(9): constructed approximate private bit on the physical AA':BB' cut. The source prints flat modulus 1/d. Changed to 1/sqrt(d) in theorem hypotheses: unitarity, the named QFT example and traceNorm X=1 force this correction.
  • hidingResource: PDF p.7, Eq.(A.8): exact computed family, q=1/3, d=m^2, k=m. Normalizer has BOTH exponents m; no density, proximity or key premise is substituted.
  • paired: PDF pp.3,7: tensor product with both owners' registers grouped together.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_BipartiteSeparability
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P24
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P42
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P21
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P47
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P54
import Definitions.Def_QAlgorithms_Papers_Independent_Gap48_P42

/-!
Horodecki--Murta, arXiv:1407.6999v3. Citations are PDF pages.
All new objects are local to this paper. Entropies are in bits, with extended
nonnegative values and infinity on support failure. Gamma always transposes Bob.
The unrestricted signed corollaries and one-sided separable gauge are deferred.
The positive-coefficient corrections below require independent moderation.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P09

open scoped Matrix ComplexConjugate ComplexOrder ENNReal
open Filter
open QAlgorithms.Entanglement (IsSeparableDensity)
open QAlgorithms.Papers.Independent.Dependency50.P24
  (transposeSecond partyCut xForm swapPrivate hidingOne hidingTwo)
open QAlgorithms.Papers.Independent.Dependency50.P42 (dimensionedPower)
open QAlgorithms.Papers.Independent.Information100.P21 (Op FiniteLOCC)
open QAlgorithms.Papers.Independent.Information100.P56 (IsLaw)
open QAlgorithms.Papers.Independent.Advance50.P47 (Box)
open QAlgorithms.Papers.Independent.Information100.P54 (relativeEntanglement)

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

/-- PDF p.2: finite nonempty input and output alphabets, without a bound on their sizes. -/
structure BellScenario where
  nx : ℕ+
  ny : ℕ+
  na : ℕ+
  nb : ℕ+

/-- PDF p.2: the real coefficient table of one fixed Bell expression. -/
abbrev BellCoefficients (S : BellScenario) := Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)

/-- PDF p.2: one complete local POVM for every local setting. -/
structure Measurements (S : BellScenario) (I J : Type) [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] where
  alice : Fin S.nx → Fin S.na → Op I
  bob : Fin S.ny → Fin S.nb → Op J
  alice_complete : ∀ x, IsPOVM (alice x)
  bob_complete : ∀ y, IsPOVM (bob y)

/-- PDF p.2: Born probabilities using the same two local POVMs. -/
def measuredBox {S : BellScenario} {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] (M : Measurements S I J) (rho : Op (I × J)) : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb) :=
  fun x y a b => effectProb (Matrix.kronecker (M.alice x a) (M.bob y b)) rho

/-- PDF p.2: signed Bell value; no absolute value or input-law weight is implicit. -/
def bellValue {S : BellScenario} (s : BellCoefficients S) (P : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)) : ℝ :=
  ∑ x, ∑ y, ∑ a, ∑ b, s x y a b * P x y a b

/-- PDF p.2, Eq.(1): Bell operator for the fixed measurement family. -/
def bellOperator {S : BellScenario} {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] (s : BellCoefficients S) (M : Measurements S I J) :
    Op (I × J) :=
  ∑ x, ∑ y, ∑ a, ∑ b, (s x y a b : ℂ) • Matrix.kronecker (M.alice x a) (M.bob y b)

open scoped Matrix.Norms.L2Operator in
/-- PDF p.2: the spectral/operator norm, explicitly selecting Mathlib's Euclidean operator norm. -/
def bellOperatorNorm {I : Type} [Fintype I] [DecidableEq I] (X : Op I) : ℝ :=
  ‖X‖

/-- PDF p.2: deterministic local strategies. Their convex hull is the local polytope. -/
def deterministicBox {S : BellScenario} (f : Fin S.nx → Fin S.na)
    (g : Fin S.ny → Fin S.nb) : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb) :=
  fun x y a b => if f x = a ∧ g y = b then 1 else 0

/-- PDF p.2: C(S) is the maximum signed local value. This finite nonempty set attains its supremum. -/
def classicalBound {S : BellScenario} (s : BellCoefficients S) : ℝ :=
  sSup {v | ∃ f : Fin S.nx → Fin S.na, ∃ g : Fin S.ny → Fin S.nb,
    v = bellValue s (deterministicBox f g)}

/-- PDF p.2, Eq.(3): supremum over all complete POVMs on this fixed state. -/
def stateValue {S : BellScenario} {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] (s : BellCoefficients S) (rho : Op (I × J)) : ℝ :=
  sSup {v | ∃ M : Measurements S I J, v = bellValue s (measuredBox M rho)}

/-- PDF p.2: Q(S) optimizes the signed value over all positive finite local dimensions. -/
def quantumBound {S : BellScenario} (s : BellCoefficients S) : ℝ :=
  sSup {v | ∃ a b : ℕ+, ∃ rho : Op (Fin a × Fin b), IsDensityMatrix rho ∧
    ∃ M : Measurements S (Fin a) (Fin b), v = bellValue s (measuredBox M rho)}

/-- PDF p.2, Eq.(4): distance to same-dimensional normalized separable states. -/
def sepDistance {I J : Type} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J]
    [DecidableEq I] [DecidableEq J] (rho : Op (I × J)) : ℝ :=
  sInf {r | ∃ sigma : Op (I × J), IsSeparableDensity sigma ∧
    r = traceNorm (transposeSecond rho - transposeSecond sigma)}

/-- PDF p.2, following Eq.(4): equivalent distance without transposing the SEP witness. -/
def sepDistanceUntransposed {I J : Type} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J]
    [DecidableEq I] [DecidableEq J] (rho : Op (I × J)) : ℝ :=
  sInf {r | ∃ sigma : Op (I × J), IsSeparableDensity sigma ∧
    r = traceNorm (transposeSecond rho - sigma)}

/-- PDF p.2, Eq.(5): an actual separable witness at distance at most epsilon is required. -/
def nearSep {I J : Type} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J]
    [DecidableEq I] [DecidableEq J] (epsilon : ℝ) : Set (Op (I × J)) :=
  {rho | IsDensityMatrix rho ∧ ∃ sigma : Op (I × J), IsSeparableDensity sigma ∧
    traceNorm (transposeSecond rho - transposeSecond sigma) ≤ epsilon}

/-- PDF pp.4,8: finite local boxes; shared randomness is independent of both inputs.
Finite deterministic mixtures describe the entire finite local polytope. -/
def HasFiniteLocalModel {S : BellScenario} (P : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)) : Prop :=
  ∃ k : ℕ, ∃ w : Fin k → ℝ, IsLaw w ∧
    ∃ f : Fin k → Fin S.nx → Fin S.na, ∃ g : Fin k → Fin S.ny → Fin S.nb,
      ∀ x y a b, P x y a b = ∑ i, w i * deterministicBox (f i) (g i) x y a b

/-- PDF p.4, Eq.(12): KL divergence in bits. The sum is formed BEFORE taking ofReal;
individual summands may be negative. A positive mass over zero has infinite divergence. -/
def classicalKLBits {I : Type} [Fintype I] (p q : I → ℝ) : ℝ≥0∞ :=
  if ∃ i, 0 < p i ∧ q i = 0 then ⊤ else
    ENNReal.ofReal (∑ i, if p i = 0 then 0 else p i * (Real.log (p i / q i) / Real.log 2))

/-- PDF pp.4,8: average conditional divergence, with the input law outside each KL divergence. -/
def boxD {S : BellScenario} (p : Fin S.nx × Fin S.ny → ℝ) (P Q : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)) : ℝ≥0∞ :=
  ∑ z, ENNReal.ofReal (p z) * classicalKLBits
    (fun ab : Fin S.na × Fin S.nb => P z.1 z.2 ab.1 ab.2)
    (fun ab : Fin S.na × Fin S.nb => Q z.1 z.2 ab.1 ab.2)

/-- PDF p.8: uniform modifies every input-law optimization consistently; false means optimized. -/
def inputOptimization (uniform : Bool) (S : BellScenario)
    (f : (Fin S.nx × Fin S.ny → ℝ) → ℝ≥0∞) : ℝ≥0∞ :=
  if uniform then f (fun _ => ((S.nx : ℝ) * (S.ny : ℝ))⁻¹)
  else sSup {v | ∃ p, IsLaw p ∧ v = f p}

/-- PDF p.4, Eq.(12): supremum over joint input laws, THEN infimum over all local boxes. -/
def boxNonlocality {S : BellScenario} (uniform : Bool) (P : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)) : ℝ≥0∞ :=
  inputOptimization uniform S (fun p => sInf {v | ∃ Q : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb), HasFiniteLocalModel Q ∧ v = boxD p P Q})

/-- Paper-local basis adapter to the accepted dimension-changing FiniteLOCC endpoints.
It preserves each owner's basis and both matrix indices. -/
def asFin {I J : Type} [Fintype I] [Fintype J] (rho : Op (I × J)) :
    Op (Fin (Fintype.card I) × Fin (Fintype.card J)) :=
  fun a b => rho ((Fintype.equivFin I).symm a.1, (Fintype.equivFin J).symm a.2)
    ((Fintype.equivFin I).symm b.1, (Fintype.equivFin J).symm b.2)

/-- PDF pp.3--4,8: operational LOCC includes finite adaptive protocols and their limits.
Pointwise topology on finite-dimensional linear maps equals every channel-norm topology;
closure here is taken in the ambient function space, whose linear subspace is closed.
No separable-operation relaxation or uniform bound on rounds is imposed. -/
def IsOperationalLOCC {a b c d : ℕ}
    (L : Superop (Fin a × Fin b) (Fin c × Fin d)) : Prop :=
  L ∈ closure {K | FiniteLOCC K}

/-- PDF pp.3--4,8: one LOCC preprocessing channel followed by one finite Bell scenario. -/
structure BellExperiment (a b : ℕ) where
  outA : ℕ+
  outB : ℕ+
  scenario : BellScenario
  channel : Superop (Fin a × Fin b) (Fin outA × Fin outB)
  local_channel : IsOperationalLOCC channel
  measurement : Measurements scenario (Fin outA) (Fin outB)

/-- PDF p.4, Eq.(13): finite-block optimized nonlocality, before division by blocklength. -/
def rBlock {a b : ℕ} (uniform : Bool) (rho : Op (Fin a × Fin b)) : ℝ≥0∞ :=
  sSup {v | ∃ E : BellExperiment a b,
    v = boxNonlocality uniform (measuredBox E.measurement (E.channel rho))}

/-- PDF pp.4,8, Eqs.(14),(A.1): the infimum is INSIDE every supremum, and the same
channel and measurement compare rho^n with sigma^n for a ONE-copy separable sigma. -/
def tBlock {a b : ℕ} [Nonempty (Fin a)] [Nonempty (Fin b)]
    (uniform : Bool) (rho : Op (Fin a × Fin b)) (n : ℕ) : ℝ≥0∞ :=
  sSup {v | ∃ E : BellExperiment (a ^ n) (b ^ n),
    v = inputOptimization uniform E.scenario (fun p =>
      sInf {w | ∃ sigma : Op (Fin a × Fin b), IsSeparableDensity sigma ∧
        w = boxD p
          (measuredBox E.measurement (E.channel (dimensionedPower rho n)))
          (measuredBox E.measurement (E.channel (dimensionedPower sigma n)))})}

/-- PDF pp.4,8: asymptotic nonlocality uses limsup and positive copy numbers n+1. -/
def asymptoticR {a b : ℕ} (uniform : Bool) (rho : Op (Fin a × Fin b)) : ℝ≥0∞ :=
  Filter.limsup (fun n : ℕ => rBlock uniform (dimensionedPower rho (n+1)) /
    (n+1 : ℝ≥0∞)) Filter.atTop

/-- PDF pp.4,8: restricted regularized relative entropy, with the source's iid reference. -/
def asymptoticT {a b : ℕ} [Nonempty (Fin a)] [Nonempty (Fin b)]
    (uniform : Bool) (rho : Op (Fin a × Fin b)) : ℝ≥0∞ :=
  Filter.limsup (fun n : ℕ => tBlock uniform rho (n+1) / (n+1 : ℝ≥0∞)) Filter.atTop

/-- PDF pp.4,9: a selected product Kraus leaf of a complete locally realizable filter.
The two complete instruments are performed locally and both outcomes are flagged.
Every product contraction can be rescaled between its factors to fit this form,
so arbitrary single-product successful leaves are included, without nonlocal filters. -/
structure LocalFilter (a b : ℕ) where
  countA : ℕ+
  countB : ℕ+
  alice : Fin countA → Op (Fin a)
  bob : Fin countB → Op (Fin b)
  completeA : IsKrausFamily alice
  completeB : IsKrausFamily bob
  selectedA : Fin countA
  selectedB : Fin countB

/-- PDF pp.4,9: subnormalized successful branch, applied AFTER LOCC. -/
def successfulFilterBranch {a b : ℕ} (F : LocalFilter a b) (rho : Op (Fin a × Fin b)) :
    Op (Fin a × Fin b) :=
  let K := Matrix.kronecker (F.alice F.selectedA) (F.bob F.selectedB)
  K * rho * Kᴴ

/-- PDF pp.4,9: success probability OUTSIDE nonlocality of the normalized branch.
A zero-probability branch has score zero directly, with no conditional state evaluated. -/
def hiddenBlock {a b : ℕ} (uniform : Bool) (rho : Op (Fin a × Fin b)) : ℝ≥0∞ :=
  sSup {v | ∃ E : BellExperiment a b, ∃ F : LocalFilter E.outA E.outB,
    let branch := successfulFilterBranch F (E.channel rho)
    let p := branch.trace.re
    v = if p = 0 then 0 else ENNReal.ofReal p *
      boxNonlocality uniform (measuredBox E.measurement ((p : ℂ)⁻¹ • branch))}

/-- PDF p.4, Eq.(18), and p.9: success-weighted hidden nonlocality per input copy. -/
def asymptoticRH {a b : ℕ} (uniform : Bool) (rho : Op (Fin a × Fin b)) : ℝ≥0∞ :=
  Filter.limsup (fun n : ℕ => hiddenBlock uniform (dimensionedPower rho (n+1)) /
    (n+1 : ℝ≥0∞)) Filter.atTop

/-- PDF p.3, Eq.(8): correlator CHSH, classical bound 2 and quantum bound 2 sqrt(2). -/
def chshScenario : BellScenario := ⟨2, 2, 2, 2⟩

/-- PDF p.3, Eq.(8): plus correlations except at (1,1); outcomes use signs (-1)^a. -/
def chshCoefficients : BellCoefficients chshScenario :=
  fun x y a b => (if x = 1 ∧ y = 1 then -1 else 1) *
    (if a = b then 1 else -1)

/-- PDF p.3, Eq.(9): flat-unitary shield operator, with the printed X prefactor retained. -/
def flatX (d : ℕ+) (U : Matrix.unitaryGroup (Fin d) ℂ) : Op (Fin d × Fin d) :=
  fun a b => if b = (a.2, a.1) then
    (((d : ℝ) * Real.sqrt d)⁻¹ : ℂ) * (U : Op (Fin d)) a.1 a.2 else 0

/-- PDF p.3, Eq.(9): Y = sqrt(d) X^Gamma, with Gamma only on Bob's shield. -/
def flatY (d : ℕ+) (U : Matrix.unitaryGroup (Fin d) ℂ) : Op (Fin d × Fin d) :=
  (Real.sqrt d : ℂ) • transposeSecond (flatX d U)

/-- PDF p.3, Eq.(9): mixing probability, with denominator sqrt(d)+1. -/
def flatProbability (d : ℕ+) : ℝ := (Real.sqrt d + 1)⁻¹

/-- PDF p.3, Eq.(9): constructed approximate private bit on the physical AA':BB' cut.
The source prints flat modulus 1/d. Changed to 1/sqrt(d) in theorem hypotheses:
unitarity, the named QFT example and traceNorm X=1 force this correction. -/
def pptPrivate (d : ℕ+) (U : Matrix.unitaryGroup (Fin d) ℂ) :
    Op ((Fin 2 × Fin d) × (Fin 2 × Fin d)) :=
  let X := flatX d U
  let Y := flatY d U
  let p := flatProbability d
  let noise : Op ((Fin 2 × Fin 2) × (Fin d × Fin d)) :=
    fun a b => (p/2 : ℂ) *
      (if a.1 = (0,1) ∧ b.1 = (0,1) then (cfc Real.sqrt (Y * Yᴴ)) a.2 b.2
      else if a.1 = (1,0) ∧ b.1 = (1,0) then (cfc Real.sqrt (Yᴴ * Y)) a.2 b.2 else 0)
  partyCut ((1-p : ℂ) • xForm X + noise)

/-- PDF p.7, Eq.(A.8): exact computed family, q=1/3, d=m^2, k=m.
Normalizer has BOTH exponents m; no density, proximity or key premise is substituted. -/
def hidingResource (m : ℕ) :
    Op ((Fin 2 × (Fin m → Fin m → Fin (m^2))) ×
      (Fin 2 × (Fin m → Fin m → Fin (m^2)))) :=
  let tau1 := hidingOne (m^2) m
  let tau2 := hidingTwo (m^2) m
  let diag := (1/6 : ℂ) • (tau1 + tau2)
  let off := (1/6 : ℂ) • (tau1 - tau2)
  let odd := (1/6 : ℂ) • tau2
  let tensor := fun X : Op ((Fin m → Fin (m^2)) × (Fin m → Fin (m^2))) =>
    fun a b : (Fin m → Fin m → Fin (m^2)) × (Fin m → Fin m → Fin (m^2)) =>
      ∏ t, X (a.1 t, a.2 t) (b.1 t, b.2 t)
  partyCut (fun a b => ((2*(1/3 : ℂ)^m + 2*(1/6 : ℂ)^m)⁻¹) *
    (if (a.1 = (0,0) ∧ b.1 = (0,0)) ∨ (a.1 = (1,1) ∧ b.1 = (1,1)) then
      tensor diag a.2 b.2
    else if (a.1 = (0,0) ∧ b.1 = (1,1)) ∨ (a.1 = (1,1) ∧ b.1 = (0,0)) then
      tensor off a.2 b.2
    else if (a.1 = (0,1) ∧ b.1 = (0,1)) ∨ (a.1 = (1,0) ∧ b.1 = (1,0)) then
      tensor odd a.2 b.2 else 0))

/-- PDF pp.3,7: tensor product with both owners' registers grouped together. -/
def paired {I J K L : Type} (rho : Op (I × J)) (sigma : Op (K × L)) :
    Op ((I × K) × (J × L)) :=
  fun a b => rho (a.1.1,a.2.1) (b.1.1,b.2.1) * sigma (a.1.2,a.2.2) (b.1.2,b.2.2)

-- Sanity checks pin the concrete definitions; no target theorem is proved here.
example {I J : Type} (X : Op (I × J)) : transposeSecond (transposeSecond X) = X := rfl

example {S : BellScenario} (P : Box (Fin S.nx) (Fin S.ny) (Fin S.na) (Fin S.nb)) : bellValue (fun _ _ _ _ => 0) P = 0 := by
  simp [bellValue]

example : chshCoefficients 1 1 0 0 = -1 := by
  norm_num [chshCoefficients, chshScenario] <;> rfl

example : chshCoefficients 0 1 0 0 = 1 := by
  norm_num [chshCoefficients, chshScenario] <;> rfl

example {I : Type} [Fintype I] (p : I → ℝ) : classicalKLBits p p = 0 := by
  have h : ¬ ∃ i, 0 < p i ∧ p i = 0 := by
    rintro ⟨i, hi, he⟩
    exact (ne_of_gt hi) he
  simp only [classicalKLBits, if_neg h]
  have hsum : (∑ i, if p i = 0 then 0 else p i * (Real.log (p i / p i) / Real.log 2)) = 0 := by
    apply Finset.sum_eq_zero
    intro i hi
    by_cases hz : p i = 0
    · simp [hz]
    · simp [hz]
  rw [hsum]
  exact ENNReal.ofReal_zero

example {a b : ℕ} : IsOperationalLOCC (fun X : Op (Fin a × Fin b) => X) :=
  subset_closure (FiniteLOCC.identity a b)

example {I J : Type} [Fintype I] [Fintype J] (rho : Op (I × J)) (a b) :
    dimensionedPower (asFin rho) 0 a b = 1 := by
  simp [dimensionedPower, QAlgorithms.Papers.Independent.Information100.P80.groupedPower]

example {I J K L : Type} (rho : Op (I × J)) (sigma : Op (K × L)) (a b) :
    paired rho sigma a b = rho (a.1.1,a.2.1) (b.1.1,b.2.1) *
      sigma (a.1.2,a.2.2) (b.1.2,b.2.2) := rfl

example : flatProbability 1 = 1/2 := by
  norm_num [flatProbability]

example (d : ℕ+) (U : Matrix.unitaryGroup (Fin d) ℂ) (i j : Fin d) :
    flatX d U (i,j) (j,i) =
      (((d : ℝ) * Real.sqrt d)⁻¹ : ℂ) * (U : Op (Fin d)) i j := by
  simp [flatX]

example (S : BellScenario) (f : (Fin S.nx × Fin S.ny → ℝ) → ℝ≥0∞) :
    inputOptimization true S f = f (fun _ => ((S.nx : ℝ) * (S.ny : ℝ))⁻¹) := rfl

end QAlgorithms.Papers.Independent.Intakethird100.P09
Source
Bounds on quantum nonlocality via partial transposition, arXiv:1407.6999v3, https://arxiv.org/abs/1407.6999v3
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P09.BellCoefficients

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​), Bell coefficients are an arbitrary real-valued array sxyabs_{xyab}sxyab​, indexed by 0≤x<nx0\le x<n_x0≤x<nx​, 0≤y<ny0\le y<n_y0≤y<ny​, 0≤a<na0\le a<n_a0≤a<na​, and 0≤b<nb0\le b<n_b0≤b<nb​. No sign, normalization, or other constraint is imposed on this array.

QAlgorithms.Papers.Independent.Intakethird100.P09.BellExperiment

For natural numbers a,ba,ba,b, possibly zero, this structure consists of positive output dimensions c,dc,dc,d, a scenario with positive natural numbers nx,ny,na,nbn_x,n_y,n_a,n_bnx​,ny​,na​,nb​ of Alice and Bob inputs and outcomes, a function Φ\PhiΦ from complex matrices on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb to matrices on Cc⊗Cd\mathbb C^c\otimes\mathbb C^dCc⊗Cd, and local measurement matrices Ax,αA_{x,\alpha}Ax,α​ on Cc\mathbb C^cCc and By,βB_{y,\beta}By,β​ on Cd\mathbb C^dCd. For each input xxx, all Ax,αA_{x,\alpha}Ax,α​ must be positive semidefinite and satisfy ∑αAx,α=Ic\sum_\alpha A_{x,\alpha}=I_c∑α​Ax,α​=Ic​; the analogous conditions hold for every yyy and its By,βB_{y,\beta}By,β​. The function Φ\PhiΦ must lie in the pointwise topological closure of maps recursively constructed from bipartite identities and finite local Kraus instruments: each Alice or Bob instrument has local Kraus matrices whose adjoint products sum to the local identity, each outcome is followed by a recursively constructed continuation, and the branch outputs are summed. The structure contains no input state and imposes no additional relation among its output dimensions, scenario counts, and measurements.

QAlgorithms.Papers.Independent.Intakethird100.P09.BellScenario

A Bell scenario consists of four strictly positive integers nx,ny,na,nbn_x,n_y,n_a,n_bnx​,ny​,na​,nb​. These give the numbers of Alice’s inputs, Bob’s inputs, Alice’s outputs, and Bob’s outputs, respectively; none may be zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.HasFiniteLocalModel

Let SSS specify positive natural numbers nx,ny,na,nbn_x,n_y,n_a,n_bnx​,ny​,na​,nb​, giving Alice’s and Bob’s input and output index sets, and let P(x,y,a,b)P(x,y,a,b)P(x,y,a,b) be any real-valued array on these sets. This predicate means that there exist a natural number kkk, real weights wi≥0w_i\geq0wi​≥0 for 0≤i<k0\leq i<k0≤i<k with ∑iwi=1\sum_iw_i=1∑i​wi​=1, and deterministic response functions fi:{0,…,nx−1}→{0,…,na−1}f_i:\{0,\ldots,n_x-1\}\to\{0,\ldots,n_a-1\}fi​:{0,…,nx​−1}→{0,…,na​−1} and gi:{0,…,ny−1}→{0,…,nb−1}g_i:\{0,\ldots,n_y-1\}\to\{0,\ldots,n_b-1\}gi​:{0,…,ny​−1}→{0,…,nb​−1}, such that, for every input and output quadruple,

P(x,y,a,b)=∑i=0k−1wi 1{fi(x)=a, gi(y)=b}.P(x,y,a,b)=\sum_{i=0}^{k-1}w_i\,\mathbf1_{\{f_i(x)=a,\ g_i(y)=b\}}.P(x,y,a,b)=i=0∑k−1​wi​1{fi​(x)=a, gi​(y)=b}​.

Zero weights are permitted; k=0k=0k=0 cannot satisfy the requirement that the weights sum to 111. No separate correlation or no-signaling hypothesis is required of PPP.

QAlgorithms.Papers.Independent.Intakethird100.P09.IsOperationalLOCC

For any natural numbers a,b,c,da,b,c,da,b,c,d, including zero, and any function LLL from complex matrices on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb to complex matrices on Cc⊗Cd\mathbb C^c\otimes\mathbb C^dCc⊗Cd, this predicate means that LLL belongs to the topological closure of the following recursively generated set of maps: identity maps on bipartite systems are included; an Alice step chooses finitely many rectangular matrices AiA_iAi​ with ∑iAi†Ai=I\sum_iA_i^\dagger A_i=I∑i​Ai†​Ai​=I, applies X↦(Ai⊗I)X(Ai⊗I)†X\mapsto(A_i\otimes I)X(A_i\otimes I)^\daggerX↦(Ai​⊗I)X(Ai​⊗I)†, follows each outcome iii by another recursively generated map LiL_iLi​, and sums the resulting outputs; a Bob step has the same form using I⊗BiI\otimes B_iI⊗Bi​ with ∑iBi†Bi=I\sum_iB_i^\dagger B_i=I∑i​Bi†​Bi​=I. Local dimensions may change, and each continuation may depend on its outcome. The closure uses the topology on functions given by pointwise convergence of output matrices. No separate linearity or channel condition is included in this predicate beyond membership in that closure.

QAlgorithms.Papers.Independent.Intakethird100.P09.LocalFilter

For any natural numbers a,ba,ba,b, a local filter consists of positive integers rA,rBr_A,r_BrA​,rB​, families of complex square matrices Ai∈Ca×aA_i\in\mathbb C^{a\times a}Ai​∈Ca×a for 0≤i<rA0\le i<r_A0≤i<rA​ and Bj∈Cb×bB_j\in\mathbb C^{b\times b}Bj​∈Cb×b for 0≤j<rB0\le j<r_B0≤j<rB​, satisfying

∑i=0rA−1Ai†Ai=Ia,∑j=0rB−1Bj†Bj=Ib,\sum_{i=0}^{r_A-1}A_i^\dagger A_i=I_a, \qquad \sum_{j=0}^{r_B-1}B_j^\dagger B_j=I_b,i=0∑rA​−1​Ai†​Ai​=Ia​,j=0∑rB​−1​Bj†​Bj​=Ib​,

together with selected indices i∗∈{0,…,rA−1}i_*\in\{0,\ldots,r_A-1\}i∗​∈{0,…,rA​−1} and j∗∈{0,…,rB−1}j_*\in\{0,\ldots,r_B-1\}j∗​∈{0,…,rB​−1}. The local dimensions a,ba,ba,b may be zero. The selected matrices may be zero; no positive probability or nonzero action is required of the selected branch.

QAlgorithms.Papers.Independent.Intakethird100.P09.Measurements

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​) and finite types I,JI,JI,J, each equipped with decidable equality, a measurement specification consists of complex matrices Ax,aA_{x,a}Ax,a​ indexed by I×II\times II×I and By,bB_{y,b}By,b​ indexed by J×JJ\times JJ×J. For every x<nxx<n_xx<nx​, all Ax,aA_{x,a}Ax,a​ are positive semidefinite and ∑a<naAx,a=1I\sum_{a<n_a}A_{x,a}=1_I∑a<na​​Ax,a​=1I​; for every y<nyy<n_yy<ny​, all By,bB_{y,b}By,b​ are positive semidefinite and ∑b<nbBy,b=1J\sum_{b<n_b}B_{y,b}=1_J∑b<nb​​By,b​=1J​. The types I,JI,JI,J are allowed to be empty; on an empty index type, the identity and all matrices are the unique empty matrix, so the corresponding requirements are satisfied.

QAlgorithms.Papers.Independent.Intakethird100.P09.asFin

For any finite types I,JI,JI,J, possibly empty, and any complex matrix ρ\rhoρ indexed by I×JI\times JI×J, choose the bijections eI:I→{0,…,∣I∣−1}e_I:I\to\{0,\ldots,|I|-1\}eI​:I→{0,…,∣I∣−1} and eJ:J→{0,…,∣J∣−1}e_J:J\to\{0,\ldots,|J|-1\}eJ​:J→{0,…,∣J∣−1} supplied by their finite-type structures. This defines a matrix indexed by {0,…,∣I∣−1}×{0,…,∣J∣−1}\{0,\ldots,|I|-1\}\times\{0,\ldots,|J|-1\}{0,…,∣I∣−1}×{0,…,∣J∣−1} through

(asFin⁡ρ)(a,b),(a′,b′)=ρ(eI−1(a),eJ−1(b)),(eI−1(a′),eJ−1(b′)).(\operatorname{asFin}\rho)_{(a,b),(a',b')} =\rho_{(e_I^{-1}(a),e_J^{-1}(b)),(e_I^{-1}(a'),e_J^{-1}(b'))}.(asFinρ)(a,b),(a′,b′)​=ρ(eI−1​(a),eJ−1​(b)),(eI−1​(a′),eJ−1​(b′))​.

Thus the definition reindexes both rows and columns using those bijections. It requires no nonemptiness, decidable-equality, positivity, or normalization hypotheses.

QAlgorithms.Papers.Independent.Intakethird100.P09.asymptoticR

For natural numbers a,ba,ba,b, a Boolean flag uuu, and any complex matrix ρ\rhoρ on {0,…,a−1}×{0,…,b−1}\{0,\ldots,a-1\}\times\{0,\ldots,b-1\}{0,…,a−1}×{0,…,b−1}, this defines the extended nonnegative real number

lim sup⁡m→∞Ru(ρ[m])m.\limsup_{m\to\infty}\frac{\mathcal R_u(\rho^{[m]})}{m}.m→∞limsup​mRu​(ρ[m])​.

Here ρ[m]\rho^{[m]}ρ[m] is the matrix with entries ∏t=0m−1ρ(xt,yt),(xt′,yt′)\prod_{t=0}^{m-1}\rho_{(x_t,y_t),(x'_t,y'_t)}∏t=0m−1​ρ(xt​,yt​),(xt′​,yt′​)​, relabelled onto local index sets of sizes am,bma^m,b^mam,bm using the specified finite-set bijections. For a matrix ω\omegaω, Ru(ω)\mathcal R_u(\omega)Ru​(ω) is the supremum over experiments consisting of a map Λ\LambdaΛ in the closure of finite LOCC maps, positive finite output dimensions, a Bell scenario with positive finite input and outcome counts, and local POVMs (Ax,α)α,(By,β)β(A_{x,\alpha})_\alpha,(B_{y,\beta})_\beta(Ax,α​)α​,(By,β​)β​, of the following quantity for P(α,β∣x,y)=Re⁡tr⁡[(Ax,α⊗By,β)Λ(ω)]P(\alpha,\beta\mid x,y)=\operatorname{Re}\operatorname{tr}[(A_{x,\alpha}\otimes B_{y,\beta})\Lambda(\omega)]P(α,β∣x,y)=Retr[(Ax,α​⊗By,β​)Λ(ω)]:

{inf⁡Q finite localDunif(P∥Q),u=true,sup⁡π input probability lawinf⁡Q finite localDπ(P∥Q),u=false.\begin{cases} \displaystyle\inf_{Q\text{ finite local}}D_{\mathrm{unif}}(P\|Q),&u=\mathrm{true},\\[2mm] \displaystyle\sup_{\pi\text{ input probability law}}\inf_{Q\text{ finite local}}D_\pi(P\|Q),&u=\mathrm{false}. \end{cases}⎩⎨⎧​Q finite localinf​Dunif​(P∥Q),π input probability lawsup​Q finite localinf​Dπ​(P∥Q),​u=true,u=false.​

Each POVM consists of positive semidefinite matrices summing to the identity. A finite local box is a finite convex combination of deterministic boxes 1α=f(x), β=g(y)\mathbf1_{\alpha=f(x),\,\beta=g(y)}1α=f(x),β=g(y)​. The divergence is Dπ(P∥Q)=∑x,ymax⁡(πxy,0) K(Pxy,Qxy)D_\pi(P\|Q)=\sum_{x,y}\max(\pi_{xy},0)\,K(P_{xy},Q_{xy})Dπ​(P∥Q)=∑x,y​max(πxy​,0)K(Pxy​,Qxy​), interpreted in [0,∞][0,\infty][0,∞], where K(p,q)=∞K(p,q)=\inftyK(p,q)=∞ if some pi>0p_i>0pi​>0 has qi=0q_i=0qi​=0, and otherwise

K(p,q)=max⁡ ⁣(0,∑i:pi≠0pilog⁡(pi/qi)log⁡2).K(p,q)=\max\!\left(0,\sum_{i:p_i\ne0}p_i\frac{\log(p_i/q_i)}{\log2}\right).K(p,q)=max​0,i:pi​=0∑​pi​log2log(pi​/qi​)​​.

The uniform input law assigns 1/(#x #y)1/(\#x\,\#y)1/(#x#y) to each pair. Finite LOCC maps are generated by identity maps and finite, outcome-dependent local Kraus operations, summing over branches, with each local Kraus family satisfying ∑jEj†Ej=I\sum_j E_j^\dagger E_j=I∑j​Ej†​Ej​=I. The limiting sequence uses only m=n+1≥1m=n+1\ge1m=n+1≥1, so its denominator never vanishes. Neither positivity nor trace one is required of ρ\rhoρ, and aaa or bbb may be zero; all expressions retain their literal total-function meanings, including division by zero and log⁡0=0\log0=0log0=0. Suprema and the limit superior take values in [0,∞][0,\infty][0,∞], with an empty supremum equal to zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.asymptoticRH

For natural numbers a,ba,ba,b, a Boolean flag uuu, and any complex matrix ρ\rhoρ on local index sets of sizes a,ba,ba,b, this defines

lim sup⁡m→∞Hu(ρ[m])m∈[0,∞],\limsup_{m\to\infty}\frac{\mathcal H_u(\rho^{[m]})}{m}\in[0,\infty],m→∞limsup​mHu​(ρ[m])​∈[0,∞],

where ρ[m]\rho^{[m]}ρ[m] has entries ∏t=0m−1ρ(it,jt),(it′,jt′)\prod_{t=0}^{m-1}\rho_{(i_t,j_t),(i'_t,j'_t)}∏t=0m−1​ρ(it​,jt​),(it′​,jt′​)​, relabelled onto local index sets of sizes am,bma^m,b^mam,bm by the specified bijections. For any matrix ω\omegaω, Hu(ω)\mathcal H_u(\omega)Hu​(ω) is the supremum over a map Λ\LambdaΛ in the closure of finite LOCC maps, positive finite output dimensions, local output filters with complete nonempty finite Kraus families Ci,DjC_i,D_jCi​,Dj​ and selected indices i∗,j∗i_*,j_*i∗​,j∗​, and Bell measurements with positive finite input and outcome counts. Write

τ=(Ci∗⊗Dj∗)Λ(ω)(Ci∗⊗Dj∗)†,p=Re⁡tr⁡τ.\tau=(C_{i_*}\otimes D_{j_*})\Lambda(\omega)(C_{i_*}\otimes D_{j_*})^\dagger, \qquad p=\operatorname{Re}\operatorname{tr}\tau.τ=(Ci∗​​⊗Dj∗​​)Λ(ω)(Ci∗​​⊗Dj∗​​)†,p=Retrτ.

The optimized value is zero for p=0p=0p=0, and otherwise is max⁡(p,0)Nu(P)\max(p,0)\mathcal N_u(P)max(p,0)Nu​(P), where P(α,β∣x,y)=Re⁡tr⁡[(Ax,α⊗By,β)p−1τ]P(\alpha,\beta\mid x,y)=\operatorname{Re}\operatorname{tr}[(A_{x,\alpha}\otimes B_{y,\beta})p^{-1}\tau]P(α,β∣x,y)=Retr[(Ax,α​⊗By,β​)p−1τ], and each local measurement is a family of positive semidefinite effects summing to the identity. The quantity Nu(P)\mathcal N_u(P)Nu​(P) is inf⁡Q finite localDunif(P∥Q)\inf_{Q\text{ finite local}}D_{\mathrm{unif}}(P\|Q)infQ finite local​Dunif​(P∥Q) for u=trueu=\mathrm{true}u=true, and sup⁡π input probability lawinf⁡Q finite localDπ(P∥Q)\sup_{\pi\text{ input probability law}}\inf_{Q\text{ finite local}}D_\pi(P\|Q)supπ input probability law​infQ finite local​Dπ​(P∥Q) otherwise. Finite local boxes are finite convex combinations of deterministic product responses. Here Dπ(P∥Q)=∑x,ymax⁡(πxy,0)K(Pxy,Qxy)D_\pi(P\|Q)=\sum_{x,y}\max(\pi_{xy},0)K(P_{xy},Q_{xy})Dπ​(P∥Q)=∑x,y​max(πxy​,0)K(Pxy​,Qxy​), where K(p,q)=∞K(p,q)=\inftyK(p,q)=∞ if some pi>0p_i>0pi​>0 has qi=0q_i=0qi​=0, and otherwise K(p,q)=max⁡(0,∑i:pi≠0pilog⁡(pi/qi)/log⁡2)K(p,q)=\max(0,\sum_{i:p_i\ne0}p_i\log(p_i/q_i)/\log2)K(p,q)=max(0,∑i:pi​=0​pi​log(pi​/qi​)/log2); the uniform input law weights input pairs equally. Finite LOCC maps are generated by identities and finite, outcome-dependent complete local Kraus operations, summing over branches. The limit uses only m=n+1≥1m=n+1\ge1m=n+1≥1. No density-matrix hypothesis is imposed on ρ\rhoρ, and zero local dimensions are allowed; negative branch traces are converted to zero in [0,∞][0,\infty][0,∞], where 0⋅∞=00\cdot\infty=00⋅∞=0, and empty suprema are zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.asymptoticT

For natural numbers a,ba,ba,b whose index sets {0,…,a−1}\{0,\ldots,a-1\}{0,…,a−1} and {0,…,b−1}\{0,\ldots,b-1\}{0,…,b−1} are nonempty, hence a,b>0a,b>0a,b>0, a Boolean flag uuu, and any complex matrix ρ\rhoρ on their product, this defines

lim sup⁡m→∞Tu(ρ,m)m∈[0,∞].\limsup_{m\to\infty}\frac{\mathcal T_u(\rho,m)}{m}\in[0,\infty].m→∞limsup​mTu​(ρ,m)​∈[0,∞].

For each mmm, Tu(ρ,m)\mathcal T_u(\rho,m)Tu​(ρ,m) is the supremum over Bell experiments on local dimensions am,bma^m,b^mam,bm. Such an experiment comprises a map Λ\LambdaΛ in the closure of finite LOCC maps, positive finite output dimensions, positive finite numbers of inputs and outcomes, and local POVMs Ax,α,By,βA_{x,\alpha},B_{y,\beta}Ax,α​,By,β​. Set

Pρ(α,β∣x,y)=Re⁡tr⁡[(Ax,α⊗By,β)Λ(ρ[m])],P_\rho(\alpha,\beta\mid x,y) =\operatorname{Re}\operatorname{tr}[(A_{x,\alpha}\otimes B_{y,\beta})\Lambda(\rho^{[m]})],Pρ​(α,β∣x,y)=Retr[(Ax,α​⊗By,β​)Λ(ρ[m])],

where ρ[m]\rho^{[m]}ρ[m] has tensor-product entries ∏t=0m−1ρ(it,jt),(it′,jt′)\prod_{t=0}^{m-1}\rho_{(i_t,j_t),(i'_t,j'_t)}∏t=0m−1​ρ(it​,jt​),(it′​,jt′​)​, relabelled by the specified bijections onto index sets of sizes am,bma^m,b^mam,bm. The experiment contributes

{inf⁡σ separable density matrixDunif(Pρ∥Pσ),u=true,sup⁡π input probability lawinf⁡σ separable density matrixDπ(Pρ∥Pσ),u=false.\begin{cases} \displaystyle\inf_{\sigma\text{ separable density matrix}}D_{\mathrm{unif}}(P_\rho\|P_\sigma),&u=\mathrm{true},\\[2mm] \displaystyle\sup_{\pi\text{ input probability law}}\inf_{\sigma\text{ separable density matrix}}D_\pi(P_\rho\|P_\sigma),&u=\mathrm{false}. \end{cases}⎩⎨⎧​σ separable density matrixinf​Dunif​(Pρ​∥Pσ​),π input probability lawsup​σ separable density matrixinf​Dπ​(Pρ​∥Pσ​),​u=true,u=false.​

Here σ\sigmaσ is a single matrix on the original a×ba\times ba×b system, and PσP_\sigmaPσ​ uses σ[m]\sigma^{[m]}σ[m] with the same experiment. “Separable density matrix” means a finite sum ∑jwjSj⊗Tj\sum_j w_j S_j\otimes T_j∑j​wj​Sj​⊗Tj​, where wj≥0w_j\ge0wj​≥0, ∑jwj=1\sum_jw_j=1∑j​wj​=1, and Sj,TjS_j,T_jSj​,Tj​ are positive semidefinite of trace one. Each POVM consists of positive semidefinite matrices summing to the identity. Finite LOCC maps are generated by identities and finite, outcome-dependent local Kraus operations with complete Kraus families, summing over branches. The divergence is Dπ(P∥Q)=∑x,ymax⁡(πxy,0)K(Pxy,Qxy)D_\pi(P\|Q)=\sum_{x,y}\max(\pi_{xy},0)K(P_{xy},Q_{xy})Dπ​(P∥Q)=∑x,y​max(πxy​,0)K(Pxy​,Qxy​), where K(p,q)=∞K(p,q)=\inftyK(p,q)=∞ if some pi>0p_i>0pi​>0 has qi=0q_i=0qi​=0, and otherwise K(p,q)=max⁡(0,∑i:pi≠0pilog⁡(pi/qi)/log⁡2)K(p,q)=\max(0,\sum_{i:p_i\ne0}p_i\log(p_i/q_i)/\log2)K(p,q)=max(0,∑i:pi​=0​pi​log(pi​/qi​)/log2); the uniform input law gives every input pair equal weight. The limit uses m=n+1≥1m=n+1\ge1m=n+1≥1. No density-matrix assumption is imposed on ρ\rhoρ; the real division and logarithms are total, and all optimization and limiting operations shown here are in [0,∞][0,\infty][0,∞].

QAlgorithms.Papers.Independent.Intakethird100.P09.bellOperator

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​), finite types I,JI,JI,J with decidable equality, real coefficient array sxyabs_{xyab}sxyab​, and measurement specification MMM, this defines the complex matrix

∑x<nx∑y<ny∑a<na∑b<nbsxyab (Ax,a⊗By,b)\sum_{x<n_x}\sum_{y<n_y}\sum_{a<n_a}\sum_{b<n_b} s_{xyab}\,(A_{x,a}\otimes B_{y,b})x<nx​∑​y<ny​∑​a<na​∑​b<nb​∑​sxyab​(Ax,a​⊗By,b​)

on I×JI\times JI×J. For every xxx, the matrices Ax,aA_{x,a}Ax,a​ are positive semidefinite and sum over aaa to 1I1_I1I​, and for every yyy, the matrices By,bB_{y,b}By,b​ are positive semidefinite and sum over bbb to 1J1_J1J​; tensor-product entries are Aii′Bjj′A_{ii'}B_{jj'}Aii′​Bjj′​. The coefficients may have either sign. The types I,JI,JI,J may be empty, yielding an empty matrix.

QAlgorithms.Papers.Independent.Intakethird100.P09.bellOperatorNorm

For any finite type III equipped with decidable equality and any complex matrix XXX indexed by I×II\times II×I, this defines a real number equal to the ambient matrix norm ∥X∥\|X\|∥X∥. No Hermiticity, positivity, or normalization assumption is imposed on XXX. The index type may be empty, in which case this norm is zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.bellValue

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​) and arbitrary real arrays sxyabs_{xyab}sxyab​ and PxyabP_{xyab}Pxyab​ on its input and output indices, the Bell value is

∑x<nx∑y<ny∑a<na∑b<nbsxyabPxyab.\sum_{x<n_x}\sum_{y<n_y}\sum_{a<n_a}\sum_{b<n_b}s_{xyab}P_{xyab}.x<nx​∑​y<ny​∑​a<na​∑​b<nb​∑​sxyab​Pxyab​.

Neither array is required to be nonnegative or normalized.

QAlgorithms.Papers.Independent.Intakethird100.P09.boxD

For a scenario SSS with positive numbers nx,ny,na,nbn_x,n_y,n_a,n_bnx​,ny​,na​,nb​ of inputs and outputs, any real input array p(x,y)p(x,y)p(x,y), and any real arrays P(x,y,a,b)P(x,y,a,b)P(x,y,a,b) and Q(x,y,a,b)Q(x,y,a,b)Q(x,y,a,b), this defines

∑x=0nx−1∑y=0ny−1[p(x,y)]+ D(P(x,y,⋅,⋅),Q(x,y,⋅,⋅))in [0,+∞],\sum_{x=0}^{n_x-1}\sum_{y=0}^{n_y-1} [p(x,y)]_+\,D\bigl(P(x,y,\cdot,\cdot),Q(x,y,\cdot,\cdot)\bigr) \quad\text{in }[0,+\infty],x=0∑nx​−1​y=0∑ny​−1​[p(x,y)]+​D(P(x,y,⋅,⋅),Q(x,y,⋅,⋅))in [0,+∞],

where [r]+=max⁡(r,0)[r]_+=\max(r,0)[r]+​=max(r,0), embedded into the extended nonnegative reals. For arrays u,vu,vu,v on the output pairs, D(u,v)=+∞D(u,v)=+\inftyD(u,v)=+∞ if some output pair has u>0u>0u>0 and v=0v=0v=0; otherwise it is the nonnegative part of ∑a,b:u(a,b)≠0u(a,b)log⁡(u(a,b)/v(a,b))/log⁡2\sum_{a,b:u(a,b)\neq0}u(a,b)\log(u(a,b)/v(a,b))/\log2∑a,b:u(a,b)=0​u(a,b)log(u(a,b)/v(a,b))/log2. These expressions use total real division and logarithms, with division by zero and log⁡0\log0log0 equal to zero and log⁡t=log⁡∣t∣\log t=\log|t|logt=log∣t∣ for negative ttt. No probability, normalization, or no-signaling assumptions are imposed on p,P,Qp,P,Qp,P,Q. Extended multiplication uses 0⋅(+∞)=00\cdot(+\infty)=00⋅(+∞)=0, so input pairs with nonpositive ppp contribute zero even when their divergence is infinite.

QAlgorithms.Papers.Independent.Intakethird100.P09.boxNonlocality

For a scenario SSS with positive input and output counts and any real array P(x,y,a,b)P(x,y,a,b)P(x,y,a,b), this defines, when the Boolean flag is true, the infimum over finite local models QQQ of the input-weighted divergence at the uniform input law; when the flag is false, it defines

sup⁡p(x,y)≥0∑x,yp(x,y)=1 inf⁡Q a finite local model∑x,y[p(x,y)]+D(Pxy,Qxy).\sup_{\substack{p(x,y)\geq0\\\sum_{x,y}p(x,y)=1}} \ \inf_{Q\text{ a finite local model}} \sum_{x,y}[p(x,y)]_+D(P_{xy},Q_{xy}).p(x,y)≥0∑x,y​p(x,y)=1​sup​ Q a finite local modelinf​x,y∑​[p(x,y)]+​D(Pxy​,Qxy​).

All extrema and sums here take values in [0,+∞][0,+\infty][0,+∞]. A finite local model has the form Q(x,y,a,b)=∑i=0k−1wi1{fi(x)=a, gi(y)=b}Q(x,y,a,b)=\sum_{i=0}^{k-1}w_i\mathbf1_{\{f_i(x)=a,\ g_i(y)=b\}}Q(x,y,a,b)=∑i=0k−1​wi​1{fi​(x)=a, gi​(y)=b}​, for a natural number kkk, nonnegative real weights summing to 111, and deterministic local response functions with the scenario’s input and output sets. For output arrays u,vu,vu,v, D(u,v)=+∞D(u,v)=+\inftyD(u,v)=+∞ if some coordinate has u>0,v=0u>0,v=0u>0,v=0; otherwise it is the nonnegative part of ∑a,b:u(a,b)≠0u(a,b)log⁡(u(a,b)/v(a,b))/log⁡2\sum_{a,b:u(a,b)\neq0}u(a,b)\log(u(a,b)/v(a,b))/\log2∑a,b:u(a,b)=0​u(a,b)log(u(a,b)/v(a,b))/log2. Division and logarithms are total, with division by zero and log⁡0\log0log0 equal to zero and negative logarithm arguments interpreted through their absolute values; extended multiplication satisfies 0⋅(+∞)=00\cdot(+\infty)=00⋅(+∞)=0. In the uniform case p(x,y)=1/(nxny)p(x,y)=1/(n_xn_y)p(x,y)=1/(nx​ny​). The infimizing local model may depend on the chosen input law, and PPP itself is not assumed to be a correlation.

QAlgorithms.Papers.Independent.Intakethird100.P09.chshCoefficients

For inputs x,y∈{0,1}x,y\in\{0,1\}x,y∈{0,1} and outcomes α,β∈{0,1}\alpha,\beta\in\{0,1\}α,β∈{0,1}, this defines the real coefficient

sxyαβ={−1,x=y=1,1,otherwise{1,α=β,−1,α≠β.s_{xy\alpha\beta} = \begin{cases}-1,&x=y=1,\\1,&\text{otherwise}\end{cases} \begin{cases}1,&\alpha=\beta,\\-1,&\alpha\ne\beta.\end{cases}sxyαβ​={−1,1,​x=y=1,otherwise​{1,−1,​α=β,α=β.​

Thus equal outcomes receive coefficient 111 and unequal outcomes coefficient −1-1−1, with both signs reversed for the input pair (1,1)(1,1)(1,1).

QAlgorithms.Papers.Independent.Intakethird100.P09.chshScenario

This defines a Bell scenario with two inputs for Alice, two inputs for Bob, two outcomes for Alice, and two outcomes for Bob. Each input and outcome index therefore ranges over {0,1}\{0,1\}{0,1}.

QAlgorithms.Papers.Independent.Intakethird100.P09.classicalBound

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​) and arbitrary real coefficient array sxyabs_{xyab}sxyab​, the classical bound is the real supremum of the values

∑x<nx∑y<nysxy f(x) g(y)\sum_{x<n_x}\sum_{y<n_y}s_{xy\,f(x)\,g(y)}x<nx​∑​y<ny​∑​sxyf(x)g(y)​

over all functions f:{0,…,nx−1}→{0,…,na−1}f:\{0,\ldots,n_x-1\}\to\{0,\ldots,n_a-1\}f:{0,…,nx​−1}→{0,…,na​−1} and g:{0,…,ny−1}→{0,…,nb−1}g:\{0,\ldots,n_y-1\}\to\{0,\ldots,n_b-1\}g:{0,…,ny​−1}→{0,…,nb​−1}. This is a finite nonempty collection because all four scenario sizes are strictly positive.

QAlgorithms.Papers.Independent.Intakethird100.P09.classicalKLBits

For any finite type III, possibly empty, and arbitrary real-valued functions p,q:I→Rp,q:I\to\mathbb Rp,q:I→R, this defines an extended nonnegative real number by

D(p,q)={+∞,∃i, pi>0 and qi=0,max⁡ ⁣{0,∑i∈I{0,pi=0,pi log⁡(pi/qi)log⁡2,pi≠0},otherwise.D(p,q)= \begin{cases} +\infty,&\exists i,\ p_i>0\ \text{and}\ q_i=0,\\[2mm] \displaystyle\max\!\left\{0,\sum_{i\in I} \begin{cases} 0,&p_i=0,\\ p_i\,\dfrac{\log(p_i/q_i)}{\log2},&p_i\neq0 \end{cases}\right\},&\text{otherwise}. \end{cases}D(p,q)=⎩⎨⎧​+∞,max⎩⎨⎧​0,i∈I∑​⎩⎨⎧​0,pi​log2log(pi​/qi​)​,​pi​=0,pi​=0​⎭⎬⎫​,​∃i, pi​>0 and qi​=0,otherwise.​

The finite value in the second branch is embedded into the extended nonnegative reals. Neither function is assumed nonnegative or normalized. Division and logarithms are total: division by zero gives zero, log⁡0=0\log0=0log0=0, and the real logarithm at a negative argument is the logarithm of its absolute value. The exceptional infinite branch tests strictly positive pip_ipi​, not merely nonzero pip_ipi​. If III is empty, the value is zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.deterministicBox

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​) and functions f:{0,…,nx−1}→{0,…,na−1}f:\{0,\ldots,n_x-1\}\to\{0,\ldots,n_a-1\}f:{0,…,nx​−1}→{0,…,na​−1} and g:{0,…,ny−1}→{0,…,nb−1}g:\{0,\ldots,n_y-1\}\to\{0,\ldots,n_b-1\}g:{0,…,ny​−1}→{0,…,nb​−1}, this defines the real array PxyabP_{xyab}Pxyab​ to equal 111 when both f(x)=af(x)=af(x)=a and g(y)=bg(y)=bg(y)=b, and 000 otherwise.

QAlgorithms.Papers.Independent.Intakethird100.P09.flatProbability

For every positive integer ddd, including d=1d=1d=1, this defines the real number

p=1d+1.p=\frac{1}{\sqrt d+1}.p=d​+11​.

QAlgorithms.Papers.Independent.Intakethird100.P09.flatX

For every positive integer ddd and every complex d×dd\times dd×d unitary matrix UUU, this defines a complex matrix XXX indexed by pairs from {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, with

X(i,j),(k,ℓ)={Uijdd,(k,ℓ)=(j,i),0,otherwise.X_{(i,j),(k,\ell)} = \begin{cases} \dfrac{U_{ij}}{d\sqrt d},&(k,\ell)=(j,i),\\ 0,&\text{otherwise}. \end{cases}X(i,j),(k,ℓ)​=⎩⎨⎧​dd​Uij​​,0,​(k,ℓ)=(j,i),otherwise.​

The case d=1d=1d=1 is included. The assumption on UUU is unitarity; no equal-magnitude condition on its entries is imposed.

QAlgorithms.Papers.Independent.Intakethird100.P09.flatY

For every positive integer ddd and every complex d×dd\times dd×d unitary matrix UUU, this defines Y=d XT2Y=\sqrt d\,X^{T_2}Y=d​XT2​, where

X(i,j),(k,ℓ)={Uij/(dd),(k,ℓ)=(j,i),0,otherwise,(XT2)(i,j),(k,ℓ)=X(i,ℓ),(k,j).X_{(i,j),(k,\ell)} =\begin{cases}U_{ij}/(d\sqrt d),&(k,\ell)=(j,i),\\0,&\text{otherwise},\end{cases} \qquad (X^{T_2})_{(i,j),(k,\ell)}=X_{(i,\ell),(k,j)}.X(i,j),(k,ℓ)​={Uij​/(dd​),0,​(k,ℓ)=(j,i),otherwise,​(XT2​)(i,j),(k,ℓ)​=X(i,ℓ),(k,j)​.

Equivalently,

Y(i,j),(k,ℓ)={Uik/d,i=j and k=ℓ,0,otherwise.Y_{(i,j),(k,\ell)} = \begin{cases} U_{ik}/d,&i=j\ \text{and}\ k=\ell,\\ 0,&\text{otherwise}. \end{cases}Y(i,j),(k,ℓ)​={Uik​/d,0,​i=j and k=ℓ,otherwise.​

All four indices range over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, including when d=1d=1d=1; only unitarity is assumed of UUU.

QAlgorithms.Papers.Independent.Intakethird100.P09.hiddenBlock

For natural numbers a,ba,ba,b, a Boolean flag uuu, and any complex matrix ρ\rhoρ on the product of local index sets of sizes a,ba,ba,b, this defines an extended nonnegative supremum over Bell experiments and selected local-filter branches. An experiment consists of a map Λ\LambdaΛ in the closure of finite LOCC maps, positive finite output dimensions, positive finite numbers of inputs and outcomes, and local POVMs Ax,α,By,βA_{x,\alpha},B_{y,\beta}Ax,α​,By,β​. A filter on the output consists of nonempty finite families Ci,DjC_i,D_jCi​,Dj​, satisfying ∑iCi†Ci=I\sum_iC_i^\dagger C_i=I∑i​Ci†​Ci​=I, ∑jDj†Dj=I\sum_jD_j^\dagger D_j=I∑j​Dj†​Dj​=I, and selected indices i∗,j∗i_*,j_*i∗​,j∗​. Put

K=Ci∗⊗Dj∗,τ=KΛ(ρ)K†,p=Re⁡tr⁡τ.K=C_{i_*}\otimes D_{j_*},\qquad \tau=K\Lambda(\rho)K^\dagger,\qquad p=\operatorname{Re}\operatorname{tr}\tau.K=Ci∗​​⊗Dj∗​​,τ=KΛ(ρ)K†,p=Retrτ.

The value included in the supremum is zero when p=0p=0p=0, and otherwise is

max⁡(p,0) Nu(P),P(α,β∣x,y)=Re⁡tr⁡[(Ax,α⊗By,β)(p−1τ)].\max(p,0)\,\mathcal N_u(P),\qquad P(\alpha,\beta\mid x,y) =\operatorname{Re}\operatorname{tr}[(A_{x,\alpha}\otimes B_{y,\beta})(p^{-1}\tau)].max(p,0)Nu​(P),P(α,β∣x,y)=Retr[(Ax,α​⊗By,β​)(p−1τ)].

Here Nu(P)\mathcal N_u(P)Nu​(P) is inf⁡Q finite localDunif(P∥Q)\inf_{Q\text{ finite local}}D_{\mathrm{unif}}(P\|Q)infQ finite local​Dunif​(P∥Q) when u=trueu=\mathrm{true}u=true, and sup⁡π input probability lawinf⁡Q finite localDπ(P∥Q)\sup_{\pi\text{ input probability law}}\inf_{Q\text{ finite local}}D_\pi(P\|Q)supπ input probability law​infQ finite local​Dπ​(P∥Q) otherwise. A finite local box is a finite convex combination of 1α=f(x), β=g(y)\mathbf1_{\alpha=f(x),\,\beta=g(y)}1α=f(x),β=g(y)​. The divergence is Dπ(P∥Q)=∑x,ymax⁡(πxy,0)K(Pxy,Qxy)D_\pi(P\|Q)=\sum_{x,y}\max(\pi_{xy},0)K(P_{xy},Q_{xy})Dπ​(P∥Q)=∑x,y​max(πxy​,0)K(Pxy​,Qxy​), with K(p,q)=∞K(p,q)=\inftyK(p,q)=∞ if some pi>0p_i>0pi​>0 has qi=0q_i=0qi​=0, and otherwise

K(p,q)=max⁡ ⁣(0,∑i:pi≠0pilog⁡(pi/qi)log⁡2).K(p,q)=\max\!\left(0,\sum_{i:p_i\ne0}p_i\frac{\log(p_i/q_i)}{\log2}\right).K(p,q)=max​0,i:pi​=0∑​pi​log2log(pi​/qi​)​​.

The uniform input law assigns equal weight to every input pair. POVM effects are positive semidefinite and sum to the identity; finite LOCC maps are generated by identities and finite, outcome-dependent complete local Kraus operations, summing over branches. No positivity or normalization hypothesis is imposed on ρ\rhoρ, and a,ba,ba,b may be zero. In particular, ppp need not be positive; for p<0p<0p<0, its extended nonnegative conversion is zero, and multiplication uses the convention 0⋅∞=00\cdot\infty=00⋅∞=0. An empty supremum is zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.hidingResource

For every natural number mmm, this defines a complex matrix HmH_mHm​ on two parties, each indexed by {0,1}×Am\{0,1\}\times\mathcal A_m{0,1}×Am​, where Am={0,…,m2−1}{0,…,m−1}2\mathcal A_m=\{0,\ldots,m^2-1\}^{\{0,\ldots,m-1\}^2}Am​={0,…,m2−1}{0,…,m−1}2. To specify its entries, put d=m2d=m^2d=m2, let IdI_dId​ be the identity on Cd⊗Cd\mathbb C^d\otimes\mathbb C^dCd⊗Cd, let FdF_dFd​ have entries (Fd)(i,j),(k,l)=1(F_d)_{(i,j),(k,l)}=1(Fd​)(i,j),(k,l)​=1 when i=li=li=l and j=kj=kj=k, and 000 otherwise, and define W+=(Id+Fd)/(d2+d)W_+=(I_d+F_d)/(d^2+d)W+​=(Id​+Fd​)/(d2+d) and W−=(Id−Fd)/(d2−d)W_-=(I_d-F_d)/(d^2-d)W−​=(Id​−Fd​)/(d2−d). On pairs of length-mmm strings over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, define T1T_1T1​ and T2T_2T2​ by (T1)(u,v),(u′,v′)=∏s=0m−1((W++W−)/2)(us,vs),(us′,vs′)(T_1)_{(u,v),(u',v')}=\prod_{s=0}^{m-1}((W_++W_-)/2)_{(u_s,v_s),(u'_s,v'_s)}(T1​)(u,v),(u′,v′)​=∏s=0m−1​((W+​+W−​)/2)(us​,vs​),(us′​,vs′​)​ and (T2)(u,v),(u′,v′)=∏s=0m−1(W+)(us,vs),(us′,vs′)(T_2)_{(u,v),(u',v')}=\prod_{s=0}^{m-1}(W_+)_{(u_s,v_s),(u'_s,v'_s)}(T2​)(u,v),(u′,v′)​=∏s=0m−1​(W+​)(us​,vs​),(us′​,vs′​)​. Put D=(T1+T2)/6D=(T_1+T_2)/6D=(T1​+T2​)/6, O=(T1−T2)/6O=(T_1-T_2)/6O=(T1​−T2​)/6, J=T2/6J=T_2/6J=T2​/6, and Tm(Z)(A,B),(A′,B′)=∏t=0m−1Z(At,Bt),(At′,Bt′)\mathcal T_m(Z)_{(A,B),(A',B')}=\prod_{t=0}^{m-1}Z_{(A_t,B_t),(A'_t,B'_t)}Tm​(Z)(A,B),(A′,B′)​=∏t=0m−1​Z(At​,Bt​),(At′​,Bt′​)​. Writing a=(i,j)a=(i,j)a=(i,j), b=(i′,j′)b=(i',j')b=(i′,j′), and cm=(2(1/3)m+2(1/6)m)−1c_m=(2(1/3)^m+2(1/6)^m)^{-1}cm​=(2(1/3)m+2(1/6)m)−1, the entry of HmH_mHm​ with row ((i,A),(j,B))((i,A),(j,B))((i,A),(j,B)) and column ((i′,A′),(j′,B′))((i',A'),(j',B'))((i′,A′),(j′,B′)) is cmTm(D)(A,B),(A′,B′)c_m\mathcal T_m(D)_{(A,B),(A',B')}cm​Tm​(D)(A,B),(A′,B′)​ if a=b=(0,0)a=b=(0,0)a=b=(0,0) or a=b=(1,1)a=b=(1,1)a=b=(1,1), is cmTm(O)(A,B),(A′,B′)c_m\mathcal T_m(O)_{(A,B),(A',B')}cm​Tm​(O)(A,B),(A′,B′)​ if (a,b)=((0,0),(1,1))(a,b)=((0,0),(1,1))(a,b)=((0,0),(1,1)) or ((1,1),(0,0))((1,1),(0,0))((1,1),(0,0)), is cmTm(J)(A,B),(A′,B′)c_m\mathcal T_m(J)_{(A,B),(A',B')}cm​Tm​(J)(A,B),(A′,B′)​ if a=b=(0,1)a=b=(0,1)a=b=(0,1) or a=b=(1,0)a=b=(1,0)a=b=(1,0), and is 000 otherwise. This definition includes m=0m=0m=0, with empty products equal to 111, and m=1m=1m=1; scalar inverses at zero are defined to be zero, including those in the formulas for W±W_\pmW±​. The declaration itself imposes no positivity or trace condition on HmH_mHm​.

QAlgorithms.Papers.Independent.Intakethird100.P09.inputOptimization

For a Boolean flag called “uniform,” a scenario SSS with positive input and output counts nx,ny,na,nbn_x,n_y,n_a,n_bnx​,ny​,na​,nb​, and any function fff from real arrays on the input pairs to [0,+∞][0,+\infty][0,+∞], this defines

{f((x,y)↦1/(nxny)),if the flag is true,sup⁡p(x,y)≥0∑x,yp(x,y)=1f(p),if the flag is false.\begin{cases} f\bigl((x,y)\mapsto1/(n_xn_y)\bigr),&\text{if the flag is true},\\[1mm] \displaystyle\sup_{\substack{p(x,y)\geq0\\\sum_{x,y}p(x,y)=1}}f(p),&\text{if the flag is false}. \end{cases}⎩⎨⎧​f((x,y)↦1/(nx​ny​)),p(x,y)≥0∑x,y​p(x,y)=1​sup​f(p),​if the flag is true,if the flag is false.​

The supremum is taken in the extended nonnegative reals and may be infinite. The function fff is unrestricted, and the optimized input laws may correlate Alice’s and Bob’s inputs and may assign zero weight to some input pairs.

QAlgorithms.Papers.Independent.Intakethird100.P09.measuredBox

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​), finite types I,JI,JI,J with decidable equality, measurement specification MMM, and arbitrary complex matrix ρ\rhoρ indexed by (I×J)×(I×J)(I\times J)\times(I\times J)(I×J)×(I×J), this defines the real array

Pxyab=Re⁡tr⁡((Ax,a⊗By,b)ρ).P_{xyab}=\operatorname{Re}\operatorname{tr}\bigl((A_{x,a}\otimes B_{y,b})\rho\bigr).Pxyab​=Retr((Ax,a​⊗By,b​)ρ).

Here, for every xxx, the matrices Ax,aA_{x,a}Ax,a​ are positive semidefinite and sum over a<naa<n_aa<na​ to 1I1_I1I​, and for every yyy, the matrices By,bB_{y,b}By,b​ are positive semidefinite and sum over b<nbb<n_bb<nb​ to 1J1_J1J​; the tensor product has entries (A⊗B)(i,j),(i′,j′)=Aii′Bjj′(A\otimes B)_{(i,j),(i',j')}=A_{ii'}B_{jj'}(A⊗B)(i,j),(i′,j′)​=Aii′​Bjj′​. No density-matrix hypothesis is imposed on ρ\rhoρ, so the definition alone imposes no probability constraints on PPP. Either III or JJJ may be empty, in which case every entry of PPP is zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.nearSep

For finite, nonempty types I,JI,JI,J with decidable equality and any real number ϵ\epsilonϵ, this defines the set of complex matrices ρ\rhoρ on I×JI\times JI×J that are positive semidefinite with trace 111 and for which there exists a separable density matrix σ\sigmaσ satisfying

∥ρTJ−σTJ∥1≤ϵ.\|\rho^{T_J}-\sigma^{T_J}\|_1\leq\epsilon.∥ρTJ​−σTJ​∥1​≤ϵ.

Here (XTJ)(i,j),(i′,j′)=X(i,j′),(i′,j)(X^{T_J})_{(i,j),(i',j')}=X_{(i,j'),(i',j)}(XTJ​)(i,j),(i′,j′)​=X(i,j′),(i′,j)​, and ∥X∥1=Re⁡tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{tr}\sqrt{X^\dagger X}∥X∥1​=RetrX†X​, using continuous functional calculus. The required separability of σ\sigmaσ means that, for some natural number qqq, it has a decomposition σ=∑ℓ=0q−1wℓAℓ⊗Bℓ\sigma=\sum_{\ell=0}^{q-1}w_\ell A_\ell\otimes B_\ellσ=∑ℓ=0q−1​wℓ​Aℓ​⊗Bℓ​, where the real weights are nonnegative and sum to 111, and every Aℓ,BℓA_\ell,B_\ellAℓ​,Bℓ​ is positive semidefinite with trace 111 on its respective subsystem. The definition allows every real ϵ\epsilonϵ; for ϵ<0\epsilon<0ϵ<0, the set is empty.

QAlgorithms.Papers.Independent.Intakethird100.P09.paired

For arbitrary types I,J,K,LI,J,K,LI,J,K,L, and arbitrary complex matrices ρ\rhoρ indexed by I×JI\times JI×J and σ\sigmaσ indexed by K×LK\times LK×L, this defines a matrix on (I×K)×(J×L)(I\times K)\times(J\times L)(I×K)×(J×L) by

paired⁡(ρ,σ)((i,k),(j,l)),((i′,k′),(j′,l′))=ρ(i,j),(i′,j′) σ(k,l),(k′,l′).\operatorname{paired}(\rho,\sigma)_{((i,k),(j,l)),((i',k'),(j',l'))} =\rho_{(i,j),(i',j')}\,\sigma_{(k,l),(k',l')}.paired(ρ,σ)((i,k),(j,l)),((i′,k′),(j′,l′))​=ρ(i,j),(i′,j′)​σ(k,l),(k′,l′)​.

The types need not be finite or nonempty, and neither matrix is assumed positive, Hermitian, or normalized.

QAlgorithms.Papers.Independent.Intakethird100.P09.pptPrivate

For every positive integer ddd and every complex d×dd\times dd×d unitary matrix UUU, this defines a complex matrix on ({0,1}×{0,…,d−1})2(\{0,1\}\times\{0,\ldots,d-1\})^2({0,1}×{0,…,d−1})2 as follows. Define matrices on the two ddd-dimensional shield indices by

X(s,t),(s′,t′)={Ust/(dd),(s′,t′)=(t,s),0,otherwise,Y(s,t),(s′,t′)={Uss′/d,s=t, s′=t′,0,otherwise,p=1d+1.X_{(s,t),(s',t')}= \begin{cases} U_{st}/(d\sqrt d),&(s',t')=(t,s),\\ 0,&\text{otherwise}, \end{cases} \qquad Y_{(s,t),(s',t')}= \begin{cases} U_{ss'}/d,&s=t,\ s'=t',\\ 0,&\text{otherwise}, \end{cases} \qquad p=\frac1{\sqrt d+1}.X(s,t),(s′,t′)​={Ust​/(dd​),0,​(s′,t′)=(t,s),otherwise,​Y(s,t),(s′,t′)​={Uss′​/d,0,​s=t, s′=t′,otherwise,​p=d​+11​.

On key indices ordered as 00,01,10,1100,01,10,1100,01,10,11, form the shield-valued block matrix

Z=12((1−p)XX†00(1−p)X0pYY†0000pY†Y0(1−p)X†00(1−p)X†X),Z=\frac12 \begin{pmatrix} (1-p)\sqrt{XX^\dagger}&0&0&(1-p)X\\ 0&p\sqrt{YY^\dagger}&0&0\\ 0&0&p\sqrt{Y^\dagger Y}&0\\ (1-p)X^\dagger&0&0&(1-p)\sqrt{X^\dagger X} \end{pmatrix},Z=21​​(1−p)XX†​00(1−p)X†​0pYY†​00​00pY†Y​0​(1−p)X00(1−p)X†X​​​,

where the square roots are obtained by applying the real square-root function through continuous functional calculus. The returned matrix WWW regroups key and shield indices by party:

W((i,s),(j,t)), ((i′,s′),(j′,t′))=Z((i,j),(s,t)), ((i′,j′),(s′,t′)).W_{((i,s),(j,t)),\,((i',s'),(j',t'))} = Z_{((i,j),(s,t)),\,((i',j'),(s',t'))}.W((i,s),(j,t)),((i′,s′),(j′,t′))​=Z((i,j),(s,t)),((i′,j′),(s′,t′))​.

The definition includes d=1d=1d=1 and assumes only unitarity of UUU, without any additional restriction on its entry magnitudes.

QAlgorithms.Papers.Independent.Intakethird100.P09.quantumBound

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​) and arbitrary real coefficient array sxyabs_{xyab}sxyab​, the quantum bound is the real supremum, over all strictly positive integers dA,dBd_A,d_BdA​,dB​, all positive semidefinite complex matrices ρ\rhoρ of trace 111 on {0,…,dA−1}×{0,…,dB−1}\{0,\ldots,d_A-1\}\times\{0,\ldots,d_B-1\}{0,…,dA​−1}×{0,…,dB​−1}, and all measurement families Ax,a,By,bA_{x,a},B_{y,b}Ax,a​,By,b​, of

∑x<nx∑y<ny∑a<na∑b<nbsxyabRe⁡tr⁡((Ax,a⊗By,b)ρ).\sum_{x<n_x}\sum_{y<n_y}\sum_{a<n_a}\sum_{b<n_b} s_{xyab}\operatorname{Re}\operatorname{tr}\bigl((A_{x,a}\otimes B_{y,b})\rho\bigr).x<nx​∑​y<ny​∑​a<na​∑​b<nb​∑​sxyab​Retr((Ax,a​⊗By,b​)ρ).

Every measurement matrix is positive semidefinite, with ∑a<naAx,a=1dA\sum_{a<n_a}A_{x,a}=1_{d_A}∑a<na​​Ax,a​=1dA​​ for every xxx and ∑b<nbBy,b=1dB\sum_{b<n_b}B_{y,b}=1_{d_B}∑b<nb​​By,b​=1dB​​ for every yyy; tensor-product entries are Aii′Bjj′A_{ii'}B_{jj'}Aii′​Bjj′​. The local dimensions have no upper bound.

QAlgorithms.Papers.Independent.Intakethird100.P09.rBlock

For natural numbers a,ba,ba,b, a Boolean flag, and any complex matrix ρ\rhoρ on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb, this defines the extended nonnegative supremum over experiments described as follows: choose positive output dimensions c,dc,dc,d, positive finite input and outcome counts, a map Φ\PhiΦ in the pointwise closure of finite adaptive local Kraus protocols, and positive semidefinite local measurement matrices Ax,α,By,βA_{x,\alpha},B_{y,\beta}Ax,α​,By,β​ summing to their respective identities for every input. Such finite protocols are generated recursively from identities by complete local Kraus instruments, outcome-dependent continuations, and summation over branches. Form the real array

PE(x,y,α,β)=Re⁡tr⁡ ⁣[(Ax,α⊗By,β)Φ(ρ)].P_E(x,y,\alpha,\beta) =\operatorname{Re}\operatorname{tr}\!\left[(A_{x,\alpha}\otimes B_{y,\beta})\Phi(\rho)\right].PE​(x,y,α,β)=Retr[(Ax,α​⊗By,β​)Φ(ρ)].

The value assigned to this experiment is inf⁡Q∑x,yp(x,y)D((PE)xy,Qxy)\inf_Q\sum_{x,y}p(x,y)D((P_E)_{xy},Q_{xy})infQ​∑x,y​p(x,y)D((PE​)xy​,Qxy​) at p(x,y)=1/(nxny)p(x,y)=1/(n_xn_y)p(x,y)=1/(nx​ny​) when the flag is true, and the supremum of that infimum over all nonnegative input laws ppp summing to 111 when the flag is false. Here Q(x,y,α,β)=∑iwi1{fi(x)=α, gi(y)=β}Q(x,y,\alpha,\beta)=\sum_iw_i\mathbf1_{\{f_i(x)=\alpha,\ g_i(y)=\beta\}}Q(x,y,α,β)=∑i​wi​1{fi​(x)=α, gi​(y)=β}​ ranges over finite deterministic local mixtures with nonnegative weights summing to 111. The output divergence D(u,v)D(u,v)D(u,v) is infinite if some coordinate has u>0,v=0u>0,v=0u>0,v=0, and otherwise is max⁡{0,∑ui≠0uilog⁡(ui/vi)/log⁡2}\max\{0,\sum_{u_i\neq0}u_i\log(u_i/v_i)/\log2\}max{0,∑ui​=0​ui​log(ui​/vi​)/log2}. All arithmetic follows the total real conventions for division and logarithms, and 0⋅(+∞)=00\cdot(+\infty)=00⋅(+∞)=0. No density-matrix assumption is imposed on ρ\rhoρ, and aaa or bbb may be zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.sepDistance

For any finite nonempty types I,JI,JI,J, each equipped with decidable equality, and arbitrary complex matrix ρ\rhoρ on I×JI\times JI×J, this defines the real infimum of Re⁡tr⁡Δ†Δ\operatorname{Re}\operatorname{tr}\sqrt{\Delta^\dagger\Delta}RetrΔ†Δ​, where Δ=T2(ρ)−T2(σ)\Delta=T_2(\rho)-T_2(\sigma)Δ=T2​(ρ)−T2​(σ) and [T2(X)](i,j),(i′,j′)=X(i,j′),(i′,j)[T_2(X)]_{(i,j),(i',j')}=X_{(i,j'),(i',j)}[T2​(X)](i,j),(i′,j′)​=X(i,j′),(i′,j)​. The infimum ranges over matrices σ\sigmaσ admitting a finite decomposition σ=∑ℓ<qwℓ(Aℓ⊗Bℓ)\sigma=\sum_{\ell<q}w_\ell(A_\ell\otimes B_\ell)σ=∑ℓ<q​wℓ​(Aℓ​⊗Bℓ​), where q∈Nq\in\mathbb Nq∈N, every wℓ≥0w_\ell\ge0wℓ​≥0, ∑ℓ<qwℓ=1\sum_{\ell<q}w_\ell=1∑ℓ<q​wℓ​=1, and every AℓA_\ellAℓ​ and BℓB_\ellBℓ​ is a positive semidefinite complex matrix of trace 111 on III and JJJ, respectively. The sum-of-weights condition excludes q=0q=0q=0, but individual weights may vanish. The square root is the positive matrix square root, and †\dagger† denotes conjugate transpose. No density-matrix condition is imposed on ρ\rhoρ.

QAlgorithms.Papers.Independent.Intakethird100.P09.sepDistanceUntransposed

For finite, nonempty types I,JI,JI,J with decidable equality and any complex matrix ρ\rhoρ indexed by I×JI\times JI×J, this defines

inf⁡σ separable density matrix∥ρTJ−σ∥1,\inf_{\sigma\text{ separable density matrix}}\|\rho^{T_J}-\sigma\|_1,σ separable density matrixinf​∥ρTJ​−σ∥1​,

where (ρTJ)(i,j),(i′,j′)=ρ(i,j′),(i′,j)(\rho^{T_J})_{(i,j),(i',j')}=\rho_{(i,j'),(i',j)}(ρTJ​)(i,j),(i′,j′)​=ρ(i,j′),(i′,j)​ and ∥X∥1=Re⁡tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{tr}\sqrt{X^\dagger X}∥X∥1​=RetrX†X​, with the square root defined by continuous functional calculus. Here a separable density matrix is any matrix expressible as σ=∑ℓ=0q−1wℓAℓ⊗Bℓ\sigma=\sum_{\ell=0}^{q-1}w_\ell A_\ell\otimes B_\ellσ=∑ℓ=0q−1​wℓ​Aℓ​⊗Bℓ​, for some natural number qqq, real weights wℓ≥0w_\ell\geq0wℓ​≥0 summing to 111, and positive semidefinite matrices Aℓ,BℓA_\ell,B_\ellAℓ​,Bℓ​ on I,JI,JI,J, respectively, each of trace 111. Thus q=0q=0q=0 cannot satisfy the weight condition, although individual weights may vanish. Only ρ\rhoρ is partially transposed in the distance expression; no positivity or normalization assumption is imposed on ρ\rhoρ.

QAlgorithms.Papers.Independent.Intakethird100.P09.stateValue

For any Bell scenario S=(nx,ny,na,nb)S=(n_x,n_y,n_a,n_b)S=(nx​,ny​,na​,nb​), finite types I,JI,JI,J with decidable equality, arbitrary real coefficient array sxyabs_{xyab}sxyab​, and arbitrary complex matrix ρ\rhoρ on I×JI\times JI×J, the state value is the real supremum of

∑x<nx∑y<ny∑a<na∑b<nbsxyabRe⁡tr⁡((Ax,a⊗By,b)ρ)\sum_{x<n_x}\sum_{y<n_y}\sum_{a<n_a}\sum_{b<n_b} s_{xyab}\operatorname{Re}\operatorname{tr}\bigl((A_{x,a}\otimes B_{y,b})\rho\bigr)x<nx​∑​y<ny​∑​a<na​∑​b<nb​∑​sxyab​Retr((Ax,a​⊗By,b​)ρ)

over all families of positive semidefinite matrices satisfying ∑a<naAx,a=1I\sum_{a<n_a}A_{x,a}=1_I∑a<na​​Ax,a​=1I​ for every xxx and ∑b<nbBy,b=1J\sum_{b<n_b}B_{y,b}=1_J∑b<nb​​By,b​=1J​ for every yyy. Tensor-product entries are Aii′Bjj′A_{ii'}B_{jj'}Aii′​Bjj′​. No positivity or trace-one condition is required of ρ\rhoρ. Either local index type may be empty, in which case all values in this supremum are zero.

QAlgorithms.Papers.Independent.Intakethird100.P09.successfulFilterBranch

For any natural numbers a,ba,ba,b, any complex matrix ρ\rhoρ on the product of the local index sets of sizes a,ba,ba,b, and a local filter consisting of nonempty finite matrix families Ai,BjA_i,B_jAi​,Bj​ with ∑iAi†Ai=Ia\sum_iA_i^\dagger A_i=I_a∑i​Ai†​Ai​=Ia​, ∑jBj†Bj=Ib\sum_jB_j^\dagger B_j=I_b∑j​Bj†​Bj​=Ib​, and selected indices i∗,j∗i_*,j_*i∗​,j∗​, this defines

(Ai∗⊗Bj∗) ρ (Ai∗⊗Bj∗)†.(A_{i_*}\otimes B_{j_*})\,\rho\,(A_{i_*}\otimes B_{j_*})^\dagger.(Ai∗​​⊗Bj∗​​)ρ(Ai∗​​⊗Bj∗​​)†.

No division by the trace is performed. Neither positivity nor trace one is required of ρ\rhoρ, the resulting matrix may be zero, and zero local dimensions are included.

QAlgorithms.Papers.Independent.Intakethird100.P09.tBlock

For natural numbers a,ba,ba,b with nonempty index sets {0,…,a−1}\{0,\ldots,a-1\}{0,…,a−1} and {0,…,b−1}\{0,\ldots,b-1\}{0,…,b−1}, hence a,b>0a,b>0a,b>0, any Boolean flag, any complex matrix ρ\rhoρ on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb, and any natural number nnn, this defines the extended nonnegative supremum over experiments on input dimensions an,bna^n,b^nan,bn of the following value:

{inf⁡σ separable density matrix on Ca⊗Cb∑x,yD(PxyE,ρ,n,PxyE,σ,n)nxny,if the flag is true,sup⁡p(x,y)≥0∑x,yp(x,y)=1inf⁡σ separable density matrix on Ca⊗Cb∑x,yp(x,y)D(PxyE,ρ,n,PxyE,σ,n),if the flag is false.\begin{cases} \displaystyle\inf_{\sigma\text{ separable density matrix on }\mathbb C^a\otimes\mathbb C^b} \sum_{x,y}\frac{D(P^{E,\rho,n}_{xy},P^{E,\sigma,n}_{xy})}{n_xn_y}, &\text{if the flag is true},\\[3mm] \displaystyle\sup_{\substack{p(x,y)\geq0\\\sum_{x,y}p(x,y)=1}} \inf_{\sigma\text{ separable density matrix on }\mathbb C^a\otimes\mathbb C^b} \sum_{x,y}p(x,y)D(P^{E,\rho,n}_{xy},P^{E,\sigma,n}_{xy}), &\text{if the flag is false}. \end{cases}⎩⎨⎧​σ separable density matrix on Ca⊗Cbinf​x,y∑​nx​ny​D(PxyE,ρ,n​,PxyE,σ,n​)​,p(x,y)≥0∑x,y​p(x,y)=1​sup​σ separable density matrix on Ca⊗Cbinf​x,y∑​p(x,y)D(PxyE,ρ,n​,PxyE,σ,n​),​if the flag is true,if the flag is false.​

An experiment chooses positive output dimensions, positive finite input and outcome counts, a map ΦE\Phi_EΦE​ in the pointwise closure of finite adaptive local Kraus protocols, and local positive semidefinite measurements Ax,α,By,βA_{x,\alpha},B_{y,\beta}Ax,α​,By,β​ summing to their identities for each input; the finite protocols are recursively generated from identities by complete local Kraus instruments, outcome-dependent continuations, and summation of branches. Its arrays are PE,ω,n(x,y,α,β)=Re⁡tr⁡[(Ax,α⊗By,β)ΦE(ω[n])]P^{E,\omega,n}(x,y,\alpha,\beta)=\operatorname{Re}\operatorname{tr}[(A_{x,\alpha}\otimes B_{y,\beta})\Phi_E(\omega^{[n]})]PE,ω,n(x,y,α,β)=Retr[(Ax,α​⊗By,β​)ΦE​(ω[n])], where ω[n]\omega^{[n]}ω[n] has entries ∏t=0n−1ω(it,jt),(it′,jt′)\prod_{t=0}^{n-1}\omega_{(i_t,j_t),(i'_t,j'_t)}∏t=0n−1​ω(it​,jt​),(it′​,jt′​)​, reindexed by the chosen bijections from length-nnn index sequences to indices of sizes an,bna^n,b^nan,bn. A separable density matrix σ\sigmaσ is a finite sum ∑ℓwℓRℓ⊗Sℓ\sum_\ell w_\ell R_\ell\otimes S_\ell∑ℓ​wℓ​Rℓ​⊗Sℓ​ with nonnegative real weights summing to 111 and positive semidefinite trace-one factors. The divergence D(u,v)D(u,v)D(u,v) is infinite if some coordinate has u>0,v=0u>0,v=0u>0,v=0; otherwise it is the nonnegative part of ∑ui≠0uilog⁡(ui/vi)/log⁡2\sum_{u_i\neq0}u_i\log(u_i/v_i)/\log2∑ui​=0​ui​log(ui​/vi​)/log2, using total real division and logarithms and 0⋅(+∞)=00\cdot(+\infty)=00⋅(+∞)=0. The infimum chooses a single-copy σ\sigmaσ and compares its nnn-fold power using the same experiment; it may depend on the input law. No density assumption is imposed on ρ\rhoρ. The case n=0n=0n=0 is included, with both matrix powers equal to the one-dimensional matrix 111 because their entry products are empty.

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