Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 3: trace words from arbitrary permutations

Open
QAlgorithms.Papers.Independent.Extend50.P13.trace_words_from_permutations

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 k≥1k\ge1k≥1, π∈Sk\pi\in S_kπ∈Sk​, and decompose π\piπ into disjoint cycles, including fixed points. Write each cycle with its largest entry last. For any slot qqq, let Wπ,qW_{\pi,q}Wπ,q​ be the product of the XiX_iXi​ along the cycle of qqq, starting at π(q)\pi(q)π(q) and ending at qqq. Let Cπ,qC_{\pi,q}Cπ,q​ be the product of ordinary traces of the words of all the other cycles; an empty product is one. Then

tr⁡≠k[T(π−1)(⨂iXi)]=Cπ,kWπ,k,tr⁡≠π(k)[T(π)(⨂iXi)]=Cπ−1,π(k)Wπ−1,π(k).\operatorname{tr}_{\ne k}[T(\pi^{-1})(\bigotimes_iX_i)]=C_{\pi,k}W_{\pi,k},\qquad \operatorname{tr}_{\ne\pi(k)}[T(\pi)(\bigotimes_iX_i)]=C_{\pi^{-1},\pi(k)}W_{\pi^{-1},\pi(k)}.tr=k​[T(π−1)(i⨂​Xi​)]=Cπ,k​Wπ,k​,tr=π(k)​[T(π)(i⨂​Xi​)]=Cπ−1,π(k)​Wπ−1,π(k)​.

These identities translate arbitrary permutation wirings into trace words without rotating an untraced matrix product.

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

/-- Corollary 3, Eq.28 (PDF pp.8–9). SOURCE CORRECTION: the printed second
open inverse word is canonically rotated to end at k, although the retained slot is
pi(k). Here that word ends at pi(k). For pi=(123) it is X3 X2 X1, as Proposition 2
requires. Every fixed point still contributes its singleton trace. -/
theorem trace_words_from_permutations {d r : ℕ} (hd : 0 < d)
    (pi : Equiv.Perm (Fin (r+1))) (X : Fin (r+1) → (Matrix (Fin d) (Fin d) ℂ)) :
    partialTraceSlot (Fin.last r)
      (QAlgorithms.Schur.tensorPermutation d (r+1) pi⁻¹ * tensorMatrices X) =
        openCycleExpression pi (Fin.last r) X ∧
    partialTraceSlot (pi (Fin.last r))
      (QAlgorithms.Schur.tensorPermutation d (r+1) pi * tensorMatrices X) =
        openCycleExpression pi⁻¹ (pi (Fin.last r)) 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. 9, Corollary 3: trace words from arbitrary permutations
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, every permutation π\piπ of {0,…,r}\{0,\ldots,r\}{0,…,r}, and every family X0,…,XrX_0,\ldots,X_rX0​,…,Xr​ of complex d×dd\times dd×d matrices, define TσT_\sigmaTσ​ by (Tσ)y,x=1{y=x∘σ−1}(T_\sigma)_{y,x}=\mathbf1_{\{y=x\circ\sigma^{-1}\}}(Tσ​)y,x​=1{y=x∘σ−1}​, and define (⨂iXi)x,y=∏i(Xi)xi,yi(\bigotimes_iX_i)_{x,y}=\prod_i(X_i)_{x_i,y_i}(⨂i​Xi​)x,y​=∏i​(Xi​)xi​,yi​​. For a slot qqq, let Cπ(q)C_\pi(q)Cπ​(q) be its cycle ordered as [πq,π2q,…,q][\pi q,\pi^2q,\ldots,q][πq,π2q,…,q], with [q][q][q] for a fixed point, and let LπL_\piLπ​ consist of the largest label in each cycle. For a list w=[i1,…,iℓ]w=[i_1,\ldots,i_\ell]w=[i1​,…,iℓ​], write Xw=Xi1⋯XiℓX_w=X_{i_1}\cdots X_{i_\ell}Xw​=Xi1​​⋯Xiℓ​​, with X[]=IdX_{[]}=I_dX[]​=Id​, and set

Oπ(q;X)=(∏c∈Lπq∉Cπ(c)tr⁡(XCπ(c)))XCπ(q).O_\pi(q;X)= \left(\prod_{\substack{c\in L_\pi\\q\notin C_\pi(c)}} \operatorname{tr}(X_{C_\pi(c)})\right)X_{C_\pi(q)}.Oπ​(q;X)=​c∈Lπ​q∈/Cπ​(c)​∏​tr(XCπ​(c)​)​XCπ​(q)​.

The partial trace retaining slot qqq has entries ∑sMs[q:=a],s[q:=b]\sum_s M_{s[q:=a],s[q:=b]}∑s​Ms[q:=a],s[q:=b]​, summing over assignments to all other slots. The declaration asserts

Tr⁡≠r ⁣(Tπ−1⨂iXi)=Oπ(r;X),Tr⁡≠π(r) ⁣(Tπ⨂iXi)=Oπ−1(π(r);X).\operatorname{Tr}_{\ne r}\!\left(T_{\pi^{-1}}\bigotimes_iX_i\right)=O_\pi(r;X), \qquad \operatorname{Tr}_{\ne\pi(r)}\!\left(T_\pi\bigotimes_iX_i\right) =O_{\pi^{-1}}(\pi(r);X).Tr=r​(Tπ−1​i⨂​Xi​)=Oπ​(r;X),Tr=π(r)​(Tπ​i⨂​Xi​)=Oπ−1​(π(r);X).

The case r=0r=0r=0 is included: there is one slot, the permutation is the identity, and both identities reduce to X0=X0X_0=X_0X0​=X0​.

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