Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Necessary purification test in the balanced domain

Open
QAlgorithms.Papers.Independent.Intake100.P46.testBound_lt_rank_notPurifiable

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

prove2quantum

All systems have positive finite dimensions and fixed computational bases. Choi operators are unnormalized and input first. A valid process maps every pair of local CPTP maps, with arbitrary ancillary input and output wires, to a CPTP map. Purity tests every compatible pair of local unitaries with those same ancillary extensions.

Let WWW be a valid bipartite process with trivial global past and future, let r=rank⁡Wr=\operatorname{rank}Wr=rankW, and suppose dAIdBI=dAOdBOd_{A_I}d_{B_I}=d_{A_O}d_{B_O}dAI​​dBI​​=dAO​​dBO​​. Choose its positive spectral support, the canonical vector w0=∑i=0r−1λi ∣λi⟩∣i⟩w_0=\sum_{i=0}^{r-1}\sqrt{\lambda_i}\,|\lambda_i\rangle|i\ranglew0​=∑i=0r−1​λi​​∣λi​⟩∣i⟩, an orthonormal basis of ker⁡OW\ker O_WkerOW​, and a full orthonormal eigenbasis of the compression in Eq.(30). Here OW=(⟨w0∗∣⊗I)ΠLV⊥(∣w0∗⟩⊗I)O_W=(\langle w_0^*|\otimes I)\Pi_{L_V^\perp}(|w_0^*\rangle\otimes I)OW​=(⟨w0∗​∣⊗I)ΠLV⊥​​(∣w0∗​⟩⊗I), and ΠLV⊥\Pi_{L_V^\perp}ΠLV⊥​​ represents I−LVI-L_VI−LV​ on input-first vectorized matrices. For every nonzero eigenmode, reshape it by ∣MkT⟩ ⁣⟩=∣mk⟩|M_k^T\rangle\!\rangle=|m_k\rangle∣MkT​⟩⟩=∣mk​⟩ and form Ck=Mk+Mk†C_k=M_k+M_k^\daggerCk​=Mk​+Mk†​ and Ck+dm=i(Mk−Mk†)C_{k+d_m}=i(M_k-M_k^\dagger)Ck+dm​​=i(Mk​−Mk†​). Suppose this family is nonempty. With n+(C),n−(C),n0(C)n_+(C),n_-(C),n_0(C)n+​(C),n−​(C),n0​(C) counting eigenvalues with multiplicity, set dmax⁡=min⁡k[min⁡(n+(Ck),n−(Ck))+n0(Ck)]d_{\max}=\min_k[\min(n_+(C_k),n_-(C_k))+n_0(C_k)]dmax​=mink​[min(n+​(Ck​),n−​(Ck​))+n0​(Ck​)]. Then

dmax⁡<r⟹W is not purifiable.d_{\max}<r\quad\Longrightarrow\quad W\text{ is not purifiable}.dmax​<r⟹W is not purifiable.

This is a necessary test only; its failure to obstruct purification gives no converse. The chosen bases are part of the data, rather than a basis-independence assertion.

Moreover, for every complex linear subspace SSS of the kernel coordinate space, if (I−LV)(∣ℓ(v)⟩⟨ℓ(w)∣)=0(I-L_V)(|\ell(v)\rangle\langle\ell(w)|)=0(I−LV​)(∣ℓ(v)⟩⟨ℓ(w)∣)=0 for every v,w∈Sv,w\in Sv,w∈S, then dim⁡CS≤dmax⁡\dim_{\mathbb C}S\le d_{\max}dimC​S≤dmax​. Here ℓ\ellℓ sends coordinates to their linear combination in the chosen orthonormal basis of VWV_WVW​; it preserves complex dimension.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P46
Formal statement
noncomputable section

open scoped Matrix ComplexConjugate ComplexOrder

attribute [local instance] Classical.decEq Classical.propDecidable

namespace QAlgorithms.Papers.Independent.Intake100.P46

/-- PDF pp.6–7, §5, Eqs.(33)–(34): every bilinearly admissible subspace of VW
has dimension at most the computed bound, and the strict rank obstruction excludes
purification. Subspaces are expressed in the orthonormal kernel coordinates.
PRINTED: unrestricted laboratory dimensions. CHANGED: require total laboratory
input/output balance. WHY: the rank-sized reversible reconstruction in Theorem 4
is square only in this domain; the unrestricted reconstruction is deferred. -/
theorem testBound_lt_rank_notPurifiable {d : Fin 4 → ℕ+}
    (W : ProcessMatrix (laboratorySignature d 1 1)) (hW : IsValidProcess W)
    (e : SupportSpectrum W) (b : KernelBasisData e) (s : CompressionSpectrum b)
    (balanced : (d 0 : ℕ) * (d 2 : ℕ) = (d 1 : ℕ) * (d 3 : ℕ))
    (nonempty : ∃ k, s.values k ≠ 0) :
    (∀ S : Submodule ℂ (Fin b.dimension → ℂ),
      (∀ v ∈ S, ∀ w ∈ S,
        invalidSubspaceProjector
          (vectorOuter (liftKernelVector b v) (liftKernelVector b w)) = 0) →
      (Module.finrank ℂ S : WithTop ℕ) ≤ testBound s) ∧
    (testBound s < (Matrix.rank W : WithTop ℕ) → ¬ IsPurifiable W) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P46

end
Source
A purification postulate for quantum mechanics with indefinite causal order, arXiv:1611.08535v4, PDF p. 7, §5, Eqs.(26)–(34)
Read-back

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

Let d0,d1,d2,d3d_0,d_1,d_2,d_3d0​,d1​,d2​,d3​ be arbitrary positive integers, put δp,f=(p,d0,d1,d2,d3,f)\delta_{p,f}=(p,d_0,d_1,d_2,d_3,f)δp,f​=(p,d0​,d1​,d2​,d3​,f), and, for any six positive dimensions δ\deltaδ, write Hδ=∏j=05{0,…,δj−1}H_\delta=\prod_{j=0}^{5}\{0,\ldots,\delta_j-1\}Hδ​=∏j=05​{0,…,δj​−1}. All matrices and vectors below have complex entries. To specify the operations appearing in the statement, for T⊆{0,…,5}T\subseteq\{0,\ldots,5\}T⊆{0,…,5} define the replacement operation on matrices indexed by HδH_\deltaHδ​ by

(RTX)xy={1∏j∈Tδj∑z∈Hδzj=xj for j∉TXz, (zT,yTc),xj=yj for every j∈T,0,otherwise,(R_T X)_{xy}= \begin{cases} \displaystyle \frac{1}{\prod_{j\in T}\delta_j} \sum_{\substack{z\in H_\delta\\ z_j=x_j\text{ for }j\notin T}} X_{z,\,(z_T,y_{T^c})}, &x_j=y_j\text{ for every }j\in T,\\ 0,&\text{otherwise}, \end{cases}(RT​X)xy​=⎩⎨⎧​∏j∈T​δj​1​z∈Hδ​zj​=xj​ for j∈/T​∑​Xz,(zT​,yTc​)​,0,​xj​=yj​ for every j∈T,otherwise,​

where (zT,yTc)(z_T,y_{T^c})(zT​,yTc​) takes its coordinates from zzz on TTT and from yyy elsewhere, and define

PδX=X−R{5}X+R{2,5}X+R{4,5}X−R{2,4,5}X−R{1,2,5}X+R{1,2,4,5}X−R{3,4,5}X+R{2,3,4,5}X−R{1,2,3,4,5}X+R{0,1,2,3,4,5}X,QδX=X−PδX.\begin{aligned} P_\delta X={}&X-R_{\{5\}}X+R_{\{2,5\}}X+R_{\{4,5\}}X-R_{\{2,4,5\}}X -R_{\{1,2,5\}}X+R_{\{1,2,4,5\}}X\\ &-R_{\{3,4,5\}}X+R_{\{2,3,4,5\}}X -R_{\{1,2,3,4,5\}}X+R_{\{0,1,2,3,4,5\}}X, \qquad Q_\delta X=X-P_\delta X. \end{aligned}Pδ​X=​X−R{5}​X+R{2,5}​X+R{4,5}​X−R{2,4,5}​X−R{1,2,5}​X+R{1,2,4,5}​X−R{3,4,5}​X+R{2,3,4,5}​X−R{1,2,3,4,5}​X+R{0,1,2,3,4,5}​X,Qδ​X=X−Pδ​X.​

Here a channel matrix on input and output index sets I,OI,OI,O means a positive semidefinite matrix JJJ indexed by I×OI\times OI×O satisfying ∑o∈OJ(i,o),(j,o)=1i=j\sum_{o\in O}J_{(i,o),(j,o)}=\mathbf1_{i=j}∑o∈O​J(i,o),(j,o)​=1i=j​ for every i,j∈Ii,j\in Ii,j∈I. For a matrix ZZZ indexed by HδH_\deltaHδ​, four arbitrary positive auxiliary dimensions ain,aout,bin,bouta_{\rm in},a_{\rm out},b_{\rm in},b_{\rm out}ain​,aout​,bin​,bout​, and laboratory matrices A,BA,BA,B with respective input/output index sets (δ1×ain,δ2×aout)(\delta_1\times a_{\rm in},\delta_2\times a_{\rm out})(δ1​×ain​,δ2​×aout​) and (δ3×bin,δ4×bout)(\delta_3\times b_{\rm in},\delta_4\times b_{\rm out})(δ3​×bin​,δ4​×bout​), define their contraction LZ(A,B)L_Z(A,B)LZ​(A,B) by

LZ(A,B)((p,α,β),(f,α′,β′)),((q,γ,η),(g,γ′,η′))=∑x1,x2,x3,x4y1,y2,y3,y4Z(p,x1,x2,x3,x4,f),(q,y1,y2,y3,y4,g)A((x1,α),(x2,α′)),((y1,γ),(y2,γ′))B((x3,β),(x4,β′)),((y3,η),(y4,η′)),\begin{aligned} &L_Z(A,B)_{((p,\alpha,\beta),(f,\alpha',\beta')), ((q,\gamma,\eta),(g,\gamma',\eta'))}\\ &\quad= \sum_{\substack{x_1,x_2,x_3,x_4\\y_1,y_2,y_3,y_4}} Z_{(p,x_1,x_2,x_3,x_4,f),(q,y_1,y_2,y_3,y_4,g)} A_{((x_1,\alpha),(x_2,\alpha')),((y_1,\gamma),(y_2,\gamma'))} B_{((x_3,\beta),(x_4,\beta')),((y_3,\eta),(y_4,\eta'))}, \end{aligned}​LZ​(A,B)((p,α,β),(f,α′,β′)),((q,γ,η),(g,γ′,η′))​=x1​,x2​,x3​,x4​y1​,y2​,y3​,y4​​∑​Z(p,x1​,x2​,x3​,x4​,f),(q,y1​,y2​,y3​,y4​,g)​A((x1​,α),(x2​,α′)),((y1​,γ),(y2​,γ′))​B((x3​,β),(x4​,β′)),((y3​,η),(y4​,η′))​,​

with each internal coordinate ranging over its corresponding δj\delta_jδj​ values. Call ZZZ valid if this contraction is a channel matrix for every such choice of auxiliary dimensions and every pair of channel matrices A,BA,BA,B. Call ZZZ pure if, for every such choice and every pair of matrices U,VU,VU,V between the corresponding laboratory input and output spaces satisfying both U†U=I, UU†=IU^\dagger U=I,\ UU^\dagger=IU†U=I, UU†=I and V†V=I, VV†=IV^\dagger V=I,\ VV^\dagger=IV†V=I, VV†=I, the contraction LZ(JU,JV)L_Z(J_U,J_V)LZ​(JU​,JV​) equals JTJ_TJT​ for some matrix TTT satisfying both T†T=IT^\dagger T=IT†T=I and TT†=ITT^\dagger=ITT†=I, where (JU)(i,o),(j,t)=UoiUtj‾(J_U)_{(i,o),(j,t)}=U_{oi}\overline{U_{tj}}(JU​)(i,o),(j,t)​=Uoi​Utj​​, and likewise for V,TV,TV,T. Now let WWW be any valid matrix indexed by Hδ1,1H_{\delta_{1,1}}Hδ1,1​​. Suppose it is supplied with a positive integer r=rank⁡Wr=\operatorname{rank}Wr=rankW, positive real numbers λi\lambda_iλi​, and vectors ui:Hδ1,1→Cu_i:H_{\delta_{1,1}}\to\mathbb Cui​:Hδ1,1​​→C, for 0≤i<r0\le i<r0≤i<r, such that

∑xui(x)‾uj(x)=1i=j,Wxy=∑i=0r−1λiui(x)ui(y)‾.\sum_x\overline{u_i(x)}u_j(x)=\mathbf1_{i=j}, \qquad W_{xy}=\sum_{i=0}^{r-1}\lambda_i u_i(x)\overline{u_i(y)}.x∑​ui​(x)​uj​(x)=1i=j​,Wxy​=i=0∑r−1​λi​ui​(x)ui​(y)​.

On H=Hδ1,rH=H_{\delta_{1,r}}H=Hδ1,r​​, define

c(x)=λx5 ux5(0,x1,x2,x3,x4,0),D(a,v),(b,w)=(Qδ1,rEw,b)v,a,Kvw=∑a,b∈Hc(a)D(a,v),(b,w)c(b)‾,c(x)=\sqrt{\lambda_{x_5}}\,u_{x_5}(0,x_1,x_2,x_3,x_4,0),\qquad D_{(a,v),(b,w)}=(Q_{\delta_{1,r}}E_{w,b})_{v,a},\qquad K_{vw}=\sum_{a,b\in H}c(a)D_{(a,v),(b,w)}\overline{c(b)},c(x)=λx5​​​ux5​​(0,x1​,x2​,x3​,x4​,0),D(a,v),(b,w)​=(Qδ1,r​​Ew,b​)v,a​,Kvw​=a,b∈H∑​c(a)D(a,v),(b,w)​c(b)​,

where Ew,bE_{w,b}Ew,b​ has entry 111 at row www, column bbb, and zero elsewhere. Suppose further that a natural number nnn and vectors bi:H→Cb_i:H\to\mathbb Cbi​:H→C, 0≤i<n0\le i<n0≤i<n, are supplied with ∑xbi(x)‾bj(x)=1i=j\sum_x\overline{b_i(x)}b_j(x)=\mathbf1_{i=j}∑x​bi​(x)​bj​(x)=1i=j​ and complex span exactly {v:Kv=0}\{v:Kv=0\}{v:Kv=0}. Define the n2×n2n^2\times n^2n2×n2 matrix

C(i,j),(k,ℓ)=∑a,v,c′,w∈Hbi(a)bj(v)‾D(a,v),(c′,w)bk(c′)‾bℓ(w).C_{(i,j),(k,\ell)} =\sum_{a,v,c',w\in H} b_i(a)\overline{b_j(v)} D_{(a,v),(c',w)} \overline{b_k(c')}b_\ell(w).C(i,j),(k,ℓ)​=a,v,c′,w∈H∑​bi​(a)bj​(v)​D(a,v),(c′,w)​bk​(c′)​bℓ​(w).

Suppose real numbers θk\theta_kθk​ and vectors zk:{0,…,n−1}2→Cz_k:\{0,\ldots,n-1\}^2\to\mathbb Czk​:{0,…,n−1}2→C, indexed by all pairs k∈{0,…,n−1}2k\in\{0,\ldots,n-1\}^2k∈{0,…,n−1}2, are supplied such that these vectors are orthonormal, span the whole complex coordinate space, and satisfy Czk=θkzkCz_k=\theta_k z_kCzk​=θk​zk​. Assume also

d0d2=d1d3and∃k, θk≠0.d_0d_2=d_1d_3 \quad\text{and}\quad \exists k,\ \theta_k\ne0.d0​d2​=d1​d3​and∃k, θk​=0.

For every kkk with θk≠0\theta_k\ne0θk​=0, form the matrix MkM_kMk​ with entries (Mk)ij=zk(i,j)(M_k)_{ij}=z_k(i,j)(Mk​)ij​=zk​(i,j), and, for ε∈{0,1}\varepsilon\in\{0,1\}ε∈{0,1}, set

Hk,0=Mk+Mk†,Hk,1=iMk+(iMk)†.H_{k,0}=M_k+M_k^\dagger,\qquad H_{k,1}=\mathrm iM_k+(\mathrm iM_k)^\dagger.Hk,0​=Mk​+Mk†​,Hk,1​=iMk​+(iMk​)†.

For a Hermitian matrix H′H'H′, let n+(H′),n−(H′),n0(H′)n_+(H'),n_-(H'),n_0(H')n+​(H′),n−​(H′),n0​(H′) count its strictly positive, strictly negative, and zero eigenvalues, respectively, with multiplicity, and put

B=min⁡k:θk≠0ε∈{0,1}(min⁡(n+(Hk,ε),n−(Hk,ε))+n0(Hk,ε)).B=\min_{\substack{k:\theta_k\ne0\\\varepsilon\in\{0,1\}}} \bigl(\min(n_+(H_{k,\varepsilon}),n_-(H_{k,\varepsilon})) +n_0(H_{k,\varepsilon})\bigr).B=k:θk​=0ε∈{0,1}​min​(min(n+​(Hk,ε​),n−​(Hk,ε​))+n0​(Hk,ε​)).

This minimum is interpreted in N∪{∞}\mathbb N\cup\{\infty\}N∪{∞}, with an empty minimum equal to ∞\infty∞; the assumed nonzero θk\theta_kθk​ makes its index set nonempty and forces n>0n>0n>0. The declaration asserts the conjunction of the following two conclusions: first, every complex linear subspace S⊆CnS\subseteq\mathbb C^nS⊆Cn such that

Qδ1,r ⁣(ℓ(v)ℓ(w)†)=0for all v,w∈S,ℓ(v)(x)=∑i=0n−1vibi(x),Q_{\delta_{1,r}}\!\left(\ell(v)\ell(w)^\dagger\right)=0 \quad\text{for all }v,w\in S, \qquad \ell(v)(x)=\sum_{i=0}^{n-1}v_i b_i(x),Qδ1,r​​(ℓ(v)ℓ(w)†)=0for all v,w∈S,ℓ(v)(x)=i=0∑n−1​vi​bi​(x),

has dim⁡CS≤B\dim_{\mathbb C}S\le BdimC​S≤B, including the zero subspace; second, if B<rank⁡WB<\operatorname{rank}WB<rankW, there do not exist any positive integers p,fp,fp,f and any matrix ZZZ indexed by Hδp,fH_{\delta_{p,f}}Hδp,f​​ that is both valid and pure in the senses just specified and satisfies, for every x,y∈Hδ1,1x,y\in H_{\delta_{1,1}}x,y∈Hδ1,1​​,

Wxy=∑t=0f−1Z(0,x1,x2,x3,x4,t),(0,y1,y2,y3,y4,t).W_{xy} =\sum_{t=0}^{f-1} Z_{(0,x_1,x_2,x_3,x_4,t),(0,y_1,y_2,y_3,y_4,t)}.Wxy​=t=0∑f−1​Z(0,x1​,x2​,x3​,x4​,t),(0,y1​,y2​,y3​,y4​,t)​.

The supplied support data require r>0r>0r>0, so zero-rank WWW is excluded by those hypotheses.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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