Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs.(57)–(59): operator contraction and block positivity

Open
QAlgorithms.Papers.Independent.Extend50.P13.contraction_and_block_positivity

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

prove2quantum

All matrices are complex, d×dd\times dd×d, with d≥1d\ge1d≥1. Write III for the identity and tr⁡\operatorname{tr}tr for the ordinary, unnormalized trace. Matrix inequalities use the Löwner order, so A≥0A\ge0A≥0 includes Hermiticity. Let r≥1r\ge1r≥1 and let PPP be any operator on (Cd)⊗(r+1)(\mathbb C^d)^{\otimes(r+1)}(Cd)⊗(r+1), without a Hermiticity assumption. Define fP(X)=tr⁡1…r[P(X1⊗⋯⊗Xr⊗I)]f_P(X)=\operatorname{tr}_{1\ldots r}[P(X_1\otimes\cdots\otimes X_r\otimes I)]fP​(X)=tr1…r​[P(X1​⊗⋯⊗Xr​⊗I)]. For every complex input tuple and every v∈Cdv\in\mathbb C^dv∈Cd,

⟨v,fP(X)v⟩=tr⁡[P(X1⊗⋯⊗Xr⊗∣v⟩⟨v∣)].\langle v,f_P(X)v\rangle=\operatorname{tr}[P(X_1\otimes\cdots\otimes X_r\otimes|v\rangle\langle v|)].⟨v,fP​(X)v⟩=tr[P(X1​⊗⋯⊗Xr​⊗∣v⟩⟨v∣)].

For a PSD tuple XXX, fP(X)≥0f_P(X)\ge0fP​(X)≥0 if and only if the scalar on the right is real and nonnegative for every vvv. Globally,

[∀X1,…,Xr≥0, fP(X)≥0]⟺P is Hermitian and block positive.[\forall X_1,\ldots,X_r\ge0,\ f_P(X)\ge0]\quad\Longleftrightarrow\quad P\text{ is Hermitian and block positive}.[∀X1​,…,Xr​≥0, fP​(X)≥0]⟺P is Hermitian and block positive.

Block positivity tests every fully separable state, equivalently every pure product vector. The global quantifier is essential to this correspondence.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P13
Formal statement
noncomputable section

open scoped Matrix ComplexConjugate ComplexOrder

namespace QAlgorithms.Papers.Independent.Extend50.P13

attribute [local instance] Classical.propDecidable

/-- General construction, Eqs.57–59 (PDF pp.14–15). The last equivalence is
universal in all PSD input tuples; one positive value alone does not imply block
positivity. Complex scalar inequalities include both reality and nonnegativity. -/
theorem contraction_and_block_positivity {d r : ℕ} (hd : 0 < d) (hr : 1 ≤ r)
    (P : (Matrix (Fin (r+1) → Fin d) (Fin (r+1) → Fin d) ℂ)) :
    (∀ (X : Fin r → (Matrix (Fin d) (Fin d) ℂ)) (v : Fin d → ℂ),
      finiteMatrixElement v (contractInputs P X) v =
        Matrix.trace (P * tensorMatrices (Fin.lastCases (rankOneOperator v v) X))) ∧
    (∀ X : Fin r → (Matrix (Fin d) (Fin d) ℂ), (∀ i, (X i).PosSemidef) →
      ((contractInputs P X).PosSemidef ↔ ∀ v : Fin d → ℂ,
        RealNonnegative (Matrix.trace (P * tensorMatrices (Fin.lastCases (rankOneOperator v v) X))))) ∧
    (PositiveMap (contractInputs P) ↔ FullyBlockPositive P) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P13

end
Source
Positive maps and trace polynomials from the symmetric group, arXiv:2002.12887v2, PDF p. 14, Eqs.(57)–(59): operator contraction and block positivity
Read-back

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

For all natural numbers d>0d>0d>0 and r≥1r\ge1r≥1, and every complex matrix PPP indexed by ddd-valued (r+1)(r+1)(r+1)-tuples, define its contraction on an rrr-tuple of complex d×dd\times dd×d matrices X=(X0,…,Xr−1)X=(X_0,\ldots,X_{r-1})X=(X0​,…,Xr−1​) by

CP(X)a,b=∑x,y∈{0,…,d−1}rP(x,a),(y,b)∏i=0r−1(Xi)yi,xi,\mathcal C_P(X)_{a,b} =\sum_{x,y\in\{0,\ldots,d-1\}^{r}} P_{(x,a),(y,b)}\prod_{i=0}^{r-1}(X_i)_{y_i,x_i},CP​(X)a,b​=x,y∈{0,…,d−1}r∑​P(x,a),(y,b)​i=0∏r−1​(Xi​)yi​,xi​​,

where (x,a)(x,a)(x,a) appends the final coordinate, and write vv∗vv^*vv∗ for the matrix with entries vavb‾v_a\overline{v_b}va​vb​​. Then, for every such XXX and every v∈Cdv\in\mathbb C^dv∈Cd,

∑a,bva‾CP(X)a,bvb=Tr⁡ ⁣(P(X0⊗⋯⊗Xr−1⊗vv∗)).\sum_{a,b}\overline{v_a}\mathcal C_P(X)_{a,b}v_b =\operatorname{Tr}\!\left(P(X_0\otimes\cdots\otimes X_{r-1}\otimes vv^*)\right).a,b∑​va​​CP​(X)a,b​vb​=Tr(P(X0​⊗⋯⊗Xr−1​⊗vv∗)).

For every XXX whose entries XiX_iXi​ are positive semidefinite, CP(X)\mathcal C_P(X)CP​(X) is positive semidefinite if and only if, for every v∈Cdv\in\mathbb C^dv∈Cd, the trace on the right has imaginary part zero and nonnegative real part. Furthermore, CP(X)\mathcal C_P(X)CP​(X) is positive semidefinite for every tuple of positive semidefinite inputs if and only if PPP is Hermitian and

Tr⁡ ⁣(P⨂i=0rvivi∗)\operatorname{Tr}\!\left(P\bigotimes_{i=0}^{r}v_iv_i^*\right)Tr(Pi=0⨂r​vi​vi∗​)

has imaginary part zero and nonnegative real part for every collection v0,…,vr∈Cdv_0,\ldots,v_r\in\mathbb C^dv0​,…,vr​∈Cd, including zero vectors. No Hermitian assumption on PPP is imposed before these conclusions.

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

    Confirmed by the moderator at approval.

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