Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Device-independent quantum key distribution based on measurement inputs

Definition
QAlgorithms_Papers_Independent_Intakethird100_P47

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

prove2quantum

The objects the formalized statements of Device-independent quantum key distribution based on measurement inputs (arXiv:1308.6447) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Behavior: Binary conditional probabilities p(a,b|A,B), with inputs first (PDF pp.2,5).
  • IsBehavior: A nonnegative normalized binary conditional distribution (PDF pp.2,5).
  • bipartitePOVMBehavior: The bipartite Born behavior for two binary local POVMs in arbitrary finite dimensions (PDF pp.3,5). The state and local effects are independent of the other party's input.
  • HasFiniteQuantumRealization: A finite-dimensional quantum realization of the entire binary behavior (PDF pp.3,5). All dimensions are allowed; one shared density and two local binary POVMs produce every input/output probability. No Hardy, purity, product-state or uniqueness premise is built in.
  • PairLaw: A binary pair law; also used for the accepted key and fixed Eve guess (PDF pp.4,8).
  • IsPairLaw: A nonnegative normalized pair law (PDF pp.4,8).
  • HardyParameters: Noncommuting local rank-one bases of (3); party false is Alice (PDF p.3).
  • localKet: The two local measurement bases, including the conjugates and minus in (3) (PDF p.3).
  • hardyPhi: The four ordered product vectors of (2) (PDF pp.2–3).
  • gsResidual: The Gram–Schmidt residual in (4), with the inner product linear in its second slot (PDF p.3).
  • gsDenominatorSq: The squared denominator of (4); used only for the source's unit input vectors (PDF p.3).
  • gsStep: One normalized step of (4); strict denominator positivity is a conclusion below (PDF p.3).
  • hardyGS: The explicitly constructed four vectors of (4), not an arbitrary Hardy witness (PDF p.3).
  • psiH: The source's Hardy state is the last constructed Gram–Schmidt vector (PDF p.3).
  • hardySpan: The forbidden-event span S of II A (PDF p.3).
  • hardyBehavior: The Born probabilities for the specific two-qubit projective bases (3) (PDF pp.2–3). Projectors are constructed from the local vectors; the input/output order is explicit.
  • HardyConditions: All four Hardy conditions (1), including strictly positive success (PDF p.2).
  • binarySettingLaw: The product setting law (5), with each parameter the probability of input zero (PDF p.4).
  • biasedInput: The four independently signed biases in III; true selects plus epsilon (PDF p.4).
  • acceptedMass: Joint probability of the input pair and the event S = {a=b=0} (PDF pp.3,6).
  • siftingProbability: Pr[S], the sifting probability (PDF pp.3,6).
  • aliceMass: The two unnormalized Alice masses sigma and nu in (15a,b) (PDF p.6).
  • acceptedLaw: Input pair law conditioned on S, used only when acceptance is positive (PDF p.6).
  • aliceMarginal: Alice's marginal of any binary pair law (PDF pp.6,8).
  • hardyStatistics: The signed Hardy specialization of (12), in order h1,h2,h3,h4 (PDF p.5).
  • noisyHardy: Visibility family (13); eta=0 is white noise and eta=1 is ideal (PDF p.5).
  • guessLaw: The accepted joint law of Alice's bit A and the fixed Eve guess G (PDF p.8). p0,p1 are accepted-round group masses; zero-mass groups contribute zero.
  • balanceRetention: Independent bit-dependent retention kernel in VI B (PDF p.8).
  • retention: Probability of retention in a normalized pair law (PDF p.8).
  • retainedLaw: Pair law conditioned on the public keep flag; the old fixed guess is unchanged (PDF p.8). It is used only when the retention probability is positive.
  • pairEntropy: Shannon entropy in bits of a finite pair law; zero terms have 0 log 0 = 0 (PDF pp.6,8).
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_Ensemble

/-!
Statements from arXiv:1308.6447v3. Binary labels use false = 0, true = 1.
A behavior is evaluated in the order (Alice input, Bob input, Alice output, Bob output).
Only the algebraic results pinned by the source are stated. Operational security claims
and cited background are inventoried in HARD.md and GAPS.json.
-/

namespace QAlgorithms.Papers.Independent.Intakethird100.P47

open scoped ComplexConjugate
open scoped BigOperators

/-- Binary conditional probabilities p(a,b|A,B), with inputs first (PDF pp.2,5). -/
abbrev Behavior := Bool → Bool → Bool → Bool → ℝ

/-- A nonnegative normalized binary conditional distribution (PDF pp.2,5). -/
def IsBehavior (p : Behavior) : Prop :=
  (∀ A B a b, 0 ≤ p A B a b) ∧ (∀ A B, ∑ a, ∑ b, p A B a b = 1)

/-- The bipartite Born behavior for two binary local POVMs in arbitrary finite dimensions
(PDF pp.3,5). The state and local effects are independent of the other party's input. -/
noncomputable def bipartitePOVMBehavior {dA dB : ℕ}
    (rho : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ)
    (M : Bool → Bool → Matrix (Fin dA) (Fin dA) ℂ)
    (N : Bool → Bool → Matrix (Fin dB) (Fin dB) ℂ) : Behavior :=
  fun A B a b => effectProb (Matrix.kronecker (M A a) (N B b)) rho

/-- A finite-dimensional quantum realization of the entire binary behavior (PDF pp.3,5).
All dimensions are allowed; one shared density and two local binary POVMs produce every
input/output probability. No Hardy, purity, product-state or uniqueness premise is built in. -/
def HasFiniteQuantumRealization (p : Behavior) : Prop :=
  ∃ (dA dB : ℕ)
    (rho : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ)
    (M : Bool → Bool → Matrix (Fin dA) (Fin dA) ℂ)
    (N : Bool → Bool → Matrix (Fin dB) (Fin dB) ℂ),
    IsDensityMatrix rho ∧ (∀ A, IsPOVM (M A)) ∧ (∀ B, IsPOVM (N B)) ∧
      p = bipartitePOVMBehavior rho M N

/-- A binary pair law; also used for the accepted key and fixed Eve guess (PDF pp.4,8). -/
abbrev PairLaw := Bool → Bool → ℝ

/-- A nonnegative normalized pair law (PDF pp.4,8). -/
def IsPairLaw (w : PairLaw) : Prop :=
  (∀ A B, 0 ≤ w A B) ∧ (∑ A, ∑ B, w A B = 1)

/-- Noncommuting local rank-one bases of (3); party false is Alice (PDF p.3). -/
structure HardyParameters where
  alpha : Bool → ℂ
  beta : Bool → ℂ
  normalized : ∀ P, ‖alpha P‖ ^ 2 + ‖beta P‖ ^ 2 = 1
  alpha_pos : ∀ P, 0 < ‖alpha P‖
  alpha_lt_one : ∀ P, ‖alpha P‖ < 1

/-- The two local measurement bases, including the conjugates and minus in (3) (PDF p.3). -/
noncomputable def localKet (d : HardyParameters) (P X a : Bool) :
    EuclideanSpace ℂ Bool :=
  if X then
    if a then conj (d.beta P) • ket false - conj (d.alpha P) • ket true
    else d.alpha P • ket false + d.beta P • ket true
  else ket a

/-- The four ordered product vectors of (2) (PDF pp.2–3). -/
noncomputable def hardyPhi (d : HardyParameters) : Fin 4 → EuclideanSpace ℂ (Bool × Bool) :=
  ![tensorVec (localKet d false true true) (localKet d true true true),
    tensorVec (ket false) (localKet d true true false),
    tensorVec (localKet d false true false) (ket false),
    tensorVec (ket false) (ket false)]

/-- The Gram–Schmidt residual in (4), with the inner product linear in its second slot (PDF p.3). -/
noncomputable def gsResidual (us : List (EuclideanSpace ℂ (Bool × Bool)))
    (v : EuclideanSpace ℂ (Bool × Bool)) : EuclideanSpace ℂ (Bool × Bool) :=
  v - (us.map (fun u => (inner ℂ u v) • u)).sum

/-- The squared denominator of (4); used only for the source's unit input vectors (PDF p.3). -/
noncomputable def gsDenominatorSq (us : List (EuclideanSpace ℂ (Bool × Bool)))
    (v : EuclideanSpace ℂ (Bool × Bool)) : ℝ :=
  1 - (us.map (fun u => ‖inner ℂ u v‖ ^ 2)).sum

/-- One normalized step of (4); strict denominator positivity is a conclusion below (PDF p.3). -/
noncomputable def gsStep (us : List (EuclideanSpace ℂ (Bool × Bool)))
    (v : EuclideanSpace ℂ (Bool × Bool)) : EuclideanSpace ℂ (Bool × Bool) :=
  ((Real.sqrt (gsDenominatorSq us v) : ℂ)⁻¹) • gsResidual us v

/-- The explicitly constructed four vectors of (4), not an arbitrary Hardy witness (PDF p.3). -/
noncomputable def hardyGS (d : HardyParameters) : Fin 4 → EuclideanSpace ℂ (Bool × Bool) :=
  let v0 := hardyPhi d 0
  let v1 := gsStep [v0] (hardyPhi d 1)
  let v2 := gsStep [v0, v1] (hardyPhi d 2)
  let v3 := gsStep [v0, v1, v2] (hardyPhi d 3)
  ![v0, v1, v2, v3]

/-- The source's Hardy state is the last constructed Gram–Schmidt vector (PDF p.3). -/
noncomputable def psiH (d : HardyParameters) : EuclideanSpace ℂ (Bool × Bool) :=
  hardyGS d 3

/-- The forbidden-event span S of II A (PDF p.3). -/
noncomputable def hardySpan (d : HardyParameters) :
    Submodule ℂ (EuclideanSpace ℂ (Bool × Bool)) :=
  Submodule.span ℂ (Set.range (fun i : Fin 3 => hardyPhi d (Fin.castSucc i)))

/-- The Born probabilities for the specific two-qubit projective bases (3) (PDF pp.2–3).
Projectors are constructed from the local vectors; the input/output order is explicit. -/
noncomputable def hardyBehavior (d : HardyParameters)
    (rho : Matrix (Bool × Bool) (Bool × Bool) ℂ) : Behavior :=
  fun A B a b => effectProb
    (pureDensity (tensorVec (localKet d false A a) (localKet d true B b))) rho

/-- All four Hardy conditions (1), including strictly positive success (PDF p.2). -/
def HardyConditions (p : Behavior) : Prop :=
  0 < p false false false false ∧ p true false false false = 0 ∧
    p false true false false = 0 ∧ p true true true true = 0

/-- The product setting law (5), with each parameter the probability of input zero (PDF p.4). -/
def binarySettingLaw (pA pB : ℝ) : PairLaw :=
  fun A B => (if A then 1 - pA else pA) * (if B then 1 - pB else pB)

/-- The four independently signed biases in III; true selects plus epsilon (PDF p.4). -/
def biasedInput (pA pB epsilon : ℝ) (e : Bool × Bool) : PairLaw :=
  binarySettingLaw (pA + (if e.1 then epsilon else -epsilon))
    (pB + (if e.2 then epsilon else -epsilon))

/-- Joint probability of the input pair and the event S = {a=b=0} (PDF pp.3,6). -/
def acceptedMass (p : Behavior) (w : PairLaw) : PairLaw :=
  fun A B => w A B * p A B false false

/-- Pr[S], the sifting probability (PDF pp.3,6). -/
noncomputable def siftingProbability (p : Behavior) (w : PairLaw) : ℝ :=
  ∑ A, ∑ B, acceptedMass p w A B

/-- The two unnormalized Alice masses sigma and nu in (15a,b) (PDF p.6). -/
noncomputable def aliceMass (p : Behavior) (w : PairLaw) (A : Bool) : ℝ :=
  ∑ B, acceptedMass p w A B

/-- Input pair law conditioned on S, used only when acceptance is positive (PDF p.6). -/
noncomputable def acceptedLaw (p : Behavior) (w : PairLaw) : PairLaw :=
  fun A B => acceptedMass p w A B / siftingProbability p w

/-- Alice's marginal of any binary pair law (PDF pp.6,8). -/
noncomputable def aliceMarginal (j : PairLaw) (A : Bool) : ℝ := ∑ B, j A B

/-- The signed Hardy specialization of (12), in order h1,h2,h3,h4 (PDF p.5). -/
def hardyStatistics (p : Behavior) : Fin 4 → ℝ :=
  ![p false false false false, -p true false false false,
    -p false true false false, -p true true true true]

/-- Visibility family (13); eta=0 is white noise and eta=1 is ideal (PDF p.5). -/
noncomputable def noisyHardy (d : HardyParameters) (eta : ℝ) :
    Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (((1 - eta) / 4 : ℝ) : ℂ) • (1 : Matrix (Bool × Bool) (Bool × Bool) ℂ) +
    (eta : ℂ) • pureDensity (psiH d)

/-- The accepted joint law of Alice's bit A and the fixed Eve guess G (PDF p.8).
p0,p1 are accepted-round group masses; zero-mass groups contribute zero. -/
def guessLaw (p0 p1 P0 P1 : ℝ) : PairLaw :=
  fun A G => if G then (if A then p1 * P1 else p1 * (1 - P1))
    else (if A then p0 * (1 - P0) else p0 * P0)

/-- Independent bit-dependent retention kernel in VI B (PDF p.8). -/
noncomputable def balanceRetention (j : PairLaw) (A : Bool) : ℝ :=
  min (aliceMarginal j false) (aliceMarginal j true) / aliceMarginal j A

/-- Probability of retention in a normalized pair law (PDF p.8). -/
noncomputable def retention (j : PairLaw) (k : Bool → ℝ) : ℝ :=
  ∑ A, ∑ B, j A B * k A

/-- Pair law conditioned on the public keep flag; the old fixed guess is unchanged (PDF p.8).
It is used only when the retention probability is positive. -/
noncomputable def retainedLaw (j : PairLaw) (k : Bool → ℝ) : PairLaw :=
  fun A B => j A B * k A / retention j k

/-- Shannon entropy in bits of a finite pair law; zero terms have 0 log 0 = 0 (PDF pp.6,8). -/
noncomputable def pairEntropy (j : PairLaw) : ℝ :=
  -(∑ A, ∑ B, j A B * (Real.log (j A B) / Real.log 2))

/-! Sanity examples pin definitions and conventions; no headline proofs are supplied. -/

example : IsBehavior (fun _ _ _ _ => 1 / 4) := by
  norm_num [IsBehavior]

/-- A zero input matrix produces zero Born mass, rather than a normalized law. -/
example {dA dB : ℕ}
    (M : Bool → Bool → Matrix (Fin dA) (Fin dA) ℂ)
    (N : Bool → Bool → Matrix (Fin dB) (Fin dB) ℂ) :
    bipartitePOVMBehavior (0 : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ) M N =
      (fun _ _ _ _ => 0) := by
  funext A B a b
  simp [bipartitePOVMBehavior, effectProb]

/-- A normalized one-dimensional system with identity effects has unit (0,0) mass. -/
example :
    bipartitePOVMBehavior (1 : Matrix (Fin 1 × Fin 1) (Fin 1 × Fin 1) ℂ)
      (fun _ a => if a then 0 else 1) (fun _ b => if b then 0 else 1)
      false false false false = 1 := by
  norm_num [bipartitePOVMBehavior, effectProb, Matrix.kronecker,
    Matrix.kroneckerMap, Matrix.trace, Matrix.mul_apply]

/-- Supplying one normalized state and local POVMs certifies their computed behavior. -/
example {dA dB : ℕ}
    (rho : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ)
    (M : Bool → Bool → Matrix (Fin dA) (Fin dA) ℂ)
    (N : Bool → Bool → Matrix (Fin dB) (Fin dB) ℂ)
    (hrho : IsDensityMatrix rho) (hM : ∀ A, IsPOVM (M A)) (hN : ∀ B, IsPOVM (N B)) :
    HasFiniteQuantumRealization (bipartitePOVMBehavior rho M N) := by
  exact ⟨dA, dB, rho, M, N, hrho, hM, hN, rfl⟩

example : IsPairLaw (fun _ _ => 1 / 4) := by
  norm_num [IsPairLaw]

example (d : HardyParameters) (P a : Bool) : localKet d P false a = ket a := by
  rfl

example (d : HardyParameters) :
    localKet d false true true =
      conj (d.beta false) • ket false - conj (d.alpha false) • ket true := by
  rfl

example (d : HardyParameters) : hardyPhi d 3 = tensorVec (ket false) (ket false) := by
  rfl

example (v : EuclideanSpace ℂ (Bool × Bool)) :
    gsResidual [] v = v ∧ gsDenominatorSq [] v = 1 := by
  simp [gsResidual, gsDenominatorSq]

example (v : EuclideanSpace ℂ (Bool × Bool)) : gsStep [] v = v := by
  simp [gsStep, gsDenominatorSq, gsResidual]

example (d : HardyParameters) : hardyGS d 0 = hardyPhi d 0 ∧ psiH d = hardyGS d 3 := by
  exact ⟨rfl, rfl⟩

example (d : HardyParameters) : hardyPhi d 0 ∈ hardySpan d := by
  exact Submodule.subset_span ⟨(0 : Fin 3), rfl⟩

example (d : HardyParameters) (rho : Matrix (Bool × Bool) (Bool × Bool) ℂ) :
    hardyBehavior d rho false false false false =
      effectProb (pureDensity (tensorVec (ket false) (ket false))) rho := by
  rfl

example : ¬ HardyConditions (fun _ _ _ _ => 0) := by
  simp [HardyConditions]

example : binarySettingLaw (1 / 2) (1 / 2) false true = 1 / 4 := by
  norm_num [binarySettingLaw]

example (pA pB : ℝ) (e : Bool × Bool) : biasedInput pA pB 0 e = binarySettingLaw pA pB := by
  simp [biasedInput]

example (p : Behavior) (w : PairLaw) :
    acceptedMass p w false true = w false true * p false true false false := by
  rfl

example (p : Behavior) (w : PairLaw) :
    siftingProbability p w = ∑ A, aliceMass p w A := by
  rfl

example (p : Behavior) (w : PairLaw) (A : Bool) :
    aliceMarginal (acceptedLaw p w) A =
      ∑ B, acceptedMass p w A B / siftingProbability p w := by
  rfl

example (p : Behavior) : hardyStatistics p 2 = -p false true false false := by
  rfl

example (d : HardyParameters) : noisyHardy d 1 = pureDensity (psiH d) := by
  simp [noisyHardy]

example (p0 p1 P0 P1 : ℝ) : guessLaw p0 p1 P0 P1 true false = p0 * (1 - P0) := by
  rfl

example (j : PairLaw) (A : Bool) : balanceRetention j A =
    min (aliceMarginal j false) (aliceMarginal j true) / aliceMarginal j A := by
  rfl

example (j : PairLaw) : retention j (fun _ => 0) = 0 := by
  simp [retention]

example (j : PairLaw) (k : Bool → ℝ) (A B : Bool) :
    retainedLaw j k A B = j A B * k A / retention j k := by
  rfl

example : pairEntropy (fun _ _ => 0) = 0 := by
  simp [pairEntropy]

end QAlgorithms.Papers.Independent.Intakethird100.P47
Source
Device-independent quantum key distribution based on measurement inputs, arXiv:1308.6447v3, https://arxiv.org/abs/1308.6447v3
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P47.Behavior

A behavior is an arbitrary real-valued function p(A,B,a,b)p(A,B,a,b)p(A,B,a,b) of four Boolean variables A,B,a,b∈{false,true}A,B,a,b\in\{\mathrm{false},\mathrm{true}\}A,B,a,b∈{false,true}. This type imposes no positivity or normalization conditions.

QAlgorithms.Papers.Independent.Intakethird100.P47.HardyConditions

For any real-valued function ppp of four Boolean arguments, HardyConditions⁡(p)\operatorname{HardyConditions}(p)HardyConditions(p) means exactly

p(0,0,0,0)>0,p(1,0,0,0)=0,p(0,1,0,0)=0,p(1,1,1,1)=0,p(0,0,0,0)>0,\qquad p(1,0,0,0)=0,\qquad p(0,1,0,0)=0,\qquad p(1,1,1,1)=0,p(0,0,0,0)>0,p(1,0,0,0)=0,p(0,1,0,0)=0,p(1,1,1,1)=0,

where 000 denotes false and 111 denotes true. No nonnegativity or normalization requirements on the other values of ppp are included.

QAlgorithms.Papers.Independent.Intakethird100.P47.HardyParameters

A set of Hardy parameters consists of two functions α,β:{false,true}→C\alpha,\beta:\{\mathrm{false},\mathrm{true}\}\to\mathbb Cα,β:{false,true}→C, together with the requirements that, for each Boolean PPP,

∣αP∣2+∣βP∣2=1,0<∣αP∣<1.|\alpha_P|^2+|\beta_P|^2=1, \qquad 0<|\alpha_P|<1.∣αP​∣2+∣βP​∣2=1,0<∣αP​∣<1.

QAlgorithms.Papers.Independent.Intakethird100.P47.HasFiniteQuantumRealization

For any real-valued function p(A,B,a,b)p(A,B,a,b)p(A,B,a,b) of four Boolean arguments, this property means that there exist natural numbers dA,dBd_A,d_BdA​,dB​, a complex matrix ρ\rhoρ on the product of the two corresponding index sets, and complex matrix families MA,aM_{A,a}MA,a​ and NB,bN_{B,b}NB,b​ of sizes dA×dAd_A\times d_AdA​×dA​ and dB×dBd_B\times d_BdB​×dB​, respectively, such that ρ\rhoρ is positive semidefinite with tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, every MA,aM_{A,a}MA,a​ and NB,bN_{B,b}NB,b​ is positive semidefinite, and

∑a∈{0,1}MA,a=IdA,∑b∈{0,1}NB,b=IdB,p(A,B,a,b)=Re⁡tr⁡ ⁣((MA,a⊗NB,b)ρ)\sum_{a\in\{0,1\}}M_{A,a}=I_{d_A},\qquad \sum_{b\in\{0,1\}}N_{B,b}=I_{d_B},\qquad p(A,B,a,b)=\operatorname{Re}\operatorname{tr}\!\bigl((M_{A,a}\otimes N_{B,b})\rho\bigr)a∈{0,1}∑​MA,a​=IdA​​,b∈{0,1}∑​NB,b​=IdB​​,p(A,B,a,b)=Retr((MA,a​⊗NB,b​)ρ)

for every choice of Boolean arguments, with false represented by 000 and true by 111. The existential quantifiers allow zero dimensions, but either dimension being zero makes the trace-one requirement impossible.

QAlgorithms.Papers.Independent.Intakethird100.P47.IsBehavior

For a real-valued function p(A,B,a,b)p(A,B,a,b)p(A,B,a,b) of four Boolean variables, being a behavior satisfying this predicate means that p(A,B,a,b)≥0p(A,B,a,b)\geq 0p(A,B,a,b)≥0 for every A,B,a,bA,B,a,bA,B,a,b, and that, for every fixed A,BA,BA,B,

∑a∈{false,true}∑b∈{false,true}p(A,B,a,b)=1.\sum_{a\in\{\mathrm{false},\mathrm{true}\}} \sum_{b\in\{\mathrm{false},\mathrm{true}\}}p(A,B,a,b)=1.a∈{false,true}∑​b∈{false,true}∑​p(A,B,a,b)=1.

QAlgorithms.Papers.Independent.Intakethird100.P47.IsPairLaw

For a real-valued function w(A,B)w(A,B)w(A,B) of two Boolean variables, this predicate means that w(A,B)≥0w(A,B)\geq 0w(A,B)≥0 for every A,BA,BA,B, and that

∑A∈{false,true}∑B∈{false,true}w(A,B)=1.\sum_{A\in\{\mathrm{false},\mathrm{true}\}} \sum_{B\in\{\mathrm{false},\mathrm{true}\}}w(A,B)=1.A∈{false,true}∑​B∈{false,true}∑​w(A,B)=1.

QAlgorithms.Papers.Independent.Intakethird100.P47.PairLaw

A pair law is an arbitrary real-valued function w(A,B)w(A,B)w(A,B) of two Boolean variables A,B∈{false,true}A,B\in\{\mathrm{false},\mathrm{true}\}A,B∈{false,true}. This type imposes no positivity or normalization conditions.

QAlgorithms.Papers.Independent.Intakethird100.P47.acceptedLaw

For any real-valued function ppp of four Boolean arguments and any real-valued function www on Boolean pairs, acceptedLaw⁡(p,w)\operatorname{acceptedLaw}(p,w)acceptedLaw(p,w) is the function

acceptedLaw⁡(p,w)(A,B)=w(A,B) p(A,B,false,false)∑C∈{false,true}∑D∈{false,true}w(C,D) p(C,D,false,false).\operatorname{acceptedLaw}(p,w)(A,B)= \frac{w(A,B)\,p(A,B,\mathrm{false},\mathrm{false})} {\displaystyle\sum_{C\in\{\mathrm{false},\mathrm{true}\}} \sum_{D\in\{\mathrm{false},\mathrm{true}\}} w(C,D)\,p(C,D,\mathrm{false},\mathrm{false})}.acceptedLaw(p,w)(A,B)=C∈{false,true}∑​D∈{false,true}∑​w(C,D)p(C,D,false,false)w(A,B)p(A,B,false,false)​.

No positivity or normalization hypotheses are imposed, and the denominator need not be nonzero; if it is zero, real division by zero makes every entry of this function zero.

QAlgorithms.Papers.Independent.Intakethird100.P47.acceptedMass

For any real-valued function ppp of four Boolean arguments and any real-valued function www on Boolean pairs, acceptedMass⁡(p,w)\operatorname{acceptedMass}(p,w)acceptedMass(p,w) is the function on Boolean pairs defined by

acceptedMass⁡(p,w)(A,B)=w(A,B) p(A,B,false,false).\operatorname{acceptedMass}(p,w)(A,B)=w(A,B)\,p(A,B,\mathrm{false},\mathrm{false}).acceptedMass(p,w)(A,B)=w(A,B)p(A,B,false,false).

Neither function is assumed to be nonnegative or normalized.

QAlgorithms.Papers.Independent.Intakethird100.P47.aliceMarginal

For any real-valued function jjj on Boolean pairs and any Boolean AAA, aliceMarginal⁡(j,A)\operatorname{aliceMarginal}(j,A)aliceMarginal(j,A) is the real number

aliceMarginal⁡(j,A)=j(A,false)+j(A,true).\operatorname{aliceMarginal}(j,A)=j(A,\mathrm{false})+j(A,\mathrm{true}).aliceMarginal(j,A)=j(A,false)+j(A,true).

The function jjj is not assumed to be nonnegative or normalized.

QAlgorithms.Papers.Independent.Intakethird100.P47.aliceMass

For any real-valued function ppp of four Boolean arguments, any real-valued function www on Boolean pairs, and any Boolean AAA, define

aliceMass⁡(p,w,A)=∑B∈{false,true}w(A,B) p(A,B,false,false).\operatorname{aliceMass}(p,w,A)= \sum_{B\in\{\mathrm{false},\mathrm{true}\}} w(A,B)\,p(A,B,\mathrm{false},\mathrm{false}).aliceMass(p,w,A)=B∈{false,true}∑​w(A,B)p(A,B,false,false).

There are no nonnegativity or normalization assumptions on either function.

QAlgorithms.Papers.Independent.Intakethird100.P47.balanceRetention

For any function j:{0,1}2→Rj:\{0,1\}^2\to\mathbb Rj:{0,1}2→R and Boolean AAA, where 000 denotes false and 111 denotes true, define mA=j(A,0)+j(A,1)m_A=j(A,0)+j(A,1)mA​=j(A,0)+j(A,1). This definition assigns

min⁡(m0,m1)mA\frac{\min(m_0,m_1)}{m_A}mA​min(m0​,m1​)​

to AAA. No nonnegativity, normalization, or positivity assumption is imposed on jjj or its row sums. Division is total: if mA=0m_A=0mA​=0, the assigned value is 000.

QAlgorithms.Papers.Independent.Intakethird100.P47.biasedInput

For arbitrary real numbers pA,pB,ϵp_A,p_B,\epsilonpA​,pB​,ϵ and any Boolean pair e=(eA,eB)e=(e_A,e_B)e=(eA​,eB​), let qA=pA+ϵq_A=p_A+\epsilonqA​=pA​+ϵ if eAe_AeA​ is true and qA=pA−ϵq_A=p_A-\epsilonqA​=pA​−ϵ otherwise, and let qB=pB+ϵq_B=p_B+\epsilonqB​=pB​+ϵ if eBe_BeB​ is true and qB=pB−ϵq_B=p_B-\epsilonqB​=pB​−ϵ otherwise. Then biasedInput⁡(pA,pB,ϵ,e)\operatorname{biasedInput}(p_A,p_B,\epsilon,e)biasedInput(pA​,pB​,ϵ,e) is the real-valued function

w(A,B)={1−qA,A=true,qA,A=false  ⋅  {1−qB,B=true,qB,B=false.w(A,B)= \begin{cases}1-q_A,&A=\mathrm{true},\\q_A,&A=\mathrm{false}\end{cases} \;\cdot\; \begin{cases}1-q_B,&B=\mathrm{true},\\q_B,&B=\mathrm{false}.\end{cases}w(A,B)={1−qA​,qA​,​A=true,A=false​⋅{1−qB​,qB​,​B=true,B=false.​

There are no restrictions on the three real parameters or on whether qA,qBq_A,q_BqA​,qB​ lie in [0,1][0,1][0,1].

QAlgorithms.Papers.Independent.Intakethird100.P47.binarySettingLaw

For arbitrary real numbers pA,pBp_A,p_BpA​,pB​, binarySettingLaw⁡(pA,pB)\operatorname{binarySettingLaw}(p_A,p_B)binarySettingLaw(pA​,pB​) is the real-valued function on Boolean pairs given, with 0=false0=\mathrm{false}0=false and 1=true1=\mathrm{true}1=true, by

w(0,0)=pApB,w(0,1)=pA(1−pB),w(1,0)=(1−pA)pB,w(1,1)=(1−pA)(1−pB).w(0,0)=p_Ap_B,\quad w(0,1)=p_A(1-p_B),\quad w(1,0)=(1-p_A)p_B,\quad w(1,1)=(1-p_A)(1-p_B).w(0,0)=pA​pB​,w(0,1)=pA​(1−pB​),w(1,0)=(1−pA​)pB​,w(1,1)=(1−pA​)(1−pB​).

The parameters are not restricted to [0,1][0,1][0,1], so its entries are not required to be nonnegative.

QAlgorithms.Papers.Independent.Intakethird100.P47.bipartitePOVMBehavior

For any natural numbers dA,dBd_A,d_BdA​,dB​, any complex matrix ρ\rhoρ indexed by {0,…,dA−1}×{0,…,dB−1}\{0,\ldots,d_A-1\}\times\{0,\ldots,d_B-1\}{0,…,dA​−1}×{0,…,dB​−1}, and any families of complex matrices MA,aM_{A,a}MA,a​ of size dA×dAd_A\times d_AdA​×dA​ and NB,bN_{B,b}NB,b​ of size dB×dBd_B\times d_BdB​×dB​, where A,B,a,b∈{0,1}A,B,a,b\in\{0,1\}A,B,a,b∈{0,1} represent the Boolean values false and true, this definition assigns the real-valued function

p(A,B,a,b)=Re⁡tr⁡ ⁣((MA,a⊗NB,b)ρ).p(A,B,a,b)=\operatorname{Re}\operatorname{tr}\!\bigl((M_{A,a}\otimes N_{B,b})\rho\bigr).p(A,B,a,b)=Retr((MA,a​⊗NB,b​)ρ).

There are no positivity, trace, or normalization assumptions on these matrices. Either dimension may be zero; in that case the trace is an empty sum and every value of ppp is zero.

QAlgorithms.Papers.Independent.Intakethird100.P47.gsDenominatorSq

For any finite list of vectors u1,…,uru_1,\ldots,u_ru1​,…,ur​ and any vector vvv in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2, this definition returns the real number

1−∑j=1r∣⟨uj,v⟩∣2,⟨u,v⟩=∑a,b∈{false,true}u(a,b)‾ v(a,b).1-\sum_{j=1}^{r}|\langle u_j,v\rangle|^2, \qquad \langle u,v\rangle=\sum_{a,b\in\{\mathrm{false},\mathrm{true}\}} \overline{u(a,b)}\,v(a,b).1−j=1∑r​∣⟨uj​,v⟩∣2,⟨u,v⟩=a,b∈{false,true}∑​u(a,b)​v(a,b).

No normalization or orthogonality is assumed, so this number need not be nonnegative; repeated list entries contribute separately, and an empty list gives 111.

QAlgorithms.Papers.Independent.Intakethird100.P47.gsResidual

For any finite list of vectors u1,…,uru_1,\ldots,u_ru1​,…,ur​ and any vector vvv in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2, this definition returns

v−∑j=1r⟨uj,v⟩uj,⟨u,v⟩=∑a,b∈{false,true}u(a,b)‾ v(a,b).v-\sum_{j=1}^{r}\langle u_j,v\rangle u_j, \qquad \langle u,v\rangle=\sum_{a,b\in\{\mathrm{false},\mathrm{true}\}} \overline{u(a,b)}\,v(a,b).v−j=1∑r​⟨uj​,v⟩uj​,⟨u,v⟩=a,b∈{false,true}∑​u(a,b)​v(a,b).

There are no normalization or orthogonality hypotheses on the vectors; repeated list entries contribute separately, and an empty list gives the result vvv.

QAlgorithms.Papers.Independent.Intakethird100.P47.gsStep

For any finite list of vectors u1,…,uru_1,\ldots,u_ru1​,…,ur​ and any vector vvv in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2, this definition returns

( 1−∑j=1r∣⟨uj,v⟩∣2 )−1(v−∑j=1r⟨uj,v⟩uj),⟨u,v⟩=∑a,b∈{false,true}u(a,b)‾ v(a,b).\left(\sqrt{\,1-\sum_{j=1}^{r}|\langle u_j,v\rangle|^2\,}\right)^{-1} \left(v-\sum_{j=1}^{r}\langle u_j,v\rangle u_j\right), \qquad \langle u,v\rangle=\sum_{a,b\in\{\mathrm{false},\mathrm{true}\}} \overline{u(a,b)}\,v(a,b).(1−j=1∑r​∣⟨uj​,v⟩∣2​)−1(v−j=1∑r​⟨uj​,v⟩uj​),⟨u,v⟩=a,b∈{false,true}∑​u(a,b)​v(a,b).

The real square root is regarded as a complex scalar before taking its inverse. No normalization or orthogonality is assumed; repeated list entries contribute separately. For an empty list the result is vvv. If the expression under the square root is nonpositive, its real square root is 000, whose inverse is defined to be 000, so the result is the zero vector.

QAlgorithms.Papers.Independent.Intakethird100.P47.guessLaw

For arbitrary real numbers p0,p1,P0,P1p_0,p_1,P_0,P_1p0​,p1​,P0​,P1​, this defines a real-valued function jjj on two Boolean arguments A,GA,GA,G. Writing 000 for false and 111 for true, its four values are

j(0,0)=p0P0,j(1,0)=p0(1−P0),j(0,1)=p1(1−P1),j(1,1)=p1P1.j(0,0)=p_0P_0,\qquad j(1,0)=p_0(1-P_0),\qquad j(0,1)=p_1(1-P_1),\qquad j(1,1)=p_1P_1.j(0,0)=p0​P0​,j(1,0)=p0​(1−P0​),j(0,1)=p1​(1−P1​),j(1,1)=p1​P1​.

There are no hypotheses restricting the four parameters, so nonnegativity and normalization are not required.

QAlgorithms.Papers.Independent.Intakethird100.P47.hardyBehavior

For parameters d=(αP,βP)P∈{0,1}d=(\alpha_P,\beta_P)_{P\in\{0,1\}}d=(αP​,βP​)P∈{0,1}​ satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1 for each PPP, and any complex matrix ρ\rhoρ whose rows and columns are indexed by {0,1}2\{0,1\}^2{0,1}2, define local vectors

ℓP,X,a={ea,X=0,αPe0+βPe1,X=1, a=0,βP‾e0−αP‾e1,X=1, a=1,\ell_{P,X,a}= \begin{cases} e_a,&X=0,\\ \alpha_Pe_0+\beta_Pe_1,&X=1,\ a=0,\\ \overline{\beta_P}e_0-\overline{\alpha_P}e_1,&X=1,\ a=1, \end{cases}ℓP,X,a​=⎩⎨⎧​ea​,αP​e0​+βP​e1​,βP​​e0​−αP​​e1​,​X=0,X=1, a=0,X=1, a=1,​

where 000 denotes false, 111 denotes true, and e0,e1e_0,e_1e0​,e1​ are coordinate unit vectors. The real-valued function hardyBehavior⁡(d,ρ)\operatorname{hardyBehavior}(d,\rho)hardyBehavior(d,ρ) on four Boolean arguments is

hardyBehavior⁡(d,ρ)(A,B,a,b)=Re⁡tr⁡ ⁣((vv∗)ρ),v=ℓ0,A,a⊗ℓ1,B,b,\operatorname{hardyBehavior}(d,\rho)(A,B,a,b) =\operatorname{Re}\operatorname{tr}\!\left((vv^*)\rho\right), \qquad v=\ell_{0,A,a}\otimes\ell_{1,B,b},hardyBehavior(d,ρ)(A,B,a,b)=Retr((vv∗)ρ),v=ℓ0,A,a​⊗ℓ1,B,b​,

where vr,s=(ℓ0,A,a)r(ℓ1,B,b)sv_{r,s}=(\ell_{0,A,a})_r(\ell_{1,B,b})_svr,s​=(ℓ0,A,a​)r​(ℓ1,B,b​)s​ and (vv∗)z,z′=vzvz′‾(vv^*)_{z,z'}=v_z\overline{v_{z'}}(vv∗)z,z′​=vz​vz′​​. No positivity, trace, or Hermitian assumption is imposed on ρ\rhoρ, and no nonnegativity or normalization condition is imposed separately on the resulting function.

QAlgorithms.Papers.Independent.Intakethird100.P47.hardyGS

Given complex coefficients αP,βP\alpha_P,\beta_PαP​,βP​ for each Boolean PPP, satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1, let ece_cec​ be the Boolean coordinate vector and let (u⊗w)(a,b)=u(a)w(b)(u\otimes w)(a,b)=u(a)w(b)(u⊗w)(a,b)=u(a)w(b). Define

ϕ0=(βfalse‾efalse−αfalse‾etrue)⊗(βtrue‾efalse−αtrue‾etrue),ϕ1=efalse⊗(αtrueefalse+βtrueetrue),ϕ2=(αfalseefalse+βfalseetrue)⊗efalse,ϕ3=efalse⊗efalse.\begin{aligned} \phi_0&=(\overline{\beta_{\mathrm{false}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{false}}}e_{\mathrm{true}}) \otimes(\overline{\beta_{\mathrm{true}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{true}}}e_{\mathrm{true}}),\\ \phi_1&=e_{\mathrm{false}}\otimes (\alpha_{\mathrm{true}}e_{\mathrm{false}}+\beta_{\mathrm{true}}e_{\mathrm{true}}),\\ \phi_2&=(\alpha_{\mathrm{false}}e_{\mathrm{false}}+\beta_{\mathrm{false}}e_{\mathrm{true}}) \otimes e_{\mathrm{false}},\\ \phi_3&=e_{\mathrm{false}}\otimes e_{\mathrm{false}}. \end{aligned}ϕ0​ϕ1​ϕ2​ϕ3​​=(βfalse​​efalse​−αfalse​​etrue​)⊗(βtrue​​efalse​−αtrue​​etrue​),=efalse​⊗(αtrue​efalse​+βtrue​etrue​),=(αfalse​efalse​+βfalse​etrue​)⊗efalse​,=efalse​⊗efalse​.​

This definition returns the indexed family (v0,v1,v2,v3)(v_0,v_1,v_2,v_3)(v0​,v1​,v2​,v3​) in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2 obtained by setting v0=ϕ0v_0=\phi_0v0​=ϕ0​ and, successively for r=1,2,3r=1,2,3r=1,2,3, setting

vr=( 1−∑j=0r−1∣⟨vj,ϕr⟩∣2 )−1(ϕr−∑j=0r−1⟨vj,ϕr⟩vj),⟨u,w⟩=∑a,bu(a,b)‾ w(a,b).v_r= \left(\sqrt{\,1-\sum_{j=0}^{r-1}|\langle v_j,\phi_r\rangle|^2\,}\right)^{-1} \left(\phi_r-\sum_{j=0}^{r-1}\langle v_j,\phi_r\rangle v_j\right), \qquad \langle u,w\rangle=\sum_{a,b}\overline{u(a,b)}\,w(a,b).vr​=​1−j=0∑r−1​∣⟨vj​,ϕr​⟩∣2​​−1(ϕr​−j=0∑r−1​⟨vj​,ϕr​⟩vj​),⟨u,w⟩=a,b∑​u(a,b)​w(a,b).

Both inner-product indices range over the Booleans. Each reciprocal is taken in C\mathbb CC after embedding the real square root; a nonpositive expression under a square root gives square root 000 and reciprocal 000.

QAlgorithms.Papers.Independent.Intakethird100.P47.hardyPhi

Given complex coefficients αP,βP\alpha_P,\beta_PαP​,βP​ for each Boolean PPP, satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1, this definition returns the four vectors ϕ0,ϕ1,ϕ2,ϕ3\phi_0,\phi_1,\phi_2,\phi_3ϕ0​,ϕ1​,ϕ2​,ϕ3​ in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2:

ϕ0=(βfalse‾efalse−αfalse‾etrue)⊗(βtrue‾efalse−αtrue‾etrue),ϕ1=efalse⊗(αtrueefalse+βtrueetrue),ϕ2=(αfalseefalse+βfalseetrue)⊗efalse,ϕ3=efalse⊗efalse.\begin{aligned} \phi_0&= (\overline{\beta_{\mathrm{false}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{false}}}e_{\mathrm{true}}) \otimes (\overline{\beta_{\mathrm{true}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{true}}}e_{\mathrm{true}}),\\ \phi_1&=e_{\mathrm{false}}\otimes (\alpha_{\mathrm{true}}e_{\mathrm{false}}+\beta_{\mathrm{true}}e_{\mathrm{true}}),\\ \phi_2&=(\alpha_{\mathrm{false}}e_{\mathrm{false}}+\beta_{\mathrm{false}}e_{\mathrm{true}}) \otimes e_{\mathrm{false}},\\ \phi_3&=e_{\mathrm{false}}\otimes e_{\mathrm{false}}. \end{aligned}ϕ0​ϕ1​ϕ2​ϕ3​​=(βfalse​​efalse​−αfalse​​etrue​)⊗(βtrue​​efalse​−αtrue​​etrue​),=efalse​⊗(αtrue​efalse​+βtrue​etrue​),=(αfalse​efalse​+βfalse​etrue​)⊗efalse​,=efalse​⊗efalse​.​

Here ece_cec​ is the coordinate vector at Boolean ccc, and the tensor notation means (u⊗v)(a,b)=u(a)v(b)(u\otimes v)(a,b)=u(a)v(b)(u⊗v)(a,b)=u(a)v(b); the four indices are 0,1,2,30,1,2,30,1,2,3.

QAlgorithms.Papers.Independent.Intakethird100.P47.hardySpan

For parameters ddd consisting of complex numbers αP,βP\alpha_P,\beta_PαP​,βP​, indexed by P∈{0,1}P\in\{0,1\}P∈{0,1} (where 000 denotes false and 111 denotes true), satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1 for each PPP, define sP=αPe0+βPe1s_P=\alpha_P e_0+\beta_P e_1sP​=αP​e0​+βP​e1​ and tP=βP‾e0−αP‾e1t_P=\overline{\beta_P}e_0-\overline{\alpha_P}e_1tP​=βP​​e0​−αP​​e1​, where e0,e1e_0,e_1e0​,e1​ are the coordinate unit vectors in C{0,1}\mathbb C^{\{0,1\}}C{0,1}. Then hardySpan⁡(d)\operatorname{hardySpan}(d)hardySpan(d) is the complex linear subspace of C{0,1}×{0,1}\mathbb C^{\{0,1\}\times\{0,1\}}C{0,1}×{0,1} spanned by the three vectors t0⊗t1t_0\otimes t_1t0​⊗t1​, e0⊗s1e_0\otimes s_1e0​⊗s1​, and s0⊗e0s_0\otimes e_0s0​⊗e0​, with tensor coordinates (u⊗v)a,b=uavb(u\otimes v)_{a,b}=u_a v_b(u⊗v)a,b​=ua​vb​.

QAlgorithms.Papers.Independent.Intakethird100.P47.hardyStatistics

For any real-valued function ppp of four Boolean arguments, hardyStatistics⁡(p)\operatorname{hardyStatistics}(p)hardyStatistics(p) is the function on the four indices 0,1,2,30,1,2,30,1,2,3 with ordered values

(p(0,0,0,0), −p(1,0,0,0), −p(0,1,0,0), −p(1,1,1,1)),\bigl( p(0,0,0,0),\ -p(1,0,0,0),\ -p(0,1,0,0),\ -p(1,1,1,1) \bigr),(p(0,0,0,0), −p(1,0,0,0), −p(0,1,0,0), −p(1,1,1,1)),

where Boolean 000 denotes false and Boolean 111 denotes true. No positivity, normalization, or additional equations are assumed for ppp.

QAlgorithms.Papers.Independent.Intakethird100.P47.localKet

Given complex coefficients αP,βP\alpha_P,\beta_PαP​,βP​ for each Boolean PPP, satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1, and Boolean arguments P,X,aP,X,aP,X,a, this definition returns the vector in C{false,true}\mathbb C^{\{\mathrm{false},\mathrm{true}\}}C{false,true} given by

{ea,X=false,αPefalse+βPetrue,X=true, a=false,βP‾efalse−αP‾etrue,X=true, a=true,\begin{cases} e_a,&X=\mathrm{false},\\ \alpha_P e_{\mathrm{false}}+\beta_P e_{\mathrm{true}}, &X=\mathrm{true},\ a=\mathrm{false},\\ \overline{\beta_P}e_{\mathrm{false}}-\overline{\alpha_P}e_{\mathrm{true}}, &X=\mathrm{true},\ a=\mathrm{true}, \end{cases}⎩⎨⎧​ea​,αP​efalse​+βP​etrue​,βP​​efalse​−αP​​etrue​,​X=false,X=true, a=false,X=true, a=true,​

where ece_cec​ has coordinate 111 at ccc and 000 at the other Boolean coordinate.

QAlgorithms.Papers.Independent.Intakethird100.P47.noisyHardy

For parameters d=(αP,βP)P∈{0,1}d=(\alpha_P,\beta_P)_{P\in\{0,1\}}d=(αP​,βP​)P∈{0,1}​ satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1 for each PPP, and any real number η\etaη, define sP=αPe0+βPe1s_P=\alpha_Pe_0+\beta_Pe_1sP​=αP​e0​+βP​e1​ and tP=βP‾e0−αP‾e1t_P=\overline{\beta_P}e_0-\overline{\alpha_P}e_1tP​=βP​​e0​−αP​​e1​, where 0=false0=\mathrm{false}0=false, 1=true1=\mathrm{true}1=true, and e0,e1e_0,e_1e0​,e1​ are coordinate unit vectors. In C{0,1}2\mathbb C^{\{0,1\}^2}C{0,1}2, whose tensor coordinates satisfy (u⊗v)a,b=uavb(u\otimes v)_{a,b}=u_av_b(u⊗v)a,b​=ua​vb​, set ϕ0=t0⊗t1\phi_0=t_0\otimes t_1ϕ0​=t0​⊗t1​, ϕ1=e0⊗s1\phi_1=e_0\otimes s_1ϕ1​=e0​⊗s1​, ϕ2=s0⊗e0\phi_2=s_0\otimes e_0ϕ2​=s0​⊗e0​, and ϕ3=e0⊗e0\phi_3=e_0\otimes e_0ϕ3​=e0​⊗e0​; define v0=ϕ0v_0=\phi_0v0​=ϕ0​ and, for j=1,2,3j=1,2,3j=1,2,3, recursively define

vj=( 1−∑r=0j−1∣⟨vr,ϕj⟩∣2 )−1(ϕj−∑r=0j−1⟨vr,ϕj⟩vr),⟨u,v⟩=∑zuz‾vz.v_j= \left(\sqrt{\,1-\sum_{r=0}^{j-1}|\langle v_r,\phi_j\rangle|^2\,}\right)^{-1} \left(\phi_j-\sum_{r=0}^{j-1}\langle v_r,\phi_j\rangle v_r\right), \qquad \langle u,v\rangle=\sum_z\overline{u_z}v_z.vj​=​1−r=0∑j−1​∣⟨vr​,ϕj​⟩∣2​​−1(ϕj​−r=0∑j−1​⟨vr​,ϕj​⟩vr​),⟨u,v⟩=z∑​uz​​vz​.

Here the square root is the real square root, embedded into C\mathbb CC before inversion; the real square root is zero for a nonpositive argument, and the inverse of zero is zero. Then noisyHardy⁡(d,η)\operatorname{noisyHardy}(d,\eta)noisyHardy(d,η) is the complex matrix indexed by Boolean pairs given by

noisyHardy⁡(d,η)=1−η4I4+η v3v3∗,(v3v3∗)z,z′=(v3)z(v3)z′‾.\operatorname{noisyHardy}(d,\eta) =\frac{1-\eta}{4}I_4+\eta\,v_3v_3^*, \qquad (v_3v_3^*)_{z,z'}=(v_3)_z\overline{(v_3)_{z'}}.noisyHardy(d,η)=41−η​I4​+ηv3​v3∗​,(v3​v3∗​)z,z′​=(v3​)z​(v3​)z′​​.

The parameter η\etaη is unrestricted and need not lie in [0,1][0,1][0,1].

QAlgorithms.Papers.Independent.Intakethird100.P47.pairEntropy

For any real-valued function jjj on Boolean pairs, this defines

−∑A∈{0,1}∑B∈{0,1}j(A,B)log⁡(j(A,B))log⁡2,-\sum_{A\in\{0,1\}}\sum_{B\in\{0,1\}} j(A,B)\frac{\log(j(A,B))}{\log 2},−A∈{0,1}∑​B∈{0,1}∑​j(A,B)log2log(j(A,B))​,

where 000 denotes false and 111 true. No nonnegativity or normalization is required. The real logarithm used here is total: log⁡0=0\log 0=0log0=0, and for negative inputs log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣; in particular, an entry equal to zero contributes zero.

QAlgorithms.Papers.Independent.Intakethird100.P47.psiH

Given complex coefficients αP,βP\alpha_P,\beta_PαP​,βP​ for each Boolean PPP, satisfying ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1, let ece_cec​ be the Boolean coordinate vector and let (u⊗w)(a,b)=u(a)w(b)(u\otimes w)(a,b)=u(a)w(b)(u⊗w)(a,b)=u(a)w(b). Form

ϕ0=(βfalse‾efalse−αfalse‾etrue)⊗(βtrue‾efalse−αtrue‾etrue),ϕ1=efalse⊗(αtrueefalse+βtrueetrue),ϕ2=(αfalseefalse+βfalseetrue)⊗efalse,ϕ3=efalse⊗efalse.\begin{aligned} \phi_0&=(\overline{\beta_{\mathrm{false}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{false}}}e_{\mathrm{true}}) \otimes(\overline{\beta_{\mathrm{true}}}e_{\mathrm{false}} -\overline{\alpha_{\mathrm{true}}}e_{\mathrm{true}}),\\ \phi_1&=e_{\mathrm{false}}\otimes (\alpha_{\mathrm{true}}e_{\mathrm{false}}+\beta_{\mathrm{true}}e_{\mathrm{true}}),\\ \phi_2&=(\alpha_{\mathrm{false}}e_{\mathrm{false}}+\beta_{\mathrm{false}}e_{\mathrm{true}}) \otimes e_{\mathrm{false}},\\ \phi_3&=e_{\mathrm{false}}\otimes e_{\mathrm{false}}. \end{aligned}ϕ0​ϕ1​ϕ2​ϕ3​​=(βfalse​​efalse​−αfalse​​etrue​)⊗(βtrue​​efalse​−αtrue​​etrue​),=efalse​⊗(αtrue​efalse​+βtrue​etrue​),=(αfalse​efalse​+βfalse​etrue​)⊗efalse​,=efalse​⊗efalse​.​

Set v0=ϕ0v_0=\phi_0v0​=ϕ0​ and, successively for r=1,2,3r=1,2,3r=1,2,3, set

vr=( 1−∑j=0r−1∣⟨vj,ϕr⟩∣2 )−1(ϕr−∑j=0r−1⟨vj,ϕr⟩vj),⟨u,w⟩=∑a,b∈{false,true}u(a,b)‾ w(a,b).v_r= \left(\sqrt{\,1-\sum_{j=0}^{r-1}|\langle v_j,\phi_r\rangle|^2\,}\right)^{-1} \left(\phi_r-\sum_{j=0}^{r-1}\langle v_j,\phi_r\rangle v_j\right), \qquad \langle u,w\rangle=\sum_{a,b\in\{\mathrm{false},\mathrm{true}\}} \overline{u(a,b)}\,w(a,b).vr​=​1−j=0∑r−1​∣⟨vj​,ϕr​⟩∣2​​−1(ϕr​−j=0∑r−1​⟨vj​,ϕr​⟩vj​),⟨u,w⟩=a,b∈{false,true}∑​u(a,b)​w(a,b).

This definition returns v3v_3v3​ in C{false,true}2\mathbb C^{\{\mathrm{false},\mathrm{true}\}^2}C{false,true}2. Each reciprocal is taken in C\mathbb CC after embedding the real square root; a nonpositive expression under a square root gives square root 000 and reciprocal 000.

QAlgorithms.Papers.Independent.Intakethird100.P47.retainedLaw

For arbitrary functions j:{0,1}2→Rj:\{0,1\}^2\to\mathbb Rj:{0,1}2→R and k:{0,1}→Rk:\{0,1\}\to\mathbb Rk:{0,1}→R, this defines a new function on Boolean pairs by

jret(A,B)=j(A,B)k(A)∑C∈{0,1}∑D∈{0,1}j(C,D)k(C).j_{\mathrm{ret}}(A,B)= \frac{j(A,B)k(A)} {\displaystyle\sum_{C\in\{0,1\}}\sum_{D\in\{0,1\}}j(C,D)k(C)}.jret​(A,B)=C∈{0,1}∑​D∈{0,1}∑​j(C,D)k(C)j(A,B)k(A)​.

Here 000 and 111 denote false and true. There are no sign, normalization, or nonzero-denominator assumptions; if the denominator vanishes, every value of the resulting function is 000.

QAlgorithms.Papers.Independent.Intakethird100.P47.retention

For arbitrary functions j:{0,1}2→Rj:\{0,1\}^2\to\mathbb Rj:{0,1}2→R and k:{0,1}→Rk:\{0,1\}\to\mathbb Rk:{0,1}→R, with 000 denoting false and 111 true, this defines the real number

∑A∈{0,1}∑B∈{0,1}j(A,B)k(A)=(j(0,0)+j(0,1))k(0)+(j(1,0)+j(1,1))k(1).\sum_{A\in\{0,1\}}\sum_{B\in\{0,1\}}j(A,B)k(A) =\bigl(j(0,0)+j(0,1)\bigr)k(0)+\bigl(j(1,0)+j(1,1)\bigr)k(1).A∈{0,1}∑​B∈{0,1}∑​j(A,B)k(A)=(j(0,0)+j(0,1))k(0)+(j(1,0)+j(1,1))k(1).

Neither function is subject to any sign, normalization, or range restriction.

QAlgorithms.Papers.Independent.Intakethird100.P47.siftingProbability

For any real-valued function ppp of four Boolean arguments and any real-valued function www on Boolean pairs, the real number siftingProbability⁡(p,w)\operatorname{siftingProbability}(p,w)siftingProbability(p,w) is

∑A∈{false,true}∑B∈{false,true}w(A,B) p(A,B,false,false).\sum_{A\in\{\mathrm{false},\mathrm{true}\}} \sum_{B\in\{\mathrm{false},\mathrm{true}\}} w(A,B)\,p(A,B,\mathrm{false},\mathrm{false}).A∈{false,true}∑​B∈{false,true}∑​w(A,B)p(A,B,false,false).

No nonnegativity or normalization assumptions are imposed on ppp or www, and the definition does not require this number to lie in [0,1][0,1][0,1].

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