Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sum of traces of relation tensors

Open
QAlgorithms.Papers.Independent.Extend50.P30.sumRelationTraces

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

prove2quantum

Let ddd be prime, t≥1t\geq1t≥1, and n≥0n\geq0n≥0. Each R(T)R(T)R(T) has trace ∣T∩Δ∣n|T\cap\Delta|^n∣T∩Δ∣n, where Δ\DeltaΔ is the diagonal relation. Their trace sum has the two product forms below. For n=0n=0n=0 this recovers the cardinality of Σt,t(d)\Sigma_{t,t}(d)Σt,t​(d), including the empty product at t=1t=1t=1.

∑Ttr⁡R(T)=dn∏k=0t−2(dk+dn)=dnt∏k=0t−2(1+dk−n).\sum_T\operatorname{tr}R(T)=d^n\prod_{k=0}^{t-2}(d^k+d^n)=d^{nt}\prod_{k=0}^{t-2}(1+d^{k-n}).T∑​trR(T)=dnk=0∏t−2​(dk+dn)=dntk=0∏t−2​(1+dk−n).

This gives the source's sum of traces of relation tensors in the fixed computational-basis and phase conventions.

Formalization Note Pure states carry norm one; stabilizer averages use density matrices to discard global phases. All finite tensor indices are explicitly ordered by copy, then physical qudit.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P30
Formal statement
noncomputable section

open scoped BigOperators ComplexConjugate Matrix

namespace QAlgorithms.Papers.Independent.Extend50.P30

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

open QAlgorithms.Papers.Independent.Gap20.P06 (ketBra)

attribute [local instance] Classical.propDecidable

/-- PDF pp.45--46, Remark 5.1: individual traces and both finite-product forms, including n=0. -/
theorem sumRelationTraces (d n t : ℕ) [NeZero d] [Fact (Nat.Prime d)] (ht : 1 ≤ t) :
    (∀ T : Lagrangian d t, (tensorRelation n T.val).trace =
      ((Nat.card {x : ResidueRegister d t // (x, x) ∈ T.val} : ℂ) ^ n)) ∧
    (∑ T : Lagrangian d t, (tensorRelation n T.val).trace) = (momentNormalization d n t : ℂ) ∧
    (∑ T : Lagrangian d t, (tensorRelation n T.val).trace) =
      (d : ℂ) ^ (n * t) * ∏ k ∈ Finset.range (t - 1), (1 + (d : ℂ) ^ ((k : ℤ) - n)) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P30

end
Source
Schur-Weyl Duality for the Clifford Group with Applications: Property Testing, a Robust Hudson Theorem, and de Finetti Representations, arXiv:1712.08628v3, PDF p. 45, remark-5.1
Read-back

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

For every nonzero prime natural number ddd, every natural number nnn, and every natural number t≥1t\ge1t≥1, let V=(Z/dZ)tV=(\mathbb Z/d\mathbb Z)^tV=(Z/dZ)t, and let L\mathcal LL consist of all subspaces T⊆V×VT\subseteq V\times VT⊆V×V with ∣T∣=dt|T|=d^t∣T∣=dt, (1,1)∈T(\mathbf1,\mathbf1)\in T(1,1)∈T, and q(x)=q(y)q(x)=q(y)q(x)=q(y) for every (x,y)∈T(x,y)\in T(x,y)∈T, where q(x)=∑jxj~ 2q(x)=\sum_j\widetilde{x_j}^{\,2}q(x)=∑j​xj​​2 is evaluated modulo 2d2d2d for even ddd and modulo ddd otherwise. Define the complex matrix Rn(T)\mathcal R_n(T)Rn​(T), indexed by u,v:{0,…,t−1}→(Z/dZ)nu,v:\{0,\ldots,t-1\}\to(\mathbb Z/d\mathbb Z)^nu,v:{0,…,t−1}→(Z/dZ)n, by Rn(T)(u,v)=∏j=0n−11T((ui(j))i,(vi(j))i)\mathcal R_n(T)(u,v)=\prod_{j=0}^{n-1}\mathbf1_T((u_i(j))_i,(v_i(j))_i)Rn​(T)(u,v)=∏j=0n−1​1T​((ui​(j))i​,(vi​(j))i​). Then every T∈LT\in\mathcal LT∈L satisfies

tr⁡Rn(T)=∣{x∈V:(x,x)∈T}∣n,\operatorname{tr}\mathcal R_n(T)=|\{x\in V:(x,x)\in T\}|^n,trRn​(T)=∣{x∈V:(x,x)∈T}∣n,

and, as equalities of complex numbers,

∑T∈Ltr⁡Rn(T)=dn∏k=0t−2(dk+dn)=dnt∏k=0t−2(1+d k−n).\sum_{T\in\mathcal L}\operatorname{tr}\mathcal R_n(T) =d^n\prod_{k=0}^{t-2}(d^k+d^n) =d^{nt}\prod_{k=0}^{t-2}(1+d^{\,k-n}).T∈L∑​trRn​(T)=dnk=0∏t−2​(dk+dn)=dntk=0∏t−2​(1+dk−n).

The exponents k−nk-nk−n in the last product are integers, so they may be negative. When t=1t=1t=1, both products are empty and equal 111; when n=0n=0n=0, each R0(T)\mathcal R_0(T)R0​(T) is the one-entry matrix with entry 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me