Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

One-shot/classical-spectrum comparison

Open
QAlgorithms.Papers.Independent.Advance50.P02.oneShot_classicalSpectrum

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

prove2quantum

All Hilbert spaces are finite dimensional and complex; all logarithms are binary. Positive-operator inequalities use the identity when comparing with a scalar. Let ρ\rhoρ be normalized, σ≥0\sigma\ge0σ≥0, 0<ε<10<\varepsilon<10<ε<1, and 0<δ<min⁡{ε,1−ε}0<\delta<\min\{\varepsilon,1-\varepsilon\}0<δ<min{ε,1−ε}. Let P,QP,QP,Q be the pair's Nussbaum–Szkola distributions. For invertible σ\sigmaσ, put λ=log⁡λmax⁡−log⁡λmin⁡\lambda=\log\lambda_{\max}-\log\lambda_{\min}λ=logλmax​−logλmin​ and θ=min⁡{2max⁡(1,⌈λ⌉),ν(σ)}\theta=\min\{2\max(1,\lceil\lambda\rceil),\nu(\sigma)\}θ=min{2max(1,⌈λ⌉),ν(σ)}; for singular σ\sigmaσ, use θ=ν(σ)\theta=\nu(\sigma)θ=ν(σ). Then

Dhε≤Dsε+δ(P∥Q)+log⁡28(ε+δ)θδ4(1−ε−δ),Dhε≥Dsε−δ(P∥Q)−log⁡θ+log⁡δ,Dmax⁡1−ε≤Dsε+δ(P∥Q)+log⁡θ−log⁡(δ(1−ε)),Dmax⁡1−ε≥Dsε−δ(P∥Q)−log⁡(33εθ)+log⁡δ3.\begin{aligned} D_h^\varepsilon&\le D_s^{\varepsilon+\delta}(P\Vert Q)+\log\frac{2^8(\varepsilon+\delta)\theta}{\delta^4(1-\varepsilon-\delta)},\\ D_h^\varepsilon&\ge D_s^{\varepsilon-\delta}(P\Vert Q)-\log\theta+\log\delta,\\ D_{\max}^{\sqrt{1-\varepsilon}}&\le D_s^{\varepsilon+\delta}(P\Vert Q)+\log\theta-\log(\delta(1-\varepsilon)),\\ D_{\max}^{\sqrt{1-\varepsilon}}&\ge D_s^{\varepsilon-\delta}(P\Vert Q)-\log(3^3\varepsilon\theta)+\log\delta^3. \end{aligned}Dhε​Dhε​Dmax1−ε​​Dmax1−ε​​​≤Dsε+δ​(P∥Q)+logδ4(1−ε−δ)28(ε+δ)θ​,≥Dsε−δ​(P∥Q)−logθ+logδ,≤Dsε+δ​(P∥Q)+logθ−log(δ(1−ε)),≥Dsε−δ​(P∥Q)−log(33εθ)+logδ3.​

The quantum quantities on the left have arguments (ρ∥σ)(\rho\Vert\sigma)(ρ∥σ). These bounds preserve flat spectra by the positive-bin correction described in the audit.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P02
Formal statement
noncomputable section

open Filter

open scoped BigOperators Matrix ComplexOrder ComplexConjugate Matrix.Norms.L2Operator Topology

namespace QAlgorithms.Papers.Independent.Advance50.P02

attribute [local instance] Classical.propDecidable Classical.decEq

open QAlgorithms.Papers.Independent.Information100.P63
  (Mat tensorPower logTwo normalQuantile testingBeta)

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

open QAlgorithms (effectProb)

open QAlgorithms.Papers.Independent.Information100.P06 (Below)

open QAlgorithms.Papers.Independent.Information100.P30 (tensorMap)

open QAlgorithms.Papers.Independent.Information100.P67 (purifiedDistance)

open QAlgorithms.Papers.Independent.Dependency50.P26 (TracePreserving)

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

variable {I J A B X Z : Type} [Fintype I] [DecidableEq I]
  [Fintype J] [DecidableEq J] [Fintype A] [DecidableEq A]
  [Fintype B] [DecidableEq B] [Fintype X] [DecidableEq X]
  [Fintype Z] [DecidableEq Z]

/-- Theorem 14, PDF pp.17--18: four bounds with the positive-bin repair of positiveSpectralFactor.
Printed/changed/why is recorded in MODERATION_NOTES.md. Source correction. Printed: p.17 defines theta=min(2 ceil(lambda),nu), zero for flat spectra.
Changed: For positive definite sigma use theta=min(2 max(1,ceil(lambda)),nu); singular sigma uses the independently proved nu branch.
Why: p.18 requires a positive integer bin count. Flat spectra have nu=1 and corrected theta=1. The nu proof covers singular comparisons without evaluating log(0); all four constants and conclusions are retained. -/
theorem oneShot_classicalSpectrum (rho sigma : Mat I) (hrho : QAlgorithms.IsDensityMatrix rho)
    (hsigma : sigma.PosSemidef) (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma)
    (e delta : ℝ) (he : 0 < e ∧ e < 1)
    (hdelta : 0 < delta ∧ delta < min e (1-e)) :
    extendedTestingDivergence e rho sigma ≤ classicalSpectrumDivergence (e+delta) (nsProbability r s) (nsReferenceWeight r s) +
      (logTwo ((2:ℝ)^8*(e+delta)*positiveSpectralFactor sigma / (delta^4*(1-e-delta))) : ℝ) ∧
    classicalSpectrumDivergence (e-delta) (nsProbability r s) (nsReferenceWeight r s) - (logTwo (positiveSpectralFactor sigma) : ℝ) +
      (logTwo delta : ℝ) ≤ extendedTestingDivergence e rho sigma ∧
    smoothedMaxRelativeEntropy (Real.sqrt (1-e)) rho sigma ≤ classicalSpectrumDivergence (e+delta) (nsProbability r s) (nsReferenceWeight r s) +
      (logTwo (positiveSpectralFactor sigma)-logTwo (delta*(1-e)) : ℝ) ∧
    classicalSpectrumDivergence (e-delta) (nsProbability r s) (nsReferenceWeight r s) - (logTwo ((3:ℝ)^3*e*positiveSpectralFactor sigma) : ℝ) +
      (logTwo (delta^3) : ℝ) ≤ smoothedMaxRelativeEntropy (Real.sqrt (1-e)) rho sigma := by sorry

end QAlgorithms.Papers.Independent.Advance50.P02

end
Source
A Hierarchy of Information Quantities for Finite Block Length Analysis of Quantum Tasks, arXiv:1208.1478v3, PDF p. 17, Theorem 14: one-shot/classical-spectrum comparison
Read-back

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

For any finite index type III with decidable equality, let ρ≥0\rho\ge0ρ≥0 have trace 111, let σ≥0\sigma\ge0σ≥0, and choose spectral presentations ρ=Udiag⁡(λ)U†\rho=U\operatorname{diag}(\lambda)U^\daggerρ=Udiag(λ)U†, σ=Vdiag⁡(μ)V†\sigma=V\operatorname{diag}(\mu)V^\daggerσ=Vdiag(μ)V†, where all λx,μy≥0\lambda_x,\mu_y\ge0λx​,μy​≥0 and U†U=V†V=1U^\dagger U=V^\dagger V=1U†U=V†V=1. Set

P(x,y)=λx∣(U†V)xy∣2,Q(x,y)=μy∣(U†V)xy∣2,Cu(P,Q)=sup⁡{R∈R:∑z:P(z)≤2RQ(z)P(z)≤u}.P(x,y)=\lambda_x|(U^\dagger V)_{xy}|^2,\qquad Q(x,y)=\mu_y|(U^\dagger V)_{xy}|^2,\qquad C_u(P,Q)=\sup\left\{R\in\mathbb R:\sum_{z:P(z)\le2^RQ(z)}P(z)\le u\right\}.P(x,y)=λx​∣(U†V)xy​∣2,Q(x,y)=μy​∣(U†V)xy​∣2,Cu​(P,Q)=sup⎩⎨⎧​R∈R:z:P(z)≤2RQ(z)∑​P(z)≤u⎭⎬⎫​.

Let dσd_\sigmadσ​ be the number of distinct eigenvalues of σ\sigmaσ, including zero, and define

hσ={min⁡ ⁣(2max⁡ ⁣(1,⌈log⁡2λmax⁡(σ)−log⁡2λmin⁡(σ)⌉N),dσ),σ positive definite,dσ,otherwise,h_\sigma= \begin{cases} \min\!\left(2\max\!\left(1,\left\lceil \log_2\lambda_{\max}(\sigma)-\log_2\lambda_{\min}(\sigma) \right\rceil_{\mathbb N}\right),d_\sigma\right),&\sigma\text{ positive definite},\\ d_\sigma,&\text{otherwise}, \end{cases}hσ​={min(2max(1,⌈log2​λmax​(σ)−log2​λmin​(σ)⌉N​),dσ​),dσ​,​σ positive definite,otherwise,​

where ⌈x⌉N\lceil x\rceil_{\mathbb N}⌈x⌉N​ is the least natural number at least xxx, truncated to 000 for x≤0x\le0x≤0. For effects TTT, meaning T≥0T\ge0T≥0 and 1−T≥01-T\ge01−T≥0, let bu(A,B)b_u(A,B)bu​(A,B) be the real infimum of Re⁡tr⁡(TB)\operatorname{Re}\operatorname{tr}(TB)Retr(TB) subject to 1−u≤Re⁡tr⁡(TA)1-u\le\operatorname{Re}\operatorname{tr}(TA)1−u≤Retr(TA); let Dtestu(A,B)=−log⁡2bu(A,B)D_{\mathrm{test}}^u(A,B)=-\log_2b_u(A,B)Dtestu​(A,B)=−log2​bu​(A,B) if bu(A,B)>0b_u(A,B)>0bu​(A,B)>0, and +∞+\infty+∞ otherwise. Let Dmax⁡ a(A,B)D_{\max}^{\,a}(A,B)Dmaxa​(A,B) be the extended real infimum of log⁡2t\log_2tlog2​t over t>0t>0t>0 and τ≥0\tau\ge0τ≥0 satisfying 0<Re⁡tr⁡τ≤10<\operatorname{Re}\operatorname{tr}\tau\le10<Retrτ≤1, tB−τ≥0tB-\tau\ge0tB−τ≥0, and

1−(Re⁡tr⁡A τA+(1−Re⁡tr⁡A)(1−Re⁡tr⁡τ))2≤a.\sqrt{1-\left( \operatorname{Re}\operatorname{tr}\sqrt{\sqrt A\,\tau\sqrt A} +\sqrt{(1-\operatorname{Re}\operatorname{tr}A)(1-\operatorname{Re}\operatorname{tr}\tau)} \right)^2}\le a.1−(RetrA​τA​​+(1−RetrA)(1−Retrτ)​)2​≤a.

For every real 0<e<10<e<10<e<1 and 0<δ<min⁡(e,1−e)0<\delta<\min(e,1-e)0<δ<min(e,1−e), the following four extended real inequalities hold:

Dteste(ρ,σ)≤Ce+δ(P,Q)+log⁡2 ⁣28(e+δ)hσδ4(1−e−δ),Ce−δ(P,Q)−log⁡2hσ+log⁡2δ≤Dteste(ρ,σ),Dmax⁡ 1−e(ρ,σ)≤Ce+δ(P,Q)+log⁡2hσ−log⁡2(δ(1−e)),Ce−δ(P,Q)−log⁡2(33ehσ)+log⁡2(δ3)≤Dmax⁡ 1−e(ρ,σ).\begin{aligned} D_{\mathrm{test}}^e(\rho,\sigma) &\le C_{e+\delta}(P,Q) +\log_2\!\frac{2^8(e+\delta)h_\sigma}{\delta^4(1-e-\delta)},\\ C_{e-\delta}(P,Q)-\log_2h_\sigma+\log_2\delta &\le D_{\mathrm{test}}^e(\rho,\sigma),\\ D_{\max}^{\,\sqrt{1-e}}(\rho,\sigma) &\le C_{e+\delta}(P,Q)+\log_2h_\sigma-\log_2(\delta(1-e)),\\ C_{e-\delta}(P,Q)-\log_2(3^3eh_\sigma)+\log_2(\delta^3) &\le D_{\max}^{\,\sqrt{1-e}}(\rho,\sigma). \end{aligned}Dteste​(ρ,σ)Ce−δ​(P,Q)−log2​hσ​+log2​δDmax1−e​​(ρ,σ)Ce−δ​(P,Q)−log2​(33ehσ​)+log2​(δ3)​≤Ce+δ​(P,Q)+log2​δ4(1−e−δ)28(e+δ)hσ​​,≤Dteste​(ρ,σ),≤Ce+δ​(P,Q)+log2​hσ​−log2​(δ(1−e)),≤Dmax1−e​​(ρ,σ).​

No support inclusion or trace normalization of σ\sigmaσ is required, and its zero eigenvalues are allowed.

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