Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.3, proof, Eq. (2) — M≥6 rank(A)−1ϵ−2ln⁡(2/δ)M \ge 6\,\mathrm{rank}(A)^{-1}\epsilon^{-2}\ln(2/\delta)M≥6rank(A)−1ϵ−2ln(2/δ) gives failure probability ≤δ\le\delta≤δ

Proved
TraceEstimation.ProjectionRank.sample_bound_eq2

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

gaussianp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1projection-matrixsample-complexitytrace-estimation

Let A∈Rn×nA \in \mathbb{R}^{n\times n}A∈Rn×n be an orthogonal projection matrix (symmetric with A2=AA^2 = AA2=A) of rank r=rank(A)≥1r = \mathrm{rank}(A) \ge 1r=rank(A)≥1, let 0<ϵ≤120 < \epsilon \le \tfrac120<ϵ≤21​ and δ>0\delta > 0δ>0, and let M≥1M \ge 1M≥1 be an integer with

M≥6 r−1ϵ−2ln⁡(2/δ).(2)M \ge 6\, r^{-1} \epsilon^{-2} \ln(2/\delta). \qquad (2)M≥6r−1ϵ−2ln(2/δ).(2)

Then the Gaussian trace estimator GMG_MGM​ of AAA satisfies

Pr⁡(∣GM−r∣≥rϵ)≤δ.\Pr\bigl(|G_M - r| \ge r\epsilon\bigr) \le \delta .Pr(∣GM​−r∣≥rϵ)≤δ.

This converts the exponential tail bound into a sample-size requirement; it is the bound into which the proof of Lemma 5.3 substitutes ϵ=1/(2r)\epsilon = 1/(2r)ϵ=1/(2r).

Formalization Note The probability is Measure.real under the product Gaussian measure of Definition 3.1. The range 0<ϵ≤1/20 < \epsilon \le 1/20<ϵ≤1/2 is inherited from the χ2\chi^2χ2 tail bound. For δ≥2\delta \ge 2δ≥2 the right side of (2) is non-positive and the conclusion holds trivially since probabilities are at most 111; no upper bound on δ\deltaδ is imposed, matching the paper.

Preamble
import Mathlib
import Definitions.Def_TraceEstimation_Shared_gaussianEstimator
Formal statement
namespace TraceEstimation.ProjectionRank

open MeasureTheory ProbabilityTheory Matrix

/-- Avron–Toledo, Lemma 5.3, proof (p. 8:9), Eq. (2): for an orthogonal projection `A`
(symmetric, `A * A = A`) with `rank(A) ≥ 1`, `0 < ε ≤ 1/2`, `δ > 0` and a number of samples
`M ≥ 1` with `M ≥ 6 rank(A)⁻¹ ε⁻² ln(2/δ)`, we have `Pr(|G_M - rank(A)| ≥ rank(A) ε) ≤ δ`. -/
theorem sample_bound_eq2 {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.IsHermitian)
    (hA2 : A * A = A) (hr : 0 < A.rank) (ε : ℝ) (hε : 0 < ε) (hε2 : ε ≤ 1 / 2) (δ : ℝ)
    (hδ : 0 < δ) (M : ℕ) (hM : 0 < M)
    (hMε : 6 * (A.rank : ℝ)⁻¹ * ε⁻¹ ^ 2 * Real.log (2 / δ) ≤ M) :
    (Shared.gaussianSampleMeasure n M).real
        {ω | (A.rank : ℝ) * ε ≤ |Shared.gaussianEstimator A M ω - A.rank|} ≤ δ := by sorry

end TraceEstimation.ProjectionRank
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:9, proof of Lemma 5.3, Eq. (2)
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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me