Lanczos quadrature is the Gauss rule of the spectral measure
Library Β· Result group
Theorem (Matrix.IsHermitian.lanczosQuadrature_eq_gaussQuadrature).Lanczos quadrature is the Gauss rule of the spectral measure: for Hermitian \mathbf{A} and every q, \mathsf{lanczosQuadrature}(\mathbf{A}, \mathbf{b}, q) is the q-point Gauss rule of \mu_{\mathbf{A},\mathbf{b}}, for every RCLike field (complex Hermitian included). [GolubMeurant2010, Ch. 6].
Headline (provisional)
Lean statement and details
Matrix.IsHermitian.lanczosQuadrature_eq_gaussQuadrature.{u_1, u_2} {π : Type u_1} [RCLike π]
{n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n π} (hA : A.IsHermitian) (b : n β π)
(q : β) : lanczosQuadrature A b q = gaussQuadrature (spectralMeasure A b) q
Theorem (Matrix.IsHermitian.lanczosQuadrature_succ_eq_sum).GolubβWelsch: for Hermitian \mathbf{A}, every q, and a unitary diagonalisation \mathbf{T} = \mathbf{U}\operatorname{diag}(\mathbf{d})\mathbf{U}^{\mathsf{H}} of the tridiagonal matrix of q + 1 steps of the Lanczos recurrence, \mathsf{lanczosQuadrature}(\mathbf{A}, \mathbf{b}, q + 1) = \sum_i \|\mathbf{b}\|^2\lvert\mathbf{U}_{0,i}\rvert^2\,\delta_{\mathbf{d}_i}\,: the nodes are the eigenvalues of \mathbf{T}, the weights the squared first entries of its eigenvectors. [GolubMeurant2010, Ch. 6] (locator to check).
Lean statement and details
Matrix.IsHermitian.lanczosQuadrature_succ_eq_sum.{u_1, u_2} {π : Type u_1} [RCLike π] {n : Type u_2}
[Fintype n] [DecidableEq n] {A : Matrix n n π} (hA : A.IsHermitian) (b : n β π) (q : β)
{U : Matrix (Fin (q + 1)) (Fin (q + 1)) π} (hU : HasOrthonormalCols U) {d : Fin (q + 1) β β}
(hT : lanczosTridiagonal A b (q + 1) = (U * diagonal fun i β¦ β(d i)) * Uα΄΄) :
lanczosQuadrature A b (q + 1) =
β i, ENNReal.ofReal (βWithLp.toLp 2 bβ ^ 2 * βU 0 iβ ^ 2) β’ Measure.dirac (d i)
Theorem (Matrix.IsHermitian.matchesMoments_lanczosQuadrature).Lanczos quadrature matches the first 2q moments of the spectral measure: for Hermitian \mathbf{A}, every \mathbf{b} and every q, \int p\,d\mu_{\mathbf{A},\mathbf{b}} = \int p\,d\,\mathsf{lanczosQuadrature}(\mathbf{A}, \mathbf{b}, q) for every real polynomial p of degree less than 2q. [GolubMeurant2010, Ch. 6]. Chen, Trogdon and Ubaru (2022) start their spectrum-approximation bounds from this form; locator to check.
Lean statement and details
Matrix.IsHermitian.matchesMoments_lanczosQuadrature.{u_1, u_2} {π : Type u_1} [RCLike π]
{n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n π} (hA : A.IsHermitian) (b : n β π)
(q : β) : MatchesMoments (spectralMeasure A b) (lanczosQuadrature A b q) (2 * q)
Theorem (Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_continuousOn).Lanczos quadrature and the minimax error: for Hermitian \mathbf{A} with spectrum in [a, a'] and f continuous on [a, a'], q + 1 Lanczos steps give \bigl\lvert\mathbf{b}^{\mathsf{H}}\bigl(f(\mathbf{A})\mathbf{b} - \mathsf{lanczosFA}(\mathbf{A}, f, \mathbf{b}, q + 1)\bigr)\bigr\rvert \le 2E_{2q + 1}(f; [a, a'])\|\mathbf{b}\|^2\,,E_{2q + 1} the error of the best uniform approximation of f on [a, a'] by polynomials of degree at most 2q + 1 (minimaxError), the degree of exactness of the Gauss rule. [GolubMeurant2010, Ch. 6], the exactness it rests on.
Lean statement and details
Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_continuousOn.{u_1, u_2}
{π : Type u_1} [RCLike π] {n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n π}
(hA : A.IsHermitian) {a a' : β} (hs : spectrum β A β Set.Icc a a') {f : β β β}
(hf : ContinuousOn f (Set.Icc a a')) (b : n β π) (q : β) :
βstar b β¬α΅₯ (cfc f A *α΅₯ b - lanczosFA A f b (q + 1))β β€
2 * minimaxError f (Set.Icc a a') (2 * q + 1) * βWithLp.toLp 2 bβ ^ 2
Theorem (Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_differentiableOn).Lanczos quadrature for analytic functions: let \mathbf{A} be Hermitian with spectrum in [a, a'], a < a', and let f on [a, a'], pulled back to [-1, 1] by t \mapsto ((a' - a)t + a' + a)/2, extend to a function holomorphic and bounded by \mathbf{M} on the open Bernstein ellipse E_\rho, \rho > 1. Then q + 1 steps give \bigl\lvert\mathbf{b}^{\mathsf{H}}\bigl(f(\mathbf{A})\mathbf{b} - \mathsf{lanczosFA}(\mathbf{A}, f, \mathbf{b}, q + 1)\bigr)\bigr\rvert \le \frac{4\mathbf{M}}{\rho^{2q + 1}(\rho - 1)}\|\mathbf{b}\|^2\,, twice the rate of Lanczos-FA in the exponent, from the Chebyshev truncation of degree 2q + 1. [Trefethen2019, Theorem 8.2] (locator to check), the approximation rate; constants composed here.
Lean statement and details
Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_differentiableOn.{u_1, u_2}
{π : Type u_1} [RCLike π] {n : Type u_2} [Fintype n] [DecidableEq n] {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))
(b : n β π) (q : β) :
βstar b β¬α΅₯ (cfc f A *α΅₯ b - lanczosFA A f b (q + 1))β β€
4 * M / (Ο ^ (2 * q + 1) * (Ο - 1)) * βWithLp.toLp 2 bβ ^ 2
Theorem (Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_lipschitzOnWith).Lanczos quadrature for Lipschitz functions: for Hermitian \mathbf{A} with spectrum in [a, a'], a < a', and fL-Lipschitz on [a, a'], q + 1 steps give <!-- value jacksonApproximationConstant --> \bigl\lvert\mathbf{b}^{\mathsf{H}}\bigl(f(\mathbf{A})\mathbf{b} - \mathsf{lanczosFA}(\mathbf{A}, f, \mathbf{b}, q + 1)\bigr)\bigr\rvert \le \frac{\pi L(a' - a)}{2q + 3}\|\mathbf{b}\|^2\,, from Jackson's theorem on [a, a'] in degree 2q + 1 (the constant is jacksonApproximationConstant). The approximation step is [ChenTrogdonUbaru2022, Appendix C, Theorem 38]; constants composed here.
Lean statement and details
Matrix.IsHermitian.norm_star_dotProduct_cfc_mulVec_sub_lanczosFA_le_of_lipschitzOnWith.{u_1, u_2}
{π : Type u_1} [RCLike π] {n : Type u_2} [Fintype n] [DecidableEq n] {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')) (b : n β π) (q : β) :
βstar b β¬α΅₯ (cfc f A *α΅₯ b - lanczosFA A f b (q + 1))β β€
jacksonApproximationConstant * βL * (a' - a) / (2 * βq + 3) * βWithLp.toLp 2 bβ ^ 2
Theorem (Matrix.IsHermitian.star_dotProduct_lanczosFA_eval).Gauss (Lanczos) quadrature is exact through degree 2q - 1: for Hermitian \mathbf{A} and a real polynomial p with \deg p < 2q, \mathbf{b}^{\mathsf{H}}\mathsf{lanczosFA}(\mathbf{A}, p, \mathbf{b}, q) = \mathbf{b}^{\mathsf{H}}p(\mathbf{A})\mathbf{b}; Lanczos-FA itself is exact only through degree q - 1. [GolubMeurant2010, Ch. 6].
Lean statement and details
Matrix.IsHermitian.star_dotProduct_lanczosFA_eval.{u_1, u_2} {π : Type u_1} [RCLike π]
{n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n π} (hA : A.IsHermitian) (b : n β π)
{q : β} {p : Polynomial β} (hp : p.degree < 2 * βq) :
star b β¬α΅₯ lanczosFA A (fun x β¦ Polynomial.eval x p) b q = quadForm ((Polynomial.aeval A) p) b
Theorem (HasOrthonormalCols.lanczosQuadrature_eq_interpolatoryQuadrature).Lanczos quadrature is the Gauss rule of the spectral measure: for Hermitian \mathbf{A}, \mathbf{Q} with orthonormal columns spanning \mathcal{K}_q(\mathbf{A}, \mathbf{b}) and every q, \mathsf{lanczosQuadrature}(\mathbf{A}, \mathbf{b}, q) is the interpolatory rule of \mu_{\mathbf{A},\mathbf{b}} at the set s of the distinct Ritz values (the eigenvalues of \mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}), q of them when q is at most the grade of \mathbf{b}. Past the grade both sides are \mu_{\mathbf{A},\mathbf{b}} itself. [GolubMeurant2010, Ch. 6].
Lean statement and details
NLAlib.HasOrthonormalCols.lanczosQuadrature_eq_interpolatoryQuadrature.{u_1, u_2, u_3}
{π : Type u_1} [RCLike π] {n : Type u_2} {r : Type u_3} [Fintype n] [DecidableEq n] [Fintype r]
[DecidableEq r] {Q : Matrix n r π} (hQ : HasOrthonormalCols Q) {A : Matrix n n π}
(hA : A.IsHermitian) {b : n β π} {q : β} (hK : Q.mulVecLin.range = krylovSpace A b q)
{s : Finset β} (hs : βs = spectrum β (Qα΄΄ * A * Q)) :
lanczosQuadrature A b q = interpolatoryQuadrature (spectralMeasure A b) s