Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.1

Open
QAlgorithms.Papers.Independent.Extend50.P34.mixedness_tester_correct

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

prove2quantum

There is an absolute C>0C>0C>0 such that for d≥2d\ge2d≥2, 0<ϵ≤1/20<\epsilon\le1/20<ϵ≤1/2, and any integer n≥Cd/ϵ2n\ge Cd/\epsilon^2n≥Cd/ϵ2, the Mixedness Tester accepts exactly when

p2♯(λ)≤(1+ϵ2/2)n(n−1)d,λ∼SWρn.p_2^\sharp(\lambda)\le(1+\epsilon^2/2)\frac{n(n-1)}d,\qquad\lambda\sim\mathrm{SW}_\rho^n.p2♯​(λ)≤(1+ϵ2/2)dn(n−1)​,λ∼SWρn​.

It accepts the maximally mixed state with probability at least 2/32/32/3 and rejects every state at distance at least ϵ\epsilonϵ with probability at least 2/32/32/3. Thus an integer copy count of order d/ϵ2d/\epsilon^2d/ϵ2 suffices.

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.1, arXiv:1501.05028v1, PDF p.33. Use a sufficiently large absolute multiple and integer n. The acceptance inequality is weak, exactly as printed. -/
theorem mixedness_tester_correct
    : ∃ C : ℝ, 0 < C ∧ ∀ d : ℕ, 2 ≤ d →
      ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ 1/2 →
        ∀ n : ℕ, C*d/epsilon^2 ≤ (n : ℝ) →
          (∀ rho : Matrix (Fin d) (Fin d) ℂ, IsDensityMatrix rho →
            (decreasingSpectrum rho = unif d → 2/3 ≤ mixednessStateAccept n epsilon rho) ∧
            (epsilon ≤ tv (decreasingSpectrum rho) (unif d) →
              mixednessStateAccept n epsilon rho ≤ 1/3)) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P34

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

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

There exists a real constant C>0C>0C>0 such that, for every natural number d≥2d\ge2d≥2, every real 0<ϵ≤1/20<\epsilon\le1/20<ϵ≤1/2, every natural number nnn satisfying Cd/ϵ2≤nCd/\epsilon^2\le nCd/ϵ2≤n, and every complex d×dd\times dd×d positive semidefinite matrix ρ\rhoρ with trace 111, the following assertions hold. Let Pd,n\mathcal P_{d,n}Pd,n​ consist of Young diagrams with nnn cells and at most ddd rows; for each λ\lambdaλ, number its cells by the fixed bijection with {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, take the row-preserving and column-preserving permutation groups Rλ,CλR_\lambda,C_\lambdaRλ​,Cλ​, define Yλeh=∑a∈Rλ,b∈Cλsgn⁡(b)ehabY_\lambda e_h=\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)e_{hab}Yλ​eh​=∑a∈Rλ​,b∈Cλ​​sgn(b)ehab​, and let Πλ\Pi_\lambdaΠλ​ project orthogonally onto its range. Put fλ=dim⁡Crange⁡Yλf_\lambda=\dim_{\mathbb C}\operatorname{range}Y_\lambdafλ​=dimC​rangeYλ​, cλ(π)=tr⁡(LπΠλ)c_\lambda(\pi)=\operatorname{tr}(L_\pi\Pi_\lambda)cλ​(π)=tr(Lπ​Πλ​), where Lπeh=eπhL_\pi e_h=e_{\pi h}Lπ​eh​=eπh​, and Pλ=(fλ/n!)∑πcλ(π−1)TπP_\lambda=(f_\lambda/n!)\sum_\pi c_\lambda(\pi^{-1})T_\piPλ​=(fλ​/n!)∑π​cλ​(π−1)Tπ​, where Tπex=ex∘π−1T_\pi e_x=e_{x\circ\pi^{-1}}Tπ​ex​=ex∘π−1​. Define A2(λ)=0A_2(\lambda)=0A2​(λ)=0 for n<2n<2n<2; otherwise A2(λ)A_2(\lambda)A2​(λ) is n(n−1)/fλn(n-1)/f_\lambdan(n−1)/fλ​ times the average of Re⁡cλ(π)\operatorname{Re}c_\lambda(\pi)Recλ​(π) over permutations with one 222-cycle and n−2n-2n−2 fixed points. Define

Acc⁡n,ϵ(ρ)=∑λ∈Pd,nRe⁡tr⁡(Pλρ⊗n)1{A2(λ)≤(1+ϵ2/2)n(n−1)/d}.\operatorname{Acc}_{n,\epsilon}(\rho)= \sum_{\lambda\in\mathcal P_{d,n}} \operatorname{Re}\operatorname{tr}(P_\lambda\rho^{\otimes n}) \mathbf1_{\left\{A_2(\lambda)\le (1+\epsilon^2/2)n(n-1)/d\right\}}.Accn,ϵ​(ρ)=λ∈Pd,n​∑​Retr(Pλ​ρ⊗n)1{A2​(λ)≤(1+ϵ2/2)n(n−1)/d}​.

If the decreasing eigenvalue list p(ρ)p(\rho)p(ρ) equals the vector ud=(1/d,…,1/d)u_d=(1/d,\ldots,1/d)ud​=(1/d,…,1/d), then Acc⁡n,ϵ(ρ)≥2/3\operatorname{Acc}_{n,\epsilon}(\rho)\ge2/3Accn,ϵ​(ρ)≥2/3; if ϵ≤12∑i<d∣pi(ρ)−1/d∣\epsilon\le\frac12\sum_{i<d}|p_i(\rho)-1/d|ϵ≤21​∑i<d​∣pi​(ρ)−1/d∣, then Acc⁡n,ϵ(ρ)≤1/3\operatorname{Acc}_{n,\epsilon}(\rho)\le1/3Accn,ϵ​(ρ)≤1/3. The stated lower bound on nnn forces n>0n>0n>0, although no separate positivity hypothesis is written.

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