Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Fact 2.1

Open
QAlgorithms.Papers.Independent.Extend50.P34.diagonal_trace_distance

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

prove2quantum

Let η,λ\eta,\lambdaη,λ be probability vectors on [d][d][d], d≥1d\ge1d≥1, and set ρ=diag⁡(η)\rho=\operatorname{diag}(\eta)ρ=diag(η) and σ=diag⁡(λ)\sigma=\operatorname{diag}(\lambda)σ=diag(λ). Then

dtr(ρ,σ)=dTV(η,λ).d_{\rm tr}(\rho,\sigma)=d_{\rm TV}(\eta,\lambda).dtr​(ρ,σ)=dTV​(η,λ).

Both distances include the factor 1/21/21/2. This embeds classical statistical distance into quantum trace distance.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P34
Formal statement
noncomputable section

open scoped Matrix BigOperators

open MeasureTheory

namespace QAlgorithms.Papers.Independent.Extend50.P34

attribute [local instance] Classical.propDecidable

-- Reuse exact pinned definitions; these are imports, not local declarations.

open QAlgorithms.Papers.Independent.Support50.P38 (tv wordMass)

open QAlgorithms.Papers.Independent.Advance50.P28 (counts)

/-- Fact 2.1, arXiv:1501.05028v1, PDF p.10.  -/
theorem diagonal_trace_distance
    (d : ℕ) (hd : 0 < d) (eta lambda : Fin d → ℝ)
    (heta : Learning.IsDistribution eta) (hlambda : Learning.IsDistribution lambda) :
    traceDistance (Matrix.diagonal fun i => (eta i : ℂ))
      (Matrix.diagonal fun i => (lambda i : ℂ)) = tv eta lambda := by sorry

end QAlgorithms.Papers.Independent.Extend50.P34

end
Source
Quantum Spectrum Testing, arXiv:1501.05028v1, PDF p. 10, Fact 2.1
Read-back

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

For every positive natural number ddd and every pair of probability vectors η,λ∈Rd\eta,\lambda\in\mathbb R^dη,λ∈Rd, meaning that each has nonnegative entries summing to 111, the diagonal complex matrices Dη=diag⁡(η0,…,ηd−1)D_\eta=\operatorname{diag}(\eta_0,\ldots,\eta_{d-1})Dη​=diag(η0​,…,ηd−1​) and Dλ=diag⁡(λ0,…,λd−1)D_\lambda=\operatorname{diag}(\lambda_0,\ldots,\lambda_{d-1})Dλ​=diag(λ0​,…,λd−1​) satisfy

12Re⁡Tr⁡(Dη−Dλ)†(Dη−Dλ)=12∑i=0d−1∣ηi−λi∣.\frac12\operatorname{Re}\operatorname{Tr} \sqrt{(D_\eta-D_\lambda)^\dagger(D_\eta-D_\lambda)} = \frac12\sum_{i=0}^{d-1}|\eta_i-\lambda_i|.21​ReTr(Dη​−Dλ​)†(Dη​−Dλ​)​=21​i=0∑d−1​∣ηi​−λi​∣.

The square root is defined by spectral functional calculus; the left side is the specified trace distance, and the right side is the specified total variation distance. Dimension d=1d=1d=1 is included.

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