Documentation

CslibFrontier.Foundations.Data.MvPolynomial.Substitution

Substitution: total degree and the chain rule #

Substituting polynomials of total degree at most k for the variables of a polynomial P multiplies the total degree by at most k (MvPolynomial.totalDegree_aeval_le_mul). In particular, an affine change of variables does not raise the total degree (MvPolynomial.totalDegree_aeval_le). The same bound holds for the degree of a substitution of univariate polynomials (MvPolynomial.natDegree_aeval_le_mul). Partial derivatives of a substitution follow the chain rule (MvPolynomial.pderiv_aeval).

Main results #

theorem MvPolynomial.totalDegree_aeval_le_mul {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] {g : τ → MvPolynomial σ R} {k : ℕ} (hg : ∀ (i : τ), (g i).totalDegree ≤ k) (P : MvPolynomial τ R) :

Substituting polynomials of total degree at most k for the variables multiplies the total degree by at most k.

theorem MvPolynomial.totalDegree_aeval_le {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] {g : τ → MvPolynomial σ R} (hg : ∀ (i : τ), (g i).totalDegree ≤ 1) (P : MvPolynomial τ R) :

Substituting polynomials of total degree at most 1 for the variables does not raise the total degree.

theorem MvPolynomial.totalDegree_sumRingEquiv_le {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] (P : MvPolynomial (σ ⊕ τ) R) :

Retaining one block of variables in the coefficient ring does not increase the total degree in the other block.

theorem MvPolynomial.eval₂_sumRingEquiv {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] {S : Type u_4} [CommSemiring S] (φ : R →+* S) (x : σ → S) (z : τ → S) (P : MvPolynomial (σ ⊕ τ) R) :
eval₂ (eval₂Hom φ z) x ((sumRingEquiv R σ τ) P) = eval₂ φ (Sum.elim x z) P

Evaluating a split polynomial evaluates its coefficient variables in the second block and its remaining variables in the first block.

theorem MvPolynomial.coeff_coeff_sumRingEquiv {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] (P : MvPolynomial (σ ⊕ τ) R) (s : σ →₀ ℕ) (t : τ →₀ ℕ) :
(((sumRingEquiv R σ τ) P).coeff s).coeff t = P.coeff (s.sumElim t)

Taking a coefficient in each retained block recovers the original coefficient.

theorem MvPolynomial.totalDegree_coeff_sumRingEquiv_le {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] (P : MvPolynomial (σ ⊕ τ) R) (s : σ →₀ ℕ) :

The degree of a retained coefficient is at most the original total degree.

theorem MvPolynomial.natDegree_aeval_le_of_support {τ : Type u_2} {R : Type u_3} [CommSemiring R] {A : Type u_4} [CommSemiring A] [Algebra R A] {g : τ → Polynomial A} {w : τ → ℕ} {P : MvPolynomial τ R} {d : ℕ} (hg : ∀ (i : τ), (g i).natDegree ≤ w i) (hP : ∀ s ∈ P.support, (s.sum fun (i : τ) (e : ℕ) => e * w i) ≤ d) :
((aeval g) P).natDegree ≤ d

Bound the degree of a univariate substitution by a weighted degree of each original monomial. The weight of a variable is any upper bound on the degree of its replacement.

theorem MvPolynomial.natDegree_aeval_le_mul {τ : Type u_2} {R : Type u_3} [CommSemiring R] {A : Type u_4} [CommSemiring A] [Algebra R A] {g : τ → Polynomial A} {k : ℕ} (hg : ∀ (i : τ), (g i).natDegree ≤ k) (P : MvPolynomial τ R) :

Substituting univariate polynomials of degree at most k, with coefficients in an R-algebra, for the variables gives a polynomial of degree at most k times the total degree.

theorem MvPolynomial.eval_polynomial_aeval {τ : Type u_2} {R : Type u_3} [CommSemiring R] (g : τ → Polynomial R) (P : MvPolynomial τ R) (x : R) :
Polynomial.eval x ((aeval g) P) = (eval fun (i : τ) => Polynomial.eval x (g i)) P

Evaluating a substitution of univariate polynomials at x evaluates the polynomial at the values of the substituted polynomials at x.

theorem MvPolynomial.pderiv_aeval {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] [Fintype τ] (L : τ → MvPolynomial σ R) (p : MvPolynomial τ R) (i : σ) :
(pderiv i) ((aeval L) p) = ∑ k : τ, (aeval L) ((pderiv k) p) * (pderiv i) (L k)

Chain rule for formal partial derivatives under polynomial substitution.