Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Ns Identities: ns identities

Open
QAlgorithms.Papers.Independent.Bridge50.P50.ns_identities

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

prove2quantum

Let S\mathcal SS be the density operators on a nonzero, finite-dimensional complex Hilbert space of dimension ddd. Logarithms are in bits, DDD is support-aware Umegaki relative entropy, and VVV is relative entropy variance in bits squared. Choose spectral decompositions ρ=∑ara∣ϕa⟩⟨ϕa∣\rho=\sum_a r_a|\phi_a\rangle\langle\phi_a|ρ=∑a​ra​∣ϕa​⟩⟨ϕa​∣ and σ=∑bsb∣ψb⟩⟨ψb∣\sigma=\sum_b s_b|\psi_b\rangle\langle\psi_b|σ=∑b​sb​∣ψb​⟩⟨ψb​∣ in orthonormal eigenbases. Define

P(a,b)=ra∣⟨ϕa∣ψb⟩∣2,Q(a,b)=sb∣⟨ϕa∣ψb⟩∣2.P(a,b)=r_a|\langle\phi_a|\psi_b\rangle|^2,\qquad Q(a,b)=s_b|\langle\phi_a|\psi_b\rangle|^2.P(a,b)=ra​∣⟨ϕa​∣ψb​⟩∣2,Q(a,b)=sb​∣⟨ϕa​∣ψb​⟩∣2.

These are probability mass functions and satisfy

D(ρ∥σ)=D(P∥Q),ker⁡σ⊆ker⁡ρ  ⟺  (∀a,b: Q(a,b)=0⇒P(a,b)=0).D(\rho\|\sigma)=D(P\|Q),\qquad \ker\sigma\subseteq\ker\rho\iff(\forall a,b:\ Q(a,b)=0\Rightarrow P(a,b)=0).D(ρ∥σ)=D(P∥Q),kerσ⊆kerρ⟺(∀a,b: Q(a,b)=0⇒P(a,b)=0).

On this support-dominated domain, also V(ρ∥σ)=V(P∥Q)V(\rho\|\sigma)=V(P\|Q)V(ρ∥σ)=V(P∥Q). For two pairs of states, use the tensor products of the chosen eigenbases. Their resulting NS laws are exactly P1⊗P2P_1\otimes P_2P1​⊗P2​ and Q1⊗Q2Q_1\otimes Q_2Q1​⊗Q2​, under the canonical regrouping of the two label pairs.

This summarizes (B1)–(B3) while retaining basis choices in degenerate eigenspaces and the source domain of finite variance.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P50
Formal statement
noncomputable section

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

open MeasureTheory Filter Set

namespace QAlgorithms.Papers.Independent.Bridge50.P50

attribute [local instance] Classical.propDecidable Classical.decEq

-- Exact accepted primitives; these names do not create local declarations.

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

open QAlgorithms.Papers.Independent.Information100.P08 (Ensemble ensembleAverage)

open QAlgorithms.Papers.Independent.Information100.P69 (entropy)

open QAlgorithms.Papers.Independent.Dependency50.P35 (Dominates)

open QAlgorithms.Papers.Independent.Dependency50.P36 (pairInformationVariance)

open QAlgorithms (vnEntropy traceDistance minEigenvalue)

attribute [local instance] QAlgorithms.Papers.Independent.Bridge50.P50.matrixBorelMeasurable

attribute [local instance] QAlgorithms.Papers.Independent.Bridge50.P50.matrixBorelSpace

/-- Appendix B, PDF pp.25–26, (B1)–(B3): normalized NS laws, entropy and variance
identities, support equivalence and literal product laws in the PRODUCT eigenbasis.
Variance is stated on its source domain, sigma dominating rho. -/
theorem ns_identities {I : Type} {J : Type*} [Fintype I] [DecidableEq I] [Nonempty I]
    [Fintype J] [DecidableEq J] [Nonempty J]
    (rho sigma : Mat I) (hrho : QAlgorithms.IsDensityMatrix rho)
    (hsigma : QAlgorithms.IsDensityMatrix sigma)
    (r s : NSSpectralData I) (hr : IsSpectral rho r) (hs : IsSpectral sigma s) :
    ((∀ a, 0 ≤ nsP r s a ∧ 0 ≤ nsQ r s a) ∧
      (∑ a, nsP r s a) = 1 ∧ (∑ a, nsQ r s a) = 1) ∧
    entropy rho sigma = nsClassicalD (nsP r s) (nsQ r s) ∧
    (Dominates sigma rho → pairInformationVariance rho sigma = classicalV (nsP r s) (nsQ r s)) ∧
    (Dominates sigma rho ↔ ∀ a, nsQ r s a = 0 → nsP r s a = 0) ∧
    (∀ rho2 sigma2 : Mat J, QAlgorithms.IsDensityMatrix rho2 → QAlgorithms.IsDensityMatrix sigma2 →
      ∀ r2 s2 : NSSpectralData J, IsSpectral rho2 r2 → IsSpectral sigma2 s2 →
      IsSpectral (Matrix.kronecker rho rho2) (productSpectral r r2) ∧
      IsSpectral (Matrix.kronecker sigma sigma2) (productSpectral s s2) ∧
      ∀ (a : I × I) (b : J × J),
        nsP (productSpectral r r2) (productSpectral s s2) ((a.1,b.1),(a.2,b.2)) =
          nsP r s a * nsP r2 s2 b ∧
        nsQ (productSpectral r r2) (productSpectral s s2) ((a.1,b.1),(a.2,b.2)) =
          nsQ r s a * nsQ r2 s2 b) := by sorry

end QAlgorithms.Papers.Independent.Bridge50.P50

end
Source
Second-Order Asymptotics for the Classical Capacity of Image-Additive Quantum Channels, arXiv:1308.6503v3, PDF p. 25, Ns Identities
Read-back

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

Let I,JI,JI,J be finite, nonempty types with decidable equality. Let ρ,σ\rho,\sigmaρ,σ be density matrices on CI\mathbb C^ICI, and let r=(ri,ui)r=(r_i,u_i)r=(ri​,ui​) and s=(sj,vj)s=(s_j,v_j)s=(sj​,vj​) be spectral data satisfying ri,sj≥0r_i,s_j\ge0ri​,sj​≥0,

∑kui(k)‾uj(k)=δij,∑kvi(k)‾vj(k)=δij,ρkl=∑iriui(k)ui(l)‾,σkl=∑jsjvj(k)vj(l)‾.\sum_k\overline{u_i(k)}u_j(k)=\delta_{ij},\qquad \sum_k\overline{v_i(k)}v_j(k)=\delta_{ij},\qquad \rho_{kl}=\sum_i r_i u_i(k)\overline{u_i(l)},\qquad \sigma_{kl}=\sum_j s_j v_j(k)\overline{v_j(l)}.k∑​ui​(k)​uj​(k)=δij​,k∑​vi​(k)​vj​(k)=δij​,ρkl​=i∑​ri​ui​(k)ui​(l)​,σkl​=j∑​sj​vj​(k)vj​(l)​.

For a=(i,j)∈I×Ia=(i,j)\in I\times Ia=(i,j)∈I×I, put

Pa=ri∣∑kui(k)‾vj(k)∣2,Qa=sj∣∑kui(k)‾vj(k)∣2.P_a=r_i\left|\sum_k\overline{u_i(k)}v_j(k)\right|^2,\qquad Q_a=s_j\left|\sum_k\overline{u_i(k)}v_j(k)\right|^2.Pa​=ri​​k∑​ui​(k)​vj​(k)​2,Qa​=sj​​k∑​ui​(k)​vj​(k)​2.

Define Dcl(P∥Q)=+∞D_{\rm cl}(P\|Q)=+\inftyDcl​(P∥Q)=+∞ if Qa=0Q_a=0Qa​=0 and Pa≠0P_a\ne0Pa​=0 for some aaa, and otherwise define it as [∑aPalog⁡2(Pa/Qa)]+[\sum_aP_a\log_2(P_a/Q_a)]_+[∑a​Pa​log2​(Pa​/Qa​)]+​. Define D(R∥T)=+∞D(R\|T)=+\inftyD(R∥T)=+∞ unless R,TR,TR,T are density matrices and ker⁡T⊆ker⁡R\ker T\subseteq\ker RkerT⊆kerR, and otherwise define it as [Re⁡tr⁡(f(R)−Rlog⁡T)]+/ln⁡2[\operatorname{Re}\operatorname{tr}(f(R)-R\log T)]_+/\ln2[Retr(f(R)−RlogT)]+​/ln2, with f(x)=xln⁡xf(x)=x\ln xf(x)=xlnx and matrix functions given by continuous functional calculus. Define

V(R,T)=Re⁡tr⁡ ⁣(R(log⁡2R−log⁡2T)2)−(Re⁡tr⁡(f(R)−Rlog⁡T)ln⁡2)2,Vcl(P,Q)=∑aPa(log⁡2(Pa/Qa)−(Dcl(P∥Q))R)2,V(R,T)=\operatorname{Re}\operatorname{tr}\!\left(R(\log_2R-\log_2T)^2\right) -\left(\frac{\operatorname{Re}\operatorname{tr}(f(R)-R\log T)}{\ln2}\right)^2, \quad V_{\rm cl}(P,Q)=\sum_aP_a\left(\log_2(P_a/Q_a)-(D_{\rm cl}(P\|Q))_{\mathbb R}\right)^2,V(R,T)=Retr(R(log2​R−log2​T)2)−(ln2Retr(f(R)−RlogT)​)2,Vcl​(P,Q)=a∑​Pa​(log2​(Pa​/Qa​)−(Dcl​(P∥Q))R​)2,

where conversion to a real number sends +∞+\infty+∞ to 000, and total division and logarithms give Pa/0=0P_a/0=0Pa​/0=0 and log⁡20=0\log_2 0=0log2​0=0. The conclusions are that every Pa,QaP_a,Q_aPa​,Qa​ is nonnegative, ∑aPa=∑aQa=1\sum_aP_a=\sum_aQ_a=1∑a​Pa​=∑a​Qa​=1, D(ρ∥σ)=Dcl(P∥Q)D(\rho\|\sigma)=D_{\rm cl}(P\|Q)D(ρ∥σ)=Dcl​(P∥Q), and ker⁡σ⊆ker⁡ρ\ker\sigma\subseteq\ker\rhokerσ⊆kerρ implies V(ρ,σ)=Vcl(P,Q)V(\rho,\sigma)=V_{\rm cl}(P,Q)V(ρ,σ)=Vcl​(P,Q); moreover,

ker⁡σ⊆ker⁡ρ⟺∀a, Qa=0⟹Pa=0.\ker\sigma\subseteq\ker\rho \quad\Longleftrightarrow\quad \forall a,\ Q_a=0\Longrightarrow P_a=0.kerσ⊆kerρ⟺∀a, Qa​=0⟹Pa​=0.

Finally, for every pair of density matrices ρ2,σ2\rho_2,\sigma_2ρ2​,σ2​ on CJ\mathbb C^JCJ and every spectral data r2=(rh′,uh′)r_2=(r'_h,u'_h)r2​=(rh′​,uh′​), s2=(sl′,vl′)s_2=(s'_l,v'_l)s2​=(sl′​,vl′​) satisfying the same nonnegativity, orthonormality, and reconstruction requirements, the data with eigenvalues rirh′r_ir'_hri​rh′​ and vectors (k,t)↦ui(k)uh′(t)(k,t)\mapsto u_i(k)u'_h(t)(k,t)↦ui​(k)uh′​(t) are spectral data for ρ⊗ρ2\rho\otimes\rho_2ρ⊗ρ2​, and the analogous data from s,s2s,s_2s,s2​ are spectral data for σ⊗σ2\sigma\otimes\sigma_2σ⊗σ2​; their associated arrays satisfy, for every a=(i,j)∈I2a=(i,j)\in I^2a=(i,j)∈I2 and b=(h,l)∈J2b=(h,l)\in J^2b=(h,l)∈J2,

P((i,h),(j,l))⊗=PaPb′,Q((i,h),(j,l))⊗=QaQb′.P^{\otimes}_{((i,h),(j,l))}=P_aP'_b,\qquad Q^{\otimes}_{((i,h),(j,l))}=Q_aQ'_b.P((i,h),(j,l))⊗​=Pa​Pb′​,Q((i,h),(j,l))⊗​=Qa​Qb′​.
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