Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.19

Open
QAlgorithms.Papers.Independent.Extend50.P34.paninski_exact_even_expansion

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

prove2quantum

For even d≥2d\ge2d≥2, n≥0n\ge0n≥0, and 0≤ϵ≤1/20\le\epsilon\le1/20≤ϵ≤1/2,

dχ2(SWPdϵn,SWdn)=∑2≤k≤n\k evenn↓k(2ϵ)2kd−k1(k!!)2∑μ⊢k balanced\0<ℓ(μ)≤dχμ(2k/2)2d↑[μ]evend↑[μ]odd.d_{\chi^2}(\mathrm{SW}_{P_d^\epsilon}^n,\mathrm{SW}_d^n)=\sum_{\substack{2\le k\le n\k\text{ even}}}n^{\downarrow k}(2\epsilon)^{2k}d^{-k}\frac1{(k!!)^2}\sum_{\substack{\mu\vdash k\text{ balanced}\0<\ell(\mu)\le d}}\chi_\mu(2^{k/2})^2\frac{d^{\uparrow[\mu]_{\rm even}}}{d^{\uparrow[\mu]_{\rm odd}}}.dχ2​(SWPdϵ​n​,SWdn​)=2≤k≤n\k even​∑​n↓k(2ϵ)2kd−k(k!!)21​μ⊢k balanced\0<ℓ(μ)≤d​∑​χμ​(2k/2)2d↑[μ]odd​d↑[μ]even​​.

The sums are finite and every content-product denominator is positive under the height restriction. This exact expansion leads to the exponential chi-squared bound.

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)

/-- Theorem 4.19, arXiv:1501.05028v1, PDF p.42. Both the exponent 2k on 2epsilon and the square on k!! are retained. k≤n replaces only vanishing terms. -/
theorem paninski_exact_even_expansion
    (d n : ℕ) (hd : 0 < d) (heven : Even d)
    (epsilon : ℝ) (he : 0 ≤ epsilon) (he1 : epsilon ≤ 1/2) :
    chiSq (swSpectrum (n := n) (paninski d epsilon)) (swSpectrum (n := n) (unif d)) =
      ∑ k ∈ (Finset.Icc 2 n).filter Even,
        falling n k * (2*epsilon)^(2*k) / (d : ℝ)^k *
          (1 / evenDoubleFactorial k ^ 2 *
            ∑ mu ∈ (diagrams d k).filter DominoBalanced,
              classCharacter mu (Multiset.replicate (k/2) 2)^2 *
                parityProduct d mu true / parityProduct d mu false) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P34

end
Source
Quantum Spectrum Testing, arXiv:1501.05028v1, PDF p. 42, Theorem 4.19
Read-back

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

For every positive even integer ddd, natural number nnn, and real 0≤ϵ≤120\le\epsilon\le\tfrac120≤ϵ≤21​, put pi=(1+2ϵ)/dp_i=(1+2\epsilon)/dpi​=(1+2ϵ)/d for even iii and pi=(1−2ϵ)/dp_i=(1-2\epsilon)/dpi​=(1−2ϵ)/d for odd iii, and put ui=1/du_i=1/dui​=1/d. For any diagram ξ\xiξ of size hhh, use its chosen cell numbering to define row-preserving and column-preserving permutation sets Rξ,CξR_\xi,C_\xiRξ​,Cξ​, the matrix Yξ(g,k)=∑a∈Rξ,b∈Cξsgn⁡(b)1{g=kab}Y_\xi(g,k)=\sum_{a\in R_\xi,b\in C_\xi}\operatorname{sgn}(b)\mathbf1_{\{g=kab\}}Yξ​(g,k)=∑a∈Rξ​,b∈Cξ​​sgn(b)1{g=kab}​, its range Vξ⊆CShV_\xi\subseteq\mathbb C^{S_h}Vξ​⊆CSh​, its orthogonal projection Πξ\Pi_\xiΠξ​, and Dξ=dim⁡CVξD_\xi=\dim_{\mathbb C}V_\xiDξ​=dimC​Vξ​. Set χ^ξ(w)=tr⁡(LwΠξ)\widehat\chi_\xi(w)=\operatorname{tr}(L_w\Pi_\xi)χ​ξ​(w)=tr(Lw​Πξ​), where Lw(g,k)=1{g=wk}L_w(g,k)=\mathbf1_{\{g=wk\}}Lw​(g,k)=1{g=wk}​, and let χˉξ(η)\bar\chi_\xi(\eta)χˉ​ξ​(η) be the average of Re⁡χ^ξ(w)\operatorname{Re}\widehat\chi_\xi(w)Reχ​ξ​(w) over permutations whose full cycle-length multiset, including fixed points, is η\etaη, with value zero if none exist. For ∣λ∣=n|\lambda|=n∣λ∣=n and height at most ddd, define Pλ=Dλn!∑w∈Snχ^λ(w−1)TwP_\lambda=\frac{D_\lambda}{n!}\sum_{w\in S_n}\widehat\chi_\lambda(w^{-1})T_wPλ​=n!Dλ​​∑w∈Sn​​χ​λ​(w−1)Tw​, Tw(v,z)=1{v=z∘w−1}T_w(v,z)=\mathbf1_{\{v=z\circ w^{-1}\}}Tw​(v,z)=1{v=z∘w−1}​, and wa(λ)=Re⁡tr⁡(PλDa(n))w_a(\lambda)=\operatorname{Re}\operatorname{tr}(P_\lambda D_a^{(n)})wa​(λ)=Retr(Pλ​Da(n)​), where Da(n)D_a^{(n)}Da(n)​ is diagonal with word entry ∏jazj\prod_j a_{z_j}∏j​azj​​. Define χ2(wp,wu)\chi^2(w_p,w_u)χ2(wp​,wu​) as the sum of wu(λ)(wp(λ)/wu(λ)−1)2w_u(\lambda)(w_p(\lambda)/w_u(\lambda)-1)^2wu​(λ)(wp​(λ)/wu​(λ)−1)2, with a zero summand whenever wu(λ)=0w_u(\lambda)=0wu​(λ)=0. Let Ed(μ)E_d(\mu)Ed​(μ) and Od(μ)O_d(\mu)Od​(μ) be the products of d+b−ad+b-ad+b−a over the cells (a,b)(a,b)(a,b) of even and odd content b−ab-ab−a, respectively, and call μ\muμ domino-reducible if a finite sequence of removals of two distinct horizontally or vertically adjacent cells, each leaving a Young diagram, reduces it to the empty diagram. Then

χ2(wp,wu)=∑2≤k≤nk evennk‾(2ϵ)2kdk1(2⌊k/2⌋⌊k/2⌋!)2∑∣μ∣=k, height⁡(μ)≤dμ domino-reducibleχˉμ(2k/2)2 Ed(μ)Od(μ).\chi^2(w_p,w_u) = \sum_{\substack{2\le k\le n\\k\text{ even}}} n^{\underline k}\frac{(2\epsilon)^{2k}}{d^k} \frac1{\bigl(2^{\lfloor k/2\rfloor}\lfloor k/2\rfloor!\bigr)^2} \sum_{\substack{|\mu|=k,\ \operatorname{height}(\mu)\le d\\ \mu\text{ domino-reducible}}} \bar\chi_\mu(2^{k/2})^2\,\frac{E_d(\mu)}{O_d(\mu)}.χ2(wp​,wu​)=2≤k≤nk even​∑​nk​dk(2ϵ)2k​(2⌊k/2⌋⌊k/2⌋!)21​∣μ∣=k, height(μ)≤dμ domino-reducible​∑​χˉ​μ​(2k/2)2Od​(μ)Ed​(μ)​.

Here nk‾n^{\underline k}nk​ is the descending factorial and 2k/22^{k/2}2k/2 inside χˉμ\bar\chi_\muχˉ​μ​ denotes the multiset of k/2k/2k/2 copies of 222. The endpoints ϵ=0,12\epsilon=0,\tfrac12ϵ=0,21​ and n=0,1n=0,1n=0,1 are included; for n=0,1n=0,1n=0,1 the outer 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