Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 5: matrix elements and a full trace

Proved
QAlgorithms.Papers.Independent.Extend50.P13.matrix_elements_full_trace

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. For k=r+1≥1k=r+1\ge1k=r+1≥1 and a partition λ⊢k\lambda\vdash kλ⊢k, let T(π)T(\pi)T(π) permute tensor factors by v1⊗⋯⊗vk↦vπ−1(1)⊗⋯⊗vπ−1(k)v_1\otimes\cdots\otimes v_k\mapsto v_{\pi^{-1}(1)}\otimes\cdots\otimes v_{\pi^{-1}(k)}v1​⊗⋯⊗vk​↦vπ−1(1)​⊗⋯⊗vπ−1(k)​, and set Pλ=χλ(e)k!∑π∈Skχλ(π−1)T(π)P_\lambda=\frac{\chi_\lambda(e)}{k!}\sum_{\pi\in S_k}\chi_\lambda(\pi^{-1})T(\pi)Pλ​=k!χλ​(e)​∑π∈Sk​​χλ​(π−1)T(π) and fλ(X1,…,Xr)=tr⁡1…r[Pλ(X1⊗⋯⊗Xr⊗I)]f_\lambda(X_1,\ldots,X_r)=\operatorname{tr}_{1\ldots r}[P_\lambda(X_1\otimes\cdots\otimes X_r\otimes I)]fλ​(X1​,…,Xr​)=tr1…r​[Pλ​(X1​⊗⋯⊗Xr​⊗I)]. Here χλ\chi_\lambdaχλ​ is the character of the shape-labelled Specht representation, independently of ddd; shapes with more than ddd rows are included. For arbitrary vectors v,w∈Cdv,w\in\mathbb C^dv,w∈Cd and arbitrary input matrices,

⟨w,fλ(X1,…,Xr)v⟩=tr⁡[Pλ(X1⊗⋯⊗Xr⊗∣v⟩⟨w∣)].\langle w,f_\lambda(X_1,\ldots,X_r)v\rangle=\operatorname{tr}[P_\lambda(X_1\otimes\cdots\otimes X_r\otimes|v\rangle\langle w|)].⟨w,fλ​(X1​,…,Xr​)v⟩=tr[Pλ​(X1​⊗⋯⊗Xr​⊗∣v⟩⟨w∣)].

Neither vector is required to have unit norm; the bra is conjugate linear. This relates output matrix elements to full tensor traces.

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

/-- Lemma 5, Eq.33 (PDF p.10). v and w are arbitrary vectors, not states. -/
theorem matrix_elements_full_trace {d r : ℕ} (hd : 0 < d)
    (lambda : QAlgorithms.Schur.Partition (r+1) (r+1))
    (X : Fin r → (Matrix (Fin d) (Fin d) ℂ)) (v w : Fin d → ℂ) :
    finiteMatrixElement w (polarizedMap lambda X) v =
      Matrix.trace (centralProjector d lambda * tensorMatrices (Fin.lastCases (rankOneOperator v w) X)) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P13

end
Source
Positive maps and trace polynomials from the symmetric group, arXiv:2002.12887v2, PDF p. 10, Lemma 5: matrix elements and a full trace
Read-back

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

For all natural numbers d,rd,rd,r with d>0d>0d>0, let λ\lambdaλ be a Young diagram with r+1r+1r+1 cells and at most r+1r+1r+1 rows, let X0,…,Xr−1X_0,\ldots,X_{r-1}X0​,…,Xr−1​ be arbitrary complex d×dd\times dd×d matrices, and let v,w∈Cdv,w\in\mathbb C^dv,w∈Cd be arbitrary vectors. Define the following matrices using the fixed numbering of the cells of λ\lambdaλ by {0,…,r}\{0,\ldots,r\}{0,…,r}: let RλR_\lambdaRλ​ and CλC_\lambdaCλ​ be the permutations preserving each cell's row and column, respectively, and let

Yg,h=∑a∈Rλ∑b∈Cλsgn⁡(b) 1{g=hab},(Lσ)g,h=1{g=σh},χλ(σ)=tr⁡(LσΠrange⁡Y),Y_{g,h}=\sum_{a\in R_\lambda}\sum_{b\in C_\lambda} \operatorname{sgn}(b)\,\mathbf1_{\{g=hab\}}, \qquad (L_\sigma)_{g,h}=\mathbf1_{\{g=\sigma h\}}, \qquad \chi_\lambda(\sigma)=\operatorname{tr}(L_\sigma\Pi_{\operatorname{range}Y}),Yg,h​=a∈Rλ​∑​b∈Cλ​∑​sgn(b)1{g=hab}​,(Lσ​)g,h​=1{g=σh}​,χλ​(σ)=tr(Lσ​ΠrangeY​),

where Πrange⁡Y\Pi_{\operatorname{range}Y}ΠrangeY​ is the orthogonal projection onto the range of YYY. With (Tσ)y,x=1{y=x∘σ−1}(T_\sigma)_{y,x}=\mathbf1_{\{y=x\circ\sigma^{-1}\}}(Tσ​)y,x​=1{y=x∘σ−1}​, set

Pλ,d=χλ(1)(r+1)!∑σ∈Sr+1χλ(σ−1)Tσ,Fλ,d(X)a,b=∑x,y∈{0,…,d−1}r(Pλ,d)(x,a),(y,b)∏i=0r−1(Xi)yi,xi.P_{\lambda,d}=\frac{\chi_\lambda(1)}{(r+1)!} \sum_{\sigma\in S_{r+1}}\chi_\lambda(\sigma^{-1})T_\sigma, \qquad F_{\lambda,d}(X)_{a,b} =\sum_{x,y\in\{0,\ldots,d-1\}^{r}} (P_{\lambda,d})_{(x,a),(y,b)} \prod_{i=0}^{r-1}(X_i)_{y_i,x_i}.Pλ,d​=(r+1)!χλ​(1)​σ∈Sr+1​∑​χλ​(σ−1)Tσ​,Fλ,d​(X)a,b​=x,y∈{0,…,d−1}r∑​(Pλ,d​)(x,a),(y,b)​i=0∏r−1​(Xi​)yi​,xi​​.

Here (x,a)(x,a)(x,a) means append aaa as the last coordinate. The declaration asserts

∑a,bwa‾ Fλ,d(X)a,bvb=tr⁡ ⁣(Pλ,d(X0⊗⋯⊗Xr−1⊗vw∗)),\sum_{a,b}\overline{w_a}\,F_{\lambda,d}(X)_{a,b}v_b =\operatorname{tr}\!\left( P_{\lambda,d}\bigl(X_0\otimes\cdots\otimes X_{r-1}\otimes vw^*\bigr)\right),a,b∑​wa​​Fλ,d​(X)a,b​vb​=tr(Pλ,d​(X0​⊗⋯⊗Xr−1​⊗vw∗)),

where (vw∗)a,b=vawb‾(vw^*)_{a,b}=v_a\overline{w_b}(vw∗)a,b​=va​wb​​, and tensor matrix entries are products of the corresponding factor entries. There are no normalization or positivity hypotheses; r=0r=0r=0 is allowed, with empty products equal to 111.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me