Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6.2

Open
QAlgorithms.Papers.Independent.Extend50.P34.rank_tester_copy_complexity

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

prove2quantum

For r≥1r\ge1r≥1 and 0<ϵ≤1/20<\epsilon\le1/20<ϵ≤1/2, the Rank Tester has copy complexity

Θ(r2/ϵ).\Theta(r^2/\epsilon).Θ(r2/ϵ).

Its upper bound is uniform in every positive ambient dimension and has perfect completeness and soundness error at most 1/31/31/3. Conversely, for some ambient dimension d>rd>rd>r, every copy count below an absolute multiple of r2/ϵr^2/\epsilonr2/ϵ has an ϵ\epsilonϵ-far input accepted with probability greater than 1/31/31/3. This establishes both directions for the named tester.

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)

/-- Lemma 6.2, arXiv:1501.05028v1, PDF p.56. Correct p.58 non-heavy substring expectation from 2epsilon*d to 2epsilon*n, and its final dimension threshold to the copy count n. Lower bound is existential in d; r=1 uses p.5. -/
theorem rank_tester_copy_complexity
    : ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ ∀ r : ℕ, 1 ≤ r →
      ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ 1/2 →
        (∀ d : ℕ, 0 < d → ∃ n : ℕ, (n : ℝ) ≤ C*r^2/epsilon ∧
          RankTesterWorks d n r epsilon) ∧
        (∃ d : ℕ, r < d ∧ ∀ n : ℕ, (n : ℝ) < c*r^2/epsilon →
          ∃ rho : Matrix (Fin d) (Fin d) ℂ, IsDensityMatrix rho ∧
            Far (supportProperty d r) epsilon (decreasingSpectrum rho) ∧ 1/3 < rankAccept n r rho) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P34

end
Source
Quantum Spectrum Testing, arXiv:1501.05028v1, PDF p. 56, Lemma 6.2
Read-back

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

There exist real constants C,c>0C,c>0C,c>0 such that, for every natural number r≥1r\ge1r≥1 and every real 0<ϵ≤120<\epsilon\le\tfrac120<ϵ≤21​, the following assertions hold. For a positive dimension ddd, let Pd,r\mathcal P_{d,r}Pd,r​ consist of nonnegative vectors of length ddd summing to 111 with at most rrr nonzero entries, and write p(ρ)p(\rho)p(ρ) for the decreasing eigenvalue vector of a positive semidefinite, trace-111 matrix ρ\rhoρ. Set TV⁡(p,q)=12∑i∣pi−qi∣\operatorname{TV}(p,q)=\tfrac12\sum_i|p_i-q_i|TV(p,q)=21​∑i​∣pi​−qi​∣. To define an,r(ρ)a_{n,r}(\rho)an,r​(ρ), for every nnn-cell Young diagram λ\lambdaλ with at most ddd rows, fix its prescribed cell numbering, let Rλ,Cλ⊆SnR_\lambda,C_\lambda\subseteq S_nRλ​,Cλ​⊆Sn​ preserve rows and columns, and let QλQ_\lambdaQλ​ project orthogonally onto the range of the matrix 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}​. Put fλ=dim⁡im⁡Yλf_\lambda=\dim\operatorname{im}Y_\lambdafλ​=dimimYλ​, χλ(π)=tr⁡(LπQλ)\chi_\lambda(\pi)=\operatorname{tr}(L_\pi Q_\lambda)χλ​(π)=tr(Lπ​Qλ​), where Lπ(g,h)=1{g=πh}L_\pi(g,h)=\mathbf1_{\{g=\pi h\}}Lπ​(g,h)=1{g=πh}​, and

Aλ=fλn!∑π∈Snχλ(π−1)Tπ,Tπ(y,x)=1{y=x∘π−1},an,r(ρ)=∑∣λ∣=nat most min⁡(d,r) rowsRe⁡tr⁡(Aλρ⊗n),A_\lambda=\frac{f_\lambda}{n!}\sum_{\pi\in S_n}\chi_\lambda(\pi^{-1})T_\pi, \quad T_\pi(y,x)=\mathbf1_{\{y=x\circ\pi^{-1}\}}, \quad a_{n,r}(\rho)=\sum_{\substack{|\lambda|=n\\\text{at most }\min(d,r)\text{ rows}}} \operatorname{Re}\operatorname{tr}(A_\lambda\rho^{\otimes n}),Aλ​=n!fλ​​π∈Sn​∑​χλ​(π−1)Tπ​,Tπ​(y,x)=1{y=x∘π−1}​,an,r​(ρ)=∣λ∣=nat most min(d,r) rows​∑​Retr(Aλ​ρ⊗n),

with tensor entries (ρ⊗n)y,z=∏iρyi,zi(\rho^{\otimes n})_{y,z}=\prod_i\rho_{y_i,z_i}(ρ⊗n)y,z​=∏i​ρyi​,zi​​. First, for every d>0d>0d>0, there is a natural number n≤Cr2/ϵn\le Cr^2/\epsilonn≤Cr2/ϵ such that every ddd-dimensional density matrix satisfies both

p(ρ)∈Pd,r ⟹ an,r(ρ)=1,(∀q∈Pd,r, TV⁡(p(ρ),q)≥ϵ) ⟹ an,r(ρ)≤13.p(\rho)\in\mathcal P_{d,r}\ \Longrightarrow\ a_{n,r}(\rho)=1, \qquad \bigl(\forall q\in\mathcal P_{d,r},\ \operatorname{TV}(p(\rho),q)\ge\epsilon\bigr) \ \Longrightarrow\ a_{n,r}(\rho)\le\tfrac13.p(ρ)∈Pd,r​ ⟹ an,r​(ρ)=1,(∀q∈Pd,r​, TV(p(ρ),q)≥ϵ) ⟹ an,r​(ρ)≤31​.

Second, there is a natural number d>rd>rd>r such that, for every natural number n<cr2/ϵn<cr^2/\epsilonn<cr2/ϵ, there exists a ddd-dimensional density matrix ρ\rhoρ satisfying TV⁡(p(ρ),q)≥ϵ\operatorname{TV}(p(\rho),q)\ge\epsilonTV(p(ρ),q)≥ϵ for every q∈Pd,rq\in\mathcal P_{d,r}q∈Pd,r​, but an,r(ρ)>13a_{n,r}(\rho)>\tfrac13an,r​(ρ)>31​. Neither assertion requires n>0n>0n>0; at n=0n=0n=0, the definitions use empty products and the empty diagram. The upper assertion also includes r≥dr\ge dr≥d, when every density matrix's spectrum belongs to Pd,r\mathcal P_{d,r}Pd,r​ and its distance hypothesis cannot hold for positive ϵ\epsilonϵ.

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