Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.1 (Fundamental Theorem of Weingarten Calculus) — Iij=∑x,y=1mAixWxyAyj∗I_{ij}=\sum_{x,y=1}^m A_{ix}W_{xy}A^*_{yj}Iij​=∑x,y=1m​Aix​Wxy​Ayj∗​

Proved
WeingartenCalc.Fundamental.theorem_2_1

by mikedeng1 · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

haar-measureinvariant-theoryp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1random-matrix-theoryweingarten-calculus

Let GGG be a compact Hausdorff topological group with Haar probability measure μ\muμ, and let U:G→U(N)U : G\to\mathrm{U}(N)U:G→U(N) be a continuous unitary representation on H=CNH=\mathbb{C}^NH=CN, with matrix elements Uxy(g)=⟨ex,U(g)ey⟩U_{xy}(g)=\langle e_x,U(g)e_y\rangleUxy​(g)=⟨ex​,U(g)ey​⟩ in the standard orthonormal basis. Fix d∈Nd\in\mathbb{N}d∈N, and let a1,…,ama_1,\dots,a_ma1​,…,am​ be a basis of the space of GGG-invariant tensors

(H⊗d)G={t∈H⊗d:U⊗d(g) t=t for all g∈G}.(H^{\otimes d})^G=\{t\in H^{\otimes d} : U^{\otimes d}(g)\,t=t\ \text{for all } g\in G\}.(H⊗d)G={t∈H⊗d:U⊗d(g)t=t for all g∈G}.

Let A=[⟨ei,ax⟩]i∈Fun(d,N), x∈[m]A=[\langle e_i,a_x\rangle]_{i\in\mathrm{Fun}(d,N),\,x\in[m]}A=[⟨ei​,ax​⟩]i∈Fun(d,N),x∈[m]​ be the Nd×mN^d\times mNd×m matrix of coordinates of the axa_xax​ in the product basis ei=ei(1)⊗⋯⊗ei(d)e_i=e_{i(1)}\otimes\cdots\otimes e_{i(d)}ei​=ei(1)​⊗⋯⊗ei(d)​, and let W=(A∗A)−1W=(A^*A)^{-1}W=(A∗A)−1 be the Weingarten matrix, the inverse of the Gram matrix of the axa_xax​. Then for all multi-indices i,j:[d]→[N]i,j:[d]\to[N]i,j:[d]→[N] the Weingarten integral

Iij=∫G∏x=1dUi(x)j(x)(g) dμ(g)I_{ij}=\int_G \prod_{x=1}^{d} U_{i(x)j(x)}(g)\,d\mu(g)Iij​=∫G​x=1∏d​Ui(x)j(x)​(g)dμ(g)

is given by

Iij=∑x,y=1mAix Wxy Ayj∗,Ayj∗=Ajy‾.I_{ij}=\sum_{x,y=1}^{m} A_{ix}\,W_{xy}\,A^*_{yj},\qquad A^*_{yj}=\overline{A_{jy}}.Iij​=x,y=1∑m​Aix​Wxy​Ayj∗​,Ayj∗​=Ajy​​.

This converts the computation of polynomial integrals over a compact group into invariant theory plus a matrix inversion: every Haar integral of a polynomial in the matrix elements of UUU is a linear combination of the IijI_{ij}Iij​.

Formalization Note The hypotheses on aaa are linear independence and span⁡{ax}=(H⊗d)G\operatorname{span}\{a_x\}=(H^{\otimes d})^Gspan{ax​}=(H⊗d)G. Corrected: the paper writes "a basis a1,…,ama_1,\dots,a_ma1​,…,am​ of (H)⊗d(H)^{\otimes d}(H)⊗d"; the same paragraph calls the axa_xax​ "the basic invariants", and with a basis of all of H⊗dH^{\otimes d}H⊗d the right side would be the identity matrix, so the basis is of (H⊗d)G(H^{\otimes d})^G(H⊗d)G. The statement holds for every d≥0d\ge0d≥0 (for d=0d=0d=0 both sides equal 111), while the paper takes ddd positive. HHH is CN\mathbb{C}^NCN with its standard basis, indices are 0-based, A∗A^*A∗ is the conjugate transpose, and WWW is Mathlib's matrix inverse, a genuine inverse by linear independence.

Preamble
import Mathlib
import Definitions.Def_WeingartenCalc_Fundamental_TensorPower

open MeasureTheory Matrix
Formal statement
namespace WeingartenCalc.Fundamental

theorem theorem_2_1
    {G : Type*} [Group G] [TopologicalSpace G] [IsTopologicalGroup G] [CompactSpace G]
    [T2Space G] [MeasurableSpace G] [BorelSpace G] (μ : Measure G) [μ.IsHaarMeasure]
    [IsProbabilityMeasure μ] {N : ℕ} (U : G →* Matrix.unitaryGroup (Fin N) ℂ)
    (hU : Continuous U) (d : ℕ)
    {m : ℕ} (a : Fin m → ((Fin d → Fin N) → ℂ)) (ha : LinearIndependent ℂ a)
    (hspan : Submodule.span ℂ (Set.range a) = invariants U d)
    (i j : Fin d → Fin N) :
    ∫ g, ∏ x : Fin d, (U g : Matrix (Fin N) (Fin N) ℂ) (i x) (j x) ∂μ
      = ∑ x : Fin m, ∑ y : Fin m,
          coordMatrix a i x * weingartenMatrix a x y * (coordMatrix a)ᴴ y j := by sorry

end WeingartenCalc.Fundamental
Source
Collins, Matsumoto & Novak, The Weingarten Calculus, arXiv:2109.14890v1, p. 4, Theorem 2.1 (setting pp. 3–4, Section 2)
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 21, 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