Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Separability Criterion for all bipartite Gaussian States

Definition
QAlgorithms_Papers_Independent_Intakenext100_P68

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

prove2quantum

The objects the formalized statements of Separability Criterion for all bipartite Gaussian States (arXiv:quant-ph/0104050) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • interleavedJ: PDF p.1, Eq.(1): J has J_XP=-1 and J_PX=+1.
  • Uncertainty: PDF p.1: the uncertainty inequality A >= iJ, in Loewner order.
  • IsCM: PDF p.1: a CM is real, symmetric and satisfies uncertainty.
  • CovarianceBlocks: PDF p.1, Eq.(2): initial bipartite blocks with a rectangular C.
  • covarianceBlockMatrix: PDF p.1, Eq.(2): the actual real symmetric-block assembly.
  • realCovarianceSum: PDF p.1 [9]: direct sum, retaining the displayed bipartition.
  • IsPhysicalCovariance: PDF p.1, Eq.(2): physical bipartite covariance; symmetry is explicit.
  • DominatesLocalCovariances: PDF pp.1--2, Eq.(3): a local witness inequality, not separability.
  • hermitianInverse: PDF p.4 [11]: spectral Moore--Penrose inverse on the Hermitian domain. Each eigenvalue t is sent to t^{-1}, with 0^{-1}=0. The off-domain zero is irrelevant to the Hermitian/PSD inputs in all statements.
  • updateX: PDF p.2, Eq.(4): X=C(B-iJ)^+ C^T, including singular B-iJ.
  • covarianceStep: PDF p.2, Eq.(4): nonphysical inputs give zero; physical inputs follow (4a,b). The output split is always n|n, even when the input split is n|m.
  • tail: PDF p.2: tail g k is gamma_(k+1), constructed only from g=gamma_0.
  • euclideanOpNorm: PDF p.4 [12]: Euclidean induced operator norm, not the matrix infinity norm.
  • lowerWitness: PDF p.2, Eq.(6): the constructed acceptance witness L=A-||C||_op I.
  • secondWitness: PDF p.2, corrected Eq.(5): B-C^T(A-U)^+C. Printed: B-C(A-U)^(-1)C^T. Changed: transpose the first C, not the last. Why: the print is ill-typed for n != m; Prop.1's proof and Appendix Lemma 1(iii) use this corrected Schur complement.
  • averageWitness: PDF p.2, Cor.1: average using the constructed second witness.
  • recoverFirst: PDF p.2 following Thm.1: descend from gamma_(k+1) to gamma_1, using Cor.1 at the preceding matrix at each recursive call.
  • bipartiteGroupedIndex: PDF pp.1,4 [8]: accepted grouped Weyl coordinates to the source's two interleaved local quadrature lists; this is a permutation, without rescaling.
  • HasGaussianCovariance: PDF pp.1,4 [8]: actual Gaussian density with symmetric physical covariance and arbitrary mean. The accepted Weyl convention has vacuum I and hbar=1. Summability guards the iterated trace/Weyl pairing. The defective frozen HasBipartiteMoments predicate is not used.
  • SeparableCM: PDF pp.1--2: existence of an actual separable Gaussian density, independent of local witness inequality (3).
  • momentumFlip: PDF pp.1--3: partial transposition reverses the second party's P coordinates.
  • partialTransposeCovariance: PDF pp.1--3: covariance of the partially transposed Gaussian operator.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P47
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P10
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier30_P08
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P19

/-!
Giedke--Kraus--Lewenstein--Cirac, arXiv:quant-ph/0104050v1, PDF pp.1--4.
Interleaved quadratures, doubled covariance, vacuum I. All inequalities below
are Loewner inequalities. The initial n|m matrix is separate from the n|n tail:
`tail g k` denotes gamma_(k+1). Full oscillator states and trace-norm separability
come from the pinned accepted library. No moments predicate from P47 is used.
Exact accepted coordinate, covariance, complexification and occupation definitions
are imported. Distinct Gaussian objects use descriptive names: accepted short-name
matches for Blocks, Physical, Dominates and step denote unrelated objects.
Compilation and independent moderation are pending the separate batch handoff.
-/

noncomputable section

open MeasureTheory Filter
open scoped BigOperators Topology ComplexOrder

namespace QAlgorithms.Papers.Independent.Intakenext100.P68

attribute [local instance] Classical.propDecidable Classical.decEq

open QAlgorithms.Papers.Independent.Dependency50.P33
  (State PureState IsSeparable IsBarycenter productCoeff)

open QAlgorithms.Papers.Independent.Dependency50.P10 (complexify)
open QAlgorithms.Papers.Independent.Frontier30.P08 (QuadratureIndex)
open QAlgorithms.Papers.Independent.Claimed50.P19 (Cov)
open QAlgorithms.Papers.Independent.Claimed50.P47 (Occupation)

/-- PDF p.1, Eq.(1): J has J_XP=-1 and J_PX=+1. -/
def interleavedJ (n : ℕ) : Cov n :=
  fun i j => if i.1 = j.1 then
    if i.2 = j.2 then 0 else if i.2 = 0 then -1 else 1
  else 0

/-- PDF p.1: the uncertainty inequality A >= iJ, in Loewner order. -/
def Uncertainty {n : ℕ} (A : Cov n) : Prop :=
  (complexify A - Complex.I • complexify (interleavedJ n)).PosSemidef

/-- PDF p.1: a CM is real, symmetric and satisfies uncertainty. -/
def IsCM {n : ℕ} (A : Cov n) : Prop := A.transpose = A ∧ Uncertainty A

/-- PDF p.1, Eq.(2): initial bipartite blocks with a rectangular C. -/
structure CovarianceBlocks (n m : ℕ) where
  A : Cov n
  B : Cov m
  C : Matrix (QuadratureIndex n) (QuadratureIndex m) ℝ

/-- PDF p.1, Eq.(2): the actual real symmetric-block assembly. -/
def covarianceBlockMatrix {n m : ℕ} (g : CovarianceBlocks n m) :
    Matrix (QuadratureIndex n ⊕ QuadratureIndex m) (QuadratureIndex n ⊕ QuadratureIndex m) ℝ :=
  Matrix.fromBlocks g.A g.C g.C.transpose g.B

/-- PDF p.1 [9]: direct sum, retaining the displayed bipartition. -/
def realCovarianceSum {I J : Type} [DecidableEq I] [DecidableEq J]
    (A : Matrix I I ℝ) (B : Matrix J J ℝ) : Matrix (I ⊕ J) (I ⊕ J) ℝ :=
  Matrix.fromBlocks A 0 0 B

/-- PDF p.1, Eq.(2): physical bipartite covariance; symmetry is explicit. -/
def IsPhysicalCovariance {n m : ℕ} (g : CovarianceBlocks n m) : Prop :=
  (covarianceBlockMatrix g).transpose = covarianceBlockMatrix g ∧
    (complexify (covarianceBlockMatrix g) -
      Complex.I • complexify (realCovarianceSum (interleavedJ n) (interleavedJ m))).PosSemidef

/-- PDF pp.1--2, Eq.(3): a local witness inequality, not separability. -/
def DominatesLocalCovariances {n m : ℕ} (g : CovarianceBlocks n m) (U : Cov n) (V : Cov m) : Prop :=
  (covarianceBlockMatrix g - realCovarianceSum U V).PosSemidef

/-- PDF p.4 [11]: spectral Moore--Penrose inverse on the Hermitian domain.
Each eigenvalue t is sent to t^{-1}, with 0^{-1}=0. The off-domain zero
is irrelevant to the Hermitian/PSD inputs in all statements. -/
def hermitianInverse {K I : Type} [RCLike K] [Fintype I] [DecidableEq I]
    (A : Matrix I I K) : Matrix I I K :=
  if h : A.IsHermitian then h.cfc (fun t : ℝ => t⁻¹) else 0

/-- PDF p.2, Eq.(4): X=C(B-iJ)^+ C^T, including singular B-iJ. -/
def updateX {n m : ℕ} (g : CovarianceBlocks n m) : Matrix (QuadratureIndex n) (QuadratureIndex n) ℂ :=
  complexify g.C *
    hermitianInverse (complexify g.B - Complex.I • complexify (interleavedJ m)) *
    complexify g.C.transpose

/-- PDF p.2, Eq.(4): nonphysical inputs give zero; physical inputs follow (4a,b).
The output split is always n|n, even when the input split is n|m. -/
def covarianceStep {n m : ℕ} (g : CovarianceBlocks n m) : CovarianceBlocks n n :=
  if IsPhysicalCovariance g then
    { A := g.A - (updateX g).map Complex.re
      B := g.A - (updateX g).map Complex.re
      C := -(updateX g).map Complex.im }
  else { A := 0, B := 0, C := 0 }

/-- PDF p.2: tail g k is gamma_(k+1), constructed only from g=gamma_0. -/
def tail {n m : ℕ} (g : CovarianceBlocks n m) : ℕ → CovarianceBlocks n n
  | 0 => covarianceStep g
  | k + 1 => covarianceStep (tail g k)

/-- PDF p.4 [12]: Euclidean induced operator norm, not the matrix infinity norm. -/
def euclideanOpNorm {I J : Type} [Fintype I] [Fintype J] [DecidableEq I]
    [DecidableEq J] (C : Matrix I J ℝ) : ℝ :=
  ‖(Matrix.toEuclideanLin C).toContinuousLinearMap‖

/-- PDF p.2, Eq.(6): the constructed acceptance witness L=A-||C||_op I. -/
def lowerWitness {n : ℕ} (g : CovarianceBlocks n n) : Cov n :=
  g.A - euclideanOpNorm g.C • (1 : Cov n)

/-- PDF p.2, corrected Eq.(5): B-C^T(A-U)^+C.
Printed: B-C(A-U)^(-1)C^T. Changed: transpose the first C, not the last.
Why: the print is ill-typed for n != m; Prop.1's proof and Appendix
Lemma 1(iii) use this corrected Schur complement. -/
def secondWitness {n m : ℕ} (g : CovarianceBlocks n m) (U : Cov n) : Cov m :=
  g.B - g.C.transpose * hermitianInverse (g.A - U) * g.C

/-- PDF p.2, Cor.1: average using the constructed second witness. -/
def averageWitness {n : ℕ} (g : CovarianceBlocks n n) (U : Cov n) : Cov n :=
  (1 / 2 : ℝ) • (U + secondWitness g U)

/-- PDF p.2 following Thm.1: descend from gamma_(k+1) to gamma_1,
using Cor.1 at the preceding matrix at each recursive call. -/
def recoverFirst {n m : ℕ} (g : CovarianceBlocks n m) : ℕ → Cov n → Cov n
  | 0, U => U
  | k + 1, U => recoverFirst g k (averageWitness (tail g k) U)

/-- PDF pp.1,4 [8]: accepted grouped Weyl coordinates to the source's two
interleaved local quadrature lists; this is a permutation, without rescaling. -/
def bipartiteGroupedIndex {n m : ℕ} :
    (Fin n ⊕ Fin m) ⊕ (Fin n ⊕ Fin m) → QuadratureIndex n ⊕ QuadratureIndex m
  | Sum.inl (Sum.inl i) => Sum.inl (i, 0)
  | Sum.inl (Sum.inr j) => Sum.inr (j, 0)
  | Sum.inr (Sum.inl i) => Sum.inl (i, 1)
  | Sum.inr (Sum.inr j) => Sum.inr (j, 1)

/-- PDF pp.1,4 [8]: actual Gaussian density with symmetric physical covariance
and arbitrary mean. The accepted Weyl convention has vacuum I and hbar=1.
Summability guards the iterated trace/Weyl pairing. The defective frozen
HasBipartiteMoments predicate is not used. -/
def HasGaussianCovariance {n m : ℕ}
    (rho : State (Occupation (Fin n) × Occupation (Fin m))) (g : CovarianceBlocks n m)
    (d : QuadratureIndex n ⊕ QuadratureIndex m → ℝ) : Prop :=
  IsPhysicalCovariance g ∧ ∀ xi : (Fin n ⊕ Fin m) ⊕ (Fin n ⊕ Fin m) → ℝ,
    (∀ u, Summable (fun v => rho.coefficients u v *
      QAlgorithms.Papers.Independent.Claimed50.P47.bipartiteWeyl xi v u)) ∧
    Summable (fun u => ∑' v, rho.coefficients u v *
      QAlgorithms.Papers.Independent.Claimed50.P47.bipartiteWeyl xi v u) ∧
    QAlgorithms.Papers.Independent.Claimed50.P47.bipartiteCharacteristic
      rho.coefficients xi =
    QAlgorithms.Papers.Independent.Claimed50.P47.gaussianStateCharacteristic
      (d ∘ bipartiteGroupedIndex) ((covarianceBlockMatrix g).submatrix bipartiteGroupedIndex bipartiteGroupedIndex) xi

/-- PDF pp.1--2: existence of an actual separable Gaussian density,
independent of local witness inequality (3). -/
def SeparableCM {n m : ℕ} (g : CovarianceBlocks n m) : Prop :=
  ∃ (rho : State (Occupation (Fin n) × Occupation (Fin m))) (d : QuadratureIndex n ⊕ QuadratureIndex m → ℝ),
    HasGaussianCovariance rho g d ∧ IsSeparable rho.coefficients

/-- PDF pp.1--3: partial transposition reverses the second party's P coordinates. -/
def momentumFlip (m : ℕ) : Cov m :=
  Matrix.diagonal (fun i => if i.2 = 0 then 1 else -1)

/-- PDF pp.1--3: covariance of the partially transposed Gaussian operator. -/
def partialTransposeCovariance {n m : ℕ} (g : CovarianceBlocks n m) : CovarianceBlocks n m :=
  { A := g.A
    B := momentumFlip m * g.B * momentumFlip m
    C := g.C * momentumFlip m }

/-! Small definitional sanity checks; source results remain unproved. -/

example : interleavedJ 1 (0, 0) (0, 1) = -1 := by
  norm_num [interleavedJ]

example : interleavedJ 1 (0, 1) (0, 0) = 1 := by
  norm_num [interleavedJ]

example {n m : ℕ} (g : CovarianceBlocks n m) (i j : QuadratureIndex n) :
    covarianceBlockMatrix g (Sum.inl i) (Sum.inl j) = g.A i j := rfl

example {K I : Type} [RCLike K] [Fintype I] [DecidableEq I]
    (A : Matrix I I K) (h : A.IsHermitian) :
    hermitianInverse A = h.cfc (fun t : ℝ => t⁻¹) := by
  simp only [hermitianInverse, dif_pos h]

example {n m : ℕ} (g : CovarianceBlocks n m) (h : ¬ IsPhysicalCovariance g) :
    covarianceStep g = { A := 0, B := 0, C := 0 } := by
  simp only [covarianceStep, if_neg h]

example {n m : ℕ} (g : CovarianceBlocks n m) : tail g 0 = covarianceStep g := rfl

example {n m : ℕ} (g : CovarianceBlocks n m) (U : Cov n) : recoverFirst g 0 U = U := rfl

example {n m : ℕ} (i : Fin n) :
    (bipartiteGroupedIndex (n := n) (m := m)) (Sum.inr (Sum.inl i)) = Sum.inl (i, 1) := rfl

example : momentumFlip 1 (0, 1) (0, 1) = -1 := by
  norm_num [momentumFlip, Matrix.diagonal]

end QAlgorithms.Papers.Independent.Intakenext100.P68
Source
Separability Criterion for all bipartite Gaussian States, arXiv:quant-ph/0104050v1, https://arxiv.org/abs/quant-ph/0104050v1
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P68.CovarianceBlocks

For every pair of natural numbers n,mn,mn,m, this structure consists of three arbitrary real matrices: a square matrix AAA indexed by {0,…,n−1}×{0,1}\{0,\ldots,n-1\}\times\{0,1\}{0,…,n−1}×{0,1}, a square matrix BBB indexed by {0,…,m−1}×{0,1}\{0,\ldots,m-1\}\times\{0,1\}{0,…,m−1}×{0,1}, and a rectangular matrix CCC whose row indices are those of AAA and whose column indices are those of BBB. The structure imposes no symmetry, positivity, or other conditions. Either nnn or mmm may be zero.

QAlgorithms.Papers.Independent.Intakenext100.P68.DominatesLocalCovariances

For all natural numbers n,mn,mn,m, every triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of real matrices of sizes 2n×2n2n\times2n2n×2n, 2m×2m2m\times2m2m×2m, and 2n×2m2n\times2m2n×2m, and arbitrary real matrices UUU and VVV of sizes 2n×2n2n\times2n2n×2n and 2m×2m2m\times2m2m×2m, this predicate means precisely that (A−UCCTB−V)\begin{pmatrix}A-U&C\\C^{\mathsf T}&B-V\end{pmatrix}(A−UCT​CB−V​) is positive semidefinite. There are no additional conditions on g,U,Vg,U,Vg,U,V, and either mode count may be zero.

QAlgorithms.Papers.Independent.Intakenext100.P68.HasGaussianCovariance

For any natural numbers n,mn,mn,m, including zero, put Qr={0,…,r−1}×{0,1}Q_r=\{0,\ldots,r-1\}\times\{0,1\}Qr​={0,…,r−1}×{0,1}, Sr=N{0,…,r−1}S_r=\mathbb N^{\{0,\ldots,r-1\}}Sr​=N{0,…,r−1}, and S=Sn×SmS=S_n\times S_mS=Sn​×Sm​. The arguments are a state ρ\rhoρ with coefficient kernel R:S×S→CR:S\times S\to\mathbb CR:S×S→C, an arbitrary real block triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of sizes Qn,QmQ_n,Q_mQn​,Qm​, and a real vector ddd on Qn⊔QmQ_n\sqcup Q_mQn​⊔Qm​. Being a state means that there exist ar,br∈ℓ2(S;C)a_r,b_r\in\ell^2(S;\mathbb C)ar​,br​∈ℓ2(S;C), indexed by r∈Nr\in\mathbb Nr∈N, such that ∑r∥ar∥∥br∥<∞\sum_r\|a_r\|\|b_r\|<\infty∑r​∥ar​∥∥br​∥<∞ and Ruv=∑rar(u)br(v)‾R_{uv}=\sum_r a_r(u)\overline{b_r(v)}Ruv​=∑r​ar​(u)br​(v)​; every finite quadratic form ∑u,v∈Fzu‾Ruvzv\sum_{u,v\in F}\overline{z_u}R_{uv}z_v∑u,v∈F​zu​​Ruv​zv​, for finite F⊆SF\subseteq SF⊆S and any z:S→Cz:S\to\mathbb Cz:S→C, is real and nonnegative; and the real diagonal is summable with ∑uRe⁡Ruu=1\sum_u\operatorname{Re}R_{uu}=1∑u​ReRuu​=1. Write

G=(ACCTB),G=\begin{pmatrix}A&C\\C^{\mathsf T}&B\end{pmatrix},G=(ACT​CB​),

and let JrJ_rJr​ have entries (Jr)(i,0),(i,1)=−1(J_r)_{(i,0),(i,1)}=-1(Jr​)(i,0),(i,1)​=−1, (Jr)(i,1),(i,0)=1(J_r)_{(i,1),(i,0)}=1(Jr​)(i,1),(i,0)​=1, and zero otherwise. Let eee send each first-copy mode index to its subsystem’s coordinate 000, and each second-copy mode index to its subsystem’s coordinate 111; thus its domain is (Fin⁡n⊔Fin⁡m)⊔(Fin⁡n⊔Fin⁡m)(\operatorname{Fin}n\sqcup\operatorname{Fin}m)\sqcup(\operatorname{Fin}n\sqcup\operatorname{Fin}m)(Finn⊔Finm)⊔(Finn⊔Finm). Set Γij=Ge(i),e(j)\Gamma_{ij}=G_{e(i),e(j)}Γij​=Ge(i),e(j)​, di′=de(i)d'_i=d_{e(i)}di′​=de(i)​, and \Omega=\begin{psmallmatrix}0&I\\-I&0\end{psmallmatrix} on this grouped domain. For a real vector ξ\xiξ there, assign to each mode aaa the complex number za=−(ξfirst,a+iξsecond,a)/2z_a=-(\xi_{\mathrm{first},a}+i\xi_{\mathrm{second},a})/\sqrt2za​=−(ξfirst,a​+iξsecond,a​)/2​, and define

D(z)pq=e−∣z∣2/2p! q!∑j=0min⁡(p,q)zp−j(−z‾)q−jj!(p−j)!(q−j)!,Wξ(u,v)=∏a<nD(za)u1(a),v1(a)∏b<mD(zb)u2(b),v2(b).D(z)_{pq} =e^{-|z|^2/2}\sqrt{p!\,q!} \sum_{j=0}^{\min(p,q)} \frac{z^{p-j}(-\overline z)^{q-j}}{j!(p-j)!(q-j)!}, \qquad W_\xi(u,v)= \prod_{a<n}D(z_a)_{u_1(a),v_1(a)} \prod_{b<m}D(z_b)_{u_2(b),v_2(b)}.D(z)pq​=e−∣z∣2/2p!q!​j=0∑min(p,q)​j!(p−j)!(q−j)!zp−j(−z)q−j​,Wξ​(u,v)=a<n∏​D(za​)u1​(a),v1​(a)​b<m∏​D(zb​)u2​(b),v2​(b)​.

The predicate holds precisely when GGG is symmetric, G−i(Jn⊕Jm)G-i(J_n\oplus J_m)G−i(Jn​⊕Jm​) is positive semidefinite, and for every such real vector ξ\xiξ, each inner series ∑vRuvWξ(v,u)\sum_v R_{uv}W_\xi(v,u)∑v​Ruv​Wξ​(v,u) is summable, the series of their sums over uuu is summable, and

∑u∑vRuvWξ(v,u)=exp⁡ ⁣(−14ξTΩTΓΩξ+i ξTΩd′).\sum_u\sum_v R_{uv}W_\xi(v,u) = \exp\!\left(-\frac14\xi^{\mathsf T}\Omega^{\mathsf T}\Gamma\Omega\xi +i\,\xi^{\mathsf T}\Omega d'\right).u∑​v∑​Ruv​Wξ​(v,u)=exp(−41​ξTΩTΓΩξ+iξTΩd′).

Empty mode sets contribute empty products equal to one.

QAlgorithms.Papers.Independent.Intakenext100.P68.IsCM

For every natural number nnn and every real matrix AAA indexed by {0,…,n−1}×{0,1}\{0,\ldots,n-1\}\times\{0,1\}{0,…,n−1}×{0,1}, this predicate means that AT=AA^{\mathsf T}=AAT=A and that A−iJnA-\mathrm{i}J_nA−iJn​, viewed as a complex matrix, is positive semidefinite. Here JnJ_nJn​ is block diagonal with one block (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​) per mode. When n=0n=0n=0, both conditions hold for the matrix with empty index set.

QAlgorithms.Papers.Independent.Intakenext100.P68.IsPhysicalCovariance

For all natural numbers n,mn,mn,m and every triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of real matrices of sizes 2n×2n2n\times2n2n×2n, 2m×2m2m\times2m2m×2m, and 2n×2m2n\times2m2n×2m, respectively, this predicate means that Γ=(ACCTB)\Gamma=\begin{pmatrix}A&C\\C^{\mathsf T}&B\end{pmatrix}Γ=(ACT​CB​) satisfies ΓT=Γ\Gamma^{\mathsf T}=\GammaΓT=Γ and that the complex matrix Γ−i(Jn00Jm)\Gamma-\mathrm{i}\begin{pmatrix}J_n&0\\0&J_m\end{pmatrix}Γ−i(Jn​0​0Jm​​) is positive semidefinite. Each JrJ_rJr​ is block diagonal with rrr copies of (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​), and all real matrices in the complex expression are embedded entrywise into C\mathbb CC. Either mode count may be zero; when both are zero, both conditions hold.

QAlgorithms.Papers.Independent.Intakenext100.P68.SeparableCM

For any natural numbers n,mn,mn,m, including zero, put Qr=Fin⁡r×{0,1}Q_r=\operatorname{Fin}r\times\{0,1\}Qr​=Finr×{0,1}, Sr=NFin⁡rS_r=\mathbb N^{\operatorname{Fin}r}Sr​=NFinr, and let g=(A,B,C)g=(A,B,C)g=(A,B,C) be arbitrary real blocks on Qn,QmQ_n,Q_mQn​,Qm​. This predicate says that there exist a state kernel RRR on Sn×SmS_n\times S_mSn​×Sm​ and a real vector ddd on Qn⊔QmQ_n\sqcup Q_mQn​⊔Qm​ satisfying both the following Gaussian condition and the following approximation condition. For any label set LLL used here, a state kernel KKK means a kernel admitting

Kuv=∑r∈Nar(u)br(v)‾,ar,br∈ℓ2(L;C),∑r∥ar∥∥br∥<∞,K_{uv}=\sum_{r\in\mathbb N}a_r(u)\overline{b_r(v)}, \qquad a_r,b_r\in\ell^2(L;\mathbb C),\qquad \sum_r\|a_r\|\|b_r\|<\infty,Kuv​=r∈N∑​ar​(u)br​(v)​,ar​,br​∈ℓ2(L;C),r∑​∥ar​∥∥br​∥<∞,

whose quadratic forms on every finite subset are real and nonnegative, and whose real diagonal is summable with sum one. For the Gaussian condition, set G=\begin{psmallmatrix}A&C\\C^{\mathsf T}&B\end{psmallmatrix}; require GGG symmetric and G−i(Jn⊕Jm)⪰0G-i(J_n\oplus J_m)\succeq0G−i(Jn​⊕Jm​)⪰0, where JrJ_rJr​ has same-mode entries J(a,0),(a,1)=−1J_{(a,0),(a,1)}=-1J(a,0),(a,1)​=−1, J(a,1),(a,0)=1J_{(a,1),(a,0)}=1J(a,1),(a,0)​=1, and all others zero. Reorder G,dG,dG,d into Γ,d′\Gamma,d'Γ,d′ by listing coordinate 000 of both subsystems first and coordinate 111 of both subsystems second, and put \Omega=\begin{psmallmatrix}0&I\\-I&0\end{psmallmatrix}. For every real vector ξ\xiξ in that order, set za=−(ξfirst,a+iξsecond,a)/2z_a=-(\xi_{\mathrm{first},a}+i\xi_{\mathrm{second},a})/\sqrt2za​=−(ξfirst,a​+iξsecond,a​)/2​, define

D(z)pq=e−∣z∣2/2p! q!∑j=0min⁡(p,q)zp−j(−z‾)q−jj!(p−j)!(q−j)!,D(z)_{pq} =e^{-|z|^2/2}\sqrt{p!\,q!} \sum_{j=0}^{\min(p,q)} \frac{z^{p-j}(-\overline z)^{q-j}}{j!(p-j)!(q-j)!},D(z)pq​=e−∣z∣2/2p!q!​j=0∑min(p,q)​j!(p−j)!(q−j)!zp−j(−z)q−j​,

and let Wξ(u,v)W_\xi(u,v)Wξ​(u,v) be the product of these entries over all modes in both subsystems. Require every inner series and the outer series in ∑u∑vRuvWξ(v,u)\sum_u\sum_vR_{uv}W_\xi(v,u)∑u​∑v​Ruv​Wξ​(v,u) to be summable, and require this sum to equal exp⁡(−ξTΩTΓΩξ/4+iξTΩd′)\exp(-\xi^{\mathsf T}\Omega^{\mathsf T}\Gamma\Omega\xi/4+i\xi^{\mathsf T}\Omega d')exp(−ξTΩTΓΩξ/4+iξTΩd′). The approximation condition is that for every real ε>0\varepsilon>0ε>0, there is a finite convex combination Y=∑j=1rpj(Kj⊗Lj)Y=\sum_{j=1}^r p_j(K_j\otimes L_j)Y=∑j=1r​pj​(Kj​⊗Lj​), where pj≥0p_j\ge0pj​≥0, ∑jpj=1\sum_jp_j=1∑j​pj​=1, Kj,LjK_j,L_jKj​,Lj​ are state kernels on Sn,SmS_n,S_mSn​,Sm​, and (Kj⊗Lj)(a,b),(a′,b′)=(Kj)aa′(Lj)bb′(K_j\otimes L_j)_{(a,b),(a',b')}=(K_j)_{aa'}(L_j)_{bb'}(Kj​⊗Lj​)(a,b),(a′,b′)​=(Kj​)aa′​(Lj​)bb′​, such that τ(R−Y)<ε\tau(R-Y)<\varepsilonτ(R−Y)<ε. Here τ(T)\tau(T)τ(T) is the infimum, in [0,∞][0,\infty][0,∞], of ∑r∥ar∥∥br∥\sum_r\|a_r\|\|b_r\|∑r​∥ar​∥∥br​∥ over all summable expansions Tuv=∑rar(u)br(v)‾T_{uv}=\sum_r a_r(u)\overline{b_r(v)}Tuv​=∑r​ar​(u)br​(v)​ of the displayed kind; an empty collection of expansions has infimum +∞+\infty+∞. Zero mode counts are included, with empty products equal to one.

QAlgorithms.Papers.Independent.Intakenext100.P68.Uncertainty

For every natural number nnn and every real matrix AAA indexed by {0,…,n−1}×{0,1}\{0,\ldots,n-1\}\times\{0,1\}{0,…,n−1}×{0,1}, this predicate means that the complex matrix A−iJnA-\mathrm{i}J_nA−iJn​ is positive semidefinite, where real entries are embedded into C\mathbb CC and JnJ_nJn​ has zero entries between distinct modes and block (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​) within each mode. No separate hypothesis on AAA is imposed. The definition includes n=0n=0n=0, when the positive semidefiniteness condition holds on the empty index set.

QAlgorithms.Papers.Independent.Intakenext100.P68.averageWitness

For every natural number nnn, including zero, let Qn={0,…,n−1}×{0,1}Q_n=\{0,\ldots,n-1\}\times\{0,1\}Qn​={0,…,n−1}×{0,1}. For arbitrary real matrices A,B,C,UA,B,C,UA,B,C,U on QnQ_nQn​, with g=(A,B,C)g=(A,B,C)g=(A,B,C), this defines

M(g,U)=12(U+B−CTH(A−U)C),M(g,U)=\frac12\left(U+B-C^{\mathsf T}H(A-U)C\right),M(g,U)=21​(U+B−CTH(A−U)C),

where H(N)=0H(N)=0H(N)=0 if NNN is not Hermitian, and otherwise H(N)H(N)H(N) applies the reciprocal function to its eigenvalues, assigning zero to a zero eigenvalue. The definition requires no symmetry, positivity, or uncertainty hypotheses.

QAlgorithms.Papers.Independent.Intakenext100.P68.bipartiteGroupedIndex

For any natural numbers n,mn,mn,m, including zero, this defines a function from two disjoint copies of the disjoint union {0,…,n−1}⊔{0,…,m−1}\{0,\ldots,n-1\}\sqcup\{0,\ldots,m-1\}{0,…,n−1}⊔{0,…,m−1} to

({0,…,n−1}×{0,1})⊔({0,…,m−1}×{0,1}).\bigl(\{0,\ldots,n-1\}\times\{0,1\}\bigr) \sqcup \bigl(\{0,\ldots,m-1\}\times\{0,1\}\bigr).({0,…,n−1}×{0,1})⊔({0,…,m−1}×{0,1}).

An index iii from the nnn-element part of the first outer copy is sent to the first summand’s (i,0)(i,0)(i,0); an index jjj from the mmm-element part of that copy is sent to the second summand’s (j,0)(j,0)(j,0). In the second outer copy, the corresponding images are respectively the first summand’s (i,1)(i,1)(i,1) and the second summand’s (j,1)(j,1)(j,1). Cases involving an empty part have no indices to map.

QAlgorithms.Papers.Independent.Intakenext100.P68.covarianceBlockMatrix

For all natural numbers n,mn,mn,m and every triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of real matrices with AAA of size 2n×2n2n\times2n2n×2n, BBB of size 2m×2m2m\times2m2m×2m, and CCC of size 2n×2m2n\times2m2n×2m, with each mode indexed by two coordinates, this defines the real matrix (ACCTB)\begin{pmatrix}A&C\\C^{\mathsf T}&B\end{pmatrix}(ACT​CB​) on the disjoint union of the two index sets. No conditions on these matrices are required, and zero-sized blocks are allowed.

QAlgorithms.Papers.Independent.Intakenext100.P68.covarianceStep

For all natural numbers n,mn,mn,m and every real matrix triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of sizes 2n×2n2n\times2n2n×2n, 2m×2m2m\times2m2m×2m, and 2n×2m2n\times2m2n×2m, this defines a new triple with both mode counts equal to nnn. Write JrJ_rJr​ for the block diagonal matrix with rrr copies of (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​). If Γ=(ACCTB)\Gamma=\begin{pmatrix}A&C\\C^{\mathsf T}&B\end{pmatrix}Γ=(ACT​CB​) is symmetric and Γ−idiag⁡(Jn,Jm)\Gamma-\mathrm{i}\operatorname{diag}(J_n,J_m)Γ−idiag(Jn​,Jm​) is positive semidefinite after complexification, the returned triple is (A−Re⁡X, A−Re⁡X, −Im⁡X)(A-\operatorname{Re}X,\ A-\operatorname{Re}X,\ -\operatorname{Im}X)(A−ReX, A−ReX, −ImX), where X=C H(B−iJm) CTX=C\,H(B-\mathrm{i}J_m)\,C^{\mathsf T}X=CH(B−iJm​)CT, real and imaginary parts are taken entrywise, and H(M)H(M)H(M) is zero for non-Hermitian MMM and otherwise applies t↦t−1t\mapsto t^{-1}t↦t−1 by Hermitian functional calculus, with 0−1=00^{-1}=00−1=0. If that symmetry-and-positivity condition fails, all three returned matrices are zero. The definition includes zero mode counts and imposes no hypotheses on the input triple.

QAlgorithms.Papers.Independent.Intakenext100.P68.euclideanOpNorm

For any finite index types I,JI,JI,J, each equipped with decidable equality, and any real matrix C=(Cij)i∈I,j∈JC=(C_{ij})_{i\in I,j\in J}C=(Cij​)i∈I,j∈J​, this defines the real number

∥C∥op=sup⁡∑j∈Jxj2≤1∑i∈I(∑j∈JCijxj)2,\|C\|_{\mathrm{op}} =\sup_{\sum_{j\in J}x_j^2\le 1} \sqrt{\sum_{i\in I}\left(\sum_{j\in J}C_{ij}x_j\right)^2},∥C∥op​=∑j∈J​xj2​≤1sup​i∈I∑​​j∈J∑​Cij​xj​​2​,

namely the operator norm of the continuous linear map from the Euclidean space RJ\mathbb R^JRJ to RI\mathbb R^IRI given by multiplication by CCC. Empty index types are allowed; if either index type is empty, this norm is zero.

QAlgorithms.Papers.Independent.Intakenext100.P68.hermitianInverse

For any scalar type KKK equipped with a real-or-complex scalar structure, any finite index type III equipped with decidable equality, and any matrix AAA over KKK indexed by I×II\times II×I, this defines a matrix as follows: if AAA is Hermitian, apply the real function t↦t−1t\mapsto t^{-1}t↦t−1 to AAA by Hermitian continuous functional calculus; otherwise return the zero matrix. The scalar reciprocal is total, with 0−1=00^{-1}=00−1=0, so in the Hermitian branch zero eigenvalues are sent to zero and nonzero eigenvalues to their reciprocals. No invertibility assumption is required, and III may be empty.

QAlgorithms.Papers.Independent.Intakenext100.P68.interleavedJ

For every natural number nnn, this defines a real matrix JnJ_nJn​ indexed by pairs (a,r)∈{0,…,n−1}×{0,1}(a,r)\in\{0,\ldots,n-1\}\times\{0,1\}(a,r)∈{0,…,n−1}×{0,1}. Its entries between distinct values of aaa are zero, and its block for each fixed aaa, in coordinate order 0,10,10,1, is (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​). When n=0n=0n=0, this is the matrix with empty index set.

QAlgorithms.Papers.Independent.Intakenext100.P68.lowerWitness

For every natural number nnn, including n=0n=0n=0, let Qn={0,…,n−1}×{0,1}Q_n=\{0,\ldots,n-1\}\times\{0,1\}Qn​={0,…,n−1}×{0,1}, and let g=(A,B,C)g=(A,B,C)g=(A,B,C) be three arbitrary real matrices indexed by Qn×QnQ_n\times Q_nQn​×Qn​. This defines the real matrix

L(g)=A−∥C∥opIQn,L(g)=A-\|C\|_{\mathrm{op}}I_{Q_n},L(g)=A−∥C∥op​IQn​​,

where ∥C∥op\|C\|_{\mathrm{op}}∥C∥op​ is the operator norm of multiplication by CCC between Euclidean spaces, and IQnI_{Q_n}IQn​​ is the identity matrix. No symmetry, positivity, or uncertainty condition on ggg is required.

QAlgorithms.Papers.Independent.Intakenext100.P68.momentumFlip

For every natural number mmm, including zero, this defines the real diagonal matrix FmF_mFm​ indexed by Qm={0,…,m−1}×{0,1}Q_m=\{0,\ldots,m-1\}\times\{0,1\}Qm​={0,…,m−1}×{0,1}, with

(Fm)(a,s),(b,t)={1,(a,s)=(b,t) and s=0,−1,(a,s)=(b,t) and s=1,0,(a,s)≠(b,t).(F_m)_{(a,s),(b,t)} = \begin{cases} 1,&(a,s)=(b,t)\text{ and }s=0,\\ -1,&(a,s)=(b,t)\text{ and }s=1,\\ 0,&(a,s)\ne(b,t). \end{cases}(Fm​)(a,s),(b,t)​=⎩⎨⎧​1,−1,0,​(a,s)=(b,t) and s=0,(a,s)=(b,t) and s=1,(a,s)=(b,t).​

Thus multiplication by this matrix preserves every coordinate labelled 000 and negates every coordinate labelled 111; for m=0m=0m=0, it is the empty matrix.

QAlgorithms.Papers.Independent.Intakenext100.P68.partialTransposeCovariance

For all natural numbers n,mn,mn,m, including zero, let Qr={0,…,r−1}×{0,1}Q_r=\{0,\ldots,r-1\}\times\{0,1\}Qr​={0,…,r−1}×{0,1}, and let g=(A,B,C)g=(A,B,C)g=(A,B,C) consist of arbitrary real matrices AAA on QnQ_nQn​, BBB on QmQ_mQm​, and CCC indexed by Qn×QmQ_n\times Q_mQn​×Qm​. With FmF_mFm​ the diagonal matrix assigning 111 to coordinates (j,0)(j,0)(j,0) and −1-1−1 to coordinates (j,1)(j,1)(j,1), this defines the new block triple

(A, FmBFm, CFm).(A,\ F_mBF_m,\ CF_m).(A, Fm​BFm​, CFm​).

The definition imposes no symmetry, positivity, or physicality hypotheses.

QAlgorithms.Papers.Independent.Intakenext100.P68.realCovarianceSum

For any types I,JI,JI,J, each equipped with decidable equality, and arbitrary real matrices AAA indexed by I×II\times II×I and BBB indexed by J×JJ\times JJ×J, this defines the block diagonal matrix (A00B)\begin{pmatrix}A&0\\0&B\end{pmatrix}(A0​0B​) indexed by the disjoint union I⊔JI\sqcup JI⊔J. Neither index type is required to be finite or nonempty.

QAlgorithms.Papers.Independent.Intakenext100.P68.recoverFirst

For all natural numbers n,mn,mn,m, let Qr={0,…,r−1}×{0,1}Q_r=\{0,\ldots,r-1\}\times\{0,1\}Qr​={0,…,r−1}×{0,1}, and take an arbitrary block triple g=(A,B,C)g=(A,B,C)g=(A,B,C), with AAA on QnQ_nQn​, BBB on QmQ_mQm​, and CCC indexed by Qn×QmQ_n\times Q_mQn​×Qm​. For a real square matrix MMM, write H(M)=0H(M)=0H(M)=0 when MMM is not Hermitian, and otherwise let H(M)H(M)H(M) apply the reciprocal function to its eigenvalues with 0−1=00^{-1}=00−1=0. Define JrJ_rJr​ by (Jr)(i,0),(i,1)=−1(J_r)_{(i,0),(i,1)}=-1(Jr​)(i,0),(i,1)​=−1, (Jr)(i,1),(i,0)=1(J_r)_{(i,1),(i,0)}=1(Jr​)(i,1),(i,0)​=1, and all other entries zero. A triple h=(Ah,Bh,Ch)h=(A_h,B_h,C_h)h=(Ah​,Bh​,Ch​), whose two block sizes may differ, is called physical here when

Gh=(AhChChTBh)is symmetric andGh−i(Jfirst⊕Jsecond)⪰0,G_h=\begin{pmatrix}A_h&C_h\\C_h^{\mathsf T}&B_h\end{pmatrix} \quad\text{is symmetric and}\quad G_h-i(J_{\text{first}}\oplus J_{\text{second}})\succeq0,Gh​=(Ah​ChT​​Ch​Bh​​)is symmetric andGh​−i(Jfirst​⊕Jsecond​)⪰0,

where real matrices are embedded entrywise into complex matrices. Define F(h)F(h)F(h) to be the zero triple if this physicality condition fails; otherwise, with

Zh=ChH(Bh−iJsecond)ChT,Z_h=C_hH(B_h-iJ_{\text{second}})C_h^{\mathsf T},Zh​=Ch​H(Bh​−iJsecond​)ChT​,

define F(h)=(Ah−Re⁡Zh, Ah−Re⁡Zh, −Im⁡Zh)F(h)=(A_h-\operatorname{Re}Z_h,\ A_h-\operatorname{Re}Z_h,\ -\operatorname{Im}Z_h)F(h)=(Ah​−ReZh​, Ah​−ReZh​, −ImZh​). Put T0=F(g)T_0=F(g)T0​=F(g) and Tk+1=F(Tk)T_{k+1}=F(T_k)Tk+1​=F(Tk​), and write Tk=(Ak,Bk,Ck)T_k=(A_k,B_k,C_k)Tk​=(Ak​,Bk​,Ck​). The declaration defines a function RgR_gRg​ of a natural number and an arbitrary real matrix UUU on QnQ_nQn​ by

Rg(0,U)=U,Rg(k+1,U)=Rg ⁣(k,12(U+Bk−CkTH(Ak−U)Ck)).R_g(0,U)=U,\qquad R_g(k+1,U)=R_g\!\left(k,\frac12\left(U+B_k-C_k^{\mathsf T}H(A_k-U)C_k\right)\right).Rg​(0,U)=U,Rg​(k+1,U)=Rg​(k,21​(U+Bk​−CkT​H(Ak​−U)Ck​)).

All zero dimensions and all natural iteration counts are included, and no physicality assumption on the initial ggg is required.

QAlgorithms.Papers.Independent.Intakenext100.P68.secondWitness

For all natural numbers n,mn,mn,m, including zero, put Qr={0,…,r−1}×{0,1}Q_r=\{0,\ldots,r-1\}\times\{0,1\}Qr​={0,…,r−1}×{0,1}. Given arbitrary real matrices AAA on QnQ_nQn​, BBB on QmQ_mQm​, CCC with rows in QnQ_nQn​ and columns in QmQ_mQm​, grouped as g=(A,B,C)g=(A,B,C)g=(A,B,C), and any real matrix UUU on QnQ_nQn​, this defines

V(g,U)=B−CTH(A−U)C.V(g,U)=B-C^{\mathsf T}H(A-U)C.V(g,U)=B−CTH(A−U)C.

Here H(M)H(M)H(M) is zero when MMM is not Hermitian; when MMM is Hermitian, H(M)H(M)H(M) is obtained by applying the scalar function t↦t−1t\mapsto t^{-1}t↦t−1 to its spectrum, with 0−1=00^{-1}=00−1=0. Thus HHH is defined even for singular matrices. No physicality or positivity assumption is imposed.

QAlgorithms.Papers.Independent.Intakenext100.P68.tail

For all natural numbers n,mn,mn,m and every real matrix triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of sizes 2n×2n2n\times2n2n×2n, 2m×2m2m\times2m2m×2m, and 2n×2m2n\times2m2n×2m, this defines a sequence of triples with both mode counts equal to nnn by T0=F(g)T_0=F(g)T0​=F(g) and Tk+1=F(Tk)T_{k+1}=F(T_k)Tk+1​=F(Tk​) for every natural number kkk; thus TkT_kTk​ applies the following rule k+1k+1k+1 times. For a triple (A,B,C)(A,B,C)(A,B,C) with mode counts r,sr,sr,s, let JqJ_qJq​ be block diagonal with qqq copies of (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​). If Γ=(ACCTB)\Gamma=\begin{pmatrix}A&C\\C^{\mathsf T}&B\end{pmatrix}Γ=(ACT​CB​) is symmetric and its complexification minus idiag⁡(Jr,Js)\mathrm{i}\operatorname{diag}(J_r,J_s)idiag(Jr​,Js​) is positive semidefinite, set F(A,B,C)=(A−Re⁡X, A−Re⁡X, −Im⁡X)F(A,B,C)=(A-\operatorname{Re}X,\ A-\operatorname{Re}X,\ -\operatorname{Im}X)F(A,B,C)=(A−ReX, A−ReX, −ImX), where X=C H(B−iJs) CTX=C\,H(B-\mathrm{i}J_s)\,C^{\mathsf T}X=CH(B−iJs​)CT, real matrices are complexified in this expression, and H(M)H(M)H(M) is zero for non-Hermitian MMM and otherwise applies the reciprocal function to its eigenvalues by Hermitian functional calculus, sending zero to zero. If the condition fails, FFF returns three zero matrices. All natural indices and zero mode counts are included, with no assumptions on the initial triple.

QAlgorithms.Papers.Independent.Intakenext100.P68.updateX

For all natural numbers n,mn,mn,m and every triple g=(A,B,C)g=(A,B,C)g=(A,B,C) of real matrices of sizes 2n×2n2n\times2n2n×2n, 2m×2m2m\times2m2m×2m, and 2n×2m2n\times2m2n×2m, this defines the complex matrix Xg=C H(B−iJm) CTX_g=C\,H(B-\mathrm{i}J_m)\,C^{\mathsf T}Xg​=CH(B−iJm​)CT, where real matrices are embedded entrywise into C\mathbb CC, JmJ_mJm​ is block diagonal with mmm copies of (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix}(01​−10​), and H(M)H(M)H(M) is zero when MMM is not Hermitian and otherwise is obtained by Hermitian functional calculus from t↦t−1t\mapsto t^{-1}t↦t−1, with 0−1=00^{-1}=00−1=0. The definition does not use AAA and requires no positivity or invertibility assumptions. Zero mode counts are included; in particular, m=0m=0m=0 gives the zero 2n×2n2n\times2n2n×2n matrix.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

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

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me