Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Towards practical and fast Quantum Cryptography

Definition
QAlgorithms_Papers_Independent_Intakethird100_P33

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

prove2quantum

The objects the formalized statements of Towards practical and fast Quantum Cryptography (arXiv:quant-ph/0411022) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • dataState: PDF p.2, (4)-(5): perfect blocking and a common zero phase, after attenuation. False is logical zero, with the occupied early bin.
  • OpticalPOVM: PDF p.2, II.B: reuse the accepted full-Fock finite-outcome POVM. Positive finite coefficient forms and their identity sum make every effect a bounded positive contraction on the full oscillator Hilbert space.
  • Unambiguous: PDF p.2: outcomes 0,1 are conclusive; outcome 2 is inconclusive.
  • discriminationSuccess: PDF pp.2-3: success averaged over the two equal conditional bit priors.
  • countingOutcome: PDF p.2: number counting, with vacuum and double-occupied sectors assigned inconclusive. The latter sector has zero weight on both source bit states.
  • monitoringOutput: PDF p.2, (6)-(7): the coherent output at the selected interference time. The other times of the delayed interferometer are not identified with these modes.
  • opticalClick: PDF p.2: ideal threshold click in one monitoring output, without dark counts.
  • sourceOccupation: PDF pp.1-3: source symbols 0,1,2 mean logical 0, logical 1, and decoy. The Bool coordinate is false for the early bin and true for the late bin.
  • substitutedWord: PDF p.3, II.D: the actual normalized number-basis vector after substitution.
  • splitCoefficients: PDF pp.4-5, Fig.2: vacuum splitting on all number sectors. The output is indexed by Bob's two occupations and Eve's two occupations, in that order. The accepted vacuumAmplitude supplies the normalized multinomial coefficients; its NNReal port weights agree with t and 1-t on the theorem's domain.
  • splitState: PDF pp.4-5: full Hilbert-space splitting. The theorem concludes Memℓp, normalization, and every coefficient, excluding the total fallback on source inputs.
  • splitBobDensity: PDF p.5, (15): Bob's reduced density after basic splitting.
  • eveReadout: PDF pp.4-5: Eve's ideal time-bin readout, with no claim of information optimality. No-click and double-occupied sectors have no conclusive bit label.
  • eveClickProbability: PDF pp.4-5: exact ideal conclusive click probability from the retained state.
  • bobDistribution: PDF p.5, (15): Bob's finite data readout, including independent trusted noise. K depends only on Bob's photon counts, never on Eve's result.
  • aliceBobJoint: PDF p.5: uniform nondecoy Alice bit jointly with Bob's readout.
  • clickJoint: PDF p.5, (15): actual joint distribution of Bob's output and Eve's inferred bit conditional on her click. Defined from the full split Born law, not by the claimed conditional independence. The theorem guards the denominator.
  • ratePolynomial: PDF p.5, (16): only the displayed polynomial, not an exact secure key rate.
  • trainDensity: PDF pp.1-3: the full product coherent source density in n two-bin blocks.
  • resendWeight: PDF p.5, III.C.2: ideal detection followed by a localized single-photon resend. Each nonvacuum input detection is replaced by |1>, not by the incident coherent pulse.
  • interceptResend: PDF p.5, Fig.3: the resulting localized-number mixture on the full train.
  • boundaryLeft: PDF pp.5-6, Fig.3: the earlier source block of cross-boundary pair k.
  • boundaryRight: PDF pp.5-6, Fig.3: the later source block of cross-boundary pair k.
  • boundaryTotal: PDF pp.5-6: one nondemolition TOTAL-number measurement on the late/early pair. This does not measure the individual occupations.
  • crossCounting: PDF pp.5-6, Fig.3 and endnote [13]: all successive disjoint cross-boundary pairs are counted. Only coherences between different total-number outcomes are removed. Unpaired outer endpoint bins are left untouched.
  • numberTerm: PDF p.2, II.C: mean input photon number, only used with summability certified.
  • coherenceTerm: PDF pp.2,5-6: the normally ordered coherence <a_i^dagger a_j>. The guard on p_j prevents truncated subtraction from creating a vacuum term.
  • FinitePairMoments: PDF pp.2,5-6: convergence of the means and cross term used by the monitor.
  • monitorFlux: PDF p.2, (6)-(7): intrinsic mean output flux at the selected interference slot. The divisor 4 is the square of the amplitude divisor 2.
  • opticalVisibility: PDF pp.5-6, (21),(23): intrinsic optical contrast, used only at positive summed flux. It is not a raw dark-count click fraction.
  • printedSignal: PDF p.7, endnote [6]: the eight signal coefficients in the PRINTED table. Pattern order is 00,01,10,11; the two port columns are DM1,DM2.
  • printedCount: PDF pp.4,7: first-order table count, not an exact coherent click law.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_RealLabelRegisters
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P34
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P39
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier18_P14
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P48
import Definitions.Def_QAlgorithms_Papers_Independent_Next46_P32

/-!
Gisin et al., arXiv:quant-ph/0411022v1. Full number bases, no photon cutoff.
The exact optical assertions and the displayed polynomial calculation are separate
from the operational security claims deferred in HARD.md. Photon flux visibility
is intrinsic optical contrast, with no dark-count contribution. Equal conditional
bit priors apply after decoy removal. Compilation is pending the batch handoff.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P33

open scoped BigOperators ENNReal
open QAlgorithms.RealRegisters (Hilbert)
open QAlgorithms.Papers.Independent.Dependency50.P33 (IsDensity rankOne)
open QAlgorithms.Papers.Independent.Dependency50.P39 (coherentCoefficient)
open QAlgorithms.Papers.Independent.Support50.P48 (vacuumAmplitude)
open QAlgorithms.Papers.Independent.Next46.P32 (FockPOVM realFockTracePair)
open QAlgorithms.Papers.Independent.Dependency50.P34
  (TwoModeFock fockKet photonMean)
open QAlgorithms.Papers.Independent.Frontier18.P14
  (coherentPair coherentPairCoefficients)

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

/-- PDF p.2, (4)-(5): perfect blocking and a common zero phase, after attenuation.
False is logical zero, with the occupied early bin. -/
def dataState (x : ℝ) (bit : Bool) : TwoModeFock :=
  if bit then coherentPair 0 (Real.sqrt x : ℂ)
  else coherentPair (Real.sqrt x : ℂ) 0

/-- PDF p.2, II.B: reuse the accepted full-Fock finite-outcome POVM.
Positive finite coefficient forms and their identity sum make every effect a
bounded positive contraction on the full oscillator Hilbert space. -/
abbrev OpticalPOVM (O : Type) [Fintype O] := FockPOVM (ℕ × ℕ) O

/-- PDF p.2: outcomes 0,1 are conclusive; outcome 2 is inconclusive. -/
def Unambiguous (M : OpticalPOVM (Fin 3)) (x : ℝ) : Prop :=
  realFockTracePair (rankOne (dataState x false)) (M.effect 1) = 0 ∧ realFockTracePair (rankOne (dataState x true)) (M.effect 0) = 0

/-- PDF pp.2-3: success averaged over the two equal conditional bit priors. -/
def discriminationSuccess (M : OpticalPOVM (Fin 3)) (x : ℝ) : ℝ :=
  (realFockTracePair (rankOne (dataState x false)) (M.effect 0) + realFockTracePair (rankOne (dataState x true)) (M.effect 1)) / 2

/-- PDF p.2: number counting, with vacuum and double-occupied sectors assigned
inconclusive. The latter sector has zero weight on both source bit states. -/
def countingOutcome (nm : ℕ × ℕ) : Fin 3 :=
  if 0 < nm.1 ∧ nm.2 = 0 then 0
  else if nm.1 = 0 ∧ 0 < nm.2 then 1 else 2

example : countingOutcome (0, 0) = 2 := by simp [countingOutcome]

example : countingOutcome (1, 0) = 0 := by simp [countingOutcome]

/-- PDF p.2, (6)-(7): the coherent output at the selected interference time.
The other times of the delayed interferometer are not identified with these modes. -/
def monitoringOutput (a b : ℂ) : TwoModeFock :=
  coherentPair (Complex.I * (a + b) / 2) ((-a + b) / 2)

/-- PDF p.2: ideal threshold click in one monitoring output, without dark counts. -/
def opticalClick (v : TwoModeFock) (port : Fin 2) : ℝ :=
  ∑' nm : ℕ × ℕ,
    if 0 < (if port = 0 then nm.1 else nm.2) then Complex.normSq (v nm) else 0

/-- PDF pp.1-3: source symbols 0,1,2 mean logical 0, logical 1, and decoy.
The Bool coordinate is false for the early bin and true for the late bin. -/
def sourceOccupation {n : ℕ} (w : Fin n → Fin 3) (j : Fin n × Bool) : ℕ :=
  if w j.1 = 0 then (if j.2 then 0 else 1)
  else if w j.1 = 1 then (if j.2 then 1 else 0) else 1

/-- PDF p.3, II.D: the actual normalized number-basis vector after substitution. -/
def substitutedWord {n : ℕ} (w : Fin n → Fin 3) : Hilbert ((Fin n × Bool) → ℕ) :=
  lp.single 2 (sourceOccupation w) 1

example : sourceOccupation (fun _ : Fin 1 => (0 : Fin 3)) (0, false) = 1 := by
  simp [sourceOccupation]

example : sourceOccupation (fun _ : Fin 1 => (0 : Fin 3)) (0, true) = 0 := by
  simp [sourceOccupation]

/-- PDF pp.4-5, Fig.2: vacuum splitting on all number sectors. The output is
indexed by Bob's two occupations and Eve's two occupations, in that order.
The accepted vacuumAmplitude supplies the normalized multinomial coefficients;
its NNReal port weights agree with t and 1-t on the theorem's domain. -/
def splitCoefficients (t : ℝ) (v : TwoModeFock)
    (z : (ℕ × ℕ) × (ℕ × ℕ)) : ℂ :=
  v (z.1.1 + z.2.1, z.1.2 + z.2.2) *
    (vacuumAmplitude (fun b : Bool => Real.toNNReal (if b then 1 - t else t))
      (fun b : Bool => if b then z.2.1 else z.1.1) (z.1.1 + z.2.1) : ℂ) *
    (vacuumAmplitude (fun b : Bool => Real.toNNReal (if b then 1 - t else t))
      (fun b : Bool => if b then z.2.2 else z.1.2) (z.1.2 + z.2.2) : ℂ)

/-- PDF pp.4-5: full Hilbert-space splitting. The theorem concludes Memℓp,
normalization, and every coefficient, excluding the total fallback on source inputs. -/
def splitState (t : ℝ) (v : TwoModeFock) : Hilbert ((ℕ × ℕ) × (ℕ × ℕ)) :=
  if h : Memℓp (splitCoefficients t v) 2 then ⟨splitCoefficients t v, h⟩ else 0

/-- PDF p.5, (15): Bob's reduced density after basic splitting. -/
def splitBobDensity (t : ℝ) (v : TwoModeFock) : Matrix (ℕ × ℕ) (ℕ × ℕ) ℂ :=
  fun p q => ∑' e : ℕ × ℕ, splitState t v (p, e) * star (splitState t v (q, e))

/-- PDF pp.4-5: Eve's ideal time-bin readout, with no claim of information
optimality. No-click and double-occupied sectors have no conclusive bit label. -/
def eveReadout (nm : ℕ × ℕ) : Option Bool :=
  if 0 < nm.1 ∧ nm.2 = 0 then some false
  else if nm.1 = 0 ∧ 0 < nm.2 then some true else none

/-- PDF pp.4-5: exact ideal conclusive click probability from the retained state. -/
def eveClickProbability (mu t : ℝ) : ℝ :=
  ∑' e : ℕ × ℕ, if eveReadout e = some false then
    Complex.normSq (dataState (mu * (1 - t)) false e) else 0

/-- PDF p.5, (15): Bob's finite data readout, including independent trusted noise.
K depends only on Bob's photon counts, never on Eve's result. -/
def bobDistribution {O : Type} (K : (ℕ × ℕ) → O → ℝ)
    (mu t : ℝ) (bit : Bool) (o : O) : ℝ :=
  ∑' p : ℕ × ℕ, Complex.normSq (dataState (mu * t) bit p) * K p o

/-- PDF p.5: uniform nondecoy Alice bit jointly with Bob's readout. -/
def aliceBobJoint {O : Type} (K : (ℕ × ℕ) → O → ℝ)
    (mu t : ℝ) (o : O) (bit : Bool) : ℝ := bobDistribution K mu t bit o / 2

/-- PDF p.5, (15): actual joint distribution of Bob's output and Eve's inferred
bit conditional on her click. Defined from the full split Born law, not by the
claimed conditional independence. The theorem guards the denominator. -/
def clickJoint {O : Type} (K : (ℕ × ℕ) → O → ℝ)
    (mu t : ℝ) (o : O) (e : Bool) : ℝ :=
  (∑ bit : Bool, ∑' z : (ℕ × ℕ) × (ℕ × ℕ),
    if eveReadout z.2 = some e then
      Complex.normSq (splitState t (dataState mu bit) z) * K z.1 o else 0) /
    (2 * eveClickProbability mu t)

example : eveReadout (0, 0) = none := by simp [eveReadout]

example : splitCoefficients 1 (fockKet 1 0) ((1, 0), (0, 0)) = 1 := by
  norm_num [splitCoefficients, vacuumAmplitude, fockKet]

/-- PDF p.5, (16): only the displayed polynomial, not an exact secure key rate. -/
def ratePolynomial (t tB eta f mu : ℝ) : ℝ :=
  mu * t * tB * eta * (1 - f) * (1 - mu * (1 - t))

example (tB eta f mu : ℝ) : ratePolynomial 0 tB eta f mu = 0 := by
  simp [ratePolynomial]

/-- PDF pp.1-3: the full product coherent source density in n two-bin blocks. -/
def trainDensity {n : ℕ} (w : Fin n → Fin 3) (x : ℝ) :
    Matrix ((Fin n × Bool) → ℕ) ((Fin n × Bool) → ℕ) ℂ :=
  fun p q =>
    (∏ j : Fin n × Bool,
      coherentCoefficient (if sourceOccupation w j = 0 then 0 else (Real.sqrt x : ℂ)) (p j)) *
    star (∏ j : Fin n × Bool,
      coherentCoefficient (if sourceOccupation w j = 0 then 0 else (Real.sqrt x : ℂ)) (q j))

/-- PDF p.5, III.C.2: ideal detection followed by a localized single-photon resend.
Each nonvacuum input detection is replaced by |1>, not by the incident coherent pulse. -/
def resendWeight (x : ℝ) (occupied : Bool) (m : ℕ) : ℝ :=
  let z := if occupied then x else 0
  if m = 0 then Real.exp (-z) else if m = 1 then 1 - Real.exp (-z) else 0

/-- PDF p.5, Fig.3: the resulting localized-number mixture on the full train. -/
def interceptResend {n : ℕ} (w : Fin n → Fin 3) (x : ℝ) :
    Matrix ((Fin n × Bool) → ℕ) ((Fin n × Bool) → ℕ) ℂ :=
  fun p q => if p = q then
    (∏ j : Fin n × Bool, resendWeight x (decide (sourceOccupation w j = 1)) (p j) : ℝ)
    else 0

/-- PDF pp.5-6, Fig.3: the earlier source block of cross-boundary pair k. -/
def boundaryLeft {n : ℕ} (k : Fin (n - 1)) : Fin n := ⟨k.val, by omega⟩

/-- PDF pp.5-6, Fig.3: the later source block of cross-boundary pair k. -/
def boundaryRight {n : ℕ} (k : Fin (n - 1)) : Fin n := ⟨k.val + 1, by omega⟩

/-- PDF pp.5-6: one nondemolition TOTAL-number measurement on the late/early pair.
This does not measure the individual occupations. -/
def boundaryTotal {n : ℕ} (p : (Fin n × Bool) → ℕ) (k : Fin (n - 1)) : ℕ :=
  p (boundaryLeft k, true) + p (boundaryRight k, false)

/-- PDF pp.5-6, Fig.3 and endnote [13]: all successive disjoint cross-boundary
pairs are counted. Only coherences between different total-number outcomes are
removed. Unpaired outer endpoint bins are left untouched. -/
def crossCounting {n : ℕ} (w : Fin n → Fin 3) (x : ℝ) :
    Matrix ((Fin n × Bool) → ℕ) ((Fin n × Bool) → ℕ) ℂ :=
  fun p q => if ∀ k : Fin (n - 1), boundaryTotal p k = boundaryTotal q k then
    trainDensity w x p q else 0

/-- PDF p.2, II.C: mean input photon number, only used with summability certified. -/
def numberTerm {J : Type} (rho : Matrix (J → ℕ) (J → ℕ) ℂ) (i : J)
    (p : J → ℕ) : ℝ := (p i : ℝ) * (rho p p).re

/-- PDF pp.2,5-6: the normally ordered coherence <a_i^dagger a_j>.
The guard on p_j prevents truncated subtraction from creating a vacuum term. -/
def coherenceTerm {J : Type} [DecidableEq J]
    (rho : Matrix (J → ℕ) (J → ℕ) ℂ) (i j : J) (p : J → ℕ) : ℂ :=
  if i = j then (p i : ℂ) * rho p p else if p j = 0 then 0 else
    (Real.sqrt (((p i : ℝ) + 1) * (p j : ℝ)) : ℂ) *
      rho p (Function.update (Function.update p i (p i + 1)) j (p j - 1))

/-- PDF pp.2,5-6: convergence of the means and cross term used by the monitor. -/
def FinitePairMoments {J : Type} [DecidableEq J]
    (rho : Matrix (J → ℕ) (J → ℕ) ℂ) (i j : J) : Prop :=
  Summable (numberTerm rho i) ∧ Summable (numberTerm rho j) ∧
    Summable (coherenceTerm rho i j)

/-- PDF p.2, (6)-(7): intrinsic mean output flux at the selected interference
slot. The divisor 4 is the square of the amplitude divisor 2. -/
def monitorFlux {J : Type} [DecidableEq J]
    (rho : Matrix (J → ℕ) (J → ℕ) ℂ) (i j : J) (port : Fin 2) : ℝ :=
  ((∑' p, numberTerm rho i p) + (∑' p, numberTerm rho j p) +
    (if port = 0 then 2 else -2) * (∑' p, coherenceTerm rho i j p).re) / 4

/-- PDF pp.5-6, (21),(23): intrinsic optical contrast, used only at positive
summed flux. It is not a raw dark-count click fraction. -/
def opticalVisibility {J : Type} [DecidableEq J]
    (rho : Matrix (J → ℕ) (J → ℕ) ℂ) (i j : J) : ℝ :=
  (monitorFlux rho i j 0 - monitorFlux rho i j 1) /
    (monitorFlux rho i j 0 + monitorFlux rho i j 1)

example {n : ℕ} (w : Fin n → Fin 3) (x : ℝ) (p : (Fin n × Bool) → ℕ) :
    crossCounting w x p p = trainDensity w x p p := by simp [crossCounting]

example (x : ℝ) : resendWeight x false 1 = 0 := by simp [resendWeight]

/-- PDF p.7, endnote [6]: the eight signal coefficients in the PRINTED table.
Pattern order is 00,01,10,11; the two port columns are DM1,DM2. -/
def printedSignal (x : ℝ) (pattern : Fin 4) (port : Fin 2) : ℝ :=
  if pattern = 2 then (if port = 0 then x else 0)
  else if pattern = 1 then 0 else x / 4

/-- PDF pp.4,7: first-order table count, not an exact coherent click law. -/
def printedCount (x pd f : ℝ) (pattern : Fin 4) (port : Fin 2) : ℝ :=
  (printedSignal x pattern port + (1 - printedSignal x pattern port) * pd) * (1 - f) / 4

example (x : ℝ) : printedSignal x 0 0 = x / 4 := by simp [printedSignal]

/-! Definitional sanity checks. These do not prove any of the source results. -/

example (x : ℝ) : dataState x false = coherentPair (Real.sqrt x : ℂ) 0 := rfl

example (M : OpticalPOVM (Fin 3)) (x : ℝ) :
    Unambiguous M x ↔
      realFockTracePair (rankOne (dataState x false)) (M.effect 1) = 0 ∧ realFockTracePair (rankOne (dataState x true)) (M.effect 0) = 0 := Iff.rfl

example (M : OpticalPOVM (Fin 3)) (x : ℝ) :
    discriminationSuccess M x =
      (realFockTracePair (rankOne (dataState x false)) (M.effect 0) + realFockTracePair (rankOne (dataState x true)) (M.effect 1)) / 2 := rfl

example (a : ℂ) : monitoringOutput a a = coherentPair (Complex.I * (a + a) / 2) 0 := by
  simp [monitoringOutput]

example (port : Fin 2) : opticalClick 0 port = 0 := by simp [opticalClick]

example {n : ℕ} (w : Fin n → Fin 3) :
    substitutedWord w (sourceOccupation w) = 1 := by simp [substitutedWord]

example (t : ℝ) : splitState t 0 = 0 := by
  have h : splitCoefficients t 0 = 0 := by ext z; simp [splitCoefficients]
  unfold splitState
  split_ifs with hm
  · apply lp.ext
    funext z
    change splitCoefficients t 0 z = 0
    exact congrFun h z
  · rfl

example (t : ℝ) : splitBobDensity t 0 = 0 := by
  have h : splitState t 0 = 0 := by
    have hc : splitCoefficients t 0 = 0 := by ext z; simp [splitCoefficients]
    unfold splitState
    split_ifs with hm
    · apply lp.ext
      funext z
      change splitCoefficients t 0 z = 0
      exact congrFun hc z
    · rfl
  ext p q
  simp [splitBobDensity, h]

example {O : Type} (mu t : ℝ) (b : Bool) (o : O) :
    bobDistribution (fun (_ : ℕ × ℕ) (_ : O) => (0 : ℝ)) mu t b o = 0 := by
  simp [bobDistribution]

example {O : Type} [Fintype O] :
    QAlgorithms.mutualInfoBits (fun _ : O × Bool => 0) = 0 := by
  simp [QAlgorithms.mutualInfoBits]

example (x : ℝ) : resendWeight x true 2 = 0 := by simp [resendWeight]

example {n : ℕ} (k : Fin (n - 1)) : boundaryTotal (fun _ => 0) k = 0 := by
  simp [boundaryTotal]

example {J : Type} (i : J) (p : J → ℕ) :
    numberTerm (0 : Matrix (J → ℕ) (J → ℕ) ℂ) i p = 0 := by simp [numberTerm]

example {J : Type} [DecidableEq J] (i j : J) (p : J → ℕ) :
    coherenceTerm (0 : Matrix (J → ℕ) (J → ℕ) ℂ) i j p = 0 := by
  simp [coherenceTerm]

example {J : Type} [DecidableEq J] (i j : J) :
    FinitePairMoments (0 : Matrix (J → ℕ) (J → ℕ) ℂ) i j := by
  have hn (k : J) :
      numberTerm (0 : Matrix (J → ℕ) (J → ℕ) ℂ) k = (fun _ => 0) := by
    funext p
    simp [numberTerm]
  have hc : coherenceTerm (0 : Matrix (J → ℕ) (J → ℕ) ℂ) i j = (fun _ => 0) := by
    funext p
    simp [coherenceTerm]
  unfold FinitePairMoments
  rw [hn i, hn j, hc]
  exact ⟨summable_zero, summable_zero, summable_zero⟩

example (x pd : ℝ) (pattern : Fin 4) (port : Fin 2) :
    printedCount x pd 1 pattern port = 0 := by simp [printedCount]

end QAlgorithms.Papers.Independent.Intakethird100.P33
Source
Towards practical and fast Quantum Cryptography, arXiv:quant-ph/0411022v1, https://arxiv.org/abs/quant-ph/0411022v1
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P33.FinitePairMoments

For any type JJJ with decidable equality, any complex matrix ρ\rhoρ indexed by occupation configurations p:J→Np:J\to\mathbb Np:J→N, and any i,j∈Ji,j\in Ji,j∈J, this is the conjunction that each of the following three families, indexed by all such ppp, is summable:

p(i)Re⁡ρp,p,p(j)Re⁡ρp,p,{p(i)ρp,p,i=j,0,i≠j, p(j)=0,(p(i)+1)p(j) ρp,pi+,j−,i≠j, p(j)>0.p(i)\operatorname{Re}\rho_{p,p},\qquad p(j)\operatorname{Re}\rho_{p,p},\qquad \begin{cases} p(i)\rho_{p,p},&i=j,\\ 0,&i\ne j,\ p(j)=0,\\ \sqrt{(p(i)+1)p(j)}\,\rho_{p,p^{i+,j-}},&i\ne j,\ p(j)>0. \end{cases}p(i)Reρp,p​,p(j)Reρp,p​,⎩⎨⎧​p(i)ρp,p​,0,(p(i)+1)p(j)​ρp,pi+,j−​,​i=j,i=j, p(j)=0,i=j, p(j)>0.​

Here pi+,j−p^{i+,j-}pi+,j− changes the occupations at i,ji,ji,j to p(i)+1,p(j)−1p(i)+1,p(j)-1p(i)+1,p(j)−1, respectively, and leaves all others unchanged. The first two summability statements concern real families, and the third concerns a complex family. The indices i,ji,ji,j may coincide, and JJJ need not be finite or countable. The predicate does not require ρ\rhoρ to be positive or normalized.

QAlgorithms.Papers.Independent.Intakethird100.P33.OpticalPOVM

For any type OOO equipped with a finite enumeration, this abbreviates the type of families of complex kernels Eo:(N×N)2→CE_o:(\mathbb N\times\mathbb N)^2\to\mathbb CEo​:(N×N)2→C, indexed by o∈Oo\in Oo∈O, satisfying two requirements: for every ooo, every finite set S⊆N×NS\subseteq\mathbb N\times\mathbb NS⊆N×N, and every function z:N×N→Cz:\mathbb N\times\mathbb N\to\mathbb Cz:N×N→C, the quantity ∑a∈S∑b∈Sz(a)‾Eo(a,b)z(b)\sum_{a\in S}\sum_{b\in S}\overline{z(a)}E_o(a,b)z(b)∑a∈S​∑b∈S​z(a)​Eo​(a,b)z(b) has imaginary part 000 and nonnegative real part; and for all a,b∈N×Na,b\in\mathbb N\times\mathbb Na,b∈N×N, ∑o∈OEo(a,b)=δa,b\sum_{o\in O}E_o(a,b)=\delta_{a,b}∑o∈O​Eo​(a,b)=δa,b​. Here δa,b\delta_{a,b}δa,b​ is 111 when a=ba=ba=b and 000 otherwise. If OOO is empty, no such family exists, since the completeness requirement would give 0=10=10=1 on the diagonal.

QAlgorithms.Papers.Independent.Intakethird100.P33.Unambiguous

For every real xxx and every three-outcome family M=(E0,E1,E2)M=(E_0,E_1,E_2)M=(E0​,E1​,E2​) of complex kernels on N×N\mathbb N\times\mathbb NN×N, each positive on all finite quadratic forms and satisfying E0+E1+E2=IE_0+E_1+E_2=IE0​+E1​+E2​=I coefficientwise, this defines the conjunction

Re⁡ ⁣(∑p∈N2∑q∈N2d0(p)d0(q)‾E1(q,p))=0,Re⁡ ⁣(∑p∈N2∑q∈N2d1(p)d1(q)‾E0(q,p))=0.\operatorname{Re}\!\left(\sum_{p\in\mathbb N^2}\sum_{q\in\mathbb N^2}d_0(p)\overline{d_0(q)}E_1(q,p)\right)=0, \qquad \operatorname{Re}\!\left(\sum_{p\in\mathbb N^2}\sum_{q\in\mathbb N^2}d_1(p)\overline{d_1(q)}E_0(q,p)\right)=0.Re​p∈N2∑​q∈N2∑​d0​(p)d0​(q)​E1​(q,p)​=0,Re​p∈N2∑​q∈N2∑​d1​(p)d1​(q)​E0​(q,p)​=0.

Here s=xs=\sqrt{x}s=x​ is the real square root, cα(r)=e−∣α∣2/2αr/r!c_\alpha(r)=e^{-|\alpha|^2/2}\alpha^r/\sqrt{r!}cα​(r)=e−∣α∣2/2αr/r!​, and d0(m,n)=cs(m)c0(n)d_0(m,n)=c_s(m)c_0(n)d0​(m,n)=cs​(m)c0​(n) and d1(m,n)=c0(m)cs(n)d_1(m,n)=c_0(m)c_s(n)d1​(m,n)=c0​(m)cs​(n), with each coefficient function replaced by zero if it is not square summable. The displayed sums are iterated infinite sums in the indicated order. No restriction on xxx is imposed; for x≤0x\leq0x≤0, both d0d_0d0​ and d1d_1d1​ are the vacuum vector supported at (0,0)(0,0)(0,0).

QAlgorithms.Papers.Independent.Intakethird100.P33.aliceBobJoint

For any type OOO, any function K:N2×O→RK:\mathbb N^2\times O\to\mathbb RK:N2×O→R, arbitrary real μ,t\mu,tμ,t, o∈Oo\in Oo∈O, and a Boolean bbb, define c(a,r)=e−∣a∣2/2ar/r!c(a,r)=e^{-|a|^2/2}a^r/\sqrt{r!}c(a,r)=e−∣a∣2/2ar/r!​ and, with x=μtx=\mu tx=μt, define coefficients

dx,b(r,s)={c(0,r)c(x,s),b=true,c(x,r)c(0,s),b=false.d_{x,b}(r,s)= \begin{cases} c(0,r)c(\sqrt{x},s),&b=\mathrm{true},\\ c(\sqrt{x},r)c(0,s),&b=\mathrm{false}. \end{cases}dx,b​(r,s)={c(0,r)c(x​,s),c(x​,r)c(0,s),​b=true,b=false.​

Let Dx,bD_{x,b}Dx,b​ be this coefficient vector if it is square summable, and zero otherwise. The definition is

aliceBobJoint⁡(K,μ,t,o,b)=12∑p∈N2∣Dx,b(p)∣2K(p,o).\operatorname{aliceBobJoint}(K,\mu,t,o,b) =\frac12\sum_{p\in\mathbb N^2}|D_{x,b}(p)|^2K(p,o).aliceBobJoint(K,μ,t,o,b)=21​p∈N2∑​∣Dx,b​(p)∣2K(p,o).

Real square roots are embedded in C\mathbb CC, with x=0\sqrt{x}=0x​=0 when x<0x<0x<0. There are no positivity or normalization requirements on KKK, no restrictions on μ,t\mu,tμ,t, and no finiteness assumption on OOO; a nonsummable real series is assigned value 000.

QAlgorithms.Papers.Independent.Intakethird100.P33.bobDistribution

For any type OOO, any function K:N2×O→RK:\mathbb N^2\times O\to\mathbb RK:N2×O→R, arbitrary real μ,t\mu,tμ,t, a Boolean bbb, and o∈Oo\in Oo∈O, put x=μtx=\mu tx=μt and

c(a,r)=e−∣a∣2/2arr!,dx,b(r,s)={c(0,r)c(x,s),b=true,c(x,r)c(0,s),b=false.c(a,r)=\frac{e^{-|a|^2/2}a^r}{\sqrt{r!}},\qquad d_{x,b}(r,s)= \begin{cases} c(0,r)c(\sqrt{x},s),&b=\mathrm{true},\\ c(\sqrt{x},r)c(0,s),&b=\mathrm{false}. \end{cases}c(a,r)=r!​e−∣a∣2/2ar​,dx,b​(r,s)={c(0,r)c(x​,s),c(x​,r)c(0,s),​b=true,b=false.​

Here square roots of real numbers are embedded in C\mathbb CC. Let Dx,bD_{x,b}Dx,b​ have these coefficients when they are square summable, and be zero otherwise. The definition returns the real number

bobDistribution⁡(K,μ,t,b,o)=∑p∈N2∣Dx,b(p)∣2K(p,o).\operatorname{bobDistribution}(K,\mu,t,b,o) =\sum_{p\in\mathbb N^2}|D_{x,b}(p)|^2K(p,o).bobDistribution(K,μ,t,b,o)=p∈N2∑​∣Dx,b​(p)∣2K(p,o).

No positivity, normalization, or summability assumptions are imposed on KKK, and OOO need not be finite or nonempty. A nonsummable real series has value 000 under the infinite-sum convention used here. Negative xxx is allowed and has x=0\sqrt{x}=0x​=0.

QAlgorithms.Papers.Independent.Intakethird100.P33.boundaryLeft

For every natural number nnn and every integer index kkk satisfying 0≤k<n−10\le k<n-10≤k<n−1, where subtraction in N\mathbb NN is truncated at 000, this returns the index kkk in {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. For n=0n=0n=0 or n=1n=1n=1, the input index set is empty.

QAlgorithms.Papers.Independent.Intakethird100.P33.boundaryRight

For every natural number nnn and every integer index kkk satisfying 0≤k<n−10\le k<n-10≤k<n−1, where subtraction in N\mathbb NN is truncated at 000, this returns the index k+1k+1k+1 in {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. For n=0n=0n=0 or n=1n=1n=1, the input index set is empty.

QAlgorithms.Papers.Independent.Intakethird100.P33.boundaryTotal

For every natural number nnn, occupation function p:{0,…,n−1}×{false,true}→Np:\{0,\ldots,n-1\}\times\{\mathrm{false},\mathrm{true}\}\to\mathbb Np:{0,…,n−1}×{false,true}→N, and index kkk with 0≤k<n−10\le k<n-10≤k<n−1, this defines the natural number

boundaryTotal⁡(p,k)=p(k,true)+p(k+1,false).\operatorname{boundaryTotal}(p,k) =p(k,\mathrm{true})+p(k+1,\mathrm{false}).boundaryTotal(p,k)=p(k,true)+p(k+1,false).

Here n−1n-1n−1 uses truncated natural-number subtraction; for n=0n=0n=0 or n=1n=1n=1, there is no admissible kkk.

QAlgorithms.Papers.Independent.Intakethird100.P33.clickJoint

For any type OOO, any function K:N2×O→RK:\mathbb N^2\times O\to\mathbb RK:N2×O→R, arbitrary real μ,t\mu,tμ,t, o∈Oo\in Oo∈O, and a Boolean eee, define c(a,r)=e−∣a∣2/2ar/r!c(a,r)=e^{-|a|^2/2}a^r/\sqrt{r!}c(a,r)=e−∣a∣2/2ar/r!​ and let Dx,bD_{x,b}Dx,b​ be the square-summable vector with coefficients c(x,r)c(0,s)c(\sqrt{x},r)c(0,s)c(x​,r)c(0,s) for b=falseb=\mathrm{false}b=false and c(0,r)c(x,s)c(0,r)c(\sqrt{x},s)c(0,r)c(x​,s) for b=trueb=\mathrm{true}b=true, with the construction returning zero if the specified coefficients are not square summable. Set t+=max⁡(t,0)t_+=\max(t,0)t+​=max(t,0) and u+=max⁡(1−t,0)u_+=\max(1-t,0)u+​=max(1−t,0). For p=(p1,p2)p=(p_1,p_2)p=(p1​,p2​) and h=(h1,h2)h=(h_1,h_2)h=(h1​,h2​) in N2\mathbb N^2N2, define

vb(p,h)=Dμ,b(p1+h1,p2+h2)∏j=12(pj+hj)!pj! hj! (t+)pj(u+)hj,v_b(p,h)=D_{\mu,b}(p_1+h_1,p_2+h_2) \prod_{j=1}^{2} \sqrt{\frac{(p_j+h_j)!}{p_j!\,h_j!}}\, (\sqrt{t_+})^{p_j}(\sqrt{u_+})^{h_j},vb​(p,h)=Dμ,b​(p1​+h1​,p2​+h2​)j=1∏2​pj​!hj​!(pj​+hj​)!​​(t+​​)pj​(u+​​)hj​,

and let VbV_bVb​ have these coefficients if they are square summable, and be zero otherwise. Define Afalse={(r,0):r>0}A_{\mathrm{false}}=\{(r,0):r>0\}Afalse​={(r,0):r>0} and Atrue={(0,s):s>0}A_{\mathrm{true}}=\{(0,s):s>0\}Atrue​={(0,s):s>0}. Then the returned real number is

clickJoint⁡(K,μ,t,o,e)=∑b∈{false,true}∑p,h∈N21h∈Ae∣Vb(p,h)∣2K(p,o)2∑h∈Afalse∣Dμ(1−t),false(h)∣2.\operatorname{clickJoint}(K,\mu,t,o,e)= \frac{\displaystyle\sum_{b\in\{\mathrm{false},\mathrm{true}\}} \sum_{p,h\in\mathbb N^2} \mathbf1_{h\in A_e}|V_b(p,h)|^2K(p,o)} {\displaystyle 2\sum_{h\in A_{\mathrm{false}}} |D_{\mu(1-t),\mathrm{false}}(h)|^2}.clickJoint(K,μ,t,o,e)=2h∈Afalse​∑​∣Dμ(1−t),false​(h)∣2b∈{false,true}∑​p,h∈N2∑​1h∈Ae​​∣Vb​(p,h)∣2K(p,o)​.

All real amplitudes in these formulas are embedded in C\mathbb CC, and negative arguments of real square roots give 000. There are no probability or summability assumptions on KKK and no restrictions on μ,t\mu,tμ,t. Each nonsummable real series is assigned value 000; if the denominator is 000, the quotient is 000.

QAlgorithms.Papers.Independent.Intakethird100.P33.coherenceTerm

For any type JJJ with decidable equality, complex matrix ρ\rhoρ indexed by functions J→NJ\to\mathbb NJ→N, indices i,j∈Ji,j\in Ji,j∈J, and occupation configuration p:J→Np:J\to\mathbb Np:J→N, this defines the complex number

Cρ,i,j(p)={p(i)ρp,p,i=j,0,i≠j and p(j)=0,(p(i)+1)p(j) ρp,pi+,j−,i≠j and p(j)>0,C_{\rho,i,j}(p)= \begin{cases} p(i)\rho_{p,p},&i=j,\\ 0,&i\ne j\ \text{and }p(j)=0,\\ \sqrt{(p(i)+1)p(j)}\,\rho_{p,p^{i+,j-}}, &i\ne j\ \text{and }p(j)>0, \end{cases}Cρ,i,j​(p)=⎩⎨⎧​p(i)ρp,p​,0,(p(i)+1)p(j)​ρp,pi+,j−​,​i=j,i=j and p(j)=0,i=j and p(j)>0,​

where pi+,j−p^{i+,j-}pi+,j− agrees with ppp away from i,ji,ji,j, has value p(i)+1p(i)+1p(i)+1 at iii, and value p(j)−1p(j)-1p(j)−1 at jjj. The square-root factor is regarded as complex. The first branch takes precedence when i=ji=ji=j; the subtraction in the last branch occurs only when p(j)>0p(j)>0p(j)>0. No positivity, normalization, or summability condition on ρ\rhoρ, and no finiteness or countability condition on JJJ, is required.

QAlgorithms.Papers.Independent.Intakethird100.P33.countingOutcome

For every pair (m,n)∈N×N(m,n)\in\mathbb N\times\mathbb N(m,n)∈N×N, this defines an outcome in {0,1,2}\{0,1,2\}{0,1,2}: it is 000 when m>0m>0m>0 and n=0n=0n=0, it is 111 when m=0m=0m=0 and n>0n>0n>0, and it is 222 otherwise. Thus both (0,0)(0,0)(0,0) and every pair with both entries positive give outcome 222.

QAlgorithms.Papers.Independent.Intakethird100.P33.crossCounting

For every natural number nnn, word w:{0,…,n−1}→{0,1,2}w:\{0,\ldots,n-1\}\to\{0,1,2\}w:{0,…,n−1}→{0,1,2}, and real number xxx, this defines a complex matrix indexed by occupation configurations p,q:{0,…,n−1}×{false,true}→Np,q:\{0,\ldots,n-1\}\times\{\mathrm{false},\mathrm{true}\}\to\mathbb Np,q:{0,…,n−1}×{false,true}→N. Define sw(i,b)s_w(i,b)sw​(i,b) to be 111 for (wi,b)=(0,false)(w_i,b)=(0,\mathrm{false})(wi​,b)=(0,false) or (1,true)(1,\mathrm{true})(1,true), 000 for (wi,b)=(0,true)(w_i,b)=(0,\mathrm{true})(wi​,b)=(0,true) or (1,false)(1,\mathrm{false})(1,false), and 111 for either value of bbb when wi=2w_i=2wi​=2. Put ai,b=xa_{i,b}=\sqrt{x}ai,b​=x​ if sw(i,b)=1s_w(i,b)=1sw​(i,b)=1, and ai,b=0a_{i,b}=0ai,b​=0 otherwise, regarding these amplitudes as complex numbers, and define ca(r)=e−∣a∣2/2ar/r!c_a(r)=e^{-|a|^2/2}a^r/\sqrt{r!}ca​(r)=e−∣a∣2/2ar/r!​. The matrix entry is

{(∏i,bcai,b(p(i,b)))(∏i,bcai,b(q(i,b)))‾,p(k,true)+p(k+1,false)=q(k,true)+q(k+1,false)for every 0≤k<n−1,0,otherwise.\begin{cases} \displaystyle \left(\prod_{i,b}c_{a_{i,b}}(p(i,b))\right) \overline{\left(\prod_{i,b}c_{a_{i,b}}(q(i,b))\right)}, & \displaystyle p(k,\mathrm{true})+p(k+1,\mathrm{false}) =q(k,\mathrm{true})+q(k+1,\mathrm{false}) \quad\text{for every }0\le k<n-1,\\[4pt] 0,&\text{otherwise}. \end{cases}⎩⎨⎧​​i,b∏​cai,b​​(p(i,b))​​i,b∏​cai,b​​(q(i,b))​​,0,​p(k,true)+p(k+1,false)=q(k,true)+q(k+1,false)for every 0≤k<n−1,otherwise.​

Here n−1n-1n−1 is natural-number subtraction, truncated at zero, so for n=0n=0n=0 or n=1n=1n=1 the boundary condition is vacuous. There is no restriction on xxx; the real square root used here is zero when x<0x<0x<0. For n=0n=0n=0, both products are empty and the sole matrix entry is 111.

QAlgorithms.Papers.Independent.Intakethird100.P33.dataState

For every real number xxx and Boolean bit\mathrm{bit}bit, this defines a vector in ℓ2(N×N;C)\ell^2(\mathbb N\times\mathbb N;\mathbb C)ℓ2(N×N;C). Put s=xs=\sqrt{x}s=x​, using the real square root, which is 000 when x≤0x\leq0x≤0, and define cα(r)=e−∣α∣2/2αr/r!c_\alpha(r)=e^{-|\alpha|^2/2}\alpha^r/\sqrt{r!}cα​(r)=e−∣α∣2/2αr/r!​ for α∈C\alpha\in\mathbb Cα∈C and r∈Nr\in\mathbb Nr∈N, with α0=1\alpha^0=1α0=1 even when α=0\alpha=0α=0. If bit\mathrm{bit}bit is false, the vector has coefficients cs(m)c0(n)c_s(m)c_0(n)cs​(m)c0​(n); if bit\mathrm{bit}bit is true, it has coefficients c0(m)cs(n)c_0(m)c_s(n)c0​(m)cs​(n). In either case, the coefficient function is used as an ℓ2\ell^2ℓ2 vector if it is square summable, and the zero vector is used otherwise. There is no assumption that xxx is positive; for x≤0x\leq0x≤0, both Boolean inputs give the vector with coefficient 111 at (0,0)(0,0)(0,0) and 000 elsewhere.

QAlgorithms.Papers.Independent.Intakethird100.P33.discriminationSuccess

For every real xxx and every three-outcome family M=(E0,E1,E2)M=(E_0,E_1,E_2)M=(E0​,E1​,E2​) of complex kernels on N×N\mathbb N\times\mathbb NN×N, each positive on finite quadratic forms and summing coefficientwise to the identity, this defines the real number

12[Re⁡ ⁣(∑p∈N2∑q∈N2d0(p)d0(q)‾E0(q,p))+Re⁡ ⁣(∑p∈N2∑q∈N2d1(p)d1(q)‾E1(q,p))].\frac12\left[ \operatorname{Re}\!\left(\sum_{p\in\mathbb N^2}\sum_{q\in\mathbb N^2}d_0(p)\overline{d_0(q)}E_0(q,p)\right) + \operatorname{Re}\!\left(\sum_{p\in\mathbb N^2}\sum_{q\in\mathbb N^2}d_1(p)\overline{d_1(q)}E_1(q,p)\right) \right].21​​Re​p∈N2∑​q∈N2∑​d0​(p)d0​(q)​E0​(q,p)​+Re​p∈N2∑​q∈N2∑​d1​(p)d1​(q)​E1​(q,p)​​.

Here s=xs=\sqrt{x}s=x​ is the real square root, cα(r)=e−∣α∣2/2αr/r!c_\alpha(r)=e^{-|\alpha|^2/2}\alpha^r/\sqrt{r!}cα​(r)=e−∣α∣2/2αr/r!​, and d0(m,n)=cs(m)c0(n)d_0(m,n)=c_s(m)c_0(n)d0​(m,n)=cs​(m)c0​(n) and d1(m,n)=c0(m)cs(n)d_1(m,n)=c_0(m)c_s(n)d1​(m,n)=c0​(m)cs​(n), with either coefficient function replaced by zero if it is not square summable. No unambiguity hypothesis is required. For x≤0x\leq0x≤0, both vectors are the vacuum vector supported at (0,0)(0,0)(0,0).

QAlgorithms.Papers.Independent.Intakethird100.P33.eveClickProbability

For arbitrary real numbers μ,t\mu,tμ,t, put x=μ(1−t)x=\mu(1-t)x=μ(1−t) and define

c(a,r)=e−∣a∣2/2arr!,dx(r,s)=c(x,r)c(0,s),c(a,r)=\frac{e^{-|a|^2/2}a^r}{\sqrt{r!}},\qquad d_x(r,s)=c(\sqrt{x},r)c(0,s),c(a,r)=r!​e−∣a∣2/2ar​,dx​(r,s)=c(x​,r)c(0,s),

with real square roots embedded in C\mathbb CC. Let DxD_xDx​ be the vector with coefficients dxd_xdx​ if those coefficients are square summable, and the zero vector otherwise. This is the literal construction of the state used here. The definition returns

eveClickProbability⁡(μ,t)=∑(r,s)∈N2r>0, s=0∣Dx(r,s)∣2.\operatorname{eveClickProbability}(\mu,t) =\sum_{\substack{(r,s)\in\mathbb N^2\\r>0,\ s=0}}|D_x(r,s)|^2.eveClickProbability(μ,t)=(r,s)∈N2r>0, s=0​∑​∣Dx​(r,s)∣2.

There are no sign or interval assumptions on μ,t\mu,tμ,t; the real square root is 000 for negative arguments, so x≤0x\le0x≤0 gives the vacuum coefficients and the displayed value is 000.

QAlgorithms.Papers.Independent.Intakethird100.P33.eveReadout

For every pair (r,s)∈N2(r,s)\in\mathbb N^2(r,s)∈N2, this defines an optional Boolean value by

eveReadout⁡(r,s)={some⁡(false),r>0 and s=0,some⁡(true),r=0 and s>0,none⁡,otherwise.\operatorname{eveReadout}(r,s)= \begin{cases} \operatorname{some}(\mathrm{false}),&r>0\text{ and }s=0,\\ \operatorname{some}(\mathrm{true}),&r=0\text{ and }s>0,\\ \operatorname{none},&\text{otherwise}. \end{cases}eveReadout(r,s)=⎩⎨⎧​some(false),some(true),none,​r>0 and s=0,r=0 and s>0,otherwise.​

Thus both (0,0)(0,0)(0,0) and every pair with both coordinates positive return no value.

QAlgorithms.Papers.Independent.Intakethird100.P33.interceptResend

For every natural number nnn, word w:{0,…,n−1}→{0,1,2}w:\{0,\ldots,n-1\}\to\{0,1,2\}w:{0,…,n−1}→{0,1,2}, and real xxx, this defines a complex matrix indexed by occupation functions p,q:{0,…,n−1}×{false,true}→Np,q:\{0,\ldots,n-1\}\times\{\mathrm{false},\mathrm{true}\}\to\mathbb Np,q:{0,…,n−1}×{false,true}→N. Declare (i,false)(i,\mathrm{false})(i,false) occupied precisely when wi∈{0,2}w_i\in\{0,2\}wi​∈{0,2}, and (i,true)(i,\mathrm{true})(i,true) occupied precisely when wi∈{1,2}w_i\in\{1,2\}wi​∈{1,2}. For each mode jjj, let zj=xz_j=xzj​=x when occupied and zj=0z_j=0zj​=0 otherwise, and put

rj(m)={e−zj,m=0,1−e−zj,m=1,0,m≥2.r_j(m)= \begin{cases} e^{-z_j},&m=0,\\ 1-e^{-z_j},&m=1,\\ 0,&m\ge2. \end{cases}rj​(m)=⎩⎨⎧​e−zj​,1−e−zj​,0,​m=0,m=1,m≥2.​

The matrix entry is

interceptResend⁡(w,x)p,q={∏jrj(p(j)),p=q,0,p≠q,\operatorname{interceptResend}(w,x)_{p,q} =\begin{cases} \displaystyle\prod_j r_j(p(j)),&p=q,\\ 0,&p\ne q, \end{cases}interceptResend(w,x)p,q​=⎩⎨⎧​j∏​rj​(p(j)),0,​p=q,p=q,​

with the real product embedded in C\mathbb CC. No sign assumption is imposed on xxx, so the factors need not be nonnegative. When n=0n=0n=0, the unique entry is the empty product 111.

QAlgorithms.Papers.Independent.Intakethird100.P33.monitorFlux

For any type JJJ with decidable equality, complex matrix ρ\rhoρ indexed by configurations p:J→Np:J\to\mathbb Np:J→N, indices i,j∈Ji,j\in Ji,j∈J, and port r∈{0,1}r\in\{0,1\}r∈{0,1}, this defines

Ai+Aj+εr 2Re⁡C4,Ak=∑pp(k)Re⁡ρp,p,ε0=1,ε1=−1,\frac{A_i+A_j+\varepsilon_r\,2\operatorname{Re}C}{4}, \qquad A_k=\sum_p p(k)\operatorname{Re}\rho_{p,p}, \qquad \varepsilon_0=1,\quad\varepsilon_1=-1,4Ai​+Aj​+εr​2ReC​,Ak​=p∑​p(k)Reρp,p​,ε0​=1,ε1​=−1,

where

C=∑p{p(i)ρp,p,i=j,0,i≠j, p(j)=0,(p(i)+1)p(j) ρp,pi+,j−,i≠j, p(j)>0,C=\sum_p \begin{cases} p(i)\rho_{p,p},&i=j,\\ 0,&i\ne j,\ p(j)=0,\\ \sqrt{(p(i)+1)p(j)}\,\rho_{p,p^{i+,j-}},&i\ne j,\ p(j)>0, \end{cases}C=p∑​⎩⎨⎧​p(i)ρp,p​,0,(p(i)+1)p(j)​ρp,pi+,j−​,​i=j,i=j, p(j)=0,i=j, p(j)>0,​

and pi+,j−p^{i+,j-}pi+,j− changes only the occupations at i,ji,ji,j to p(i)+1,p(j)−1p(i)+1,p(j)-1p(i)+1,p(j)−1. All sums range over every function J→NJ\to\mathbb NJ→N. No summability, positivity, normalization, or distinctness of i,ji,ji,j is assumed. Each sum is a totalized infinite sum: if its family is not summable, that sum has value zero.

QAlgorithms.Papers.Independent.Intakethird100.P33.monitoringOutput

For arbitrary complex numbers a,ba,ba,b, put α=i(a+b)/2\alpha=i(a+b)/2α=i(a+b)/2 and β=(−a+b)/2\beta=(-a+b)/2β=(−a+b)/2. This defines the vector in ℓ2(N×N;C)\ell^2(\mathbb N\times\mathbb N;\mathbb C)ℓ2(N×N;C) whose coefficient at (m,n)(m,n)(m,n) is

e−(∣α∣2+∣β∣2)/2αmβnm!n!,e^{-(|\alpha|^2+|\beta|^2)/2}\frac{\alpha^m\beta^n}{\sqrt{m!}\sqrt{n!}},e−(∣α∣2+∣β∣2)/2m!​n!​αmβn​,

provided this coefficient function is square summable, and defines the zero vector otherwise. Powers with exponent 000 equal 111, including when their base is 000. There are no restrictions on aaa or bbb.

QAlgorithms.Papers.Independent.Intakethird100.P33.numberTerm

For any type JJJ, any complex matrix ρ\rhoρ indexed by functions J→NJ\to\mathbb NJ→N, any i∈Ji\in Ji∈J, and any occupation configuration p:J→Np:J\to\mathbb Np:J→N, this defines the real number

p(i) Re⁡ρp,p.p(i)\,\operatorname{Re}\rho_{p,p}.p(i)Reρp,p​.

No finiteness or countability assumption on JJJ, or positivity, normalization, or summability assumption on ρ\rhoρ, is imposed; in particular, the value need not be nonnegative.

QAlgorithms.Papers.Independent.Intakethird100.P33.opticalClick

For every vector v∈ℓ2(N×N;C)v\in\ell^2(\mathbb N\times\mathbb N;\mathbb C)v∈ℓ2(N×N;C) and every port j∈{0,1}j\in\{0,1\}j∈{0,1}, this defines the real number

∑(m,n)∈N2{∣v(m,n)∣2,j=0 and m>0, or j=1 and n>0,0,otherwise.\sum_{(m,n)\in\mathbb N^2} \begin{cases} |v(m,n)|^2,&j=0\text{ and }m>0,\text{ or }j=1\text{ and }n>0,\\ 0,&\text{otherwise}. \end{cases}(m,n)∈N2∑​{∣v(m,n)∣2,0,​j=0 and m>0, or j=1 and n>0,otherwise.​

No unit-norm assumption is imposed on vvv; the selected occupation must be strictly positive, so occupation 000 contributes nothing.

QAlgorithms.Papers.Independent.Intakethird100.P33.opticalVisibility

For any type JJJ with decidable equality, complex matrix ρ\rhoρ indexed by configurations p:J→Np:J\to\mathbb Np:J→N, and indices i,j∈Ji,j\in Ji,j∈J, define

A=∑pp(i)Re⁡ρp,p+∑pp(j)Re⁡ρp,p,C=∑p{p(i)ρp,p,i=j,0,i≠j, p(j)=0,(p(i)+1)p(j) ρp,pi+,j−,i≠j, p(j)>0,A=\sum_p p(i)\operatorname{Re}\rho_{p,p} +\sum_p p(j)\operatorname{Re}\rho_{p,p}, \qquad C=\sum_p \begin{cases} p(i)\rho_{p,p},&i=j,\\ 0,&i\ne j,\ p(j)=0,\\ \sqrt{(p(i)+1)p(j)}\,\rho_{p,p^{i+,j-}},&i\ne j,\ p(j)>0, \end{cases}A=p∑​p(i)Reρp,p​+p∑​p(j)Reρp,p​,C=p∑​⎩⎨⎧​p(i)ρp,p​,0,(p(i)+1)p(j)​ρp,pi+,j−​,​i=j,i=j, p(j)=0,i=j, p(j)>0,​

where pi+,j−p^{i+,j-}pi+,j− changes the occupations at i,ji,ji,j to p(i)+1,p(j)−1p(i)+1,p(j)-1p(i)+1,p(j)−1. This definition is the ratio

F0−F1F0+F1,F0=A+2Re⁡C4,F1=A−2Re⁡C4.\frac{F_0-F_1}{F_0+F_1}, \qquad F_0=\frac{A+2\operatorname{Re}C}{4}, \qquad F_1=\frac{A-2\operatorname{Re}C}{4}.F0​+F1​F0​−F1​​,F0​=4A+2ReC​,F1​=4A−2ReC​.

No positivity, normalization, summability, or distinctness assumption is imposed. A nonsummable family has totalized sum zero, and division by zero has value zero; consequently the defined visibility is zero whenever F0+F1=0F_0+F_1=0F0​+F1​=0.

QAlgorithms.Papers.Independent.Intakethird100.P33.printedCount

For arbitrary real numbers x,pd,fx,p_d,fx,pd​,f, pattern a∈{0,1,2,3}a\in\{0,1,2,3\}a∈{0,1,2,3}, and port r∈{0,1}r\in\{0,1\}r∈{0,1}, this defines

(S+(1−S)pd)(1−f)4,S={x,a=2, r=0,0,a=2, r=1, or a=1,x/4,a=0 or a=3.\frac{\bigl(S+(1-S)p_d\bigr)(1-f)}{4}, \qquad S= \begin{cases} x,&a=2,\ r=0,\\ 0,&a=2,\ r=1,\ \text{or }a=1,\\ x/4,&a=0\ \text{or }a=3. \end{cases}4(S+(1−S)pd​)(1−f)​,S=⎩⎨⎧​x,0,x/4,​a=2, r=0,a=2, r=1, or a=1,a=0 or a=3.​

None of x,pd,fx,p_d,fx,pd​,f is assumed nonnegative or bounded by one.

QAlgorithms.Papers.Independent.Intakethird100.P33.printedSignal

For every real number xxx, pattern a∈{0,1,2,3}a\in\{0,1,2,3\}a∈{0,1,2,3}, and port r∈{0,1}r\in\{0,1\}r∈{0,1}, this defines the real number

S(x,a,r)={x,a=2, r=0,0,a=2, r=1,0,a=1,x/4,a=0 or a=3.S(x,a,r)= \begin{cases} x,&a=2,\ r=0,\\ 0,&a=2,\ r=1,\\ 0,&a=1,\\ x/4,&a=0\ \text{or }a=3. \end{cases}S(x,a,r)=⎩⎨⎧​x,0,0,x/4,​a=2, r=0,a=2, r=1,a=1,a=0 or a=3.​

There is no sign or size restriction on xxx.

QAlgorithms.Papers.Independent.Intakethird100.P33.ratePolynomial

For arbitrary real numbers t,tB,η,f,μt,t_B,\eta,f,\mut,tB​,η,f,μ, this defines the real polynomial

ratePolynomial⁡(t,tB,η,f,μ)=μ t tB η (1−f)(1−μ(1−t)).\operatorname{ratePolynomial}(t,t_B,\eta,f,\mu) =\mu\,t\,t_B\,\eta\,(1-f)\bigl(1-\mu(1-t)\bigr).ratePolynomial(t,tB​,η,f,μ)=μttB​η(1−f)(1−μ(1−t)).

No bounds or sign conditions are imposed on any argument.

QAlgorithms.Papers.Independent.Intakethird100.P33.resendWeight

For every real xxx, Boolean bbb, and natural number mmm, set z=xz=xz=x if b=trueb=\mathrm{true}b=true and z=0z=0z=0 otherwise. This defines

resendWeight⁡(x,b,m)={e−z,m=0,1−e−z,m=1,0,m≥2.\operatorname{resendWeight}(x,b,m)= \begin{cases} e^{-z},&m=0,\\ 1-e^{-z},&m=1,\\ 0,&m\ge2. \end{cases}resendWeight(x,b,m)=⎩⎨⎧​e−z,1−e−z,0,​m=0,m=1,m≥2.​

For b=falseb=\mathrm{false}b=false this is 111 at m=0m=0m=0 and 000 elsewhere. No nonnegativity assumption is imposed on xxx; when b=trueb=\mathrm{true}b=true and x<0x<0x<0, the value at m=1m=1m=1 is negative.

QAlgorithms.Papers.Independent.Intakethird100.P33.sourceOccupation

For every natural number nnn, every word w:{0,…,n−1}→{0,1,2}w:\{0,\ldots,n-1\}\to\{0,1,2\}w:{0,…,n−1}→{0,1,2}, and every pair (r,b)(r,b)(r,b) consisting of an index r<nr<nr<n and a Boolean bbb, this defines a natural number as follows: if w(r)=0w(r)=0w(r)=0, it is 111 for b=falseb=\mathrm{false}b=false and 000 for b=trueb=\mathrm{true}b=true; if w(r)=1w(r)=1w(r)=1, it is 000 for b=falseb=\mathrm{false}b=false and 111 for b=trueb=\mathrm{true}b=true; if w(r)=2w(r)=2w(r)=2, it is 111 for either Boolean. When n=0n=0n=0, there is no possible argument (r,b)(r,b)(r,b).

QAlgorithms.Papers.Independent.Intakethird100.P33.splitBobDensity

For every real ttt and every v∈ℓ2(N×N;C)v\in\ell^2(\mathbb N\times\mathbb N;\mathbb C)v∈ℓ2(N×N;C), put

Ct,v(p,e)=v(p1+e1,p2+e2)∏r=12(pr+er)!pr! er! (max⁡(t,0))pr(max⁡(1−t,0))er,C_{t,v}(p,e)=v(p_1+e_1,p_2+e_2) \prod_{r=1}^{2} \sqrt{\frac{(p_r+e_r)!}{p_r!\,e_r!}}\, \bigl(\sqrt{\max(t,0)}\bigr)^{p_r} \bigl(\sqrt{\max(1-t,0)}\bigr)^{e_r},Ct,v​(p,e)=v(p1​+e1​,p2​+e2​)r=1∏2​pr​!er​!(pr​+er​)!​​(max(t,0)​)pr​(max(1−t,0)​)er​,

and let St,v=Ct,vS_{t,v}=C_{t,v}St,v​=Ct,v​ if this function is square summable on N2×N2\mathbb N^2\times\mathbb N^2N2×N2, and St,v=0S_{t,v}=0St,v​=0 otherwise. This defines the complex kernel on N2\mathbb N^2N2 by ρ(p,q)=∑e∈N2St,v(p,e)St,v(q,e)‾\rho(p,q)=\sum_{e\in\mathbb N^2}S_{t,v}(p,e)\overline{S_{t,v}(q,e)}ρ(p,q)=∑e∈N2​St,v​(p,e)St,v​(q,e)​ for all p,q∈N2p,q\in\mathbb N^2p,q∈N2. No normalization of vvv or restriction on ttt is imposed; if the square-summability test fails, the entire kernel is zero.

QAlgorithms.Papers.Independent.Intakethird100.P33.splitCoefficients

For every real ttt, every v∈ℓ2(N×N;C)v\in\ell^2(\mathbb N\times\mathbb N;\mathbb C)v∈ℓ2(N×N;C), and every pair of occupation pairs ((p1,p2),(e1,e2))((p_1,p_2),(e_1,e_2))((p1​,p2​),(e1​,e2​)), this defines the complex number

v(p1+e1,p2+e2)∏r=12[(pr+er)!pr! er! (max⁡(t,0))pr(max⁡(1−t,0))er].v(p_1+e_1,p_2+e_2) \prod_{r=1}^{2} \left[ \sqrt{\frac{(p_r+e_r)!}{p_r!\,e_r!}}\, \bigl(\sqrt{\max(t,0)}\bigr)^{p_r} \bigl(\sqrt{\max(1-t,0)}\bigr)^{e_r} \right].v(p1​+e1​,p2​+e2​)r=1∏2​[pr​!er​!(pr​+er​)!​​(max(t,0)​)pr​(max(1−t,0)​)er​].

The real factors are embedded in C\mathbb CC. There is no assumption that 0≤t≤10\leq t\leq10≤t≤1 or that vvv has norm 111; the maxima arise from converting ttt and 1−t1-t1−t to nonnegative reals. Zero powers, including 000^000, equal 111.

QAlgorithms.Papers.Independent.Intakethird100.P33.splitState

For every real ttt and every v∈ℓ2(N×N;C)v\in\ell^2(\mathbb N\times\mathbb N;\mathbb C)v∈ℓ2(N×N;C), define, for p,e∈N2p,e\in\mathbb N^2p,e∈N2,

Ct,v(p,e)=v(p1+e1,p2+e2)∏r=12(pr+er)!pr! er! (max⁡(t,0))pr(max⁡(1−t,0))er.C_{t,v}(p,e)=v(p_1+e_1,p_2+e_2) \prod_{r=1}^{2} \sqrt{\frac{(p_r+e_r)!}{p_r!\,e_r!}}\, \bigl(\sqrt{\max(t,0)}\bigr)^{p_r} \bigl(\sqrt{\max(1-t,0)}\bigr)^{e_r}.Ct,v​(p,e)=v(p1​+e1​,p2​+e2​)r=1∏2​pr​!er​!(pr​+er​)!​​(max(t,0)​)pr​(max(1−t,0)​)er​.

This declaration returns the vector in ℓ2(N2×N2;C)\ell^2(\mathbb N^2\times\mathbb N^2;\mathbb C)ℓ2(N2×N2;C) with coefficient function Ct,vC_{t,v}Ct,v​ if ∑p,e∣Ct,v(p,e)∣2<∞\sum_{p,e}|C_{t,v}(p,e)|^2<\infty∑p,e​∣Ct,v​(p,e)∣2<∞, and returns the zero vector otherwise. No restriction on ttt or normalization of vvv is assumed, and 000^000 is interpreted as 111.

QAlgorithms.Papers.Independent.Intakethird100.P33.substitutedWord

For every natural number nnn and every word w:{0,…,n−1}→{0,1,2}w:\{0,\ldots,n-1\}\to\{0,1,2\}w:{0,…,n−1}→{0,1,2}, this defines a vector in ℓ2({0,…,n−1}×Bool→N;C)\ell^2(\{0,\ldots,n-1\}\times\mathrm{Bool}\to\mathbb N;\mathbb C)ℓ2({0,…,n−1}×Bool→N;C) with coefficient 111 at the single occupation function sws_wsw​ and coefficient 000 at every other occupation function. The function sws_wsw​ assigns the pair of occupations (1,0)(1,0)(1,0) to the Boolean positions (false,true)(\mathrm{false},\mathrm{true})(false,true) when w(r)=0w(r)=0w(r)=0, assigns (0,1)(0,1)(0,1) when w(r)=1w(r)=1w(r)=1, and assigns (1,1)(1,1)(1,1) when w(r)=2w(r)=2w(r)=2. This includes n=0n=0n=0, when there is exactly one occupation function, the empty function, and the vector has coefficient 111 there.

QAlgorithms.Papers.Independent.Intakethird100.P33.trainDensity

For every natural number nnn, word w:{0,…,n−1}→{0,1,2}w:\{0,\ldots,n-1\}\to\{0,1,2\}w:{0,…,n−1}→{0,1,2}, and real xxx, this defines a complex matrix indexed by occupation functions p,q:{0,…,n−1}×{false,true}→Np,q:\{0,\ldots,n-1\}\times\{\mathrm{false},\mathrm{true}\}\to\mathbb Np,q:{0,…,n−1}×{false,true}→N. Put

ai,false={x,wi=0 or 2,0,wi=1,ai,true={x,wi=1 or 2,0,wi=0,c(a,r)=e−∣a∣2/2arr!,a_{i,\mathrm{false}}= \begin{cases}\sqrt{x},&w_i=0\text{ or }2,\\0,&w_i=1,\end{cases} \qquad a_{i,\mathrm{true}}= \begin{cases}\sqrt{x},&w_i=1\text{ or }2,\\0,&w_i=0,\end{cases} \qquad c(a,r)=\frac{e^{-|a|^2/2}a^r}{\sqrt{r!}},ai,false​={x​,0,​wi​=0 or 2,wi​=1,​ai,true​={x​,0,​wi​=1 or 2,wi​=0,​c(a,r)=r!​e−∣a∣2/2ar​,

where real square roots are embedded in C\mathbb CC. Its entries are

trainDensity⁡(w,x)p,q=(∏i,bc(ai,b,p(i,b)))(∏i,bc(ai,b,q(i,b)))‾.\operatorname{trainDensity}(w,x)_{p,q} =\left(\prod_{i,b}c(a_{i,b},p(i,b))\right) \overline{\left(\prod_{i,b}c(a_{i,b},q(i,b))\right)}.trainDensity(w,x)p,q​=​i,b∏​c(ai,b​,p(i,b))​​i,b∏​c(ai,b​,q(i,b))​​.

There is no assumption that x≥0x\ge0x≥0; for x<0x<0x<0, x=0\sqrt{x}=0x​=0. When n=0n=0n=0, both products are empty and equal 111, so the unique matrix entry is 111.

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