mathlib documentation

data.polynomial.algebra_map

Theory of univariate polynomials #

We show that polynomial A is an R-algebra when A is an R-algebra. We promote eval₂ to an algebra hom in aeval.

@[protected, instance]
noncomputable def polynomial.algebra_of_algebra {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] :

Note that this instance also provides algebra R R[X].

Equations
theorem polynomial.algebra_map_apply {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (r : R) :
@[simp]
theorem polynomial.to_finsupp_algebra_map {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (r : R) :
theorem polynomial.of_finsupp_algebra_map {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (r : R) :
theorem polynomial.C_eq_algebra_map {R : Type u} [comm_semiring R] (r : R) :

When we have [comm_ring R], the function C is the same as algebra_map R R[X].

(But note that C is defined when R is not necessarily commutative, in which case algebra_map is not available.)

@[ext]
theorem polynomial.alg_hom_ext' {R : Type u} {A' : Type u_1} {B' : Type u_2} [comm_semiring A'] [semiring B'] [comm_semiring R] [algebra R A'] [algebra R B'] {f g : A'[X] →ₐ[R] B'} (h₁ : f.comp (is_scalar_tower.to_alg_hom R A' A'[X]) = g.comp (is_scalar_tower.to_alg_hom R A' A'[X])) (h₂ : f polynomial.X = g polynomial.X) :
f = g

Extensionality lemma for algebra maps out of polynomial A' over a smaller base ring than A'

Algebra isomorphism between polynomial R and add_monoid_algebra R ℕ. This is just an implementation detail, but it can be useful to transfer results from finsupp to polynomials.

Equations
@[protected, instance]
def polynomial.subalgebra.nontrivial {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] [nontrivial A] :
@[simp]
theorem polynomial.alg_hom_eval₂_algebra_map {R : Type u_1} {A : Type u_2} {B : Type u_3} [comm_semiring R] [semiring A] [semiring B] [algebra R A] [algebra R B] (p : R[X]) (f : A →ₐ[R] B) (a : A) :
@[simp]
theorem polynomial.eval₂_algebra_map_X {R : Type u_1} {A : Type u_2} [comm_semiring R] [semiring A] [algebra R A] (p : R[X]) (f : R[X] →ₐ[R] A) :
@[simp]
theorem polynomial.ring_hom_eval₂_cast_int_ring_hom {R : Type u_1} {S : Type u_2} [ring R] [ring S] (p : [X]) (f : R →+* S) (r : R) :
noncomputable def polynomial.aeval {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) :

Given a valuation x of the variable in an R-algebra A, aeval R A x is the unique R-algebra homomorphism from R[X] to A sending X to x.

This is a stronger variant of the linear map polynomial.leval.

Equations
@[simp]
@[ext]
theorem polynomial.alg_hom_ext {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] {f g : R[X] →ₐ[R] A} (h : f polynomial.X = g polynomial.X) :
f = g
theorem polynomial.aeval_def {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) (p : R[X]) :
@[simp]
theorem polynomial.aeval_zero {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_X {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_C {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) (r : R) :
@[simp]
theorem polynomial.aeval_monomial {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) {n : } {r : R} :
@[simp]
theorem polynomial.aeval_X_pow {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) {n : } :
@[simp]
theorem polynomial.aeval_add {R : Type u} {A : Type z} [comm_semiring R] {p q : R[X]} [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_one {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_bit0 {R : Type u} {A : Type z} [comm_semiring R] {p : R[X]} [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_bit1 {R : Type u} {A : Type z} [comm_semiring R] {p : R[X]} [semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_nat_cast {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) (n : ) :
theorem polynomial.aeval_mul {R : Type u} {A : Type z} [comm_semiring R] {p q : R[X]} [semiring A] [algebra R A] (x : A) :
theorem polynomial.aeval_comp {R : Type u} [comm_semiring R] {p q : R[X]} {A : Type u_1} [comm_semiring A] [algebra R A] (x : A) :
@[simp]
theorem polynomial.aeval_map {R : Type u} [comm_semiring R] {B : Type u_3} [semiring B] [algebra R B] {A : Type u_1} [comm_semiring A] [algebra R A] [algebra A B] [is_scalar_tower R A B] (b : B) (p : R[X]) :
theorem polynomial.aeval_alg_hom {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] {B : Type u_3} [semiring B] [algebra R B] (f : A →ₐ[R] B) (x : A) :
theorem polynomial.eval_unique {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (φ : R[X] →ₐ[R] A) (p : R[X]) :
theorem polynomial.aeval_alg_hom_apply {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] {B : Type u_3} [semiring B] [algebra R B] (f : A →ₐ[R] B) (x : A) (p : R[X]) :
theorem polynomial.aeval_alg_equiv {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] {B : Type u_3} [semiring B] [algebra R B] (f : A ≃ₐ[R] B) (x : A) :
theorem polynomial.aeval_alg_equiv_apply {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] {B : Type u_3} [semiring B] [algebra R B] (f : A ≃ₐ[R] B) (x : A) (p : R[X]) :
theorem polynomial.aeval_algebra_map_apply {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : R) (p : R[X]) :
@[simp]
@[simp]
theorem polynomial.aeval_fn_apply {R : Type u} [comm_semiring R] {X : Type u_1} (g : R[X]) (f : X → R) (x : X) :
@[norm_cast]
theorem polynomial.aeval_subalgebra_coe {R : Type u} [comm_semiring R] (g : R[X]) {A : Type u_1} [semiring A] [algebra R A] (s : subalgebra R A) (f : s) :
theorem polynomial.coeff_zero_eq_aeval_zero' {R : Type u} {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (p : R[X]) :
theorem algebra.adjoin_singleton_eq_range_aeval (R : Type u) {A : Type z} [comm_semiring R] [semiring A] [algebra R A] (x : A) :
theorem polynomial.aeval_eq_sum_range {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] [algebra R S] {p : R[X]} (x : S) :
(polynomial.aeval x) p = ∑ (i : ) in finset.range (p.nat_degree + 1), p.coeff i x ^ i
theorem polynomial.aeval_eq_sum_range' {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] [algebra R S] {p : R[X]} {n : } (hn : p.nat_degree < n) (x : S) :
(polynomial.aeval x) p = ∑ (i : ) in finset.range n, p.coeff i x ^ i
theorem polynomial.is_root_of_eval₂_map_eq_zero {R : Type u} {S : Type v} [comm_semiring R] {p : R[X]} [comm_semiring S] {f : R →+* S} (hf : function.injective f) {r : R} :
polynomial.eval₂ f (f r) p = 0p.is_root r
theorem polynomial.is_root_of_aeval_algebra_map_eq_zero {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] [algebra R S] {p : R[X]} (inj : function.injective (algebra_map R S)) {r : R} (hr : (polynomial.aeval ((algebra_map R S) r)) p = 0) :
noncomputable def polynomial.aeval_tower {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (f : R →ₐ[S] A') (x : A') :

Version of aeval for defining algebra homs out of polynomial R over a smaller base ring than R.

Equations
@[simp]
theorem polynomial.aeval_tower_X {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') :
@[simp]
theorem polynomial.aeval_tower_C {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
@[simp]
theorem polynomial.aeval_tower_comp_C {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') :
@[simp]
theorem polynomial.aeval_tower_algebra_map {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
@[simp]
theorem polynomial.aeval_tower_comp_algebra_map {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') :
theorem polynomial.aeval_tower_to_alg_hom {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
@[simp]
theorem polynomial.aeval_tower_comp_to_alg_hom {R : Type u} {S : Type v} {A' : Type u_1} [comm_semiring A'] [comm_semiring R] [comm_semiring S] [algebra S R] [algebra S A'] (g : R →ₐ[S] A') (y : A') :
@[simp]
theorem polynomial.dvd_term_of_dvd_eval_of_dvd_terms {S : Type v} [comm_ring S] {z p : S} {f : S[X]} (i : ) (dvd_eval : p polynomial.eval z f) (dvd_terms : ∀ (j : ), j ip (f.coeff j) * z ^ j) :
p (f.coeff i) * z ^ i
theorem polynomial.dvd_term_of_is_root_of_dvd_terms {S : Type v} [comm_ring S] {r p : S} {f : S[X]} (i : ) (hr : f.is_root r) (h : ∀ (j : ), j ip (f.coeff j) * r ^ j) :
p (f.coeff i) * r ^ i
theorem polynomial.eval_mul_X_sub_C {R : Type u} [ring R] {p : R[X]} (r : R) :

The evaluation map is not generally multiplicative when the coefficient ring is noncommutative, but nevertheless any polynomial of the form p * (X - monomial 0 r) is sent to zero when evaluated at r.

This is the key step in our proof of the Cayley-Hamilton theorem.

theorem polynomial.aeval_endomorphism {R : Type u} {M : Type u_1} [comm_ring R] [add_comm_group M] [module R M] (f : M →ₗ[R] M) (v : M) (p : R[X]) :
((polynomial.aeval f) p) v = p.sum (λ (n : ) (b : R), b (f ^ n) v)