Theory of univariate polynomials #
The theorems include formulas for computing coefficients, such as
coeff_add, coeff_sum, coeff_mul
@[simp]
theorem Polynomial.coeff_smul {R : Type u} {S : Type v} [Semiring R] [SMulZeroClass S R] (r : S) (p : Polynomial R) (n : ℕ) :
theorem Polynomial.support_smul {R : Type u} {S : Type v} [Semiring R] [SMulZeroClass S R] (r : S) (p : Polynomial R) :
def Polynomial.lsum {R : Type u_1} {A : Type u_2} {M : Type u_3} [Semiring R] [Semiring A] [AddCommMonoid M] [Module R A] [Module R M] (f : ℕ → A →ₗ[R] M) :
Polynomial.sum as a linear map.
Equations
- Polynomial.lsum f = { toFun := fun (p : Polynomial A) => p.sum fun (x1 : ℕ) (x2 : A) => (f x1) x2, map_add' := ⋯, map_smul' := ⋯ }
Instances For
The nth coefficient, as a linear map.
Equations
- Polynomial.lcoeff R n = { toFun := fun (p : Polynomial R) => p.coeff n, map_add' := ⋯, map_smul' := ⋯ }
Instances For
@[simp]
Decomposes the coefficient of the product p * q as a sum
over antidiagonal. A version which sums over range (n + 1) can be obtained
by using Finset.Nat.sum_antidiagonal_eq_sum_range_succ.
constantCoeff p returns the constant term of the polynomial p,
defined as coeff p 0. This is a ring homomorphism.
Equations
- Polynomial.constantCoeff = { toFun := fun (p : Polynomial R) => p.coeff 0, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
@[simp]
@[simp]
theorem Polynomial.coeff_mul_ofNat {R : Type u} [Semiring R] {p : Polynomial R} {a k : ℕ} [a.AtLeastTwo] :
@[simp]
theorem Polynomial.coeff_ofNat_mul {R : Type u} [Semiring R] {p : Polynomial R} {a k : ℕ} [a.AtLeastTwo] :