Theory of univariate polynomials #
The main defs here are eval₂
, eval
, and map
.
We give several lemmas about their interaction with each other and with module operations.
Evaluate a polynomial p
given a ring hom f
from the scalar ring
to the target and a value x
for the variable in the target
Equations
Instances For
eval₂AddMonoidHom (f : R →+* S) (x : S)
is the AddMonoidHom
from
R[X]
to S
obtained by evaluating the pushforward of p
along f
at x
.
Equations
- Polynomial.eval₂AddMonoidHom f x = { toFun := Polynomial.eval₂ f x, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Alias of Polynomial.eval₂_natCast
.
eval₂
as a RingHom
for noncommutative rings
Equations
- Polynomial.eval₂RingHom' f x hf = { toFun := Polynomial.eval₂ f x, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
We next prove that eval₂ is multiplicative as long as target ring is commutative (even if the source ring is not).
Equations
- Polynomial.eval₂RingHom f x = { toFun := (↑(Polynomial.eval₂AddMonoidHom f x)).toFun, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
eval x p
is the evaluation of the polynomial p
at x
Equations
- Polynomial.eval = Polynomial.eval₂ (RingHom.id R)
Instances For
Alias of Polynomial.eval₂_at_natCast
.
Alias of Polynomial.eval_natCast
.
A reformulation of the expansion of (1 + y)^d: $$(d + 1) (1 + y)^d - (d + 1)y^d = \sum_{i = 0}^d {d + 1 \choose i} \cdot i \cdot y^{i - 1}.$$
Polynomial.eval
as linear map
Equations
- Polynomial.leval r = { toFun := fun (f : Polynomial R) => Polynomial.eval r f, map_add' := ⋯, map_smul' := ⋯ }
Instances For
Alias of Polynomial.eval_natCast_mul
.
IsRoot p x
implies x
is a root of p
. The evaluation of p
at x
is zero
Equations
- p.IsRoot a = (Polynomial.eval a p = 0)
Instances For
The composition of polynomials as a polynomial.
Equations
- p.comp q = Polynomial.eval₂ Polynomial.C q p
Instances For
Alias of Polynomial.natCast_comp
.
Alias of Polynomial.natCast_mul_comp
.
Alias of Polynomial.mul_X_add_natCast_comp
.
map f p
maps a polynomial p
across a ring hom f
Equations
- Polynomial.map f = Polynomial.eval₂ (Polynomial.C.comp f) Polynomial.X
Instances For
Polynomial.map
as a RingHom
.
Equations
- Polynomial.mapRingHom f = { toFun := Polynomial.map f, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Alias of map_natCast
.
If R
and S
are isomorphic, then so are their polynomial rings.
Equations
- Polynomial.mapEquiv e = RingEquiv.ofHomInv (Polynomial.mapRingHom ↑e) (Polynomial.mapRingHom ↑e.symm) ⋯ ⋯
Instances For
The polynomial ring over a finite product of rings is isomorphic to the product of polynomial rings over individual rings.
Equations
- Polynomial.piEquiv R = RingEquiv.ofBijective (Pi.ringHom fun (i : ι) => Polynomial.mapRingHom (Pi.evalRingHom R i)) ⋯
Instances For
Alias of Polynomial.eval_natCast_map
.
Alias of Polynomial.eval_intCast_map
.
we have made eval₂
irreducible from the start.
Perhaps we can make also eval
, comp
, and map
irreducible too?
eval r
, regarded as a ring homomorphism from R[X]
to R
.
Equations
- Polynomial.evalRingHom = Polynomial.eval₂RingHom (RingHom.id R)
Instances For
comp p
, regarded as a ring homomorphism from R[X]
to itself.
Equations
- Polynomial.compRingHom = Polynomial.eval₂RingHom Polynomial.C
Instances For
Polynomial evaluation commutes with List.prod
Polynomial evaluation commutes with Multiset.prod
Polynomial evaluation commutes with Finset.prod
Alias of map_intCast
.
Alias of Polynomial.eval_intCast
.
Alias of Polynomial.intCast_comp
.
Alias of Polynomial.eval₂_at_intCast
.
Alias of Polynomial.mul_X_sub_intCast_comp
.
A polynomial over an integral domain R
is irreducible if it is monic and
irreducible after mapping into an integral domain S
.
A special case of this lemma is that a polynomial over ℤ
is irreducible if
it is monic and irreducible over ℤ/pℤ
for some prime p
.