Documentation

CslibFrontier.Foundations.Analysis.DiscreteChebyshev.GridsAndRodrigues

Discrete Chebyshev Grids and Discrete Rodrigues Polynomials #

Develops discrete uniform grids on [-1, 1], finite differences, iterated summation by parts, and the discrete Rodrigues orthogonal polynomials on {0, ..., n - 1}.

Main definitions #

Main results #

Discrete Grids on [-1, 1] #

noncomputable def Cslib.DiscreteChebyshev.doutPoint (n : ℕ) (i : Fin (n + 1)) :

The i-th grid point -1 + 2 i / n of the (n + 1)-point uniform grid on [-1, 1].

theorem Cslib.DiscreteChebyshev.doutPoint_def (n : ℕ) (i : Fin (n + 1)) :
doutPoint n i = -1 + 2 * ↑↑i / ↑n
noncomputable def Cslib.DiscreteChebyshev.dinPoint (n : ℕ) (i : Fin n) :

The i-th grid point -1 + (2 i + 1) / n of the n-point interior grid on [-1, 1].

theorem Cslib.DiscreteChebyshev.dinPoint_def (n : ℕ) (i : Fin n) :
dinPoint n i = -1 + (2 * ↑↑i + 1) / ↑n

The finite (n + 1)-point uniform grid {-1, -1 + 2/n, ..., 1}.

theorem Cslib.DiscreteChebyshev.mem_doutSet_iff {n : ℕ} {x : ℝ} :
x ∈ doutSet n ↔ ∃ (i : Fin (n + 1)), doutPoint n i = x
noncomputable def Cslib.DiscreteChebyshev.dinSet (n : ℕ) :

The finite n-point interior grid {-1 + 1/n, -1 + 3/n, ..., 1 - 1/n}.

theorem Cslib.DiscreteChebyshev.mem_dinSet_iff {n : ℕ} {x : ℝ} :
x ∈ dinSet n ↔ ∃ (i : Fin n), dinPoint n i = x

doutPoint n is injective for 1 ≤ n.

dinPoint n is injective for 1 ≤ n.

theorem Cslib.DiscreteChebyshev.card_doutSet {n : ℕ} (hn : 1 ≤ n) :
(doutSet n).card = n + 1

The outer grid has cardinality n + 1 for 1 ≤ n.

theorem Cslib.DiscreteChebyshev.card_dinSet {n : ℕ} (hn : 1 ≤ n) :
(dinSet n).card = n

The interior grid has cardinality n for 1 ≤ n.

theorem Cslib.DiscreteChebyshev.doutPoint_eq_stretch {n : ℕ} (hn : 1 ≤ n) (i : Fin (n + 1)) :
doutPoint n i = (↑n + 1) / ↑n * dinPoint (n + 1) i

Pointwise scaling identity relating doutPoint n and dinPoint (n + 1).

theorem Cslib.DiscreteChebyshev.doutSet_eq_stretch {n : ℕ} (hn : 1 ≤ n) :
doutSet n = Finset.image (fun (x : ℝ) => (↑n + 1) / ↑n * x) (dinSet (n + 1))

Set-level scaling relation between doutSet n and dinSet (n + 1).

theorem Cslib.DiscreteChebyshev.dinPoint_eq_doutPoint_sub {n : ℕ} (hn : 1 ≤ n) (i : Fin n) :
dinPoint n i = doutPoint n i.succ - 1 / ↑n

Pointwise shift identity dinPoint n i = doutPoint n i.succ - 1 / n.

theorem Cslib.DiscreteChebyshev.dinSet_subset_shift {n : ℕ} (hn : 1 ≤ n) :
dinSet n ⊆ Finset.image (fun (x : ℝ) => x - 1 / ↑n) (doutSet n)

Set-level shift inclusion relating dinSet n and doutSet n.

theorem Cslib.DiscreteChebyshev.add_inv_mem_doutSet_of_mem_dinSet {n : ℕ} (hn : 1 ≤ n) {t : ℝ} (ht : t ∈ dinSet n) :
t + 1 / ↑n ∈ doutSet n

For every t ∈ dinSet n, we have t + 1 / n ∈ doutSet n.

Finite Differences and Summation by Parts #

Forward difference operator Δ p (x) = p(x + 1) - p(x) on ℝ[X].

Backward difference operator ∇ p (x) = p(x) - p(x - 1) on ℝ[X].

Evaluation bridge from polynomial fwdDiff to Mathlib's step-1 function operator _root_.fwdDiff.

Iterated evaluation bridge from polynomial fwdDiff to Mathlib's step-1 _root_.fwdDiff.

Evaluation bridge from polynomial bwdDiff to Mathlib's step-(-1) _root_.fwdDiff.

Iterated evaluation bridge from polynomial bwdDiff to Mathlib's step-(-1) _root_.fwdDiff.

Iterated backward differences vanish above the degree, derived from Mathlib's Polynomial.fwdDiff_iter_eq_zero_of_degree_lt at step -1 via eval_bwdDiff_iterate.

theorem Cslib.DiscreteChebyshev.sum_range_succ_mul_sub (H F : ℝ → ℝ) (n : ℕ) :
∑ j ∈ Finset.range (n + 1), H ↑j * (F (↑j + 1) - F ↑j) = H ↑n * F (↑n + 1) - H (-1) * F 0 - ∑ j ∈ Finset.range (n + 1), (H ↑j - H (↑j - 1)) * F ↑j

Summation by parts on {0, ..., n} (n + 1 points).

theorem Cslib.DiscreteChebyshev.sum_range_mul_fwdDiff_iterate (n d : ℕ) (Q P : Polynomial ℝ) (h0 : ∀ m < d, Polynomial.eval 0 (fwdDiff^[m] P) = 0) (hN : ∀ m < d, Polynomial.eval (↑n + 1) (fwdDiff^[m] P) = 0) :
∑ j ∈ Finset.range (n + 1), Polynomial.eval (↑j) Q * Polynomial.eval (↑j) (fwdDiff^[d] P) = (-1) ^ d * ∑ j ∈ Finset.range (n + 1), Polynomial.eval (↑j) (bwdDiff^[d] Q) * Polynomial.eval (↑j) P

Iterated summation by parts for polynomials vanishing at the boundary 0 and n + 1.

Binomial Convolution Identity #

theorem Cslib.DiscreteChebyshev.sum_choose_mul_choose (m a b : ℕ) :
∑ j ∈ Finset.range (m + 1), j.choose a * (m - j).choose b = (m + 1).choose (a + b + 1)

Binomial convolution identity ∑_{j=0}^m C(j, a) C(m - j, b) = C(m + 1, a + b + 1).

Discrete Rodrigues Polynomials #

Base polynomial x(x-1)...(x-d+1) (x-n)(x-n-1)...(x-n-d+1) for Rodrigues' formula.

theorem Cslib.DiscreteChebyshev.rodBase_vanish_right (n d s : ℕ) :
s < d → Polynomial.eval (↑n + ↑s) (rodBase n d) = 0

Discrete Rodrigues polynomial R_d(j) = (d!)^{-2} Δ^d [ j^{\underline{d}} (j - n)^{\underline{d}} ].

theorem Cslib.DiscreteChebyshev.sum_eval_mul_rodriguesJ_eq_zero {n d : ℕ} (hn : 1 ≤ n) {Q : Polynomial ℝ} (hQ : Q.natDegree < d) :
∑ j ∈ Finset.range n, Polynomial.eval (↑j) Q * Polynomial.eval (↑j) (rodriguesJ n d) = 0

Orthogonality of rodriguesJ n d to every polynomial of degree < d on {0, ..., n - 1}.

theorem Cslib.DiscreteChebyshev.sum_rodriguesJ_sq {n d : ℕ} (hn : 1 ≤ n) (hd : d < n) :
∑ j ∈ Finset.range n, Polynomial.eval (↑j) (rodriguesJ n d) ^ 2 = ↑(n + d).factorial / ((2 * ↑d + 1) * ↑(n - d - 1).factorial * ↑d.factorial ^ 2)

Closed-form squared discrete L^2 norm of rodriguesJ n d on {0, ..., n - 1}.