Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

NS moment and tensor identities

Open
QAlgorithms.Papers.Independent.Advance50.P02.ns_moments_tensor

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, and supp⁡ρ⊆supp⁡σ\operatorname{supp}\rho\subseteq\operatorname{supp}\sigmasuppρ⊆suppσ. Choose arbitrary full orthonormal spectral decompositions ρ=∑xrx∣vx⟩⟨vx∣\rho=\sum_x r_x|v_x\rangle\langle v_x|ρ=∑x​rx​∣vx​⟩⟨vx​∣ and σ=∑ysy∣uy⟩⟨uy∣\sigma=\sum_y s_y|u_y\rangle\langle u_y|σ=∑y​sy​∣uy​⟩⟨uy​∣. Define P(x,y)=rx∣⟨vx,uy⟩∣2P(x,y)=r_x|\langle v_x,u_y\rangle|^2P(x,y)=rx​∣⟨vx​,uy​⟩∣2 and Q(x,y)=sy∣⟨vx,uy⟩∣2Q(x,y)=s_y|\langle v_x,u_y\rangle|^2Q(x,y)=sy​∣⟨vx​,uy​⟩∣2. With centered variances,

D(P∥Q)=D(ρ∥σ),V(P∥Q)=V(ρ∥σ).D(P\Vert Q)=D(\rho\Vert\sigma),\qquad V(P\Vert Q)=V(\rho\Vert\sigma).D(P∥Q)=D(ρ∥σ),V(P∥Q)=V(ρ∥σ).

Using the product eigenbases for tensor powers, for every nnn,

Pρ⊗n,σ⊗n=P⊗n,Qρ⊗n,σ⊗n=Q⊗n.P_{\rho^{\otimes n},\sigma^{\otimes n}}=P^{\otimes n},\qquad Q_{\rho^{\otimes n},\sigma^{\otimes n}}=Q^{\otimes n}.Pρ⊗n,σ⊗n​=P⊗n,Qρ⊗n,σ⊗n​=Q⊗n.

Zero-PPP entries carry no moment mass and QQQ need not normalize. This transfers the finite-likelihood quantum moments to a classical iid model.

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]

/-- Eq.(16), PDF p.14, and centered interpretation p.19. Tensor identities use
product eigenbases; no assertion of basis-independent arrays in degenerate spaces. Source correction. Printed: Definition 1 p.7 calls the raw second moment V; Eq.(16) matches the first two likelihood moments.
Changed: State the centered variance identity, subtracting D^2 on both sides.
Why: The first moments also agree, so centering both second moments gives precisely the variance used in Section VI p.19. -/
theorem ns_moments_tensor (rho sigma : Mat I) (hrho : QAlgorithms.IsDensityMatrix rho)
    (hsigma : sigma.PosSemidef) (hsupport : SupportIncluded rho sigma)
    (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma) :
    classicalMean (nsProbability r s) (nsReferenceWeight r s) = relativeMean rho sigma ∧
    classicalVariance (nsProbability r s) (nsReferenceWeight r s) = centeredRelativeVariance rho sigma ∧
    (∀ n, nsTensorP r s n = weightPower n (nsProbability r s)) ∧
    (∀ n, nsTensorQ r s n = weightPower n (nsReferenceWeight r s)) := 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. 14, §V-A Eq. (16): NS moment and tensor identities
Read-back

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

For any finite type III with decidable equality, let ρ≥0\rho\ge0ρ≥0 have trace 111, let σ≥0\sigma\ge0σ≥0 satisfy ker⁡σ⊆ker⁡ρ\ker\sigma\subseteq\ker\rhokerσ⊆kerρ, and choose spectral presentations r=(λ,U)r=(\lambda,U)r=(λ,U), s=(μ,V)s=(\mu,V)s=(μ,V) with nonnegative eigenvalues, U†U=V†V=1U^\dagger U=V^\dagger V=1U†U=V†V=1, ρ=Udiag⁡(λ)U†\rho=U\operatorname{diag}(\lambda)U^\daggerρ=Udiag(λ)U†, and σ=Vdiag⁡(μ)V†\sigma=V\operatorname{diag}(\mu)V^\daggerσ=Vdiag(μ)V†. Put

P(x,y)=λx∣(U†V)xy∣2,Q(x,y)=μy∣(U†V)xy∣2,m=∑x,yP(x,y)(log⁡2P(x,y)−log⁡2Q(x,y)),P(x,y)=\lambda_x|(U^\dagger V)_{xy}|^2,\quad Q(x,y)=\mu_y|(U^\dagger V)_{xy}|^2,\quad m=\sum_{x,y}P(x,y)\bigl(\log_2P(x,y)-\log_2Q(x,y)\bigr),P(x,y)=λx​∣(U†V)xy​∣2,Q(x,y)=μy​∣(U†V)xy​∣2,m=x,y∑​P(x,y)(log2​P(x,y)−log2​Q(x,y)),

and let L=log⁡2ρ−log⁡2σL=\log_2\rho-\log_2\sigmaL=log2​ρ−log2​σ, D=Re⁡tr⁡(ρL)D=\operatorname{Re}\operatorname{tr}(\rho L)D=Retr(ρL), and Vρ=Re⁡tr⁡(ρL2)−D2V_\rho=\operatorname{Re}\operatorname{tr}(\rho L^2)-D^2Vρ​=Retr(ρL2)−D2. Scalar and matrix logarithms use the total convention log⁡20=0\log_2 0=0log2​0=0. Then

m=D,∑x,yP(x,y)(log⁡2P(x,y)−log⁡2Q(x,y)−m)2=Vρ,m=D,\qquad \sum_{x,y}P(x,y) \bigl(\log_2P(x,y)-\log_2Q(x,y)-m\bigr)^2=V_\rho,m=D,x,y∑​P(x,y)(log2​P(x,y)−log2​Q(x,y)−m)2=Vρ​,

and, for every natural nnn and every z∈(I×I)nz\in(I\times I)^nz∈(I×I)n,

(∏kλzk(1))∣∑a∈In∏kUak,zk(1)‾∏kVak,zk(2)∣2=∏kP(zk),(∏kμzk(2))∣∑a∈In∏kUak,zk(1)‾∏kVak,zk(2)∣2=∏kQ(zk).\begin{aligned} \left(\prod_k\lambda_{z_k^{(1)}}\right) \left|\sum_{a\in I^n} \overline{\prod_kU_{a_k,z_k^{(1)}}} \prod_kV_{a_k,z_k^{(2)}}\right|^2 &=\prod_kP(z_k),\\ \left(\prod_k\mu_{z_k^{(2)}}\right) \left|\sum_{a\in I^n} \overline{\prod_kU_{a_k,z_k^{(1)}}} \prod_kV_{a_k,z_k^{(2)}}\right|^2 &=\prod_kQ(z_k). \end{aligned}(k∏​λzk(1)​​)​a∈In∑​k∏​Uak​,zk(1)​​​k∏​Vak​,zk(2)​​​2(k∏​μzk(2)​​)​a∈In∑​k∏​Uak​,zk(1)​​​k∏​Vak​,zk(2)​​​2​=k∏​P(zk​),=k∏​Q(zk​).​

The tensor identities include n=0n=0n=0, when both sides equal 111. Zero eigenvalues are permitted, and σ\sigmaσ need not have trace 111.

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