Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 6.1, proof — Hoeffding tail bound for RMR_MRM​ at every t>0t > 0t>0

Proved
TraceEstimation.Rayleigh.hoeffding_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 RM=1M∑i=1MziTAziR_M = \frac1M\sum_{i=1}^M z_i^TAz_iRM​=M1​∑i=1M​ziT​Azi​ be a normalized Rayleigh-quotient trace estimator of AAA: z1,…,zMz_1,\ldots,z_Mz1​,…,zM​ are independent random vectors on a probability space 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. Then for every t>0t > 0t>0,

Pr⁡(∣RM−trace(A)∣≥t)  ≤  2exp⁡(−2M2 rank2(A) t2M⋅n2 trace2(A) κf2(A)).\Pr\bigl(|R_M - \mathrm{trace}(A)| \ge t\bigr) \;\le\; 2\exp\left(-\frac{2M^2\,\mathrm{rank}^2(A)\,t^2}{M\cdot n^2\,\mathrm{trace}^2(A)\,\kappa_f^2(A)}\right).Pr(∣RM​−trace(A)∣≥t)≤2exp(−M⋅n2trace2(A)κf2​(A)2M2rank2(A)t2​).

This is Hoeffding's inequality for the MMM independent summands ziTAziz_i^TAz_iziT​Azi​, each confined to an interval of length nrank(A)trace(A)κf(A)\frac{n}{\mathrm{rank}(A)}\mathrm{trace}(A)\kappa_f(A)rank(A)n​trace(A)κf​(A).

Formalization Note The model is a general probability space (Ω,P)(\Omega, P)(Ω,P) with random vectors z : Fin M → Ω → Fin n → ℝ satisfying IsNormalizedRayleighSample P A z (measurable, mutually independent, not necessarily identically distributed, normalized almost surely, unbiased for this AAA). The hypotheses are satisfiable, for instance by zi=n ekiz_i = \sqrt n\,e_{k_i}zi​=n​eki​​ with independent uniform indices kik_iki​. The denominator is positive under the hypotheses (M,n,trace(A),κf(A)>0M, n, \mathrm{trace}(A), \kappa_f(A) > 0M,n,trace(A),κf​(A)>0), so no division by zero occurs.

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), third display (Hoeffding's inequality): let
`A ≠ 0` be symmetric positive semi-definite and `R_M` a normalized Rayleigh-quotient trace
estimator of `A` with `M ≥ 1` samples (Definition 3.2: independent `z_i` with `z_iᵀz_i = n` a.s.
and `E(z_iᵀAz_i) = trace(A)`). For every `t > 0`,
`Pr(|R_M − trace(A)| ≥ t) ≤ 2 exp(−2M² rank²(A) t² / (M n² trace²(A) κ_f²(A)))`. -/
theorem hoeffding_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) (t : ℝ) (ht : 0 < t) :
    P.real {ω | t ≤ |rayleighEstimator A z ω - A.trace|} ≤
      2 * Real.exp (-(2 * (M : ℝ) ^ 2 * (A.rank : ℝ) ^ 2 * t ^ 2) /
        ((M : ℝ) * (n : ℝ) ^ 2 * A.trace ^ 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 3
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