Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 16: Classical Neyman–Pearson test bounds

Open
QAlgorithms.Papers.Independent.Intake100.P47.classical_test_bounds

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

prove2quantum

All Hilbert spaces are finite dimensional and nonzero. States are positive semidefinite operators of trace one, logarithms are natural, and ρ≪σ\rho\ll\sigmaρ≪σ means inclusion of supports. Write DαD_\alphaDα​ and D~α\widetilde D_\alphaDα​ for the Petz and sandwiched divergences, respectively, with generalized inverse powers on support and orders 0,1,∞0,1,\infty0,1,∞ defined by limits. Let ρAB,τA\rho_{AB},\tau_AρAB​,τA​ be states with ρA≪τA\rho_A\ll\tau_AρA​≪τA​, d=∣B∣≥1d=|B|\ge1d=∣B∣≥1, n≥0n\ge0n≥0 and μ∈R\mu\in\mathbb Rμ∈R. Put K=τA⊗n⊗ωnK=\tau_A^{\otimes n}\otimes\omega_nK=τA⊗n​⊗ωn​, L=PK(ρAB⊗n)L=\mathcal P_K(\rho_{AB}^{\otimes n})L=PK​(ρAB⊗n​), and T={L≥eμK}T=\{L\ge e^\mu K\}T={L≥eμK}. Choose any common orthonormal eigenbasis (ϕx)(\phi_x)(ϕx​) of L,KL,KL,K and define the probability laws P(x)=⟨ϕx,Lϕx⟩P(x)=\langle\phi_x,L\phi_x\rangleP(x)=⟨ϕx​,Lϕx​⟩ and Q(x)=⟨ϕx,Kϕx⟩Q(x)=\langle\phi_x,K\phi_x\rangleQ(x)=⟨ϕx​,Kϕx​⟩. Then

α(T;ρAB⊗n)=∑P(x)<eμQ(x)P(x),β(T;τA⊗n)≤gn,d∑P(x)≥eμQ(x)Q(x).\alpha(T;\rho_{AB}^{\otimes n})=\sum_{P(x)<e^\mu Q(x)}P(x),\qquad \beta(T;\tau_A^{\otimes n})\le g_{n,d}\sum_{P(x)\ge e^\mu Q(x)}Q(x).α(T;ρAB⊗n​)=P(x)<eμQ(x)∑​P(x),β(T;τA⊗n​)≤gn,d​P(x)≥eμQ(x)∑​Q(x).

Here β\betaβ maximizes acceptance over all normalized BnB^nBn alternatives, and gn,d=(n+d2−1n)g_{n,d}=\binom{n+d^2-1}{n}gn,d​=(nn+d2−1​). Zero threshold eigenvalues are accepted. These bounds reduce the constructed joint test to classical tail events.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P47
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P47

open scoped BigOperators Matrix ComplexOrder ComplexConjugate Topology

open Filter QAlgorithms

open QAlgorithms.Papers.Independent.Information100.P22 (Op mixed)

open QAlgorithms.Papers.Independent.Information100.P60 (copies)

open QAlgorithms.Papers.Independent.Information100.P71 (supportPower)

open QAlgorithms.Papers.Independent.Dependency50.P28 (SupportLE pinch logNonnegativeExtended)

open QAlgorithms.Papers.Independent.Dependency50.P21 (relativeEntropy IsSupported)

open QAlgorithms.Papers.Independent.Bridge50.P49 (groupedProduct)

open QAlgorithms.Papers.Independent.Claimed50.P12 (DiagonalIn)

attribute [local instance] Classical.propDecidable Classical.decEq

variable {A B C D I J : Type}

variable [Fintype A] [Fintype B] [Fintype C] [Fintype D] [Fintype I] [Fintype J]

variable [DecidableEq A] [DecidableEq B] [DecidableEq C] [DecidableEq D]

variable [DecidableEq I] [DecidableEq J]

/-- arXiv:1408.6894v5, PDF p.16, Lemma 16, (6.4)--(6.7).
The law Q is distinct from the test. Rejection is strict and acceptance non-strict,
so zero-eigenvalue outcomes are accepted. n=0 is allowed here. -/
theorem classical_test_bounds [Nonempty A] (d : ℕ) (hd : 0 < d)
    (rho : Op (A × Fin d)) (tau : Op A) (hr : IsDensityMatrix rho)
    (ht : IsDensityMatrix tau) (hS : SupportLE (traceRight rho) tau) (n : ℕ) (mu : ℝ)
    (U : Matrix.unitaryGroup ((Fin n → A) × (Fin n → Fin d)) ℂ)
    (hL : DiagonalIn (U : Op _) (classicalNull n rho tau))
    (hK : DiagonalIn (U : Op ((Fin n → A) × (Fin n → Fin d)))
      (universalReference (d := d) n tau)) :
    let L := classicalNull n rho tau
    let K := universalReference (d := d) n tau
    let P := basisLaw L U
    let Q := basisLaw K U
    let T := thresholdTest L K mu
    rejectionError (groupedCopies n rho) T =
      (∑ x, if P x < Real.exp mu * Q x then P x else 0) ∧
    compositeAcceptanceError (copies n tau) T ≤ (universalFactor n d : ℝ) *
      ∑ x, if Real.exp mu * Q x ≤ P x then Q x else 0 := by sorry

end QAlgorithms.Papers.Independent.Intake100.P47

end
Source
Correlation Detection and an Operational Interpretation of the Renyi Mutual Information, arXiv:1408.6894v5, PDF p. 16, Lemma 16: Classical Neyman–Pearson test bounds
Read-back

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

Let AAA be a finite, nonempty index type with decidable equality, let d>0d>0d>0 and n≥0n\ge0n≥0 be natural numbers, let ρ\rhoρ and τ\tauτ be positive semidefinite trace-one matrices on A×{0,…,d−1}A\times\{0,\ldots,d-1\}A×{0,…,d−1} and AAA, and assume ker⁡τ⊆ker⁡ρA\ker\tau\subseteq\ker\rho_Akerτ⊆kerρA​, where (ρA)ij=∑bρ(i,b),(j,b)(\rho_A)_{ij}=\sum_b\rho_{(i,b),(j,b)}(ρA​)ij​=∑b​ρ(i,b),(j,b)​. Let μ∈R\mu\in\mathbb Rμ∈R, put un,d=(n+d2−1n)u_{n,d}=\binom{n+d^2-1}{n}un,d​=(nn+d2−1​), and define

Ωn,d=1un,dn!∑π∈Sntr⁡(Ππ)Ππ,(Ππ)y,x={1y=x∘π−1,0otherwise,\Omega_{n,d}=\frac{1}{u_{n,d}n!}\sum_{\pi\in S_n}\operatorname{tr}(\Pi_\pi)\Pi_\pi, \qquad (\Pi_\pi)_{y,x}=\begin{cases}1&y=x\circ\pi^{-1},\\0&\text{otherwise},\end{cases}Ωn,d​=un,d​n!1​π∈Sn​∑​tr(Ππ​)Ππ​,(Ππ​)y,x​={10​y=x∘π−1,otherwise,​

on ({0,…,d−1})n(\{0,\ldots,d-1\})^n({0,…,d−1})n. Set K=τ⊗n⊗Ωn,dK=\tau^{\otimes n}\otimes\Omega_{n,d}K=τ⊗n⊗Ωn,d​, let ρn\rho_nρn​ be the tensor product of nnn copies of ρ\rhoρ, regrouped on An×({0,…,d−1})nA^n\times(\{0,\ldots,d-1\})^nAn×({0,…,d−1})n, and let L=∑λEλρnEλL=\sum_\lambda E_\lambda\rho_nE_\lambdaL=∑λ​Eλ​ρn​Eλ​, where the sum runs over the distinct eigenvalues of KKK and EλE_\lambdaEλ​ is its spectral projection at λ\lambdaλ. Let UUU be any unitary on this grouped space such that both U†LUU^\dagger LUU†LU and U†KUU^\dagger KUU†KU have zero off-diagonal entries, and write Px=Re⁡(U†LU)xxP_x=\operatorname{Re}(U^\dagger LU)_{xx}Px​=Re(U†LU)xx​, Qx=Re⁡(U†KU)xxQ_x=\operatorname{Re}(U^\dagger KU)_{xx}Qx​=Re(U†KU)xx​, and T=I−1(0,∞)(eμK−L)T=I-\mathbf1_{(0,\infty)}(e^\mu K-L)T=I−1(0,∞)​(eμK−L), with the indicator applied spectrally. Then

Re⁡tr⁡[(I−T)ρn]=∑x: Px<eμQxPx,sup⁡σ≥0, tr⁡σ=1Re⁡tr⁡[T(τ⊗n⊗σ)]≤un,d∑x: eμQx≤PxQx,\operatorname{Re}\operatorname{tr}[(I-T)\rho_n] =\sum_{x:\,P_x<e^\mu Q_x}P_x, \qquad \sup_{\sigma\ge0,\ \operatorname{tr}\sigma=1} \operatorname{Re}\operatorname{tr}[T(\tau^{\otimes n}\otimes\sigma)] \le u_{n,d}\sum_{x:\,e^\mu Q_x\le P_x}Q_x,Retr[(I−T)ρn​]=x:Px​<eμQx​∑​Px​,σ≥0, trσ=1sup​Retr[T(τ⊗n⊗σ)]≤un,d​x:eμQx​≤Px​∑​Qx​,

where σ\sigmaσ acts on the dnd^ndn-dimensional second register. Equality at the threshold belongs to the second sum. The statement includes n=0n=0n=0, when all empty tensor products and permutation products are interpreted by their definitions.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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