The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.Polynomial.Smeval

39 declarations. Mathlib docs · Source

theorem RingHom.smulOneHom.congr_simp E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : NonAssocSemiring S] [inst_2 : Module R S]
  [inst_3 : IsScalarTower R S S], RingHom.smulOneHom = RingHom.smulOneHom

def Polynomial.smul_pow E1 #

{R : Type u_1} →
  [inst : Semiring R] →
    {S : Type u_2} → [inst_1 : AddCommMonoid S] → [Pow S ℕ] → [MulActionWithZero R S] → S → ℕ → R → S

Scalar multiplication together with taking a natural number power.

def Polynomial.smeval E1 #

{R : Type u_1} →
  [inst : Semiring R] →
    Polynomial R → {S : Type u_2} → [inst_1 : AddCommMonoid S] → [Pow S ℕ] → [MulActionWithZero R S] → S → S

Evaluate a polynomial p in the scalar semiring R at an element x in the target S using scalar multiple R-action.

theorem Polynomial.smeval_eq_sum E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S), p.smeval x = p.sum (Polynomial.smul_pow x)

theorem Polynomial.smeval_C E0 #

∀ {R : Type u_1} [inst : Semiring R] (r : R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S), (Polynomial.C r).smeval x = r • x ^ 0

theorem Polynomial.smeval_monomial E0 #

∀ {R : Type u_1} [inst : Semiring R] (r : R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S) (n : ℕ), ((Polynomial.monomial n) r).smeval x = r • x ^ n

theorem Polynomial.eval_eq_smeval E1 #

∀ {R : Type u_1} [inst : Semiring R] (r : R) (p : Polynomial R), Polynomial.eval r p = p.smeval r

theorem Polynomial.eval₂_smulOneHom_eq_smeval E1 #

∀ (R : Type u_3) [inst : Semiring R] {S : Type u_4} [inst_1 : Semiring S] [inst_2 : Module R S]
  [inst_3 : IsScalarTower R S S] (p : Polynomial R) (x : S), Polynomial.eval₂ RingHom.smulOneHom x p = p.smeval x

theorem Polynomial.smeval_zero E0 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S), Polynomial.smeval 0 x = 0

theorem Polynomial.smeval_one E0 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S), Polynomial.smeval 1 x = 1 • x ^ 0

theorem Polynomial.smeval_X E0 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S), Polynomial.X.smeval x = x ^ 1

theorem Polynomial.smeval_X_pow E0 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : MulActionWithZero R S] (x : S) {n : ℕ}, (Polynomial.X ^ n).smeval x = x ^ n

theorem Polynomial.smeval_add E0 #

∀ (R : Type u_1) [inst : Semiring R] (p q : Polynomial R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : Module R S] (x : S), (p + q).smeval x = p.smeval x + q.smeval x

theorem Polynomial.smeval_natCast E1 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ] [inst_3 : Module R S]
  (x : S) (n : ℕ), (↑n).smeval x = n • x ^ 0

theorem Polynomial.smeval_smul E0 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : Module R S] (x : S) (r : R), (r • p).smeval x = r • p.smeval x

def Polynomial.smeval.linearMap E1 #

(R : Type u_1) →
  [inst : Semiring R] →
    {S : Type u_2} → [inst_1 : AddCommMonoid S] → [Pow S ℕ] → [inst_3 : Module R S] → S → Polynomial R →ₗ[R] S

Polynomial.smeval as a linear map.

theorem Polynomial.smeval.linearMap_apply E0 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : AddCommMonoid S] [inst_2 : Pow S ℕ]
  [inst_3 : Module R S] (x : S), (Polynomial.smeval.linearMap R x) p = p.smeval x

theorem Polynomial.leval_coe_eq_smeval E1 #

∀ {R : Type u_3} [inst : Semiring R] (r : R), ⇑(Polynomial.leval r) = fun p ↦ p.smeval r

theorem Polynomial.leval_eq_smeval.linearMap E1 #

∀ {R : Type u_3} [inst : Semiring R] (r : R), Polynomial.leval r = Polynomial.smeval.linearMap R r

theorem Polynomial.smeval_neg E0 #

∀ (R : Type u_1) [inst : Ring R] {S : Type u_2} [inst_1 : AddCommGroup S] [inst_2 : Pow S ℕ] [inst_3 : Module R S]
  (p : Polynomial R) (x : S), (-p).smeval x = -p.smeval x

theorem Polynomial.smeval_sub E0 #

∀ (R : Type u_1) [inst : Ring R] {S : Type u_2} [inst_1 : AddCommGroup S] [inst_2 : Pow S ℕ] [inst_3 : Module R S]
  (p q : Polynomial R) (x : S), (p - q).smeval x = p.smeval x - q.smeval x

theorem Polynomial.smeval_neg_nat E1 #

∀ (S : Type u_3) [inst : NonAssocRing S] [inst_1 : Pow S ℕ] [NatPowAssoc S] (q : Polynomial ℕ) (n : ℕ),
  q.smeval (-↑n) = ↑(q.smeval (-↑n))

theorem Polynomial.smeval_C_mul E1 #

∀ (R : Type u_1) [inst : Semiring R] (r : R) (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S), (Polynomial.C r * p).smeval x = r • p.smeval x

theorem Polynomial.smeval_at_natCast E1 #

∀ {S : Type u_2} [inst : NonAssocSemiring S] [inst_1 : Pow S ℕ] [NatPowAssoc S] (q : Polynomial ℕ) (n : ℕ),
  q.smeval ↑n = ↑(q.smeval n)

theorem Polynomial.smeval_at_zero E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] [NatPowAssoc S], p.smeval 0 = p.coeff 0 • 1

theorem Polynomial.smeval_X_mul E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [SMulCommClass R S S],
  (Polynomial.X * p).smeval x = x * p.smeval x

theorem Polynomial.smeval_X_pow_assoc E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [SMulCommClass R S S] (m n : ℕ),
  x ^ m * x ^ n * p.smeval x = x ^ m * (x ^ n * p.smeval x)

theorem Polynomial.smeval_X_pow_mul E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [SMulCommClass R S S] (n : ℕ),
  (Polynomial.X ^ n * p).smeval x = x ^ n * p.smeval x

theorem Polynomial.smeval_monomial_mul E1 #

∀ (R : Type u_1) [inst : Semiring R] (r : R) (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [SMulCommClass R S S] (n : ℕ),
  ((Polynomial.monomial n) r * p).smeval x = r • (x ^ n * p.smeval x)

theorem Polynomial.smeval_mul_X E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S],
  (p * Polynomial.X).smeval x = p.smeval x * x

theorem Polynomial.smeval_assoc_X_pow E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S] (m n : ℕ),
  p.smeval x * x ^ m * x ^ n = p.smeval x * (x ^ m * x ^ n)

theorem Polynomial.smeval_mul_X_pow E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S] (n : ℕ),
  (p * Polynomial.X ^ n).smeval x = p.smeval x * x ^ n

theorem Polynomial.smeval_mul E1 #

∀ (R : Type u_1) [inst : Semiring R] (p q : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S] [SMulCommClass R S S],
  (p * q).smeval x = p.smeval x * q.smeval x

theorem Polynomial.smeval_pow E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S] [SMulCommClass R S S] (n : ℕ),
  (p ^ n).smeval x = p.smeval x ^ n

theorem Polynomial.smeval_comp E1 #

∀ (R : Type u_1) [inst : Semiring R] (p q : Polynomial R) {S : Type u_2} [inst_1 : NonAssocSemiring S]
  [inst_2 : Module R S] [inst_3 : Pow S ℕ] (x : S) [NatPowAssoc S] [IsScalarTower R S S] [SMulCommClass R S S],
  (p.comp q).smeval x = p.smeval (q.smeval x)

theorem Polynomial.smeval_commute_left E1 #

∀ (R : Type u_1) [inst : Semiring R] (p : Polynomial R) {S : Type u_2} [inst_1 : Semiring S] [inst_2 : Module R S]
  [IsScalarTower R S S] [SMulCommClass R S S] {x y : S}, Commute x y → Commute (p.smeval x) y

theorem Polynomial.smeval_commute E1 #

∀ (R : Type u_1) [inst : Semiring R] (p q : Polynomial R) {S : Type u_2} [inst_1 : Semiring S] [inst_2 : Module R S]
  [IsScalarTower R S S] [SMulCommClass R S S] {x y : S}, Commute x y → Commute (p.smeval x) (q.smeval y)

theorem Polynomial.aeval_eq_smeval E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {S : Type u_2} [inst_1 : Semiring S] [inst_2 : Algebra R S] (x : S)
  (p : Polynomial R), (Polynomial.aeval x) p = p.smeval x

theorem Polynomial.aeval_coe_eq_smeval E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {S : Type u_2} [inst_1 : Semiring S] [inst_2 : Algebra R S] (x : S),
  ⇑(Polynomial.aeval x) = fun p ↦ p.smeval x