Theorem (IsOrthogonalPolynomial.integral_eval_eq_sum).Gauss quadrature: if the nodal polynomial \pi_s of distinct real nodes s is orthogonal in L^2(\mu) to the polynomials of degree less than \lvert s\rvert, for a finite measure \mu supported in [a, \mathbf{b}], then \int p\,d\mu = \sum_{\mathbf{x}\in s}\Bigl(\int\ell_\mathbf{x}\,d\mu\Bigr)p(\mathbf{x}) for every real polynomial p of degree less than 2\lvert s\rvert, \ell_\mathbf{x} the Lagrange basis polynomial of \mathbf{x}. [Gautschi2004, Theorems 1.45 and 1.46]; [GolubMeurant2010, Ch. 6]; there at the zeros of the orthogonal polynomial of a positive measure; here at any nodes whose nodal polynomial is orthogonal.
Headline (provisional)
Lean statement and details
NLAlib.IsOrthogonalPolynomial.integral_eval_eq_sum {μ : Measure ℝ} {s : Finset ℝ}
(hs : IsOrthogonalPolynomial μ s.card (Lagrange.nodal s id)) [IsFiniteMeasure μ] {a b : ℝ}
(hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) {p : Polynomial ℝ} (hp : p.degree < 2 * ↑s.card) :
∫ (x : ℝ), Polynomial.eval x p ∂μ =
∑ x ∈ s, (∫ (t : ℝ), Polynomial.eval t (Lagrange.basis s id x) ∂μ) * Polynomial.eval x p
Theorem (IsOrthogonalPolynomial.matchesMoments_interpolatoryQuadrature).The Gauss rule matches 2\lvert s\rvert moments: if the nodal polynomial of s is orthogonal in L^2(\mu) to the polynomials of degree less than \lvert s\rvert, for a finite measure \mu supported in [a, \mathbf{b}], then \mu and its interpolatory rule at s match their first 2\lvert s\rvert moments. [Gautschi2004, Theorems 1.45 and 1.46]; [GolubMeurant2010, Ch. 6].
Lean statement and details
NLAlib.IsOrthogonalPolynomial.matchesMoments_interpolatoryQuadrature {μ : Measure ℝ} {s : Finset ℝ}
(hs : IsOrthogonalPolynomial μ s.card (Lagrange.nodal s id)) [IsFiniteMeasure μ] {a b : ℝ}
(hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) :
MatchesMoments μ (interpolatoryQuadrature μ s) (2 * s.card)
Theorem (matchesMoments_gaussQuadrature).Gauss quadrature: for a finite measure \mu supported in [a, \mathbf{b}] and every k, the k-point Gauss rule matches the first 2k moments of \mu: it integrates every real polynomial of degree less than 2k exactly. [Gautschi2004, Theorem 1.45]; [GolubMeurant2010, Ch. 6]; there for k at most the number of support points; past it the rule is \mu itself.
Lean statement and details
NLAlib.matchesMoments_gaussQuadrature {μ : Measure ℝ} [IsFiniteMeasure μ] {a b : ℝ}
(hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) (k : ℕ) : MatchesMoments μ (gaussQuadrature μ k) (2 * k)
Theorem (matchesMoments_probeSpectralMeasure_slqMeasure).SLQ matches 2q moments of the probe spectral measure: for every \mathbf{A}, every test matrix \mathbf{\Omega} and every q, \mathsf{probeSpectralMeasure}(\mathbf{A}, \mathbf{\Omega}) and \mathsf{slqMeasure}(\mathbf{A}, \mathbf{\Omega}, q) give every real polynomial of degree less than 2q the same integral: each probe density matches 2q moments of its Gauss rule, and the averages match. [Gautschi2004, Theorem 1.45]; [GolubMeurant2010, Ch. 6]; there for one measure, here probe by probe and averaged.
Lean statement and details
NLAlib.matchesMoments_probeSpectralMeasure_slqMeasure.{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 𝕜)
(Ω : Matrix n m 𝕜) (q : ℕ) : MatchesMoments (probeSpectralMeasure A Ω) (slqMeasure A Ω q) (2 * q)