Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Distilling Non-Locality

Definition
QAlgorithms_Papers_Independent_Intakethird100_P48

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

prove2quantum

The objects the formalized statements of Distilling Non-Locality (arXiv:0809.3173) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Behavior: PDF pp.1–2: a binary-input, binary-output conditional probability table. Arguments are ordered x,y,a,b. Validity is supplied by IsBinaryNS.
  • IsBinaryNS: PDF pp.1–2: positivity, normalization at every input, and both no-signaling marginal equalities, including input pairs assigned zero probability by an input law.
  • binaryCorrelator: PDF p.2: the correlator X_xy=P(00|xy)+P(11|xy)-P(01|xy)-P(10|xy).
  • chshAt: PDF p.2, Definition 1: absolute three-plus/one-minus CHSH expression.
  • nonlocality: PDF p.2, Definition 1: the maximum over exactly the four CHSH input pairs. Nested binary maxima avoid any empty-set or unbounded real-supremum convention.
  • ParallelProtocol: PDF pp.2–3: deterministic parallel local operations on n resource copies. Neither party's input/output functions access any remote data or the resource table. This is the class containing the exhibited NDP; it is not a model of every adaptive wiring.
  • parityProtocol: PDF pp.2–3 and Fig.1: all copies receive the same local input and each party outputs its own XOR using frozen dotBits against the all-true history. The wiring is fixed independently of the resource behavior.
  • parallelOutputLaw: PDF p.3, proof of Theorem 1: actual simulated output distribution. The product is the joint law of independent identical resource instances.
  • StrictlyDistills: PDF p.2, Definition 2, specialized to an explicitly local parallel wiring: valid input/output boxes, a non-local resource, and strictly increased CHSH non-locality.
  • parameterBox: PDF p.3: the full two-parameter probability table, with r=epsilon at xy=11 and r=delta otherwise. Positivity domain is 0<=epsilon,delta<=1.
  • epsilonBox: PDF pp.2–3: P_epsilon is the delta=0 resource, not its protocol output.
  • HilbertSystem: Hilbert spaces used by the source's quantum-state/local-observable model, PDF pp.2–3. No finite-dimensional or separability hypothesis is imposed.
  • JointSpace: PDF pp.2–3: completed spatial tensor product for a bipartite pure state.
  • IsBinaryPOVM: PDF pp.2–3: a genuine binary local POVM, using Mathlib positivity (self-adjoint positive operators), not just a correlator test.
  • IsQuantum: PDF pp.2–3: exact quantum realization of the whole probability table by a normalized spatial bipartite state and input-dependent local binary measurements. An enlarged local Hilbert space accommodates purification and shared randomness. Mathlib Completion.map of TensorProduct.mapL supplies the completed local action.
  • quantumDistilledValues: PDF p.4: all actually distilled values from quantum members of the full positivity square, with copy number varied. No scalar-sector shortcut or real sSup.
  • optimalDelta: PDF p.4: exact delta corresponding to the displayed rounded optimizer 0.03806.
  • optimalEpsilon: PDF p.4: exact epsilon corresponding to the displayed rounded optimizer 0.30866.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Basic

/-!
# Distilling Non-Locality (arXiv:0809.3173v4)

Paper-local definitions and six statement targets. False/true label bits 0/1.
The protocol acts on independent identical resource copies. All no-signaling
constraints hold at every input, independently of any input distribution.
Quantum realizability uses normalized states on completed spatial tensor products
and genuine local POVMs, with unrestricted Hilbert spaces. Mixed states can be
purified into an enlarged local space. No arcsine criterion is a definition.
Compilation is pending the separate mechanical handoff.
-/

namespace QAlgorithms.Papers.Independent.Intakethird100.P48

open scoped BigOperators TensorProduct

noncomputable section

/-- PDF pp.1–2: a binary-input, binary-output conditional probability table.
Arguments are ordered x,y,a,b. Validity is supplied by IsBinaryNS. -/
abbrev Behavior := Bool → Bool → Bool → Bool → ℝ

/-- PDF pp.1–2: positivity, normalization at every input, and both no-signaling
marginal equalities, including input pairs assigned zero probability by an input law. -/
def IsBinaryNS (P : Behavior) : Prop :=
  (∀ x y a b, 0 ≤ P x y a b) ∧
  (∀ x y, ∑ a : Bool, ∑ b : Bool, P x y a b = 1) ∧
  (∀ x y z a, ∑ b : Bool, P x y a b = ∑ b : Bool, P x z a b) ∧
  (∀ x z y b, ∑ a : Bool, P x y a b = ∑ a : Bool, P z y a b)

/-- PDF p.2: the correlator X_xy=P(00|xy)+P(11|xy)-P(01|xy)-P(10|xy). -/
def binaryCorrelator (P : Behavior) (x y : Bool) : ℝ :=
  P x y false false + P x y true true - P x y false true - P x y true false

/-- PDF p.2, Definition 1: absolute three-plus/one-minus CHSH expression. -/
def chshAt (P : Behavior) (x y : Bool) : ℝ :=
  |binaryCorrelator P x y + binaryCorrelator P x (!y) + binaryCorrelator P (!x) y -
    binaryCorrelator P (!x) (!y)|

/-- PDF p.2, Definition 1: the maximum over exactly the four CHSH input pairs.
Nested binary maxima avoid any empty-set or unbounded real-supremum convention. -/
def nonlocality (P : Behavior) : ℝ :=
  max (max (chshAt P false false) (chshAt P false true))
    (max (chshAt P true false) (chshAt P true true))

/-- PDF pp.2–3: deterministic parallel local operations on n resource copies.
Neither party's input/output functions access any remote data or the resource table.
This is the class containing the exhibited NDP; it is not a model of every adaptive wiring. -/
structure ParallelProtocol (n : ℕ) where
  aliceInput : Bool → Fin n → Bool
  bobInput : Bool → Fin n → Bool
  aliceOutput : Bool → Qubits n → Bool
  bobOutput : Bool → Qubits n → Bool

/-- PDF pp.2–3 and Fig.1: all copies receive the same local input and each party
outputs its own XOR using frozen dotBits against the all-true history.
The wiring is fixed independently of the resource behavior. -/
def parityProtocol (n : ℕ) : ParallelProtocol n where
  aliceInput := fun x _ => x
  bobInput := fun y _ => y
  aliceOutput := fun _ a => dotBits a (fun _ => true)
  bobOutput := fun _ b => dotBits b (fun _ => true)

/-- PDF p.3, proof of Theorem 1: actual simulated output distribution.
The product is the joint law of independent identical resource instances. -/
def parallelOutputLaw {n : ℕ} (W : ParallelProtocol n) (P : Behavior) : Behavior :=
  fun x y a b => ∑ u : Qubits n, ∑ v : Qubits n,
    if W.aliceOutput x u = a ∧ W.bobOutput y v = b then
      ∏ i : Fin n, P (W.aliceInput x i) (W.bobInput y i) (u i) (v i)
    else 0

/-- PDF p.2, Definition 2, specialized to an explicitly local parallel wiring:
valid input/output boxes, a non-local resource, and strictly increased CHSH non-locality. -/
def StrictlyDistills {n : ℕ} (W : ParallelProtocol n) (P : Behavior) : Prop :=
  IsBinaryNS P ∧ IsBinaryNS (parallelOutputLaw W P) ∧
    2 < nonlocality P ∧ nonlocality P < nonlocality (parallelOutputLaw W P)

/-- PDF p.3: the full two-parameter probability table, with r=epsilon at xy=11
and r=delta otherwise. Positivity domain is 0<=epsilon,delta<=1. -/
def parameterBox (epsilon delta : ℝ) : Behavior :=
  fun x y a b =>
    let r := if x && y then epsilon else delta
    if a = b then (1 - r) / 2 else r / 2

/-- PDF pp.2–3: P_epsilon is the delta=0 resource, not its protocol output. -/
def epsilonBox (epsilon : ℝ) : Behavior := parameterBox epsilon 0

/-- Hilbert spaces used by the source's quantum-state/local-observable model,
PDF pp.2–3. No finite-dimensional or separability hypothesis is imposed. -/
structure HilbertSystem where
  carrier : Type
  [normed : NormedAddCommGroup carrier]
  [innerSpace : InnerProductSpace ℂ carrier]
  [complete : CompleteSpace carrier]

attribute [instance] HilbertSystem.normed HilbertSystem.innerSpace HilbertSystem.complete

/-- PDF pp.2–3: completed spatial tensor product for a bipartite pure state. -/
abbrev JointSpace (A B : HilbertSystem) :=
  UniformSpace.Completion (TensorProduct ℂ A.carrier B.carrier)

/-- PDF pp.2–3: a genuine binary local POVM, using Mathlib positivity
(self-adjoint positive operators), not just a correlator test. -/
def IsBinaryPOVM {A : HilbertSystem} (M : Bool → A.carrier →L[ℂ] A.carrier) : Prop :=
  (∀ a, (M a).IsPositive) ∧ ∑ a : Bool, M a = 1

/-- PDF pp.2–3: exact quantum realization of the whole probability table by a
normalized spatial bipartite state and input-dependent local binary measurements.
An enlarged local Hilbert space accommodates purification and shared randomness.
Mathlib Completion.map of TensorProduct.mapL supplies the completed local action. -/
def IsQuantum (P : Behavior) : Prop :=
  ∃ (A B : HilbertSystem) (psi : JointSpace A B)
    (M : Bool → Bool → A.carrier →L[ℂ] A.carrier)
    (N : Bool → Bool → B.carrier →L[ℂ] B.carrier),
    ‖psi‖ = 1 ∧ (∀ x, IsBinaryPOVM (A := A) (M x)) ∧ (∀ y, IsBinaryPOVM (A := B) (N y)) ∧
      ∀ x y a b, P x y a b = (inner ℂ psi (UniformSpace.Completion.map (TensorProduct.mapL (M x a) (N y b)) psi)).re

/-- PDF p.4: all actually distilled values from quantum members of the full
positivity square, with copy number varied. No scalar-sector shortcut or real sSup. -/
def quantumDistilledValues : Set ℝ :=
  {z | ∃ (epsilon delta : ℝ) (n : ℕ),
    0 ≤ epsilon ∧ epsilon ≤ 1 ∧ 0 ≤ delta ∧ delta ≤ 1 ∧ 1 < n ∧
    IsQuantum (parameterBox epsilon delta) ∧
    StrictlyDistills (parityProtocol n) (parameterBox epsilon delta) ∧
    z = nonlocality (parallelOutputLaw (parityProtocol n) (parameterBox epsilon delta))}

/-- PDF p.4: exact delta corresponding to the displayed rounded optimizer 0.03806. -/
def optimalDelta : ℝ := (1 - Real.cos (Real.pi / 8)) / 2

/-- PDF p.4: exact epsilon corresponding to the displayed rounded optimizer 0.30866. -/
def optimalEpsilon : ℝ := (1 - Real.cos (3 * Real.pi / 8)) / 2

/-! Definition sanity checks; these are not additional paper-result targets. -/

example (a : Qubits 0) : dotBits a (fun _ => true) = false := by
  simp [dotBits, Bool.zero_eq_false]

example (a : Qubits 1) : dotBits a (fun _ => true) = a 0 := by simp [dotBits]

example (n : ℕ) (x : Bool) (i : Fin n) : (parityProtocol n).aliceInput x i = x := rfl

example (epsilon delta : ℝ) : parameterBox epsilon delta true true false true = epsilon / 2 := by
  simp [parameterBox]

example (epsilon delta : ℝ) : parameterBox epsilon delta false true false false = (1 - delta) / 2 := by
  simp [parameterBox]

example (epsilon : ℝ) : epsilonBox epsilon = parameterBox epsilon 0 := rfl

example (P : Behavior) : binaryCorrelator P false false =
    P false false false false + P false false true true -
      P false false false true - P false false true false := rfl

example (A B : HilbertSystem) : ¬ ‖(0 : JointSpace A B)‖ = 1 := by simp

example (A : HilbertSystem) : (0 : A.carrier →L[ℂ] A.carrier).IsPositive :=
  ContinuousLinearMap.isPositive_zero

example {A B : HilbertSystem} (M : A.carrier →L[ℂ] A.carrier)
    (N : B.carrier →L[ℂ] B.carrier) (t : TensorProduct ℂ A.carrier B.carrier) :
    UniformSpace.Completion.map (TensorProduct.mapL M N) (t : JointSpace A B) =
      ((TensorProduct.mapL M N t) : JointSpace A B) :=
  UniformSpace.Completion.map_coe (TensorProduct.mapL M N).uniformContinuous t

/-- At the excluded local endpoint, the resource has exactly the Bell-bound value. -/
example : nonlocality (epsilonBox 0) = 2 := by
  norm_num [nonlocality, chshAt, binaryCorrelator, epsilonBox, parameterBox]

/-- Zero resource copies produce the deterministic output pair 00 independently of P. -/
example (P : Behavior) (x y a b : Bool) :
    parallelOutputLaw (parityProtocol 0) P x y a b =
      if a = false ∧ b = false then 1 else 0 := by
  simp [parallelOutputLaw, parityProtocol, dotBits, Qubits, Bool.zero_eq_false, eq_comm]

end

end QAlgorithms.Papers.Independent.Intakethird100.P48
Source
Distilling Non-Locality, arXiv:0809.3173v4, https://arxiv.org/abs/0809.3173v4
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P48.Behavior

A behavior is any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R, assigning a real number P(x,y,a,b)P(x,y,a,b)P(x,y,a,b) to each quadruple of Boolean values x,y,a,bx,y,a,bx,y,a,b. This abbreviation imposes no nonnegativity, normalization, or other conditions.

QAlgorithms.Papers.Independent.Intakethird100.P48.HilbertSystem

A Hilbert system consists of a carrier type HHH, a normed additive commutative group structure on HHH, a complex inner product space structure on HHH compatible with that normed group structure, and the assumption that HHH is complete for the resulting metric. No finite dimensionality, separability, or existence of a nonzero vector is required; the zero space is allowed.

QAlgorithms.Papers.Independent.Intakethird100.P48.IsBinaryNS

For any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R, the predicate IsBinaryNS⁡(P)\operatorname{IsBinaryNS}(P)IsBinaryNS(P) means that all four conditions hold: P(x,y,a,b)≥0P(x,y,a,b)\geq0P(x,y,a,b)≥0 for every Boolean x,y,a,bx,y,a,bx,y,a,b; ∑a,bP(x,y,a,b)=1\sum_{a,b}P(x,y,a,b)=1∑a,b​P(x,y,a,b)=1 for every Boolean x,yx,yx,y; ∑bP(x,y,a,b)=∑bP(x,z,a,b)\sum_bP(x,y,a,b)=\sum_bP(x,z,a,b)∑b​P(x,y,a,b)=∑b​P(x,z,a,b) for every Boolean x,y,z,ax,y,z,ax,y,z,a; and ∑aP(x,y,a,b)=∑aP(z,y,a,b)\sum_aP(x,y,a,b)=\sum_aP(z,y,a,b)∑a​P(x,y,a,b)=∑a​P(z,y,a,b) for every Boolean x,z,y,bx,z,y,bx,z,y,b. Every sum runs over both Boolean values.

QAlgorithms.Papers.Independent.Intakethird100.P48.IsBinaryPOVM

Given a complete complex inner-product space AAA and a pair M0,M1:A→AM_0,M_1:A\to AM0​,M1​:A→A of continuous complex-linear operators, indexed by the two Boolean values 0=false0=\mathrm{false}0=false and 1=true1=\mathrm{true}1=true, the predicate says that both operators are positive and that

M0+M1=IA.M_0+M_1=I_A.M0​+M1​=IA​.

Neither operator is required to be a projection or to be nonzero. The definition also applies to the zero space, where the identity operator is zero.

QAlgorithms.Papers.Independent.Intakethird100.P48.IsQuantum

For any real-valued array P(x,y,a,b)P(x,y,a,b)P(x,y,a,b) with Boolean indices x,y,a,bx,y,a,bx,y,a,b, the predicate says that there exist complete complex inner-product spaces A,BA,BA,B, a vector ψ\psiψ in the uniform-space completion A⊗CB^\widehat{A\otimes_{\mathbb C}B}A⊗C​B​, and continuous complex-linear operators Mx,a:A→AM_{x,a}:A\to AMx,a​:A→A and Ny,b:B→BN_{y,b}:B\to BNy,b​:B→B, for every Boolean choice of their indices, such that ∥ψ∥=1\|\psi\|=1∥ψ∥=1, each Mx,aM_{x,a}Mx,a​ and Ny,bN_{y,b}Ny,b​ is positive, Mx,0+Mx,1=IAM_{x,0}+M_{x,1}=I_AMx,0​+Mx,1​=IA​ for every xxx, Ny,0+Ny,1=IBN_{y,0}+N_{y,1}=I_BNy,0​+Ny,1​=IB​ for every yyy, and

P(x,y,a,b)=Re⁡⟨ψ,Mx,a⊗Ny,b^ ψ⟩for all x,y,a,b.P(x,y,a,b)=\operatorname{Re}\left\langle\psi,\widehat{M_{x,a}\otimes N_{y,b}}\,\psi\right\rangle \quad\text{for all }x,y,a,b.P(x,y,a,b)=Re⟨ψ,Mx,a​⊗Ny,b​​ψ⟩for all x,y,a,b.

Here 0,10,10,1 denote the two Boolean values, and the operator with a hat is the map on the completion obtained from the tensor-product map u⊗v↦Mx,au⊗Ny,bvu\otimes v\mapsto M_{x,a}u\otimes N_{y,b}vu⊗v↦Mx,a​u⊗Ny,b​v. No finite-dimensionality restriction is imposed; the required unit vector excludes witnesses whose joint space is zero.

QAlgorithms.Papers.Independent.Intakethird100.P48.JointSpace

For any two systems AAA and BBB, each consisting of a complex inner-product space with its compatible norm and an assumption of completeness, their joint space is the uniform-space completion of the complex algebraic tensor product of their underlying spaces:

JointSpace⁡(A,B)=A⊗CB^.\operatorname{JointSpace}(A,B)=\widehat{A\otimes_{\mathbb C}B}.JointSpace(A,B)=A⊗C​B​.

No finite-dimensionality assumption is imposed, and the individual spaces are allowed to be zero spaces.

QAlgorithms.Papers.Independent.Intakethird100.P48.ParallelProtocol

For every natural number nnn, including 000, a parallel protocol consists of four functions: Alice’s input function Ain:{false,true}×In→{false,true}A_{\mathrm{in}}:\{\mathrm{false},\mathrm{true}\}\times I_n\to\{\mathrm{false},\mathrm{true}\}Ain​:{false,true}×In​→{false,true}, Bob’s input function BinB_{\mathrm{in}}Bin​ with the same domain and codomain, Alice’s output function Aout:{false,true}×{false,true}In→{false,true}A_{\mathrm{out}}:\{\mathrm{false},\mathrm{true}\}\times\{\mathrm{false},\mathrm{true}\}^{I_n}\to\{\mathrm{false},\mathrm{true}\}Aout​:{false,true}×{false,true}In​→{false,true}, and Bob’s output function BoutB_{\mathrm{out}}Bout​ with that same domain and codomain, where In={0,…,n−1}I_n=\{0,\ldots,n-1\}In​={0,…,n−1} and {false,true}In\{\mathrm{false},\mathrm{true}\}^{I_n}{false,true}In​ is the set of Boolean strings indexed by InI_nIn​. There are no further conditions on these functions. When n=0n=0n=0, InI_nIn​ is empty, there is exactly one such string, the input functions have empty domains, and each output function can still depend on its Boolean first argument.

QAlgorithms.Papers.Independent.Intakethird100.P48.StrictlyDistills

For any natural number nnn, any protocol WWW consisting of Boolean input functions Ain(x,i),Bin(y,i)A_{\mathrm{in}}(x,i),B_{\mathrm{in}}(y,i)Ain​(x,i),Bin​(y,i) and Boolean output functions Aout(x,u),Bout(y,v)A_{\mathrm{out}}(x,u),B_{\mathrm{out}}(y,v)Aout​(x,u),Bout​(y,v) on length-nnn Boolean strings, and any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R, define Q(x,y,a,b)Q(x,y,a,b)Q(x,y,a,b) to be the sum, over all length-nnn Boolean strings u,vu,vu,v satisfying Aout(x,u)=aA_{\mathrm{out}}(x,u)=aAout​(x,u)=a and Bout(y,v)=bB_{\mathrm{out}}(y,v)=bBout​(y,v)=b, of ∏i=0n−1P(Ain(x,i),Bin(y,i),ui,vi)\prod_{i=0}^{n-1}P(A_{\mathrm{in}}(x,i),B_{\mathrm{in}}(y,i),u_i,v_i)∏i=0n−1​P(Ain​(x,i),Bin​(y,i),ui​,vi​). For either function R=PR=PR=P or R=QR=QR=Q, put ER(s,t)=R(s,t,false,false)+R(s,t,true,true)−R(s,t,false,true)−R(s,t,true,false)E_R(s,t)=R(s,t,\mathrm{false},\mathrm{false})+R(s,t,\mathrm{true},\mathrm{true})-R(s,t,\mathrm{false},\mathrm{true})-R(s,t,\mathrm{true},\mathrm{false})ER​(s,t)=R(s,t,false,false)+R(s,t,true,true)−R(s,t,false,true)−R(s,t,true,false) and

S(R)=max⁡s,t∈{false,true}∣ER(s,t)+ER(s,¬t)+ER(¬s,t)−ER(¬s,¬t)∣.S(R)=\max_{s,t\in\{\mathrm{false},\mathrm{true}\}} \left|E_R(s,t)+E_R(s,\neg t)+E_R(\neg s,t)-E_R(\neg s,\neg t)\right|.S(R)=s,t∈{false,true}max​∣ER​(s,t)+ER​(s,¬t)+ER​(¬s,t)−ER​(¬s,¬t)∣.

Then WWW strictly distills PPP means that, for each R∈{P,Q}R\in\{P,Q\}R∈{P,Q}, all its entries are nonnegative, ∑a,bR(x,y,a,b)=1\sum_{a,b}R(x,y,a,b)=1∑a,b​R(x,y,a,b)=1 for every x,yx,yx,y, ∑bR(x,y,a,b)=∑bR(x,z,a,b)\sum_bR(x,y,a,b)=\sum_bR(x,z,a,b)∑b​R(x,y,a,b)=∑b​R(x,z,a,b) for every x,y,z,ax,y,z,ax,y,z,a, and ∑aR(x,y,a,b)=∑aR(z,y,a,b)\sum_aR(x,y,a,b)=\sum_aR(z,y,a,b)∑a​R(x,y,a,b)=∑a​R(z,y,a,b) for every x,z,y,bx,z,y,bx,z,y,b, and additionally 2<S(P)2<S(P)2<S(P) and S(P)<S(Q)S(P)<S(Q)S(P)<S(Q). All these variables and sums are Boolean. The definition permits n=0n=0n=0 syntactically; in that case the empty product makes QQQ the deterministic law of the two output functions on the empty strings, for which S(Q)=2S(Q)=2S(Q)=2, so the strict inequalities cannot hold.

QAlgorithms.Papers.Independent.Intakethird100.P48.binaryCorrelator

For any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R and Boolean values x,yx,yx,y, its binary correlator at (x,y)(x,y)(x,y) is the real number

P(x,y,false,false)+P(x,y,true,true)−P(x,y,false,true)−P(x,y,true,false).P(x,y,\mathrm{false},\mathrm{false}) +P(x,y,\mathrm{true},\mathrm{true}) -P(x,y,\mathrm{false},\mathrm{true}) -P(x,y,\mathrm{true},\mathrm{false}).P(x,y,false,false)+P(x,y,true,true)−P(x,y,false,true)−P(x,y,true,false).

No conditions on PPP are required.

QAlgorithms.Papers.Independent.Intakethird100.P48.chshAt

For any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R and Boolean values x,yx,yx,y, define EP(s,t)=P(s,t,false,false)+P(s,t,true,true)−P(s,t,false,true)−P(s,t,true,false)E_P(s,t)=P(s,t,\mathrm{false},\mathrm{false})+P(s,t,\mathrm{true},\mathrm{true})-P(s,t,\mathrm{false},\mathrm{true})-P(s,t,\mathrm{true},\mathrm{false})EP​(s,t)=P(s,t,false,false)+P(s,t,true,true)−P(s,t,false,true)−P(s,t,true,false) for Boolean s,ts,ts,t. Then the real number chshAt⁡(P,x,y)\operatorname{chshAt}(P,x,y)chshAt(P,x,y) is

∣EP(x,y)+EP(x,¬y)+EP(¬x,y)−EP(¬x,¬y)∣,\left|E_P(x,y)+E_P(x,\neg y)+E_P(\neg x,y)-E_P(\neg x,\neg y)\right|,∣EP​(x,y)+EP​(x,¬y)+EP​(¬x,y)−EP​(¬x,¬y)∣,

where ¬\neg¬ exchanges the two Boolean values. No conditions on PPP are required.

QAlgorithms.Papers.Independent.Intakethird100.P48.epsilonBox

For every real number ϵ\epsilonϵ, the epsilon box is the function Pϵ:{false,true}4→RP_\epsilon:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RPϵ​:{false,true}4→R given by

Pϵ(x,y,a,b)={(1−ϵ)/2,x=y=true and a=b,ϵ/2,x=y=true and a≠b,1/2,at least one of x,y is false, and a=b,0,at least one of x,y is false, and a≠b.P_\epsilon(x,y,a,b)= \begin{cases} (1-\epsilon)/2,&x=y=\mathrm{true}\ \text{and }a=b,\\ \epsilon/2,&x=y=\mathrm{true}\ \text{and }a\ne b,\\ 1/2,&\text{at least one of }x,y\text{ is false, and }a=b,\\ 0,&\text{at least one of }x,y\text{ is false, and }a\ne b. \end{cases}Pϵ​(x,y,a,b)=⎩⎨⎧​(1−ϵ)/2,ϵ/2,1/2,0,​x=y=true and a=b,x=y=true and a=b,at least one of x,y is false, and a=b,at least one of x,y is false, and a=b.​

All four arguments are Boolean, and no bounds on ϵ\epsilonϵ are imposed; values outside [0,1][0,1][0,1] are included even though they produce negative entries.

QAlgorithms.Papers.Independent.Intakethird100.P48.nonlocality

For any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R, put EP(s,t)=P(s,t,false,false)+P(s,t,true,true)−P(s,t,false,true)−P(s,t,true,false)E_P(s,t)=P(s,t,\mathrm{false},\mathrm{false})+P(s,t,\mathrm{true},\mathrm{true})-P(s,t,\mathrm{false},\mathrm{true})-P(s,t,\mathrm{true},\mathrm{false})EP​(s,t)=P(s,t,false,false)+P(s,t,true,true)−P(s,t,false,true)−P(s,t,true,false). Its nonlocality is the real number

max⁡x,y∈{false,true}∣EP(x,y)+EP(x,¬y)+EP(¬x,y)−EP(¬x,¬y)∣,\max_{x,y\in\{\mathrm{false},\mathrm{true}\}} \left|E_P(x,y)+E_P(x,\neg y)+E_P(\neg x,y)-E_P(\neg x,\neg y)\right|,x,y∈{false,true}max​∣EP​(x,y)+EP​(x,¬y)+EP​(¬x,y)−EP​(¬x,¬y)∣,

where ¬\neg¬ exchanges the Boolean values. The maximum includes all four pairs (x,y)(x,y)(x,y), and the definition imposes no nonnegativity or normalization conditions on PPP.

QAlgorithms.Papers.Independent.Intakethird100.P48.optimalDelta

The real constant named optimalDelta⁡\operatorname{optimalDelta}optimalDelta is defined by

optimalDelta⁡=1−cos⁡(π/8)2.\operatorname{optimalDelta}=\frac{1-\cos(\pi/8)}{2}.optimalDelta=21−cos(π/8)​.

QAlgorithms.Papers.Independent.Intakethird100.P48.optimalEpsilon

The real constant named optimalEpsilon⁡\operatorname{optimalEpsilon}optimalEpsilon is defined by

optimalEpsilon⁡=1−cos⁡(3π/8)2.\operatorname{optimalEpsilon}=\frac{1-\cos(3\pi/8)}{2}.optimalEpsilon=21−cos(3π/8)​.

QAlgorithms.Papers.Independent.Intakethird100.P48.parallelOutputLaw

For any natural number nnn, any protocol WWW consisting of Boolean input functions Ain(x,i),Bin(y,i)A_{\mathrm{in}}(x,i),B_{\mathrm{in}}(y,i)Ain​(x,i),Bin​(y,i) for i∈In={0,…,n−1}i\in I_n=\{0,\ldots,n-1\}i∈In​={0,…,n−1} and Boolean output functions Aout(x,u),Bout(y,v)A_{\mathrm{out}}(x,u),B_{\mathrm{out}}(y,v)Aout​(x,u),Bout​(y,v) for Boolean strings u,vu,vu,v on InI_nIn​, and any function P:{false,true}4→RP:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RP:{false,true}4→R, the parallel output law is the function Q:{false,true}4→RQ:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RQ:{false,true}4→R defined, for all Boolean x,y,a,bx,y,a,bx,y,a,b, by

Q(x,y,a,b)=∑u,v∈{false,true}In{∏i∈InP(Ain(x,i),Bin(y,i),ui,vi),Aout(x,u)=a and Bout(y,v)=b,0,otherwise.Q(x,y,a,b)= \sum_{u,v\in\{\mathrm{false},\mathrm{true}\}^{I_n}} \begin{cases} \displaystyle\prod_{i\in I_n} P\bigl(A_{\mathrm{in}}(x,i),B_{\mathrm{in}}(y,i),u_i,v_i\bigr), & A_{\mathrm{out}}(x,u)=a\ \text{and}\ B_{\mathrm{out}}(y,v)=b,\\ 0,&\text{otherwise}. \end{cases}Q(x,y,a,b)=u,v∈{false,true}In​∑​⎩⎨⎧​i∈In​∏​P(Ain​(x,i),Bin​(y,i),ui​,vi​),0,​Aout​(x,u)=a and Bout​(y,v)=b,otherwise.​

No conditions on PPP or on the protocol functions are assumed. When n=0n=0n=0, each string sum has a single empty string and the product is 111, so Q(x,y,a,b)Q(x,y,a,b)Q(x,y,a,b) is 111 exactly when the two output functions, evaluated on the empty strings, return aaa and bbb, and is 000 otherwise.

QAlgorithms.Papers.Independent.Intakethird100.P48.parameterBox

For any real numbers ϵ,δ\epsilon,\deltaϵ,δ, the parameter box is the function Pϵ,δ:{false,true}4→RP_{\epsilon,\delta}:\{\mathrm{false},\mathrm{true}\}^4\to\mathbb RPϵ,δ​:{false,true}4→R defined by taking rx,y=ϵr_{x,y}=\epsilonrx,y​=ϵ when both xxx and yyy are true, and rx,y=δr_{x,y}=\deltarx,y​=δ otherwise, and setting

Pϵ,δ(x,y,a,b)={(1−rx,y)/2,a=b,rx,y/2,a≠b.P_{\epsilon,\delta}(x,y,a,b)= \begin{cases} (1-r_{x,y})/2,&a=b,\\ r_{x,y}/2,&a\ne b. \end{cases}Pϵ,δ​(x,y,a,b)={(1−rx,y​)/2,rx,y​/2,​a=b,a=b.​

All four arguments are Boolean. There are no bounds on ϵ\epsilonϵ or δ\deltaδ, so the definition also includes parameter choices that give negative entries.

QAlgorithms.Papers.Independent.Intakethird100.P48.parityProtocol

For every natural number nnn, the parity protocol is the quadruple of functions on Boolean inputs and length-nnn Boolean strings given by Ain(x,i)=xA_{\mathrm{in}}(x,i)=xAin​(x,i)=x, Bin(y,i)=yB_{\mathrm{in}}(y,i)=yBin​(y,i)=y, Aout(x,u)=⨁i=0n−1uiA_{\mathrm{out}}(x,u)=\bigoplus_{i=0}^{n-1}u_iAout​(x,u)=⨁i=0n−1​ui​, and Bout(y,v)=⨁i=0n−1viB_{\mathrm{out}}(y,v)=\bigoplus_{i=0}^{n-1}v_iBout​(y,v)=⨁i=0n−1​vi​. Here ⨁\bigoplus⨁ is Boolean addition, so the output is true exactly when the string has an odd number of true entries; this expands the Boolean sum of each entry conjoined with true used in the definition. Both output functions ignore their first argument. The definition includes n=0n=0n=0, when both outputs are false because the Boolean sum is empty.

QAlgorithms.Papers.Independent.Intakethird100.P48.quantumDistilledValues

This is the set of real numbers zzz for which there exist ϵ,δ∈[0,1]\epsilon,\delta\in[0,1]ϵ,δ∈[0,1] and a natural number n>1n>1n>1 satisfying the following conditions. Identify the Boolean values with 0,10,10,1, and define the real array Pϵ,δP_{\epsilon,\delta}Pϵ,δ​ by Pϵ,δ(x,y,a,b)=(1−rxy)/2P_{\epsilon,\delta}(x,y,a,b)=(1-r_{xy})/2Pϵ,δ​(x,y,a,b)=(1−rxy​)/2 when a=ba=ba=b, and rxy/2r_{xy}/2rxy​/2 otherwise, where r11=ϵr_{11}=\epsilonr11​=ϵ and rxy=δr_{xy}=\deltarxy​=δ at the other three input pairs. For any real Boolean-indexed array SSS, define

(TnS)(x,y,a,b)=∑u,v∈{0,1}n⨁iui=a, ⨁ivi=b∏i=0n−1S(x,y,ui,vi),CS(x,y)=S(x,y,0,0)+S(x,y,1,1)−S(x,y,0,1)−S(x,y,1,0),(T_nS)(x,y,a,b)= \sum_{\substack{u,v\in\{0,1\}^n\\ \bigoplus_i u_i=a,\ \bigoplus_i v_i=b}} \prod_{i=0}^{n-1}S(x,y,u_i,v_i), \qquad C_S(x,y)=S(x,y,0,0)+S(x,y,1,1)-S(x,y,0,1)-S(x,y,1,0),(Tn​S)(x,y,a,b)=u,v∈{0,1}n⨁i​ui​=a, ⨁i​vi​=b​∑​i=0∏n−1​S(x,y,ui​,vi​),CS​(x,y)=S(x,y,0,0)+S(x,y,1,1)−S(x,y,0,1)−S(x,y,1,0),

and

L(S)=max⁡x,y∈{0,1}∣CS(x,y)+CS(x,1−y)+CS(1−x,y)−CS(1−x,1−y)∣.L(S)=\max_{x,y\in\{0,1\}} \left|C_S(x,y)+C_S(x,1-y)+C_S(1-x,y)-C_S(1-x,1-y)\right|.L(S)=x,y∈{0,1}max​∣CS​(x,y)+CS​(x,1−y)+CS​(1−x,y)−CS​(1−x,1−y)∣.

The symbol ⨁\bigoplus⨁ means addition modulo two. Both Pϵ,δP_{\epsilon,\delta}Pϵ,δ​ and TnPϵ,δT_nP_{\epsilon,\delta}Tn​Pϵ,δ​ must be nonnegative at every entry, have ∑a,bS(x,y,a,b)=1\sum_{a,b}S(x,y,a,b)=1∑a,b​S(x,y,a,b)=1 for every x,yx,yx,y, have ∑bS(x,y,a,b)\sum_bS(x,y,a,b)∑b​S(x,y,a,b) independent of yyy for each x,ax,ax,a, and have ∑aS(x,y,a,b)\sum_aS(x,y,a,b)∑a​S(x,y,a,b) independent of xxx for each y,by,by,b. They must satisfy 2<L(Pϵ,δ)<L(TnPϵ,δ)2<L(P_{\epsilon,\delta})<L(T_nP_{\epsilon,\delta})2<L(Pϵ,δ​)<L(Tn​Pϵ,δ​), and z=L(TnPϵ,δ)z=L(T_nP_{\epsilon,\delta})z=L(Tn​Pϵ,δ​). In addition, Pϵ,δP_{\epsilon,\delta}Pϵ,δ​ must admit complete complex inner-product spaces A,BA,BA,B, a unit vector ψ∈A⊗CB^\psi\in\widehat{A\otimes_{\mathbb C}B}ψ∈A⊗C​B​, and positive continuous complex-linear operators Mx,aM_{x,a}Mx,a​ and Ny,bN_{y,b}Ny,b​, with Mx,0+Mx,1=IAM_{x,0}+M_{x,1}=I_AMx,0​+Mx,1​=IA​ and Ny,0+Ny,1=IBN_{y,0}+N_{y,1}=I_BNy,0​+Ny,1​=IB​, such that Pϵ,δ(x,y,a,b)=Re⁡⟨ψ,Mx,a⊗Ny,b^ψ⟩P_{\epsilon,\delta}(x,y,a,b)=\operatorname{Re}\langle\psi,\widehat{M_{x,a}\otimes N_{y,b}}\psi\ranglePϵ,δ​(x,y,a,b)=Re⟨ψ,Mx,a​⊗Ny,b​​ψ⟩ at every Boolean quadruple; the hat denotes the induced map on the completion. The parameter endpoints 000 and 111 are permitted, but n=0,1n=0,1n=0,1 are excluded.

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