Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4: distribution error controls observable-mean error

Open
QAlgorithms.Papers.Independent.Advance50.P30.observable_mean_error

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

prove2quantum

Let H\mathcal HH have finite dimension d≥1d\ge1d≥1, and let L=∑i=1tsiLiL=\sum_{i=1}^t s_iL_iL=∑i=1t​si​Li​, where t≥1t\ge1t≥1, all si∈Rs_i\in\mathbb Rsi​∈R, and the LiL_iLi​ are Hermitian with Tr⁡(LiLj†)=δij\operatorname{Tr}(L_iL_j^\dagger)=\delta_{ij}Tr(Li​Lj†​)=δij​. Let ρ\rhoρ be a normalized density operator. For each iii, write Li=∑aλiaΠiaL_i=\sum_a\lambda_{ia}\Pi_{ia}Li​=∑a​λia​Πia​ for its spectral decomposition, set Pia=Tr⁡(Πiaρ)P_{ia}=\operatorname{Tr}(\Pi_{ia}\rho)Pia​=Tr(Πia​ρ), and let QiQ_iQi​ be any normalized probability distribution on the same spectral alphabet. Then

∣Tr⁡(Lρ)−∑isi∑aλiaQia∣≤t ∥L∥HSmax⁡i∑a∣Pia−Qia∣.\left|\operatorname{Tr}(L\rho)-\sum_i s_i\sum_a\lambda_{ia}Q_{ia}\right| \le\sqrt t\,\|L\|_{\mathrm{HS}}\max_i\sum_a|P_{ia}-Q_{ia}|.​Tr(Lρ)−i∑​si​a∑​λia​Qia​​≤t​∥L∥HS​imax​a∑​∣Pia​−Qia​∣.

The Hilbert–Schmidt norm is ∥L∥HS=Tr⁡(L†L)\|L\|_{\mathrm{HS}}=\sqrt{\operatorname{Tr}(L^\dagger L)}∥L∥HS​=Tr(L†L)​. This estimate converts distribution-frequency control into mean-value control, including negative coefficients. The maximum is over a nonempty finite set.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P30
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Advance50.P30

open QAlgorithms MeasureTheory

open QAlgorithms.Papers.Independent.Gap48.P20 (Copies)

open QAlgorithms.Papers.Independent.Information100.P21 (Op Vec)

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

open scoped Matrix ComplexConjugate ComplexOrder Matrix.Norms.Elementwise

attribute [local instance] Classical.decEq Classical.propDecidable

attribute [local instance] QAlgorithms.Papers.Independent.Advance50.P30.matrixContinuousENorm

attribute [local instance] QAlgorithms.Papers.Independent.Advance50.P30.matrixMeasurable

attribute [local instance] QAlgorithms.Papers.Independent.Advance50.P30.matrixBorel

attribute [local instance] QAlgorithms.Papers.Independent.Advance50.P30.vectorMeasurable

attribute [local instance] QAlgorithms.Papers.Independent.Advance50.P30.vectorBorel

/-- PDF p.17, Lemma 4, Eq.(15), with arbitrary signed real coefficients.
The proof's operator-norm equality is unnecessary; HS normalization gives
operator norm at most one. The nonempty finite sSup is the actual maximum. -/
theorem observable_mean_error {I : Type} [Fintype I] [DecidableEq I] [Nonempty I]
    (t : ℕ) (ht : 0 < t) (D : HSDecomposition I t)
    (rho : Op I) (hrho : IsDensityMatrix rho)
    (Q : (i : Fin t) → Fin (D.intermediate i).count → ℝ)
    (hQpos : ∀ i a, 0 ≤ Q i a) (hQsum : ∀ i, ∑ a, Q i a = 1) :
    |(D.operator * rho).trace.re -
      ∑ i, D.coeff i * ∑ a, (D.intermediate i).value a * Q i a| ≤
      Real.sqrt t * frobNorm D.operator *
        sSup (Set.range fun i : Fin t =>
          l1 (fun a => effectProb ((D.intermediate i).effect a) rho) (Q i)) := by sorry

end QAlgorithms.Papers.Independent.Advance50.P30

end
Source
Unconditional privacy over channels which cannot convey quantum information, arXiv:quant-ph/0702077v1, PDF p. 17, Lemma 4
Read-back

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

Let III be a finite, nonempty type with decidable equality, and let t>0t>0t>0 be a natural number. For each i∈{0,…,t−1}i\in\{0,\ldots,t-1\}i∈{0,…,t−1}, take a positive number ciout≤∣I∣c_i^{\mathrm{out}}\le |I|ciout​≤∣I∣ of outcomes, nonzero positive semidefinite projections Ei,aE_{i,a}Ei,a​ indexed by III that sum to the identity and satisfy Ei,aEi,b=0E_{i,a}E_{i,b}=0Ei,a​Ei,b​=0 when a≠ba\ne ba=b, and pairwise distinct real values vi,av_{i,a}vi,a​. Put

Ai=∑avi,aEi,a.A_i=\sum_a v_{i,a}E_{i,a}.Ai​=a∑​vi,a​Ei,a​.

Suppose tr⁡(AiAj†)=1\operatorname{tr}(A_iA_j^\dagger)=1tr(Ai​Aj†​)=1 for i=ji=ji=j and 000 otherwise, and take arbitrary real coefficients cic_ici​, defining A=∑iciAiA=\sum_i c_iA_iA=∑i​ci​Ai​. Let ρ\rhoρ be positive semidefinite with trace one, and for each iii let Qi(a)Q_i(a)Qi​(a) be nonnegative real numbers summing to one over that intermediate measurement’s outcomes. With

pi(a)=Re⁡tr⁡(Ei,aρ),∥A∥F=(∑x,y∈I∣Axy∣2)1/2,p_i(a)=\operatorname{Re}\operatorname{tr}(E_{i,a}\rho), \qquad \|A\|_{\mathrm F}=\left(\sum_{x,y\in I}|A_{xy}|^2\right)^{1/2},pi​(a)=Retr(Ei,a​ρ),∥A∥F​=​x,y∈I∑​∣Axy​∣2​1/2,

the following inequality holds:

∣Re⁡tr⁡(Aρ)−∑i=0t−1ci∑avi,aQi(a)∣≤t ∥A∥Fsup⁡0≤i<t∑a∣pi(a)−Qi(a)∣.\left| \operatorname{Re}\operatorname{tr}(A\rho) -\sum_{i=0}^{t-1}c_i\sum_a v_{i,a}Q_i(a) \right| \le \sqrt t\,\|A\|_{\mathrm F} \sup_{0\le i<t}\sum_a|p_i(a)-Q_i(a)|.​Retr(Aρ)−i=0∑t−1​ci​a∑​vi,a​Qi​(a)​≤t​∥A∥F​0≤i<tsup​a∑​∣pi​(a)−Qi​(a)∣.

Because t>0t>0t>0, the supremum on the right is the maximum of a nonempty finite collection. No bounds on the real coefficients or spectral values are assumed beyond the stated conditions.

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