Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 2: matrix multiplication from cycles

Open
QAlgorithms.Papers.Independent.Extend50.P13.multiplication_from_cycles

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≥3k\ge3k≥3, let X1,…,XkX_1,\ldots,X_kX1​,…,Xk​ be arbitrary matrices and put c=(1 2 ⋯ k)c=(1\,2\,\cdots\,k)c=(12⋯k). With tr⁡≠q\operatorname{tr}_{\ne q}tr=q​ retaining only slot qqq,

tr⁡≠k[T(c−1)(X1⊗⋯⊗Xk)]=X1⋯Xk,tr⁡≠1[T(c)(X1⊗⋯⊗Xk)]=Xk⋯X1.\operatorname{tr}_{\ne k}[T(c^{-1})(X_1\otimes\cdots\otimes X_k)]=X_1\cdots X_k,\qquad \operatorname{tr}_{\ne1}[T(c)(X_1\otimes\cdots\otimes X_k)]=X_k\cdots X_1.tr=k​[T(c−1)(X1​⊗⋯⊗Xk​)]=X1​⋯Xk​,tr=1​[T(c)(X1​⊗⋯⊗Xk​)]=Xk​⋯X1​.

Here T(π)T(\pi)T(π) moves an object at slot iii to slot π(i)\pi(i)π(i). These formulas fix both multiplication order and partial-trace placement.

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

/-- Proposition 2, Eq.25 (PDF p.8). Both retained slots and both ordered products
are included, with the source's explicit k ≥ 3 restriction. -/
theorem multiplication_from_cycles {d k : ℕ} (hd : 0 < d) (hk : 3 ≤ k)
    (X : Fin k → (Matrix (Fin d) (Fin d) ℂ)) :
    let c := (List.finRange k).formPerm
    partialTraceSlot (⟨k-1, by omega⟩ : Fin k)
      (QAlgorithms.Schur.tensorPermutation d k c⁻¹ * tensorMatrices X) = (List.ofFn X).prod ∧
    partialTraceSlot (⟨0, by omega⟩ : Fin k)
      (QAlgorithms.Schur.tensorPermutation d k c * tensorMatrices X) = (List.ofFn X).reverse.prod := by sorry

end QAlgorithms.Papers.Independent.Extend50.P13

end
Source
Positive maps and trace polynomials from the symmetric group, arXiv:2002.12887v2, PDF p. 8, Proposition 2: matrix multiplication from cycles
Read-back

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

For all natural numbers d,kd,kd,k with d>0d>0d>0 and k≥3k\ge3k≥3, and every family X0,…,Xk−1X_0,\ldots,X_{k-1}X0​,…,Xk−1​ of complex d×dd\times dd×d matrices, let ccc be the cyclic permutation 0↦1↦⋯↦k−1↦00\mapsto1\mapsto\cdots\mapsto k-1\mapsto00↦1↦⋯↦k−1↦0. For a permutation σ\sigmaσ, define the matrix TσT_\sigmaTσ​, indexed by functions x,y:{0,…,k−1}→{0,…,d−1}x,y:\{0,\ldots,k-1\}\to\{0,\ldots,d-1\}x,y:{0,…,k−1}→{0,…,d−1}, by (Tσ)y,x=1(T_\sigma)_{y,x}=1(Tσ​)y,x​=1 if y=x∘σ−1y=x\circ\sigma^{-1}y=x∘σ−1, and 000 otherwise; 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 any matrix MMM on these indices, its partial trace retaining slot qqq is the d×dd\times dd×d matrix with entry ∑sMs[q:=a],s[q:=b]\sum_s M_{s[q:=a],s[q:=b]}∑s​Ms[q:=a],s[q:=b]​, where sss assigns values to all slots other than qqq. The declaration asserts both identities

Tr⁡≠k−1 ⁣(Tc−1⨂i=0k−1Xi)=X0X1⋯Xk−1,Tr⁡≠0 ⁣(Tc⨂i=0k−1Xi)=Xk−1Xk−2⋯X0.\operatorname{Tr}_{\ne k-1}\!\left(T_{c^{-1}}\bigotimes_{i=0}^{k-1}X_i\right) =X_0X_1\cdots X_{k-1}, \qquad \operatorname{Tr}_{\ne0}\!\left(T_c\bigotimes_{i=0}^{k-1}X_i\right) =X_{k-1}X_{k-2}\cdots X_0.Tr=k−1​(Tc−1​i=0⨂k−1​Xi​)=X0​X1​⋯Xk−1​,Tr=0​(Tc​i=0⨂k−1​Xi​)=Xk−1​Xk−2​⋯X0​.

No Hermiticity, positivity, or normalization is assumed for the matrices.

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