NLA-lib Explorer

Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_isUniformApproxOn

Library · theorem

General form: sizes are index types

The error of stochastic Lanczos quadrature splits into the Girard–Hutchinson error and a quadrature error: for Hermitian \mathbf{A} with spectrum in [a, a'], if a real polynomial p of degree less than 2q is within \varepsilon of f on [a, a'], then for every test matrix \mathbf{\Omega} with m columns \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q)\bigr\rvert \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{girardHutchinson}(f(\mathbf{A}), \mathbf{\Omega})\bigr\rvert + \frac{2\varepsilon\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m}\,. Probe by probe, \boldsymbol{\omega}_j^{\mathsf{H}}f(\mathbf{A})\boldsymbol{\omega}_j = \int f\,d\mu_j, \mu_j the spectral measure of \mathbf{A} and \boldsymbol{\omega}_j, is replaced by its Gauss rule, whose error is at most 2\varepsilon\mu_j(\mathbb{R}) = 2\varepsilon\|\boldsymbol{\omega}_j\|^2; the errors are averaged. With no columns both sides reduce to \lvert\operatorname{tr} f(\mathbf{A})\rvert. [UbaruChenSaad2017, §4] (locator to check); [MartinssonTropp2020, §6.6]; there with the quadrature error bounded through analytic f and Chebyshev approximation. Result: stochastic-lanczos-quadrature-error

Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_isUniformApproxOn.{u_1, u_2, u_3} {𝕜 : Type u_1}
  [RCLike 𝕜] {n : Type u_2} {m : Type u_3} [Fintype n] [DecidableEq n] [Fintype m]
  {A : Matrix n n 𝕜} (hA : A.IsHermitian) {a a' : ℝ} (hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ}
  {q : ℕ} {p : Polynomial ℝ} (hp : p.degree < 2 * ↑q) {ε : ℝ}
  (hε : Metric.IsUniformApproxOn (fun x ↦ Polynomial.eval x p) f (Set.Icc a a') ε)
  (Ω : Matrix n m 𝕜) :
  ‖(cfc f A).trace - slq A f Ω q‖ ≤
    ‖(cfc f A).trace - girardHutchinson (cfc f A) Ω‖ + 2 * ε * frobNorm Ω ^ 2 / ↑(Fintype.card m)

Full source on GitHub

Import NLAlib.Estimation.Trace.StochasticLanczosQuadrature.

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.