Lemma 5.3 — rounding recovers of a projection with probability once
ProvedTraceEstimation.ProjectionRank.projection_rank_roundLet be a projection matrix — symmetric, with , equivalently symmetric with only the eigenvalues and — and let be a failure probability. Let be an integer with
and let be the Gaussian trace estimator of with samples (Definition 3.1). Then
Thus the rank of a projection available only through matrix–vector products is computed exactly, with failure probability at most , from products, with no dependence on an accuracy parameter. Computing the rank of a projection is used, for example, to compute charge densities in electronic structure calculations without diagonalization.
Formalization Note "Projection matrix" is formalized as orthogonal projection (A.IsHermitian and A * A = A), the reading under which the paper's proof, which diagonalizes with unitary, applies. is Mathlib's round : ℝ → ℤ, which rounds half-integers up; the statement does not depend on the tie-breaking rule, since every rounding failure lies in the event . The probability is Measure.real under the product Gaussian measure of Definition 3.1. No upper bound on is imposed (for the statement is trivially true), and the case is included.
import Mathlib import Definitions.Def_TraceEstimation_Shared_gaussianEstimator
namespace TraceEstimation.ProjectionRank
open MeasureTheory ProbabilityTheory Matrix
/-- Lemma 5.3 (Avron–Toledo, p. 8:9). Let `A ∈ ℝ^{n×n}` be a projection matrix and `δ > 0` a
failure probability. For `M ≥ 24 rank(A) ln(2/δ)` samples (`M ≥ 1`), the Gaussian trace
estimator `G_M` of `A` satisfies `Pr(round(G_M) ≠ rank(A)) ≤ δ`.
"Projection matrix" is an orthogonal projection: `A` symmetric (`A.IsHermitian`) and idempotent
(`A * A = A`), i.e. symmetric with eigenvalues in `{0, 1}` (the proof diagonalises
`A = Uᵀ diag(1,…,1,0,…,0) U` with `U` unitary). `round` is Mathlib's `round : ℝ → ℤ`
(half-integers round up); the probability is `P.real` under the product Gaussian measure of
Definition 3.1. -/
theorem projection_rank_round {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.IsHermitian)
(hA2 : A * A = A) (δ : ℝ) (hδ : 0 < δ) (M : ℕ) (hM : 0 < M)
(hMδ : 24 * (A.rank : ℝ) * Real.log (2 / δ) ≤ M) :
(Shared.gaussianSampleMeasure n M).real
{ω | round (Shared.gaussianEstimator A M ω) ≠ (A.rank : ℤ)} ≤ δ := by sorry
end TraceEstimation.ProjectionRank
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.