LeanFun RevOLVER

3.4 Connection coefficients

Changing parameters changes the basis, not the polynomial being represented. The connection coefficients give the corresponding finite change of coordinates.

3.4.1 One-step parameter changes

A connection formula rewrites the same polynomial in a different basis. Raising one Jacobi parameter by one gives a two-term relation.

Theorem 3.4.1 Jacobi parameter raising
✓ 🤖

For \(n\ge 0\), over every commutative \(\mathbb {Q}\)-algebra, write \(s=\alpha +\beta \). Then

\begin{align*} (2n+s+3)P_{n+1}^{(\alpha ,\beta )} & = (n+s+2)P_{n+1}^{(\alpha ,\beta +1)}+(n+\alpha +1)P_n^{(\alpha ,\beta +1)},\\ (2n+s+3)P_{n+1}^{(\alpha ,\beta )} & = (n+s+2)P_{n+1}^{(\alpha +1,\beta )}-(n+\beta +1)P_n^{(\alpha +1,\beta )}. \end{align*}

No parameter factor is cancelled. The constant members are all one.

Reference: [DLMF, 18.9.5] and its reflection via Table 18.6.1.

Lean Formalisation
theorem Polynomial.jacobi_raise_beta.{u_1} {R : Type u_1} [CommRing R] [Algebra ℚ R] (α β : R) (n : ℕ) :
  Polynomial.C (2 * ↑n + α + β + 3) * Polynomial.jacobi α β (n + 1) =
    Polynomial.C (↑n + α + β + 2) * Polynomial.jacobi α (β + 1) (n + 1) +
      Polynomial.C (↑n + α + 1) * Polynomial.jacobi α (β + 1) n
Lean proof
/-- Raising the second Jacobi parameter, with denominators cleared
(DLMF 18.9.5, index shifted by one). -/
theorem jacobi_raise_beta (α β : R) (n : ℕ) :
    C (2 * n + α + β + 3) * jacobi α β (n + 1) =
      C (n + α + β + 2) * jacobi α (β + 1) (n + 1) +
        C (n + α + 1) * jacobi α (β + 1) n := by
  let : HasUniqueDiv R := HasUniqueDiv.of_module_rat R
  let r (α β : R) (n : ℕ) := C (2 * n + α + β + 3) * jacobi α β (n + 1) -
    (C (n + α + β + 2) * jacobi α (β + 1) (n + 1) +
      C (n + α + 1) * jacobi α (β + 1) n)
  have hz (α β : R) (n : ℕ) : (r α β n).eval 1 = 0 := by
    have h := succ_mul_eval_jacobi_one α β n
    dsimp only [r]
    simp only [eval_sub, eval_add, eval_mul, eval_C, eval_jacobi_one] at h ⊢
    linear_combination h
  have finish (p : R[X]) (hd : derivative p = 0) (hv : p.eval 1 = 0) : p = 0 := by
    have hc := eq_C_of_derivative_eq_zero hd
    have he := congrArg (fun q : R[X] ↦ q.eval 1) hc
    simp only [eval_C] at he
    rw [hc, he.symm.trans hv, C_0]
  have hr : ∀ n : ℕ, ∀ α β : R, r α β n = 0 := by
    intro n
    induction n with
    | zero =>
      intro α β
      apply finish _ _ (hz α β 0)
      dsimp only [r]
      simp only [derivative_sub, derivative_add, derivative_C_mul,
        derivative_jacobi_succ, jacobi_zero, derivative_one, mul_zero, add_zero]
      simp only [Nat.cast_zero, zero_add, map_zero, map_mul, map_add, map_ofNat, map_one]
      ring
    | succ n ih =>
      intro α β
      apply finish _ _ (hz α β (n + 1))
      have h := ih (α + 1) (β + 1)
      dsimp only [r] at h ⊢
      simp only [derivative_sub, derivative_add, derivative_C_mul, derivative_jacobi_succ]
      simp only [Nat.cast_add, Nat.cast_one, map_add, map_mul, map_natCast,
        map_ofNat, map_one] at h ⊢
      linear_combination C (algebraMap ℚ R (1 / 2)) * ((n : R[X]) + C α + C β + 3) * h
  exact sub_eq_zero.mp (hr n α β)
source

3.4.2 Finite connection formulas

The quotient \(A_{nk}/d_{nk}\) gives a one-parameter connection coefficient in the orthogonality range. The cleared expressions \(B_{nk}\) and \(D_n\) also describe changes at degenerate parameters, without division.

For \(0\le k\le n\) define polynomial expressions

\begin{align*} A_{nk}(\alpha ,\beta ,\gamma ) & =(\beta +k+1)_{n-k}(n+\gamma +\beta +1)_k(\gamma -\alpha )_{n-k},\\ d_{nk}(\alpha ,\beta ) & =(k+\alpha +\beta +1)_k(\alpha +\beta +2k+2)_{n-k}(n-k)!,\\ D_n(\alpha ,\beta )& =\prod _{k=0}^n d_{nk}(\alpha ,\beta ),\\ B_{nk}(\alpha ,\beta ,\gamma ) & =A_{nk}(\alpha ,\beta ,\gamma )\prod _{0\le j\le n,\ j\ne k}d_{nj}(\alpha ,\beta ). \end{align*}

These are defined over every commutative ring.

Reference: [DLMF, 18.18.14].

Lean Formalisation
def Polynomial.jacobiAlphaConnectionNumerator.{u_1} {R : Type u_1} [CommRing R] (α β γ : R) (n k : ℕ) : R
Lean definition
/-- Numerator of the degree `k` coefficient of `P_n^(γ,β)` in the `(α,β)` family
(DLMF 18.18.14). -/
@[expose] noncomputable def jacobiAlphaConnectionNumerator (α β γ : R) (n k : ℕ) : R :=
  (ascPochhammer R (n - k)).eval (β + k + 1) *
    (ascPochhammer R k).eval ((n : R) + γ + β + 1) *
    (ascPochhammer R (n - k)).eval (γ - α)
source

For \(\alpha ,\beta {\gt}-1\), every \(d_{nk}(\alpha ,\beta ){\gt}0\), and for arbitrary real \(\gamma \),

\[ P_n^{(\gamma ,\beta )}= \sum _{k=0}^n \frac{A_{nk}(\alpha ,\beta ,\gamma )}{d_{nk}(\alpha ,\beta )}P_k^{(\alpha ,\beta )}. \]

The coefficients equal both the integral projection coefficients and the finite determinant coefficients. Degree zero and \(\alpha +\beta +1=0\) are included.

Reference: [DLMF, 18.18.14].

Lean Formalisation
theorem Polynomial.ascPochhammer_jacobi_leading_pos {α β : ℝ} (hα : -1 < α) (hβ : -1 < β) (k : ℕ) :
  0 < Polynomial.eval (↑k + α + β + 1) (ascPochhammer ℝ k)
Lean proof
/-- The target leading rising factorial is positive, including degree zero
when its base need not be positive (DLMF Table 18.3.1). -/
theorem ascPochhammer_jacobi_leading_pos {α β : ℝ}
    (hα : -1 < α) (hβ : -1 < β) (k : ℕ) :
    0 < (ascPochhammer ℝ k).eval ((k : ℝ) + α + β + 1) := by
  cases k with
  | zero => simp
  | succ k =>
    apply ascPochhammer_pos
    push_cast
    linarith [Nat.cast_nonneg (α := ℝ) k]
source
Theorem 3.4.4 General Jacobi connection coefficients
✓ 🤖

Let

\[ L_n=D_n(\alpha ,\delta )\prod _{i=0}^nD_i(\beta ,\alpha ),\qquad Q_{ni}=\prod _{\substack {0\le l\le n\\ l\ne i}}D_l(\beta ,\alpha ). \]

Over every commutative rational algebra, for arbitrary source and target parameters,

\[ L_nP_n^{(\gamma ,\delta )}= \sum _{i=0}^n\sum _{j=0}^i B_{ni}(\alpha ,\delta ,\gamma )Q_{ni}(-1)^{i+j} B_{ij}(\beta ,\alpha ,\delta )P_j^{(\alpha ,\beta )}. \]

Over a field with \(L_n\ne 0\), divide by \(L_n\) to obtain the explicit finite connection expansion. Thus the degree-\(j\) coefficient is the displayed finite convolution over \(i\ge j\). The common scale is positive over \(\mathbb {R}\) when \(\alpha ,\beta ,\delta {\gt}-1\), with unrestricted \(\gamma \); the universal cleared identity also includes all degenerate parameter choices.

Reference: [DLMF, 18.9(ii) and 18.18(iv)].

Lean Formalisation
theorem Polynomial.jacobi_generalConnection_cleared.{u_1} {R : Type u_1} [CommRing R] [Algebra ℚ R] (α β γ δ : R) (n : ℕ) :
  (Polynomial.jacobiAlphaConnectionScale α δ n * ∏ i, Polynomial.jacobiAlphaConnectionScale β α ↑i) •
      Polynomial.jacobi γ δ n =
    ∑ i,
      ∑ j,
        ((Polynomial.jacobiAlphaConnectionCleared α δ γ n i *
              ∏ l ∈ Finset.univ.erase i, Polynomial.jacobiAlphaConnectionScale β α ↑l) *
            ((-1) ^ (↑i + ↑j) * Polynomial.jacobiAlphaConnectionCleared β α δ (↑i) j)) •
          Polynomial.jacobi α β ↑j
Lean proof
/-- Composing the two explicit one-parameter conversions gives the general
Jacobi connection identity over every commutative rational algebra. All
parameters, including degenerate specializations, are allowed (DLMF 18.18(iv)). -/
theorem jacobi_generalConnection_cleared (α β γ δ : R) (n : ℕ) :
    (jacobiAlphaConnectionScale α δ n *
      ∏ i : Fin (n + 1), jacobiAlphaConnectionScale β α i) • jacobi γ δ n =
      ∑ i : Fin (n + 1), ∑ j : Fin ((i : ℕ) + 1),
        (jacobiAlphaConnectionCleared α δ γ n i *
          (∏ l ∈ Finset.univ.erase i, jacobiAlphaConnectionScale β α l) *
          ((-1 : R) ^ ((i : ℕ) + j) * jacobiAlphaConnectionCleared β α δ i j)) •
          jacobi α β j := by
  rw [mul_comm, ← smul_smul, jacobiAlphaConnectionScale_smul, Finset.smul_sum]
  apply Finset.sum_congr rfl
  intro i _
  have hp := Finset.mul_prod_erase Finset.univ
    (fun l : Fin (n + 1) ↦ jacobiAlphaConnectionScale β α l) (Finset.mem_univ i)
  calc
    _ = (jacobiAlphaConnectionCleared α δ γ n i *
        ∏ l ∈ Finset.univ.erase i, jacobiAlphaConnectionScale β α l) •
        (jacobiAlphaConnectionScale β α i • jacobi α δ i) := by
      rw [smul_smul, smul_smul, ← hp]
      congr 1
      ring
    _ = _ := by
      rw [jacobiBetaConnectionScale_smul, Finset.smul_sum]
      simp only [smul_smul]
source
Universal identities, determinant coefficients and mixed moments

For every ring homomorphism \(f:R\to S\), applying \(f\) to \(A_{nk}\), \(d_{nk}\), \(D_n\) and \(B_{nk}\) gives the same expressions with parameters \(f(\alpha ),f(\beta ),f(\gamma )\).

Lean Formalisation
theorem Polynomial.map_jacobiAlphaConnectionNumerator.{u_1, u_2} {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S]
  (f : R →+* S) (α β γ : R) (n k : ℕ) :
  f (Polynomial.jacobiAlphaConnectionNumerator α β γ n k) =
    Polynomial.jacobiAlphaConnectionNumerator (f α) (f β) (f γ) n k
Lean proof
/-- Connection numerators commute with ring homomorphisms. -/
@[simp] theorem map_jacobiAlphaConnectionNumerator (f : R →+* S) (α β γ : R) (n k : ℕ) :
    f (jacobiAlphaConnectionNumerator α β γ n k) =
      jacobiAlphaConnectionNumerator (f α) (f β) (f γ) n k := by
  have hp (j : ℕ) (x : R) : f ((ascPochhammer R j).eval x) =
      (ascPochhammer S j).eval (f x) := by
    rw [← ascPochhammer_map f, eval_map]
    exact (eval₂_at_apply f x).symm
  simp only [jacobiAlphaConnectionNumerator, map_mul, hp, map_add, map_natCast, map_one, map_sub]
source

For arbitrary parameters in any commutative rational algebra,

\begin{align*} D_n(\alpha ,\beta )P_n^{(\gamma ,\beta )} & =\sum _{k=0}^n B_{nk}(\alpha ,\beta ,\gamma )P_k^{(\alpha ,\beta )},\\ D_n(\beta ,\alpha )P_n^{(\alpha ,\delta )} & =\sum _{k=0}^n(-1)^{n+k}B_{nk}(\beta ,\alpha ,\delta )P_k^{(\alpha ,\beta )}. \end{align*}

No nondegeneracy assumption is needed for either cleared identity.

Reference: [DLMF, 18.18.14 and Table 18.6.1].

Lean Formalisation
theorem Polynomial.eq_of_map_eval₂_eq_on.{u_1} {σ : Type u_1} {p q : Polynomial (MvPolynomial σ ℚ)} (s : σ → Set ℝ)
  (hs : ∀ (i : σ), (s i).Infinite)
  (h :
    ∀ x ∈ Set.univ.pi s,
      Polynomial.map (MvPolynomial.eval₂Hom (algebraMap ℚ ℝ) x) p =
        Polynomial.map (MvPolynomial.eval₂Hom (algebraMap ℚ ℝ) x) q) :
  p = q
Lean proof
/-- Equality on an infinite-sided real box determines a polynomial with formal
rational parameters. -/
theorem eq_of_map_eval₂_eq_on {σ : Type*} {p q : Polynomial (MvPolynomial σ ℚ)}
    (s : σ → Set ℝ) (hs : ∀ i, (s i).Infinite)
    (h : ∀ x ∈ Set.pi Set.univ s,
      p.map (MvPolynomial.eval₂Hom (algebraMap ℚ ℝ) x) =
        q.map (MvPolynomial.eval₂Hom (algebraMap ℚ ℝ) x)) : p = q := by
  ext n : 1
  apply MvPolynomial.map_injective (algebraMap ℚ ℝ) (algebraMap ℚ ℝ).injective
  apply MvPolynomial.funext_set s hs
  intro x hx
  have hc := congrArg (fun p : ℝ[X] ↦ p.coeff n) (h x hx)
  simpa only [coeff_map, MvPolynomial.coe_eval₂Hom, MvPolynomial.eval₂_eq_eval_map] using hc
source

For a finite family \(p_0,\ldots ,p_{N-1}\), let \(A_{ij}=[X^i]p_j\). For \(q\) let \(D_j(q)\) be the determinant obtained by replacing column \(j\) of \(A\) with the first \(N\) coefficients of \(q\). Over a field, on the domain \(\det A\ne 0\), put \(c_j(q)=D_j(q)/\det A\). The Jacobi versions use target parameters \((\alpha ,\beta )\), source parameters \((\gamma ,\delta )\), and target degrees \(0,\ldots ,n\) for a source of degree \(n\).

Lean Formalisation
def Polynomial.connectionMatrix.{u_1} {R : Type u_1} [CommRing R] {N : ℕ} (p : Fin N → Polynomial R) :
  Matrix (Fin N) (Fin N) R
Lean definition
/-- The finite monomial coefficient matrix of a polynomial family. -/
def connectionMatrix (p : Fin N → R[X]) : Matrix (Fin N) (Fin N) R :=
  Matrix.of (fun i j ↦ (p j).coeff i)
source
Theorem 3.4.8 Characterisation of divided finite connection coefficients
✓ 🤖

For every nonsingular target family, multiplying each divided connection coefficient by the target determinant recovers its Cramer numerator. The same identity holds for the Jacobi specialization, with unrestricted source parameters and a nonsingular target matrix.

Lean Formalisation
theorem Polynomial.finiteConnectionCoefficient_mul_det.{u_2} {N : ℕ} {K : Type u_2} [Field K] (p : Fin N → Polynomial K)
  (q : Polynomial K) (j : Fin N) (d : Polynomial.FiniteConnectionInput p) :
  Polynomial.finiteConnectionCoefficient p q j d * (Polynomial.connectionMatrix p).det =
    Polynomial.connectionNumerator p q j
Lean proof
/-- Multiplication by the nonzero determinant recovers Cramer's numerator. -/
theorem finiteConnectionCoefficient_mul_det (p : Fin N → K[X]) (q : K[X])
    (j : Fin N) (d : FiniteConnectionInput p) :
    finiteConnectionCoefficient p q j d * (connectionMatrix p).det = connectionNumerator p q j :=
  div_mul_cancel₀ _ d.nonsingular
source

Over any commutative ring, if \(\deg p_j{\lt}N\) and \(\deg q{\lt}N\), then

\[ (\det A)q=\sum _{j{\lt}N}D_j(q)p_j. \]

If \(\deg p_j\le j\), then \(\det A=\prod _{j{\lt}N}[X^j]p_j\). Over a field, \(\det A\ne 0\) gives \(q=\sum _{j{\lt}N}c_j(q)p_j\).

Reference: Cramer’s rule.

Lean Formalisation
theorem Polynomial.connectionNumerator_eq_det.{u_1} {R : Type u_1} [CommRing R] {N : ℕ} (p : Fin N → Polynomial R)
  (q : Polynomial R) (j : Fin N) :
  Polynomial.connectionNumerator p q j = ((Polynomial.connectionMatrix p).updateCol j fun i => q.coeff ↑i).det
Lean proof
/-- Each connection numerator is the determinant with one coefficient column
replaced by that of the polynomial to expand (Cramer's rule). -/
theorem connectionNumerator_eq_det (p : Fin N → R[X]) (q : R[X]) (j : Fin N) :
    connectionNumerator p q j =
      (Matrix.updateCol (connectionMatrix p) j (fun i ↦ q.coeff i)).det := rfl
source

The cleared determinant identity applies to Jacobi families over every commutative rational algebra, without restrictions on any of the four parameters. Its determinant is the product of the degree-\(j\) coefficients \([X^j]P_j\) of the target polynomials. These are their leading coefficients when the degrees do not drop. Over a field, a nonzero target determinant gives the divided expansion. Over \(\mathbb {R}\), target parameters \(\alpha ,\beta {\gt}-1\) make the determinant strictly positive; source parameters \(\gamma ,\delta \) remain unrestricted. The divided coefficients agree with the existing target polynomial-basis coordinates.

Lean Formalisation
theorem Polynomial.det_jacobiConnectionMatrix.{u_1} {R : Type u_1} [CommRing R] [Algebra ℚ R] (α β : R) (N : ℕ) :
  (Polynomial.jacobiConnectionMatrix α β N).det =
    ∏ j, (algebraMap ℚ R) (↑(↑j).factorial * 2 ^ ↑j)⁻¹ * Polynomial.eval (↑↑j + α + β + 1) (ascPochhammer R ↑j)
Lean proof
/-- The common connection denominator is the product of the degree-`j` coefficients
of the target Jacobi polynomials, including degree-dropping specialisations
(DLMF Table 18.3.1). -/
theorem det_jacobiConnectionMatrix (α β : R) (N : ℕ) :
    (jacobiConnectionMatrix α β N).det =
      ∏ j : Fin (N + 1), algebraMap ℚ R (((j.val.factorial : ℚ) * 2 ^ j.val)⁻¹) *
        (ascPochhammer R j.val).eval ((j.val : R) + α + β + 1) := by
  rw [jacobiConnectionMatrix, det_connectionMatrix _ (fun j ↦ natDegree_jacobi_le α β j)]
  simp only [coeff_jacobi_self]
source

Write \(m(\alpha ,\beta )=\int 1\, d\mu _{\alpha ,\beta }\). For \(\alpha ,\beta {\gt}-1\) and arbitrary \(\gamma \in \mathbb {R}\),

\begin{align*} 2^n n!\int P_n^{(\gamma ,\beta )}\, d\mu _{\alpha ,\beta } & =(\gamma -\alpha )_n m(\alpha ,\beta +n),\\ (\alpha +\beta +2)_m m(\alpha ,\beta +m) & =2^m(\beta +1)_m m(\alpha ,\beta ),\\ 4^k k!\int P_{k+m}^{(\gamma ,\beta )}P_k^{(\alpha ,\beta )}\, d\mu _{\alpha ,\beta } & =(k+m+\gamma +\beta +1)_k \int P_m^{(\gamma +k,\beta +k)}\, d\mu _{\alpha +k,\beta +k}. \end{align*}

The underlying integration-by-parts identity holds against any polynomial.

Reference: [DLMF, 18.18.14].

Lean Formalisation
theorem Polynomial.hasDerivAt_jacobiWeight_mul_jacobi_mixed (α β γ : ℝ) (n : ℕ) {x : ℝ} (hx : x ∈ Set.Ioo (-1) 1) :
  HasDerivAt (fun t => (1 - t) ^ (α + 1) * (1 + t) ^ (β + 1) * Polynomial.eval t (Polynomial.jacobi (γ + 1) (β + 1) n))
    ((γ - α) * ((1 - x) ^ α * (1 + x) ^ (β + 1) * Polynomial.eval x (Polynomial.jacobi (γ + 1) (β + 1) n)) -
      2 * (↑n + 1) * ((1 - x) ^ α * (1 + x) ^ β * Polynomial.eval x (Polynomial.jacobi γ β (n + 1))))
    x
Lean proof
/-- A Rodrigues derivative with different source and weight parameters
(DLMF 18.18.14). -/
theorem hasDerivAt_jacobiWeight_mul_jacobi_mixed (α β γ : ℝ) (n : ℕ)
    {x : ℝ} (hx : x ∈ Ioo (-1) 1) :
    HasDerivAt (fun t ↦ ((1 - (t : ℝ)) ^ ((α + 1)) * (1 + (t : ℝ)) ^ ((β + 1))) *
      (jacobi (γ + 1) (β + 1) n).eval t)
      ((γ - α) * (((1 - (x : ℝ)) ^ (α) * (1 + (x : ℝ)) ^ ((β + 1))) * (jacobi (γ + 1) (β + 1) n).eval x) -
        2 * (n + 1 : ℝ) * (((1 - (x : ℝ)) ^ (α) * (1 + (x : ℝ)) ^ (β)) * (jacobi γ β (n + 1)).eval x)) x := by
  exact (hasDerivAtOnOpen_iff _ _ _ ⟨x, hx⟩ _ (fun _ ↦ rfl)).mp
    (hasDerivAt_jacobiWeight_mul_jacobi_mixed_onOpen α β γ n ⟨x, hx⟩)
source