Scalar-multiple polynomial evaluation #
This file defines polynomial evaluation via scalar multiplication. Our polynomials have
coefficients in a semiring R
, and we evaluate at a weak form of R
-algebra, namely an additive
commutative monoid with an action of R
and a notion of natural number power. This
is a generalization of Algebra.Polynomial.Eval
.
Main definitions #
Polynomial.smeval
: function for evaluating a polynomial with coefficients in aSemiring
R
at an elementx
of anAddCommMonoid
S
that has natural number powers and anR
-action.smeval.linearMap
: thesmeval
function as anR
-linear map, whenS
is anR
-module.smeval.algebraMap
: thesmeval
function as anR
-algebra map, whenS
is anR
-algebra.
Main results #
smeval_monomial
: monomials evaluate as we expect.smeval_add
,smeval_smul
: linearity of evaluation, given anR
-module.smeval_mul
,smeval_comp
: multiplicativity of evaluation, given power-associativity.eval₂_smulOneHom_eq_smeval
,leval_eq_smeval.linearMap
,aeval_eq_smeval
, etc.: comparisons
TODO #
smeval_neg
andsmeval_intCast
forR
a ring andS
anAddCommGroup
.- Nonunital evaluation for polynomials with vanishing constant term for
Pow S ℕ+
(different file?)
Scalar multiplication together with taking a natural number power.
Equations
- Polynomial.smul_pow x n r = r • x ^ n
Instances For
Evaluate a polynomial p
in the scalar semiring R
at an element x
in the target S
using
scalar multiple R
-action.
Equations
Instances For
Alias of Polynomial.smeval_natCast
.
Polynomial.smeval
as a linear map.
Equations
- Polynomial.smeval.linearMap R x = { toFun := fun (f : Polynomial R) => f.smeval x, map_add' := ⋯, map_smul' := ⋯ }
Instances For
In the module docstring for algebras at Mathlib.Algebra.Algebra.Basic
, we see that
[CommSemiring R] [Semiring S] [Module R S] [IsScalarTower R S S] [SMulCommClass R S S]
is an
equivalent way to express [CommSemiring R] [Semiring S] [Algebra R S]
that allows one to relax
the defining structures independently. For non-associative power-associative algebras (e.g.,
octonions), we replace the [Semiring S]
with [NonAssocSemiring S] [Pow S ℕ] [NatPowAssoc S]
.
Alias of Polynomial.smeval_at_natCast
.