Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Classical iid spectrum expansion including zero variance

Open
QAlgorithms.Papers.Independent.Advance50.P02.iid_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 and σ≥0\sigma\ge0σ≥0 with support inclusion, and let P,QP,QP,Q be their NS distributions. Write D=D(ρ∥σ)D=D(\rho\Vert\sigma)D=D(ρ∥σ), let VVV be the centered information variance, and fix 0<ε<10<\varepsilon<10<ε<1. For Zi=log⁡P(Xi)−log⁡Q(Xi)Z_i=\log P(X_i)-\log Q(X_i)Zi​=logP(Xi​)−logQ(Xi​) under independent PPP samples and every positive nnn,

Dsε(P⊗n∥Q⊗n)=nsup⁡{R:Pr⁡[n−1∑iZi≤R]≤ε}.D_s^\varepsilon(P^{\otimes n}\Vert Q^{\otimes n})=n\sup\{R:\Pr[n^{-1}\textstyle\sum_i Z_i\le R]\le\varepsilon\}.Dsε​(P⊗n∥Q⊗n)=nsup{R:Pr[n−1∑i​Zi​≤R]≤ε}.

If V=0V=0V=0, Dsa(P⊗n∥Q⊗n)=nDD_s^a(P^{\otimes n}\Vert Q^{\otimes n})=nDDsa​(P⊗n∥Q⊗n)=nD for every positive nnn and every 0≤a<10\le a<10≤a<1, including zero. For every fixed real ccc,

Dsε+c/n(P⊗n∥Q⊗n)=nD+nV Φ−1(ε)+O(1).D_s^{\varepsilon+c/\sqrt n}(P^{\otimes n}\Vert Q^{\otimes n})=nD+\sqrt{nV}\,\Phi^{-1}(\varepsilon)+O(1).Dsε+c/n​​(P⊗n∥Q⊗n)=nD+nV​Φ−1(ε)+O(1).

The last equality is two-sided with constants before nnn; its threshold ensures the shifted error lies in its true domain. This includes both signs in (33).

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]

/-- Eqs.(31),(33), PDF pp.18--19: both signs of c/sqrt(n), and the explicit
V=0 identity for every error in [0,1), including zero. The zero shift is permitted. Constants may depend on c and epsilon. Source correction. Printed: Definition 1 p.7 prints V=Tr rho(log rho-log sigma)^2; p.19 prints Gaussian density exp(+x^2/2).
Changed: Use centered V=Tr rho(log rho-log sigma)^2-D^2 and the standard normal density exp(-x^2/2).
Why: Section VI identifies s^2 as Var(Z) and uses the standard normal Berry–Esseen theorem. For pure rho and sigma=I/d the likelihood is constant, hence V=0 even when D=log2(d) is nonzero. -/
theorem iid_classicalSpectrum (rho sigma : Mat I) (hrho : QAlgorithms.IsDensityMatrix rho)
    (hsigma : sigma.PosSemidef) (hsupport : SupportIncluded rho sigma)
    (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma)
    (e : ℝ) (he : 0 < e ∧ e < 1) :
    (centeredRelativeVariance rho sigma = 0 → ∀ a : ℝ, 0 ≤ a → a < 1 → ∀ n : ℕ, 1 ≤ n →
      classicalSpectrumDivergence a (weightPower n (nsProbability r s)) (weightPower n (nsReferenceWeight r s)) =
        ((n * relativeMean rho sigma : ℝ) : EReal)) ∧
    (∀ n : ℕ, 1 ≤ n →
      classicalSpectrumDivergence e (weightPower n (nsProbability r s)) (weightPower n (nsReferenceWeight r s)) =
        (n : EReal) * sSup {v : EReal | ∃ R : ℝ,
          empiricalMeanMass n (nsProbability r s) (nsReferenceWeight r s) R ≤ e ∧ v = (R : EReal)}) ∧
    (∀ c : ℝ, ConstantRemainder
      (fun n => classicalSpectrumDivergence (e + c / Real.sqrt n)
        (weightPower n (nsProbability r s)) (weightPower n (nsReferenceWeight r s)))
      (fun n => gaussianCenter n (relativeMean rho sigma) (centeredRelativeVariance rho sigma) e)) := 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. 19, §VI Eqs. (31),(33): classical iid spectrum expansion
Read-back

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

Let III be any finite type with decidable equality, let ρ,σ\rho,\sigmaρ,σ be complex matrices indexed by III, and suppose that ρ\rhoρ is positive semidefinite with Tr⁡ρ=1\operatorname{Tr}\rho=1Trρ=1, that σ\sigmaσ is positive semidefinite, and that ker⁡σ⊆ker⁡ρ\ker\sigma\subseteq\ker\rhokerσ⊆kerρ. These hypotheses exclude an empty III; no trace normalization is imposed on σ\sigmaσ. Let r,sr,sr,s be any supplied spectral presentations: they give nonnegative numbers rx,syr_x,s_yrx​,sy​ and square matrices U,VU,VU,V, respectively, such that U†U=V†V=1U^\dagger U=V^\dagger V=1U†U=V†V=1, ρ=Udiag⁡(rx)U†\rho=U\operatorname{diag}(r_x)U^\daggerρ=Udiag(rx​)U†, and σ=Vdiag⁡(sy)V†\sigma=V\operatorname{diag}(s_y)V^\daggerσ=Vdiag(sy​)V†. Define weights on I×II\times II×I by

P(x,y)=rx∣∑i∈IUix‾Viy∣2,Q(x,y)=sy∣∑i∈IUix‾Viy∣2,P(x,y)=r_x\left|\sum_{i\in I}\overline{U_{ix}}V_{iy}\right|^2, \qquad Q(x,y)=s_y\left|\sum_{i\in I}\overline{U_{ix}}V_{iy}\right|^2,P(x,y)=rx​​i∈I∑​Uix​​Viy​​2,Q(x,y)=sy​​i∈I∑​Uix​​Viy​​2,

and, for z∈(I×I)nz\in(I\times I)^nz∈(I×I)n, put Pn(z)=∏i=0n−1P(zi)P_n(z)=\prod_{i=0}^{n-1}P(z_i)Pn​(z)=∏i=0n−1​P(zi​) and Qn(z)=∏i=0n−1Q(zi)Q_n(z)=\prod_{i=0}^{n-1}Q(z_i)Qn​(z)=∏i=0n−1​Q(zi​). Write ℓ(x)=ln⁡(x)/ln⁡2\ell(x)=\ln(x)/\ln2ℓ(x)=ln(x)/ln2, with the total real logarithm convention ln⁡0=0\ln0=0ln0=0, and apply scalar functions to matrices by continuous functional calculus. Set

L=ℓ(ρ)−ℓ(σ),m=Re⁡Tr⁡(ρL),D0=Re⁡Tr⁡ ⁣(f(ρ)−ρln⁡(σ))ln⁡2,V0=Re⁡Tr⁡(ρL2)−D02,f(x)=xln⁡x.L=\ell(\rho)-\ell(\sigma),\qquad m=\operatorname{Re}\operatorname{Tr}(\rho L),\qquad D_0=\frac{\operatorname{Re}\operatorname{Tr}\!\left(f(\rho)-\rho\ln(\sigma)\right)}{\ln2}, \qquad V_0=\operatorname{Re}\operatorname{Tr}(\rho L^2)-D_0^2, \quad f(x)=x\ln x.L=ℓ(ρ)−ℓ(σ),m=ReTr(ρL),D0​=ln2ReTr(f(ρ)−ρln(σ))​,V0​=ReTr(ρL2)−D02​,f(x)=xlnx.

For any real aaa and finite weights p,qp,qp,q, define the extended-real threshold quantity

Sa(p,q)=sup⁡{R∈R:∑z: p(z)≤2Rq(z)p(z)≤a},\mathcal S_a(p,q) =\sup\left\{R\in\mathbb R: \sum_{z:\,p(z)\le 2^R q(z)}p(z)\le a\right\},Sa​(p,q)=sup⎩⎨⎧​R∈R:z:p(z)≤2Rq(z)∑​p(z)≤a⎭⎬⎫​,

where the supremum is taken in [−∞,+∞][-\infty,+\infty][−∞,+∞], so an empty set has supremum −∞-\infty−∞. Also define

En(R)=∑z1{1n∑i=0n−1[ℓ(P(zi))−ℓ(Q(zi))]≤R}Pn(z).E_n(R)= \sum_z \mathbf1_{\left\{\frac1n\sum_{i=0}^{n-1} [\ell(P(z_i))-\ell(Q(z_i))]\le R\right\}}P_n(z).En​(R)=z∑​1{n1​∑i=0n−1​[ℓ(P(zi​))−ℓ(Q(zi​))]≤R}​Pn​(z).

For every real eee with 0<e<10<e<10<e<1, three assertions hold simultaneously: if V0=0V_0=0V0​=0, then for every a∈[0,1)a\in[0,1)a∈[0,1), including a=0a=0a=0, and every integer n≥1n\ge1n≥1, one has Sa(Pn,Qn)=nm\mathcal S_a(P_n,Q_n)=nmSa​(Pn​,Qn​)=nm; for every integer n≥1n\ge1n≥1, one has the exact extended-real identity

Se(Pn,Qn)=nsup⁡{R∈R:En(R)≤e};\mathcal S_e(P_n,Q_n) =n\sup\{R\in\mathbb R:E_n(R)\le e\};Se​(Pn​,Qn​)=nsup{R∈R:En​(R)≤e};

and for every real ccc, there exist a real C>0C>0C>0 and an integer n0≥1n_0\ge1n0​≥1 such that, for every integer n≥n0n\ge n_0n≥n0​,

nm+nV0 Φ−1(e)−C≤S e+c/n(Pn,Qn)≤nm+nV0 Φ−1(e)+C.nm+\sqrt{nV_0}\,\Phi^{-1}(e)-C \le \mathcal S_{\,e+c/\sqrt n}(P_n,Q_n) \le nm+\sqrt{nV_0}\,\Phi^{-1}(e)+C.nm+nV0​​Φ−1(e)−C≤Se+c/n​​(Pn​,Qn​)≤nm+nV0​​Φ−1(e)+C.

Here Φ−1(e)=inf⁡{t∈R:e≤Φ(t)}\Phi^{-1}(e)=\inf\{t\in\mathbb R:e\le\Phi(t)\}Φ−1(e)=inf{t∈R:e≤Φ(t)}, with Φ(t)=∫−∞te−x2/2/2π dx\Phi(t)=\int_{-\infty}^{t}e^{-x^2/2}/\sqrt{2\pi}\,dxΦ(t)=∫−∞t​e−x2/2/2π​dx. All threshold comparisons include equality, zero weights remain included in the sums with the stated logarithm convention, and the perturbed parameter e+c/ne+c/\sqrt ne+c/n​ is used directly without clipping.

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