Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 4.5

Open
QAlgorithms.Papers.Independent.Extend50.P34.perturbation_chi_squared_identity

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

prove2quantum

Let d≥1d\ge1d≥1, n≥0n\ge0n≥0, and x∈Rdx\in\mathbb R^dx∈Rd satisfy ∑ixi=0\sum_i x_i=0∑i​xi​=0 and xi≥−1x_i\ge-1xi​≥−1. Put Qx(i)=(1+xi)/dQ_x(i)=(1+x_i)/dQx​(i)=(1+xi​)/d. Then

dχ2(SWQxn,SWdn)=∑1≤∣μ∣≤nℓ(μ)≤dsμ(x)2d↑μd∣μ∣n↓∣μ∣.d_{\chi^2}(\mathrm{SW}_{Q_x}^n,\mathrm{SW}_d^n)=\sum_{\substack{1\le|\mu|\le n\ell(\mu)\le d}}\frac{s_\mu(x)^2}{d^{\uparrow\mu}d^{|\mu|}}n^{\downarrow|\mu|}.dχ2​(SWQx​n​,SWdn​)=1≤∣μ∣≤nℓ(μ)≤d​∑​d↑μd∣μ∣sμ​(x)2​n↓∣μ∣.

Equality at xi=−1x_i=-1xi​=−1 is allowed, giving rank-deficient inputs. This expresses the statistical divergence using Schur polynomials.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P34
Formal statement
noncomputable section

open scoped Matrix BigOperators

open MeasureTheory

namespace QAlgorithms.Papers.Independent.Extend50.P34

attribute [local instance] Classical.propDecidable

-- Reuse exact pinned definitions; these are imports, not local declarations.

open QAlgorithms.Papers.Independent.Support50.P38 (tv wordMass)

open QAlgorithms.Papers.Independent.Advance50.P28 (counts)

/-- Corollary 4.5, arXiv:1501.05028v1, PDF p.35. Unlike Theorem 4.4, x_i≥-1 is required so Q_x is a probability distribution. -/
theorem perturbation_chi_squared_identity
    (d n : ℕ) (hd : 0 < d) (x : Fin d → ℝ)
    (hx : ∑ i, x i = 0) (hnonneg : ∀ i, -1 ≤ x i) :
    chiSq (swSpectrum (n := n) (perturbed x)) (swSpectrum (n := n) (unif d)) =
      ∑ k ∈ Finset.Icc 1 n, ∑ mu ∈ diagrams d k,
        schurAt mu x ^ 2 / (contentProduct d mu * (d : ℝ)^k) * falling n k := by sorry

end QAlgorithms.Papers.Independent.Extend50.P34

end
Source
Quantum Spectrum Testing, arXiv:1501.05028v1, PDF p. 35, Corollary 4.5
Read-back

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

For every positive integer ddd, every natural number nnn, and every x∈Rdx\in\mathbb R^dx∈Rd with ∑ixi=0\sum_i x_i=0∑i​xi​=0 and xi≥−1x_i\ge-1xi​≥−1 for every iii, put pi=(1+xi)/dp_i=(1+x_i)/dpi​=(1+xi​)/d and ui=1/du_i=1/dui​=1/d. The identity below uses the following explicit diagram weights. For each diagram λ\lambdaλ of size nnn and height at most ddd, use its chosen cell numbering to define the row-preserving and column-preserving permutation sets Rλ,Cλ⊆SnR_\lambda,C_\lambda\subseteq S_nRλ​,Cλ​⊆Sn​. Let Yλ(g,h)=∑a∈Rλ,b∈Cλsgn⁡(b)1{g=hab}Y_\lambda(g,h)=\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)\mathbf1_{\{g=hab\}}Yλ​(g,h)=∑a∈Rλ​,b∈Cλ​​sgn(b)1{g=hab}​, Vλ=range⁡Yλ⊆CSnV_\lambda=\operatorname{range}Y_\lambda\subseteq\mathbb C^{S_n}Vλ​=rangeYλ​⊆CSn​, Πλ\Pi_\lambdaΠλ​ its orthogonal projection, and Dλ=dim⁡CVλD_\lambda=\dim_{\mathbb C}V_\lambdaDλ​=dimC​Vλ​. Define Lπ(g,h)=1{g=πh}L_\pi(g,h)=\mathbf1_{\{g=\pi h\}}Lπ​(g,h)=1{g=πh}​, χ^λ(π)=tr⁡(LπΠλ)\widehat\chi_\lambda(\pi)=\operatorname{tr}(L_\pi\Pi_\lambda)χ​λ​(π)=tr(Lπ​Πλ​), Tπ(v,w)=1{v=w∘π−1}T_\pi(v,w)=\mathbf1_{\{v=w\circ\pi^{-1}\}}Tπ​(v,w)=1{v=w∘π−1}​, and Pλ=Dλn!∑π∈Snχ^λ(π−1)TπP_\lambda=\frac{D_\lambda}{n!}\sum_{\pi\in S_n}\widehat\chi_\lambda(\pi^{-1})T_\piPλ​=n!Dλ​​∑π∈Sn​​χ​λ​(π−1)Tπ​. For a real vector zzz, let Dz(n)D_z^{(n)}Dz(n)​ be diagonal on words w∈{0,…,d−1}nw\in\{0,\ldots,d-1\}^nw∈{0,…,d−1}n, with diagonal entry ∏jzwj\prod_j z_{w_j}∏j​zwj​​, and set wz(λ)=Re⁡tr⁡(PλDz(n))w_z(\lambda)=\operatorname{Re}\operatorname{tr}(P_\lambda D_z^{(n)})wz​(λ)=Retr(Pλ​Dz(n)​). For a diagram μ\muμ, define sμ(x)=0s_\mu(x)=0sμ​(x)=0 if its height exceeds ddd; otherwise sμ(x)=∑T∏c∈μxT(c)s_\mu(x)=\sum_T\prod_{c\in\mu}x_{T(c)}sμ​(x)=∑T​∏c∈μ​xT(c)​, summing over fillings weakly increasing along rows and strictly increasing down columns with entries in {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. With Cd(μ)=∏(a,b)∈μ(d+b−a)C_d(\mu)=\prod_{(a,b)\in\mu}(d+b-a)Cd​(μ)=∏(a,b)∈μ​(d+b−a) and nk‾n^{\underline k}nk​ the descending factorial, the assertion is

∑∣λ∣=nheight⁡(λ)≤d{0,wu(λ)=0,wu(λ)(wp(λ)wu(λ)−1)2,wu(λ)≠0=∑k=1n∑∣μ∣=kheight⁡(μ)≤dsμ(x)2Cd(μ)dk nk‾.\sum_{\substack{|\lambda|=n\\\operatorname{height}(\lambda)\le d}} \begin{cases} 0,&w_u(\lambda)=0,\\ w_u(\lambda)\left(\dfrac{w_p(\lambda)}{w_u(\lambda)}-1\right)^2, &w_u(\lambda)\ne0 \end{cases} = \sum_{k=1}^{n} \sum_{\substack{|\mu|=k\\\operatorname{height}(\mu)\le d}} \frac{s_\mu(x)^2}{C_d(\mu)d^k}\,n^{\underline k}.∣λ∣=nheight(λ)≤d​∑​⎩⎨⎧​0,wu​(λ)(wu​(λ)wp​(λ)​−1)2,​wu​(λ)=0,wu​(λ)=0​=k=1∑n​∣μ∣=kheight(μ)≤d​∑​Cd​(μ)dksμ​(x)2​nk​.

Thus a zero reference weight contributes zero by definition. Coordinates xi=−1x_i=-1xi​=−1 are permitted, as is n=0n=0n=0, when the right-hand sum is empty.

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