ApproxFun [AF, OT14] represents operators by infinite banded matrices acting on coefficient vectors. We first define operators as linear maps on polynomials and take their matrices in specified source and target bases. On finitely supported coefficients the action involves only finite sums. Bandwidth records which entries vanish. Analytic extensions to convergent series or \(\ell ^2\) require the additional hypotheses stated later.
Reference details: Polynomial maps and basis matrices
Definition
4.1.1Polynomial maps and basis matricesMathlib
Consider the linear maps \(p\mapsto Xp\), \(p\mapsto p'\), and \(p\mapsto p\). For a target basis \(c\) and any family \(v\), the basis matrix is \((c.\mathrm{toMatrix}(v))_{ij}=(c.\mathrm{repr}(v_j))_i\), the \(i\)th coordinate of \(v_j\). This construction allows infinite index sets.
def LinearMap.mulLeft.{u_14, u_15} (R : Type u_14) {A : Type u_15} [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]
[SMulCommClass R A A] (a : A) : A →ₗ[R] A
def Module.Basis.toMatrix.{u_1, u_2, u_5, u_6} {ι : Type u_1} {ι' : Type u_2} {R : Type u_5} {M : Type u_6} [CommSemiring R]
[AddCommMonoid M] [Module R M] (e : Module.Basis ι R M) (v : ι' → M) : Matrix ι ι' R
For source and target bases \(b,c\) and a linear map \(L\), define the coefficient map \(c.\mathrm{repr}\circ L\circ b.\mathrm{repr}^{-1}\) on finitely supported coefficients. Its matrix is \(A_{ij}=(c.\mathrm{repr}(L(b_j)))_i\). For natural indices, lower bandwidth \(\ell \) and upper bandwidth \(u\) mean \(A_{ij}=0\) whenever \(j+\ell {\lt}i\) or \(i+u{\lt}j\). Parameter conversion uses the identity map with different source and target bases.
def Matrix.IsBanded.{u_1} {R : Type u_1} [Zero R] (A : Matrix ℕ ℕ R) (lower upper : ℕ) : Prop
Lean definition
/-- Entries vanish below the `lower`th subdiagonal and above the `upper`th
superdiagonal. This definition does not require finite index sets or matrix
multiplication. Reference: Olver--Townsend (2013), §2. -/
def IsBanded (A : Matrix ℕ ℕ R) (lower upper : ℕ) : Prop :=
∀ i j, j + lower < i ∨ i + upper < j → A i j = 0
If a matrix has bandwidths \((\ell ,u)\), \(\ell \le \ell '\) and \(u\le u'\), then it has bandwidths \((\ell ',u')\).
Lean Formalisation
theorem Matrix.IsBanded.mono.{u_1} {R : Type u_1} [Zero R] {A : Matrix ℕ ℕ R} {l u l' u' : ℕ} (h : A.IsBanded l u) (hl : l ≤ l')
(hu : u ≤ u') : A.IsBanded l' u'
Lean proof
/-- Increasing either bandwidth preserves bandedness (Olver--Townsend 2013, §2). -/
theorem IsBanded.mono {A : Matrix ℕ ℕ R} {l u l' u' : ℕ}
(h : A.IsBanded l u) (hl : l ≤ l') (hu : u ≤ u') : A.IsBanded l' u' := by
intro i j hij
apply h
omega
The coefficient map sends the unit column at \(j\) to \(c.\mathrm{repr}(L(b_j))\). For finitely supported \(v\), its \(i\)th output is \(\sum _{j\in \operatorname {supp}(v)} A_{ij}v_j\); reconstruction in \(c\) equals \(L\) applied to reconstruction in \(b\). Composition agrees exactly with composition of the underlying linear maps. No infinite matrix sum is required.
theorem Module.Basis.repr_symm_coefficientMap.{u_1, u_2, u_3, u_5, u_6} {R : Type u_1} {M : Type u_2} {N : Type u_3}
{ι : Type u_5} {κ : Type u_6} [CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
(b : Module.Basis ι R M) (c : Module.Basis κ R N) (L : M →ₗ[R] N) (v : ι →₀ R) :
c.repr.symm ((b.coefficientMap c L) v) = L (b.repr.symm v)
Lean proof
/-- Coefficient action reconstructs exactly the image of a finite expansion
(Olver--Townsend 2013, §2). -/
theorem repr_symm_coefficientMap (b : Basis ι R M) (c : Basis κ R N)
(L : M →ₗ[R] N) (v : ι →₀ R) :
c.repr.symm (b.coefficientMap c L v) = L (b.repr.symm v) := by
simp [coefficientMap]
theorem Module.Basis.coefficientMap_single.{u_1, u_2, u_3, u_5, u_6} {R : Type u_1} {M : Type u_2} {N : Type u_3} {ι : Type u_5}
{κ : Type u_6} [CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] (b : Module.Basis ι R M)
(c : Module.Basis κ R N) (L : M →ₗ[R] N) (j : ι) : (b.coefficientMap c L) (Finsupp.single j 1) = c.repr (L (b j))
Lean proof
/-- Columns are the target coordinates of images of source basis vectors
(Olver--Townsend 2013, §2). -/
theorem coefficientMap_single (b : Basis ι R M) (c : Basis κ R N)
(L : M →ₗ[R] N) (j : ι) :
b.coefficientMap c L (Finsupp.single j 1) = c.repr (L (b j)) := by
simp [coefficientMap]
theorem Module.Basis.coefficientMap_apply.{u_1, u_2, u_3, u_5, u_6} {R : Type u_1} {M : Type u_2} {N : Type u_3} {ι : Type u_5}
{κ : Type u_6} [CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] (b : Module.Basis ι R M)
(c : Module.Basis κ R N) (L : M →ₗ[R] N) (v : ι →₀ R) (i : κ) :
((b.coefficientMap c L) v) i = v.sum fun j a => c.toMatrix (fun j => L (b j)) i j * a
Lean proof
/-- Matrix entries act by a finite sum over the input support
(Olver--Townsend 2013, §2). -/
theorem coefficientMap_apply (b : Basis ι R M) (c : Basis κ R N)
(L : M →ₗ[R] N) (v : ι →₀ R) (i : κ) :
b.coefficientMap c L v i =
v.sum (fun j a ↦ c.toMatrix (fun j ↦ L (b j)) i j * a) := by
classical
conv_lhs => rw [← v.sum_single]
simp only [map_finsuppSum, Finsupp.sum_apply]
simp only [coefficientMap, LinearMap.comp_apply, LinearEquiv.coe_coe,
Finsupp.sum, map_smul,
b.repr_symm_single, Finsupp.coe_smul, Pi.smul_apply,
smul_eq_mul, toMatrix_apply, mul_comm]
theorem Module.Basis.coefficientMap_comp.{u_1, u_2, u_3, u_4, u_5, u_6, u_7} {R : Type u_1} {M : Type u_2} {N : Type u_3}
{P : Type u_4} {ι : Type u_5} {κ : Type u_6} {τ : Type u_7} [CommSemiring R] [AddCommMonoid M] [Module R M]
[AddCommMonoid N] [Module R N] [AddCommMonoid P] [Module R P] (b : Module.Basis ι R M) (c : Module.Basis κ R N)
(d : Module.Basis τ R P) (L : M →ₗ[R] N) (K : N →ₗ[R] P) :
c.coefficientMap d K ∘ₗ b.coefficientMap c L = b.coefficientMap d (K ∘ₗ L)
Lean proof
/-- Composition is exact on finitely supported coefficients, with no infinite
matrix multiplication (Olver--Townsend 2013, §2). -/
theorem coefficientMap_comp (b : Basis ι R M) (c : Basis κ R N) (d : Basis τ R P)
(L : M →ₗ[R] N) (K : N →ₗ[R] P) :
(c.coefficientMap d K).comp (b.coefficientMap c L) =
b.coefficientMap d (K.comp L) := by
ext v i
simp [coefficientMap]
Let \(L\) be a linear map with natural-indexed source and target bases and matrix \(A\). For an input coefficient vector \(v\) supported on indices \(j{\lt}N\),
\[ (Lv)_i=\sum _{j=0}^{N-1}A_{ij}v_j \]
for every output index \(i\). If \(A\) has bandwidths \((\ell ,u)\), all output coefficients with \(i\ge N+\ell \) vanish. Thus \(N+\ell \) rows suffice to retain the entire result; a square truncation is not assumed exact. Here \(Lv\) denotes the coefficient map, and the statements hold over a commutative ring without finite-dimensional basis assumptions.
theorem Module.Basis.coefficientMap_apply_range.{u_1, u_2, u_3} {R : Type u_1} {M : Type u_2} {P : Type u_3} [CommRing R]
[AddCommGroup M] [Module R M] [AddCommGroup P] [Module R P] (b : Module.Basis ℕ R M) (c : Module.Basis ℕ R P)
(L : M →ₗ[R] P) (v : ℕ →₀ R) {N : ℕ} (hv : ∀ j ∈ v.support, j < N) (i : ℕ) :
((b.coefficientMap c L) v) i = ∑ j ∈ Finset.range N, c.toMatrix (fun j => L (b j)) i j * v j
Lean proof
/-- For input supported in the first `N` columns, every output coefficient is an
ordinary finite matrix sum. This also describes any chosen rectangular section. -/
theorem coefficientMap_apply_range (b : Basis ℕ R M) (c : Basis ℕ R P)
(L : M →ₗ[R] P) (v : ℕ →₀ R) {N : ℕ}
(hv : ∀ j ∈ v.support, j < N) (i : ℕ) :
b.coefficientMap c L v i = ∑ j ∈ Finset.range N, c.toMatrix (fun j ↦ L (b j)) i j * v j := by
classical
rw [coefficientMap_apply, Finsupp.sum]
apply Finset.sum_subset (fun j hj ↦ Finset.mem_range.mpr (hv j hj))
intro j _ hj
rw [Finsupp.notMem_support_iff.mp hj, mul_zero]
theorem Module.Basis.coefficientMap_eq_zero_of_bandwidth.{u_1, u_2, u_3} {R : Type u_1} {M : Type u_2} {P : Type u_3}
[CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup P] [Module R P] (b : Module.Basis ℕ R M)
(c : Module.Basis ℕ R P) (L : M →ₗ[R] P) {l u : ℕ} (hL : (c.toMatrix fun j => L (b j)).IsBanded l u) (v : ℕ →₀ R)
{N : ℕ} (hv : ∀ j ∈ v.support, j < N) {i : ℕ} (hi : N + l ≤ i) : ((b.coefficientMap c L) v) i = 0
Lean proof
/-- With lower bandwidth `l`, the first `N+l` rows retain every output coefficient
of an input supported in the first `N` columns. No square-section assumption. -/
theorem coefficientMap_eq_zero_of_bandwidth (b : Basis ℕ R M) (c : Basis ℕ R P)
(L : M →ₗ[R] P) {l u : ℕ}
(hL : (c.toMatrix (fun j ↦ L (b j))).IsBanded l u)
(v : ℕ →₀ R) {N : ℕ} (hv : ∀ j ∈ v.support, j < N)
{i : ℕ} (hi : N + l ≤ i) : b.coefficientMap c L v i = 0 := by
rw [coefficientMap_apply_range b c L v hv]
apply Finset.sum_eq_zero
intro j hj
rw [hL i j (Or.inl (by have := Finset.mem_range.mp hj; omega)), zero_mul]
Matrix entries depend on the choice and normalisation of each basis. The following definitions fix the Chebyshev, Jacobi and Gegenbauer coordinates used below.
Reference details: Chebyshev polynomial coordinate basis and related results
Let the Chebyshev coordinate basis of \(\mathbb {R}[X]\) be \((T_n)_{n\in \mathbb {N}}\), in the polynomial normalisation \(T_n(1)=1\). It differs from the normalised weighted Hilbert basis.
For real \(\alpha ,\beta {\gt}-1\), let the Jacobi basis of \(\mathbb {R}[X]\) be the basis built from the Jacobi sequence, in the original normalisation. This is an algebraic polynomial basis, distinct from the weighted L2 Hilbert basis.
/-- The Jacobi basis of the polynomial space in its original normalisation
(DLMF Table 18.3.1). -/
@[expose] noncomputable def jacobiBasis : Basis ℕ ℝ ℝ[X] :=
(jacobiSequence hα hβ).basis (fun n ↦
(jacobiSequence hα hβ).isUnit_leadingCoeff n)
For real \(\lambda {\gt}-1/2\), \(\lambda \ne 0\), let the Gegenbauer basis of \(\mathbb {R}[X]\) be the basis built from the sequence \(C_n^{(\lambda )}\) in its original normalisation. Theorem 4.1.9 identifies the vectors of all three bases.
For every \(n\), the \(n\)th vectors of the Chebyshev, Jacobi (\(\alpha ,\beta {\gt}-1\)) and Gegenbauer (\(\lambda {\gt}-1/2\), \(\lambda \ne 0\)) coordinate bases are \(T_n\), \(P_n^{(\alpha ,\beta )}\) and \(C_n^{(\lambda )}\).
Multiplication by \(x\) in an orthogonal basis is the tridiagonal Jacobi operator \(J\) of Chapter 3.1. Multiplication by any polynomial \(a\) is then \(a(J)\), and it can be evaluated by running Clenshaw’s recurrence in the operator algebra.
For an orthogonal polynomial sequence with finite moments and positive definite integral, the multiplication matrix is tridiagonal. Column \(n+1\) has entries \(A_{n+1},B_{n+1},C_n\) in rows \(n+2,n+1,n\), with the recurrence coefficients already defined. Column zero has entries \(A_0,B_0\) in rows one and zero. No interval-support hypothesis is imposed.
theorem Polynomial.Sequence.IsOrthogonal.mul_matrix_succ {μ : MeasureTheory.Measure ℝ} (hμ : Polynomial.HasFiniteMoments μ)
(hpos : Polynomial.HasPositiveDefiniteIntegral μ) {P : Polynomial.Sequence ℝ} (hP : P.IsOrthogonal μ)
(hu : ∀ (i : ℕ), IsUnit (↑P i).leadingCoeff) (n i : ℕ) :
(P.basis hu).toMatrix (fun j => Polynomial.X * ↑P j) i (n + 1) =
((if i = n + 2 then P.recurrenceA (n + 1) else 0) + if i = n + 1 then P.recurrenceB μ (n + 1) ⋯ else 0) +
if i = n then P.recurrenceC μ n ⋯ else 0
Lean proof
/-- Entries of multiplication in the positive-index columns (DLMF 18.2(iv)). -/
theorem IsOrthogonal.mul_matrix_succ (n i : ℕ) :
(P.basis hu).toMatrix (fun j ↦ X * P j) i (n + 1) =
(if i = n + 2 then P.recurrenceA (n + 1) else 0) +
(if i = n + 1 then P.recurrenceB μ (n + 1) (Sequence.RecurrenceBInput.of _ _ _) else 0) +
(if i = n then P.recurrenceC μ n (Sequence.RecurrenceCInput.of _ _ _) else 0) := by
have hb (k : ℕ) : (P.basis hu).repr (P k) = Finsupp.single k 1 := by
rw [← P.basis_eq_self hu k]
exact (P.basis hu).repr_self k
rw [Basis.toMatrix_apply, hP.three_term hμ hpos]
simp [hb, Finsupp.single_apply, eq_comm]
/-- Multiplication is tridiagonal for any nondegenerate orthogonal sequence,
without a support restriction on the measure (DLMF 18.2(iv)). -/
theorem IsOrthogonal.mul_matrix_isBanded :
((P.basis hu).toMatrix (fun j ↦ X * P j)).IsBanded 1 1 := by
intro i j hij
exact hP.basis_repr_X_mul_eq_zero hμ hpos hu hij
Over any commutative semiring, let \(J\) be multiplication by \(X\) on polynomials. For every polynomial \(p\), multiplication by \(p\) is exactly \(p(J)\). In any polynomial basis \(b\), the coefficient maps satisfy the same identity \(M[p]=p(J_b)\), and reconstruct \(p\, b^{-1}(v)\) for every finitely supported coefficient vector \(v\). Here \(p(J)\) is the evaluation of \(p\) at \(J\) in the algebra of linear endomorphisms.
theorem Polynomial.aeval_mulLeft_X.{u_1} {R : Type u_1} [CommSemiring R] (p : Polynomial R) :
(Polynomial.aeval (LinearMap.mulLeft R Polynomial.X)) p = LinearMap.mulLeft R p
Lean proof
/-- Multiplication by `p` is `p(J)`, where `J` multiplies by `X`.
This is an identity of endomorphisms of the full polynomial module. -/
theorem aeval_mulLeft_X (p : R[X]) :
aeval (LinearMap.mulLeft R (X : R[X])) p = LinearMap.mulLeft R p := by
have he (q : R[X]) : Algebra.lmul R R[X] q = LinearMap.mulLeft R q := by
ext r
rfl
simpa only [he, aeval_X_left_apply] using
(aeval_algHom_apply (Algebra.lmul R R[X]) (X : R[X]) p)
theorem Polynomial.coefficientMap_eq_conj.{u_1, u_2} {R : Type u_1} [CommSemiring R] {ι : Type u_2}
(b : Module.Basis ι R (Polynomial R)) (L : Module.End R (Polynomial R)) :
b.coefficientMap b L = (LinearEquiv.conjAlgEquiv R b.repr) L
Lean proof
/-- The existing same-basis coefficient map is conjugation by the basis equivalence. -/
theorem coefficientMap_eq_conj {ι : Type*} (b : Module.Basis ι R R[X])
(L : Module.End R R[X]) : b.coefficientMap b L = b.repr.conjAlgEquiv R L := by
rfl
theorem Polynomial.coefficientMap_mulLeft_eq_aeval.{u_1, u_2} {R : Type u_1} [CommSemiring R] {ι : Type u_2}
(b : Module.Basis ι R (Polynomial R)) (p : Polynomial R) :
b.coefficientMap b (LinearMap.mulLeft R p) =
(Polynomial.aeval (b.coefficientMap b (LinearMap.mulLeft R Polynomial.X))) p
Lean proof
/-- In any polynomial basis, multiplication coefficients satisfy `M[p]=p(J)`.
The operator acts on finitely supported coefficients, even for an infinite basis. -/
theorem coefficientMap_mulLeft_eq_aeval {ι : Type*} (b : Module.Basis ι R R[X]) (p : R[X]) :
b.coefficientMap b (LinearMap.mulLeft R p) =
aeval (b.coefficientMap b (LinearMap.mulLeft R (X : R[X]))) p := by
rw [coefficientMap_eq_conj, coefficientMap_eq_conj,
aeval_algHom_apply, aeval_mulLeft_X]
Clenshaw state and evaluation commute with ring homomorphisms; the recurrence itself is defined for rings without requiring commutativity. Let \(R\) be commutative, \(A\) any \(R\)-algebra, and \(J\in A\). Apply the backward recurrence with \(a_k=2J\), \(b_k=-1\), scalar coefficients \(c_k1_A\) and initial values \(1_A,J\). The result is
\[ \left(\sum _{k=0}^{n-1}c_kT_k\right)(J). \]
In particular it computes the exact multiplication operator, or its coefficient map in any polynomial basis. The full constant coefficient is retained.
theorem Polynomial.clenshawState_map.{u_1, u_2} {R : Type u_1} [Ring R] {S : Type u_2} [Ring S] (f : R →+* S) (a b c : ℕ → R)
(n k : ℕ) :
Polynomial.clenshawState (⇑f ∘ a) (⇑f ∘ b) (⇑f ∘ c) n k =
(f (Polynomial.clenshawState a b c n k).1, f (Polynomial.clenshawState a b c n k).2)
Lean proof
/-- Clenshaw state commutes with ring homomorphisms. This transports polynomial
recurrences to operators without assuming that all operators commute. -/
theorem clenshawState_map {S : Type*} [Ring S] (f : R →+* S)
(a b c : ℕ → R) (n k : ℕ) :
clenshawState (f ∘ a) (f ∘ b) (f ∘ c) n k =
(f (clenshawState a b c n k).1, f (clenshawState a b c n k).2) := by
induction n generalizing k with
| zero => simp [clenshawState]
| succ n ih => simp [clenshawState, ih]
theorem Polynomial.clenshaw_map.{u_1, u_2} {R : Type u_1} [Ring R] {S : Type u_2} [Ring S] (f : R →+* S) (a b c : ℕ → R)
(p₀ p₁ : R) (n : ℕ) :
Polynomial.clenshaw (⇑f ∘ a) (⇑f ∘ b) (⇑f ∘ c) (f p₀) (f p₁) n = f (Polynomial.clenshaw a b c p₀ p₁ n)
Lean proof
/-- Clenshaw evaluation commutes with a ring homomorphism, in the full-constant
convention (Clenshaw 1955). -/
theorem clenshaw_map {S : Type*} [Ring S] (f : R →+* S)
(a b c : ℕ → R) (p₀ p₁ : R) (n : ℕ) :
clenshaw (f ∘ a) (f ∘ b) (f ∘ c) (f p₀) (f p₁) n =
f (clenshaw a b c p₀ p₁ n) := by
simp [clenshaw, clenshawState_map]
theorem Polynomial.Chebyshev.clenshaw_polynomial_T.{u_1} {R : Type u_1} [CommRing R] (c : ℕ → R) (n : ℕ) :
Polynomial.clenshaw (fun x => 2 * Polynomial.X) (fun x => -1) (fun k => Polynomial.C (c k)) 1 Polynomial.X n =
∑ k ∈ Finset.range n, Polynomial.C (c k) * Polynomial.Chebyshev.T R ↑k
Lean proof
/-- Polynomial-valued Clenshaw reconstructs the full Chebyshev expansion. -/
theorem clenshaw_polynomial_T (c : ℕ → R) (n : ℕ) :
clenshaw (fun _ ↦ 2 * (X : R[X])) (fun _ ↦ -1) (fun k ↦ Polynomial.C (c k)) 1 X n =
∑ k ∈ Finset.range n, Polynomial.C (c k) * T R k := by
have hp (k : ℕ) : T R (k + 2 : ℕ) =
(2 * X) * T R (k + 1 : ℕ) + (-1) * T R k := by
simp only [Nat.cast_add, Nat.cast_one, Nat.cast_ofNat, T_add_two, neg_one_mul,
sub_eq_add_neg]
simpa only [Nat.cast_zero, Nat.cast_one, T_zero, T_one] using
clenshaw_eq_sum (fun _ ↦ 2 * (X : R[X])) (fun _ ↦ -1)
(fun k ↦ Polynomial.C (c k)) (fun k ↦ T R k) hp n
theorem Polynomial.Chebyshev.clenshaw_aeval_T.{u_1, u_2} {R : Type u_1} [CommRing R] {A : Type u_2} [Ring A] [Algebra R A]
(J : A) (c : ℕ → R) (n : ℕ) :
Polynomial.clenshaw (fun x => 2 * J) (fun x => -1) (fun k => (algebraMap R A) (c k)) 1 J n =
(Polynomial.aeval J) (∑ k ∈ Finset.range n, Polynomial.C (c k) * Polynomial.Chebyshev.T R ↑k)
Lean proof
/-- The same backward recurrence evaluates a Chebyshev expansion at one element
of an arbitrary algebra. This includes linear operators without assuming that
the whole endomorphism algebra is commutative. -/
theorem clenshaw_aeval_T {A : Type*} [Ring A] [Algebra R A] (J : A)
(c : ℕ → R) (n : ℕ) :
clenshaw (fun _ ↦ 2 * J) (fun _ ↦ -1) (fun k ↦ algebraMap R A (c k)) 1 J n =
aeval J (∑ k ∈ Finset.range n, Polynomial.C (c k) * T R k) := by
have h := clenshaw_map (aeval J).toRingHom (fun _ ↦ 2 * (X : R[X])) (fun _ ↦ -1)
(fun k ↦ Polynomial.C (c k)) 1 X n
rw [clenshaw_polynomial_T] at h
simpa only [Function.comp_def, AlgHom.toRingHom_eq_coe, RingHom.coe_coe,
map_mul, map_ofNat, map_neg, map_one, aeval_X, Polynomial.aeval_C] using h
theorem Polynomial.Chebyshev.clenshaw_mulLeft_T.{u_1} {R : Type u_1} [CommRing R] (c : ℕ → R) (n : ℕ) :
Polynomial.clenshaw (fun x => 2 * LinearMap.mulLeft R Polynomial.X) (fun x => -1)
(fun k => (algebraMap R (Module.End R (Polynomial R))) (c k)) 1 (LinearMap.mulLeft R Polynomial.X) n =
LinearMap.mulLeft R (∑ k ∈ Finset.range n, Polynomial.C (c k) * Polynomial.Chebyshev.T R ↑k)
Lean proof
/-- Operator Clenshaw computes multiplication by the Chebyshev expansion exactly
on the polynomial module (Olver--Townsend, Sections 2--3). -/
theorem clenshaw_mulLeft_T (c : ℕ → R) (n : ℕ) :
clenshaw (fun _ ↦ 2 * LinearMap.mulLeft R (X : R[X])) (fun _ ↦ -1)
(fun k ↦ algebraMap R (Module.End R R[X]) (c k)) 1
(LinearMap.mulLeft R (X : R[X])) n =
LinearMap.mulLeft R (∑ k ∈ Finset.range n, Polynomial.C (c k) * T R k) := by
rw [clenshaw_aeval_T, aeval_mulLeft_X]
theorem Polynomial.Chebyshev.clenshaw_coefficientMap_T.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2}
(b : Module.Basis ι R (Polynomial R)) (c : ℕ → R) (n : ℕ) :
Polynomial.clenshaw (fun x => 2 * b.coefficientMap b (LinearMap.mulLeft R Polynomial.X)) (fun x => -1)
(fun k => (algebraMap R (Module.End R (ι →₀ R))) (c k)) 1 (b.coefficientMap b (LinearMap.mulLeft R Polynomial.X))
n =
b.coefficientMap b (LinearMap.mulLeft R (∑ k ∈ Finset.range n, Polynomial.C (c k) * Polynomial.Chebyshev.T R ↑k))
Lean proof
/-- In any polynomial basis, operator Clenshaw produces the multiplication
coefficient map on finitely supported vectors, with no finite-section claim. -/
theorem clenshaw_coefficientMap_T {ι : Type*} (b : Module.Basis ι R R[X])
(c : ℕ → R) (n : ℕ) :
clenshaw (fun _ ↦ 2 * b.coefficientMap b (LinearMap.mulLeft R (X : R[X])))
(fun _ ↦ -1) (fun k ↦ algebraMap R (Module.End R (ι →₀ R)) (c k)) 1
(b.coefficientMap b (LinearMap.mulLeft R (X : R[X]))) n =
b.coefficientMap b
(LinearMap.mulLeft R (∑ k ∈ Finset.range n, Polynomial.C (c k) * T R k)) := by
rw [clenshaw_aeval_T, ← coefficientMap_mulLeft_eq_aeval]
Let \(b,c\) be polynomial bases over a commutative ring \(R\), let \(L:R[x]\to R[x]\) be \(R\)-linear, and let \(\sigma :R\to \mathbb C\) be a ring map. Write \(M_{ij}=[Lb_j]_{c,i}\). At index \(i\), an admissible input is a complex sequence \(a\) for which \(\sum _j a_j\sigma (M_{ij})\) converges unconditionally. Define \(\beta _i\) only for such an input, as this sum.
def Module.Basis.SeriesCoefficientInput.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (i : ℕ) : Type
def Module.Basis.seriesCoefficientMap.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) {i : ℕ} (a : b.SeriesCoefficientInput c L σ i) : ℂ
Lean definition
/-- The sum of a certified convergent matrix row. -/
noncomputable def seriesCoefficientMap (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) {i : ℕ}
(a : SeriesCoefficientInput b c L σ i) : ℂ :=
∑' j, a.val j * σ (c.repr (L (b j)) i)
For every admissible input at row \(i\), the series \(\sum _j a_j\sigma (M_{ij})\) converges unconditionally to \(\beta _i\).
Lean Formalisation
theorem Module.Basis.hasSum_seriesCoefficientMap_row.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) {i : ℕ} (a : b.SeriesCoefficientInput c L σ i) :
HasSum (fun j => ↑a j * σ ((c.repr (L (b j))) i)) (b.seriesCoefficientMap c L σ a)
Lean proof
/-- Characterization by the classical row sum. -/
theorem hasSum_seriesCoefficientMap_row (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) {i : ℕ}
(a : SeriesCoefficientInput b c L σ i) :
HasSum (fun j ↦ a.val j * σ (c.repr (L (b j)) i))
(b.seriesCoefficientMap c L σ a) := a.property.hasSum
At a complex point \(z\), suppose \(\sum _{j,i}|a_j\sigma (M_{ij})c_i(z)|{\lt}\infty \), with evaluation through \(\sigma \). The convergent weighted contributions \(\gamma _i=\sum _j a_j\sigma (M_{ij})c_i(z)\) then satisfy
\[ \sum _i\gamma _i=\sum _j a_j(Lb_j)(z). \]
If \(a\) also supplies an admissible coefficient input at every row, then \(\gamma _i=\beta _i c_i(z)\) and the left side is \(\sum _i\beta _i c_i(z)\). A sufficient condition for weighted reconstruction is \(|c_i(z)|\le w_i\) and
theorem Module.Basis.hasSum_seriesCoefficientMap_of_rows.{u_1} {R : Type u_1} [CommRing R]
(b c : Module.Basis ℕ R (Polynomial R)) (L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (a : ℕ → ℂ) (z : ℂ)
(habs : Summable fun p => ‖a p.1 * σ ((c.repr (L (b p.1))) p.2) * Polynomial.eval₂ σ z (c p.2)‖)
(rows : (i : ℕ) → b.SeriesCoefficientInput c L σ i) (hrows : ∀ (i : ℕ), ↑(rows i) = a) :
HasSum (fun i => b.seriesCoefficientMap c L σ (rows i) * Polynomial.eval₂ σ z (c i))
(∑' (j : ℕ), a j * Polynomial.eval₂ σ z (L (b j)))
Lean proof
/-- Certified coefficient rows can be factored from their output modes. -/
theorem hasSum_seriesCoefficientMap_of_rows (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) (a : ℕ → ℂ) (z : ℂ)
(habs : Summable (fun p : ℕ × ℕ ↦
‖a p.1 * σ (c.repr (L (b p.1)) p.2) * (c p.2).eval₂ σ z‖))
(rows : ∀ i, SeriesCoefficientInput b c L σ i)
(hrows : ∀ i, (rows i).val = a) :
HasSum (fun i ↦ b.seriesCoefficientMap c L σ (rows i) * (c i).eval₂ σ z)
(∑' j, a j * (L (b j)).eval₂ σ z) := by
have hs := habs.of_norm
have hcol (j : ℕ) : (∑' i, a j * σ (c.repr (L (b j)) i) * (c i).eval₂ σ z) =
a j * (L (b j)).eval₂ σ z := by
simpa only [mul_assoc] using ((c.hasSum_repr_eval₂ σ (L (b j)) z).mul_left (a j)).tsum_eq
have he : (∑' p : ℕ × ℕ, a p.1 * σ (c.repr (L (b p.1)) p.2) * (c p.2).eval₂ σ z) =
∑' j, a j * (L (b j)).eval₂ σ z := by
rw [hs.tsum_prod]
exact tsum_congr hcol
have h := hs.prod_symm.prod.hasSum
simp only [Prod.swap_prod_mk] at h
have he' : (∑' i, ∑' j, a j * σ (c.repr (L (b j)) i) * (c i).eval₂ σ z) =
∑' j, a j * (L (b j)).eval₂ σ z := by
rw [hs.tsum_comm]
exact tsum_congr hcol
rw [he'] at h
simpa only [seriesCoefficientMap, hrows, tsum_mul_right] using h
If \(M\) has bandwidths \((\ell ,u)\), each row sum \(\sum _j a_j\sigma (M_{ij})\) is finite for every sequence \(a\), and \(\beta _i=\sum _{j{\lt}i+u+1}a_j\sigma (M_{ij})\) for every sequence \(a\). On finitely supported sequences embedded from \(R\), this agrees exactly with the existing finite coefficient map. Neither coordinate identity needs an analytic convergence hypothesis.
Lean Formalisation
theorem Module.Basis.seriesCoefficientMap_eq_sum_of_isBanded.{u_1} {R : Type u_1} [CommRing R]
(b c : Module.Basis ℕ R (Polynomial R)) (L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (a : ℕ → ℂ) {l u : ℕ}
(hL : (c.toMatrix fun j => L (b j)).IsBanded l u) (i : ℕ) :
b.seriesCoefficientMap c L σ (Module.Basis.SeriesCoefficientInput.ofBanded b c L σ a hL i) =
∑ j ∈ Finset.range (i + u + 1), a j * σ (c.toMatrix (fun j => L (b j)) i j)
Lean proof
/-- Banded matrix rows define finite sums even on an infinite input sequence.
No convergence hypothesis is needed for this coordinate identity. -/
theorem seriesCoefficientMap_eq_sum_of_isBanded (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) (a : ℕ → ℂ) {l u : ℕ}
(hL : (c.toMatrix (fun j ↦ L (b j))).IsBanded l u) (i : ℕ) :
b.seriesCoefficientMap c L σ (.ofBanded b c L σ a hL i) =
∑ j ∈ Finset.range (i + u + 1), a j * σ (c.toMatrix (fun j ↦ L (b j)) i j) := by
classical
simp only [seriesCoefficientMap, SeriesCoefficientInput.ofBanded, toMatrix_apply]
apply tsum_eq_sum
intro j hj
have hz := hL i j (Or.inr (by simp only [Finset.mem_range] at hj; omega))
change c.repr (L (b j)) i = 0 at hz
rw [hz, map_zero, mul_zero]
def Module.Basis.SeriesCoefficientInput.ofBanded.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (a : ℕ → ℂ) {l u : ℕ}
(hL : (c.toMatrix fun j => L (b j)).IsBanded l u) (i : ℕ) : b.SeriesCoefficientInput c L σ i
Lean definition
/-- Banded rows are finite, for every input sequence. -/
def SeriesCoefficientInput.ofBanded (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) (a : ℕ → ℂ) {l u : ℕ}
(hL : (c.toMatrix (fun j ↦ L (b j))).IsBanded l u) (i : ℕ) :
SeriesCoefficientInput b c L σ i := by
refine ⟨a, ?_⟩
apply (hasSum_sum_of_ne_finset_zero (s := Finset.range (i + u + 1)) ?_).summable
intro j hj
have hz := hL i j (Or.inr (by simp only [Finset.mem_range] at hj; omega))
change c.repr (L (b j)) i = 0 at hz
rw [hz, map_zero, mul_zero]
def Module.Basis.SeriesCoefficientInput.ofFinsupp.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (v : ℕ →₀ R) (i : ℕ) : b.SeriesCoefficientInput c L σ i
Lean definition
/-- Finitely supported inputs give convergent rows for every polynomial map. -/
def SeriesCoefficientInput.ofFinsupp (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) (v : ℕ →₀ R) (i : ℕ) :
SeriesCoefficientInput b c L σ i := by
classical
refine ⟨fun j ↦ σ (v j), ?_⟩
apply (hasSum_sum_of_ne_finset_zero (s := v.support) ?_).summable
intro j hj
simp only [Finsupp.notMem_support_iff.mp hj, map_zero, zero_mul]
theorem Module.Basis.seriesCoefficientMap_finsupp.{u_1} {R : Type u_1} [CommRing R] (b c : Module.Basis ℕ R (Polynomial R))
(L : Polynomial R →ₗ[R] Polynomial R) (σ : R →+* ℂ) (v : ℕ →₀ R) (i : ℕ) :
b.seriesCoefficientMap c L σ (Module.Basis.SeriesCoefficientInput.ofFinsupp b c L σ v i) =
σ (((b.coefficientMap c L) v) i)
Lean proof
/-- On finitely supported input, the series action is exactly the existing
finite coefficient map, embedded by the coefficient homomorphism. -/
theorem seriesCoefficientMap_finsupp (b c : Basis ℕ R R[X])
(L : R[X] →ₗ[R] R[X]) (σ : R →+* ℂ) (v : ℕ →₀ R) (i : ℕ) :
b.seriesCoefficientMap c L σ (.ofFinsupp b c L σ v i) = σ (b.coefficientMap c L v i) := by
classical
rw [coefficientMap_apply, Finsupp.sum, map_sum]
simp only [seriesCoefficientMap, SeriesCoefficientInput.ofFinsupp, toMatrix_apply, map_mul, mul_comm]
apply tsum_eq_sum
intro j hj
rw [Finsupp.notMem_support_iff.mp hj, map_zero, zero_mul]