NLA-lib Explorer

Lagrange basis polynomials and the inverse of a Vandermonde matrix

Library · Source module

Lagrange basis polynomials and the inverse of a Vandermonde matrix

For distinct nodes \mathbf{v}_0, \dots, \mathbf{v}_{t-1} in a field, with Lagrange basis polynomials \ell_i (Lagrange.basis Finset.univ v i) and Vandermonde matrix \mathbf{V} = (\mathbf{v}_i^j) (Matrix.vandermonde v), the row of powers at any point \mathbf{x} is the combination (1, \mathbf{x}, \dots, \mathbf{x}^{t-1}) = \sum_i \ell_i(\mathbf{x})\,(1, \mathbf{v}_i, \dots, \mathbf{v}_i^{t-1}) of the rows of \mathbf{V}. So a matrix of power rows at points y_a is \mathbf{L}\mathbf{V} with \mathbf{L}_{ai} = \ell_i(y_a), and the columns of \mathbf{V}^{-1} are the coefficients of the \ell_i. Mathlib has both objects and no statement relating them; each fact here is the evaluation of Lagrange.eq_interpolate at a monomial. Upstream candidates for Mathlib.LinearAlgebra.Lagrange (which imports Mathlib.LinearAlgebra.Vandermonde).

Main results

* Lagrange.sum_eval_basis_mul_pow: \sum_{i \in s} \ell_i(\mathbf{x})\,\mathbf{v}_i^k = \mathbf{x}^k for k < \lvert s \rvert. * Matrix.of_pow_eq_of_eval_basis_mul_vandermonde, Matrix.of_pow_mul_inv_vandermonde: power rows are \mathbf{L}\mathbf{V}, and times \mathbf{V}^{-1} they are \mathbf{L}. * Matrix.inv_vandermonde: the entries of \mathbf{V}^{-1} are the coefficients of the Lagrange basis polynomials.

Declarations