Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 6.1, proof — Pr⁡(∣RM−trace(A)∣≥ϵ trace(A))≤2exp⁡(−2Mrank2(A)ϵ2/(n2κf2(A)))\Pr(|R_M-\mathrm{trace}(A)| \ge \epsilon\,\mathrm{trace}(A)) \le 2\exp(-2M\mathrm{rank}^2(A)\epsilon^2/(n^2\kappa_f^2(A)))Pr(∣RM​−trace(A)∣≥ϵtrace(A))≤2exp(−2Mrank2(A)ϵ2/(n2κf2​(A)))

Proved
TraceEstimation.Rayleigh.relative_tail

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

concentration-inequalitieshoeffding-inequalityp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1trace-estimation

Let A∈Rn×nA \in \mathbb{R}^{n\times n}A∈Rn×n be a nonzero symmetric positive semi-definite matrix, M≥1M \ge 1M≥1, and let RMR_MRM​ be a normalized Rayleigh-quotient trace estimator of AAA with MMM samples (independent random vectors ziz_izi​ with ziTzi=nz_i^Tz_i = nziT​zi​=n almost surely and E(ziTAzi)=trace(A)\mathrm{E}(z_i^TAz_i) = \mathrm{trace}(A)E(ziT​Azi​)=trace(A)). Let κf(A)\kappa_f(A)κf​(A) be the ratio between the largest and smallest nonzero eigenvalue of AAA. For every ϵ>0\epsilon > 0ϵ>0,

Pr⁡(∣RM−trace(A)∣≥ϵ trace(A))  ≤  2exp⁡(−2M rank2(A) ϵ2n2κf2(A)).\Pr\bigl(|R_M - \mathrm{trace}(A)| \ge \epsilon\,\mathrm{trace}(A)\bigr) \;\le\; 2\exp\left(-\frac{2M\,\mathrm{rank}^2(A)\,\epsilon^2}{n^2\kappa_f^2(A)}\right).Pr(∣RM​−trace(A)∣≥ϵtrace(A))≤2exp(−n2κf2​(A)2Mrank2(A)ϵ2​).

This is the relative-error form of the Hoeffding bound: the right-hand side no longer involves trace(A)\mathrm{trace}(A)trace(A), and it decays exponentially in MMM at a rate governed by rank(A)/(n κf(A))\mathrm{rank}(A)/(n\,\kappa_f(A))rank(A)/(nκf​(A)).

Formalization Note Same probabilistic model as the preceding milestone (IsNormalizedRayleighSample). The denominator n2κf2(A)n^2\kappa_f^2(A)n2κf2​(A) is positive because A≠0A \ne 0A=0.

Preamble
import Mathlib
import Definitions.Def_TraceEstimation_Rayleigh_kappaF
import Definitions.Def_TraceEstimation_Rayleigh_rayleighEstimator
Formal statement
namespace TraceEstimation.Rayleigh

open MeasureTheory ProbabilityTheory Matrix

/-- Avron–Toledo, proof of Theorem 6.1 (p. 8:10), fourth display (the Hoeffding bound at
`t = ε trace(A)`): let `A ≠ 0` be symmetric positive semi-definite and `R_M` a normalized
Rayleigh-quotient trace estimator of `A` with `M ≥ 1` samples. For every `ε > 0`,
`Pr(|R_M − trace(A)| ≥ ε trace(A)) ≤ 2 exp(−2M rank²(A) ε² / (n² κ_f²(A)))`. -/
theorem relative_tail {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
    {n M : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.PosSemidef) (hA0 : A ≠ 0) (hM : 0 < M)
    (z : Fin M → Ω → Fin n → ℝ) (hz : IsNormalizedRayleighSample P A z) (ε : ℝ) (hε : 0 < ε) :
    P.real {ω | ε * A.trace ≤ |rayleighEstimator A z ω - A.trace|} ≤
      2 * Real.exp (-(2 * (M : ℝ) * (A.rank : ℝ) ^ 2 * ε ^ 2) /
        ((n : ℝ) ^ 2 * kappaF hA.isHermitian ^ 2)) := by sorry

end TraceEstimation.Rayleigh
Source
Avron and Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, J. ACM 58(2), Article 8 (2011), p. 8:10, Section 6, proof of Theorem 6.1, display 4
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me