Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.Charpoly.TraceExponential

Characteristic coefficients from power traces #

Newton's characteristic-coefficient recurrence holds over every commutative ring. Over a field where 1, …, D are nonzero, the first D + 1 coefficients of the reverse characteristic polynomial agree with the finite exponential of the polynomial with coefficients -trace (M^j) / j. The polynomial of these coefficients is Mathlib's Polynomial.ofFn; there is one finite-exponential construction throughout.

The finite-exponential proof is adapted from lean-canny. Jacobi's identity Matrix.derivative_det_adjugate, (det M)' = tr (adj M * M') for a matrix M of polynomials, is obtained from the existing Derivation.map_det.

Jacobi's formula for a matrix of polynomials: (det M)' = tr (adj M * M'), with M' the entrywise derivative.

theorem Matrix.charpolyRev_newton {R : Type u_1} {ι : Type u_2} [CommRing R] [Fintype ι] [DecidableEq ι] (M : Matrix ι ι R) (k : ℕ) :
↑(k + 1) * M.charpolyRev.coeff (k + 1) = -∑ j ∈ Finset.range (k + 1), M.charpolyRev.coeff (k - j) * (M ^ (j + 1)).trace

Newton's characteristic-coefficient recurrence over an arbitrary commutative ring. No inverses or eigenvalues occur in this identity.

theorem Matrix.coeff_charpolyRev_card_sub {R : Type u_1} {ι : Type u_2} [CommRing R] [Fintype ι] [DecidableEq ι] (M : Matrix ι ι R) (k : ℕ) (hk : k ≤ Fintype.card ι) :

Within the matrix dimension, reversing the index identifies a coefficient of charpolyRev with the corresponding coefficient of charpoly.

theorem Polynomial.coefficients_eq_of_newton {K : Type u_1} [Field K] (D : ℕ) (t : ℕ → K) (P Q : Polynomial K) (hK : ∀ (j : ℕ), 1 ≤ j → j ≤ D → ↑j ≠ 0) (hzero : P.coeff 0 = Q.coeff 0) (hP : ∀ k < D, ↑(k + 1) * P.coeff (k + 1) = -∑ j ∈ Finset.range (k + 1), P.coeff (k - j) * t (j + 1)) (hQ : ∀ k < D, ↑(k + 1) * Q.coeff (k + 1) = -∑ j ∈ Finset.range (k + 1), Q.coeff (k - j) * t (j + 1)) (k : ℕ) (hk : k ≤ D) :
P.coeff k = Q.coeff k

Newton recurrence determines all coefficients through a degree where its integer multipliers are nonzero.

theorem Matrix.trace_exponential_coeff_eq_charpolyRev {K : Type u_1} [Field K] [DecidableEq K] {ι : Type u_2} [Fintype ι] [DecidableEq ι] (M : Matrix ι ι K) (D : ℕ) (hK : ∀ (j : ℕ), 1 ≤ j → j ≤ D → ↑j ≠ 0) (k : ℕ) (hk : k ≤ D) :
(Polynomial.finiteExponential D ((Polynomial.ofFn (D + 1)) fun (j : Fin (D + 1)) => -(M ^ ↑j).trace / ↑↑j)).coeff k = M.charpolyRev.coeff k

The finite exponential has exactly the characteristic coefficients through the requested truncation degree.

theorem Matrix.trace_exponential_coeff_eq_charpoly {K : Type u_1} [Field K] [DecidableEq K] {ι : Type u_2} [Fintype ι] [DecidableEq ι] (M : Matrix ι ι K) (hK : ∀ (j : ℕ), 1 ≤ j → j ≤ Fintype.card ι → ↑j ≠ 0) (k : ℕ) (hk : k ≤ Fintype.card ι) :

Reversal turns the constructed exponential coefficients into the actual characteristic polynomial coefficients of the matrix.