The error of stochastic Lanczos quadrature and the minimax error
Library · Result group
Theorem (Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_continuousOn).The error of stochastic Lanczos quadrature and the minimax error: for Hermitian \mathbf{A} with spectrum in [a, a'], f continuous on [a, a'], every test matrix \mathbf{\Omega} with m columns and q + 1 Lanczos steps per probe, \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{girardHutchinson}(f(\mathbf{A}), \mathbf{\Omega})\bigr\rvert + \frac{2E_{2q + 1}(f; [a, a'])\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m} \,,E_{2q + 1} the error of the best uniform approximation of f on [a, a'] by polynomials of degree at most 2q + 1 (minimaxError). [UbaruChenSaad2017, §4] (locator to check); there with the quadrature error bounded through analytic f and Chebyshev approximation.
Headline (provisional)General form: sizes are index types
Lean statement and details
Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_continuousOn.{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 : ℝ → ℝ}
(hf : ContinuousOn f (Set.Icc a a')) (Ω : Matrix n m 𝕜) (q : ℕ) :
‖(cfc f A).trace - slq A f Ω (q + 1)‖ ≤
‖(cfc f A).trace - girardHutchinson (cfc f A) Ω‖ +
2 * minimaxError f (Set.Icc a a') (2 * q + 1) * frobNorm Ω ^ 2 / ↑(Fintype.card m)
Theorem (Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_differentiableOn).The error of stochastic Lanczos quadrature for analytic functions: let \mathbf{A} be Hermitian with spectrum in [a, a'], a < a', and let f, transported to [-1, 1] by the affine map onto [a, a'], extend to a function F holomorphic on the open Bernstein ellipse E_\rho, \rho > 1, with \lvert F\rvert \le \mathbf{M} there. Then for every test matrix \mathbf{\Omega} with m columns and every q, with q + 1 Lanczos steps per probe, \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{girardHutchinson}(f(\mathbf{A}), \mathbf{\Omega})\bigr\rvert + \frac{4\mathbf{M}}{\rho^{2q + 1}(\rho - 1)}\cdot \frac{\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m}\,, from the Chebyshev truncation of degree 2q + 1. [UbaruChenSaad2017, Theorem 4.1] (locator to check); the setting of their analysis, there with relative error for positive definite \mathbf{A}.
General form: sizes are index types
Lean statement and details
Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_differentiableOn.{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' : ℝ} (haa : a < a')
(hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} {F : ℂ → ℂ} {ρ M : ℝ} (hρ : 1 < ρ)
(hFd : DifferentiableOn ℂ F (openBernsteinEllipse ρ))
(hM : Metric.IsUniformApproxOn F (fun x ↦ 0) (openBernsteinEllipse ρ) M)
(hExt : Set.EqOn (fun t ↦ ↑(f (((a' - a) * t + a' + a) / 2))) (fun t ↦ F ↑t) (Set.Icc (-1) 1))
(Ω : Matrix n m 𝕜) (q : ℕ) :
‖(cfc f A).trace - slq A f Ω (q + 1)‖ ≤
‖(cfc f A).trace - girardHutchinson (cfc f A) Ω‖ +
4 * M / (ρ ^ (2 * q + 1) * (ρ - 1)) * (frobNorm Ω ^ 2 / ↑(Fintype.card m))
Theorem (Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_isUniformApproxOn).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.
General form: sizes are index types
Lean statement and details
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)
Theorem (Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_lipschitzOnWith).The error of stochastic Lanczos quadrature for Lipschitz functions: for Hermitian \mathbf{A} with spectrum in [a, a'], a < a', fL-Lipschitz on [a, a'], every test matrix \mathbf{\Omega} with m columns and every q, with q + 1 Lanczos steps per probe, <!-- value jacksonApproximationConstant --> \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{girardHutchinson}(f(\mathbf{A}), \mathbf{\Omega})\bigr\rvert + \frac{\pi L(a' - a)}{2q + 3}\cdot \frac{\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m}\,; the constant is jacksonApproximationConstant. Per probe, the Gauss-rule error for Lipschitz functions (Jackson's theorem in degree 2q + 1), averaged. [UbaruChenSaad2017, §4] (locator to check); the rate from [ChenTrogdonUbaru2022, Appendix C, Theorem 38], the approximation step.
General form: sizes are index types
Lean statement and details
Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_lipschitzOnWith.{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' : ℝ} (haa : a < a')
(hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} {L : ℝ≥0} (hf : LipschitzOnWith L f (Set.Icc a a'))
(Ω : Matrix n m 𝕜) (q : ℕ) :
‖(cfc f A).trace - slq A f Ω (q + 1)‖ ≤
‖(cfc f A).trace - girardHutchinson (cfc f A) Ω‖ +
jacksonApproximationConstant * ↑L * (a' - a) / (2 * ↑q + 3) *
(frobNorm Ω ^ 2 / ↑(Fintype.card m))
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.