Documentation

CslibFrontier.Foundations.Data.MvPolynomial.Shift

Shifting the variables of a multivariate polynomial #

MvPolynomial.shift a is the substitution X i ↦ X i + C (a i). The point a may have coordinates in an algebra A over the coefficient ring R, so that a polynomial over a field can be shifted by a point with polynomial coordinates; the result is a polynomial over A.

Main definitions #

Main results #

noncomputable def MvPolynomial.shift {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommSemiring R] [CommSemiring A] [Algebra R A] (a : σ → A) :

The shift f ↦ f (X + a) by a point a with coordinates in an R-algebra.

theorem MvPolynomial.shift_X {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommSemiring R] [CommSemiring A] [Algebra R A] (a : σ → A) (i : σ) :
(shift a) (X i) = X i + C (a i)
theorem MvPolynomial.map_shift {σ : Type u_1} {R : Type u_2} {A : Type u_3} {B : Type u_4} [CommSemiring R] [CommSemiring A] [Algebra R A] [CommSemiring B] [Algebra R B] (φ : A →ₐ[R] B) (a : σ → A) (f : MvPolynomial σ R) :
(map ↑φ) ((shift a) f) = (shift fun (i : σ) => φ (a i)) f

Shifting commutes with a homomorphism applied to the coordinates of the point.

theorem MvPolynomial.eval_shift {σ : Type u_1} {R : Type u_2} [CommSemiring R] (a b : σ → R) (f : MvPolynomial σ R) :
(eval b) ((shift a) f) = (eval fun (i : σ) => b i + a i) f

Evaluating a shifted polynomial at b evaluates the polynomial at b + a.

theorem MvPolynomial.coeff_zero_shift {σ : Type u_1} {R : Type u_2} [CommSemiring R] (a : σ → R) (f : MvPolynomial σ R) :
((shift a) f).coeff 0 = (eval a) f

The constant coefficient of a shifted polynomial is the value of the polynomial at the point.

theorem MvPolynomial.pderiv_shift {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommSemiring R] [CommSemiring A] [Algebra R A] (a : σ → A) (i : σ) (f : MvPolynomial σ R) :
(pderiv i) ((shift a) f) = (shift a) ((pderiv i) f)

Shifting commutes with partial derivatives.

theorem MvPolynomial.totalDegree_le_card_mul_of_degreeOf_le {σ : Type u_1} {R : Type u_2} [CommSemiring R] [Fintype σ] {f : MvPolynomial σ R} {δ : ℕ} (hdeg : ∀ (i : σ), degreeOf i f ≤ δ) :

A polynomial of degree at most δ in each of its finitely many variables has total degree at most δ times the number of variables.

theorem MvPolynomial.totalDegree_le_card_of_degreeOf_le_one {σ : Type u_1} {R : Type u_2} [CommSemiring R] [Fintype σ] {f : MvPolynomial σ R} (hmul : ∀ (i : σ), degreeOf i f ≤ 1) :

A polynomial of degree at most one in each of its finitely many variables has total degree at most the number of variables.

theorem MvPolynomial.aeval_X_eq_map {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommSemiring R] [CommSemiring A] [Algebra R A] (p : MvPolynomial σ R) :
(aeval fun (i : σ) => X i) p = (map (algebraMap R A)) p

Substituting the variables of the polynomial ring over an algebra is a base change.

theorem MvPolynomial.degreeOf_shift_le {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommSemiring R] [CommSemiring A] [Algebra R A] (a : σ → A) (f : MvPolynomial σ R) (i : σ) :
degreeOf i ((shift a) f) ≤ degreeOf i f

Shifting does not increase the degree in a variable.

theorem MvPolynomial.degreeOf_coeff_shift_le {σ : Type u_1} {R : Type u_2} [CommSemiring R] {τ : Type u_5} (a : σ → MvPolynomial τ R) (f : MvPolynomial σ R) (i : τ) {d : ℕ} (ha : ∀ (j : σ), degreeOf i (a j) ≤ d) (m : σ →₀ ℕ) :
degreeOf i (((shift a) f).coeff m) ≤ f.totalDegree * d

When the point has polynomial coordinates of degree at most d in a variable i, every coefficient of the shifted polynomial has degree at most f.totalDegree * d in i.

theorem MvPolynomial.natDegree_coeff_shift_le {σ : Type u_1} {R : Type u_2} [CommSemiring R] {A : Type u_6} [CommSemiring A] [Algebra R A] (a : σ → Polynomial A) (f : MvPolynomial σ R) {d : ℕ} (ha : ∀ (j : σ), (a j).natDegree ≤ d) (m : σ →₀ ℕ) :

When the point has coordinates that are univariate polynomials of degree at most d, every coefficient of the shifted polynomial has degree at most f.totalDegree * d.

theorem MvPolynomial.shift_neg_shift {σ : Type u_1} {R : Type u_2} [CommRing R] (a : σ → R) (f : MvPolynomial σ R) :
(shift fun (i : σ) => -a i) ((shift a) f) = f

Shifting by -a undoes shifting by a.

theorem MvPolynomial.shift_injective {σ : Type u_1} {R : Type u_2} {A : Type u_3} [CommRing R] [CommRing A] [Algebra R A] (hRA : Function.Injective ⇑(algebraMap R A)) (a : σ → A) :

Shifting is injective when the coefficient ring embeds into the ring of the point.