Structure Operations

Contents

Related Structures

The main structure related to a polynomial ring is its coefficient ring. Univariate polynomial rings belong to the Magma category RngUPol.

Category(P) : RngUPol -> Cat
Parent(P) : RngUPol -> Pow
PrimeRing(P) : RngUPol -> Rng
BaseRing(P) : RngUPol -> Rng
CoefficientRing(P) : RngUPol -> Rng
CoefficientRing(f) : RngUPolElt -> Rng
Return the coefficient ring of polynomial ring P (the parent of f).

Changing Rings

The ChangeRing function enables changing coefficient rings on a polynomial ring.

ChangeRing(P, S) : RngUPol, Rng -> RngUPol, Map
Given a polynomial ring P=R[x], together with a ring S, construct the polynomial ring Q=S[y], together with the homomorphism h from P to Q. It is necessary that all elements of the old coefficient ring R can be automatically coerced into the new coefficient ring S. The homomorphism h will apply this coercion to the coefficients of elements in P to return elements of Q. The usual angle bracket notation can be used for indeterminate names on the result.
ChangeRing(P, S, f) : RngUPol, Rng, Map -> RngUPol, Map
Given a polynomial ring P=R[x], together with a ring S and a map f: R -> S, construct the polynomial ring Q=S[y] together with the homomorphism h from P to Q obtained by applying h to the coefficients of elements of P. The usual angle bracket notation can be used for indeterminate names on the result.

Example RngPol_ChangeRing (H24E3)

In the first example of ChangeRing below we use automatic coercion of integers to rationals to go from Z[x] to Q[y]. In fact ! can be used for this as well. In the second example we use a map to obtain a non-standard embedding (not mapping 1 to 1) of Z in Q.
> Z := Integers();
> Q := RationalField();
> P<x> := PolynomialRing(Z);
> S<y>, h := ChangeRing(P, Q);
> h(x^3-2*x+5);
y^3 - 2*y + 5
> S ! (x^3-2*x+5);
y^3 - 2*y + 5
> m := hom< Z -> Q | x :-> 3*x >;
> S<y>, h := ChangeRing(P, Q, m);
> h(x^3-2*x+5);
3*y^3 - 6*y + 15

Numerical Invariants

The characteristic can be obtained for any polynomial ring, the rank for free polynomial rings and the cardinality only for finite quotients.

Characteristic(P) : RngUPol -> RngIntElt
Rank(P) : RngUPol -> RngIntElt
Return the rank of the polynomial ring P, defined as the maximal number of independent indeterminates in P over its coefficient ring; for univariate polynomial rings this will therefore always return 1.
# P : RngUPolRes -> RngIntElt
Return the number of elements of P; this will only return an integer value if P is finite, which for polynomial rings can only happen for quotients of polynomial rings over finite coefficient rings.

Ring Predicates and Booleans

The usual ring functions returning Boolean values are available on polynomial rings.

IsCommutative(P) : RngUPol -> BoolElt
IsUnitary(P) : RngUPol -> BoolElt
IsFinite(P) : RngUPol -> BoolElt
IsOrdered(P) : RngUPol -> BoolElt
IsField(P) : RngUPol -> BoolElt
IsEuclideanDomain(P) : RngUPol -> BoolElt
IsPID(P) : RngUPol -> BoolElt
IsUFD(P) : RngUPol -> BoolElt
IsDivisionRing(P) : RngUPol -> BoolElt
IsEuclideanRing(P) : RngUPol -> BoolElt
IsDomain(P) : RngUPol -> BoolElt
IsPrincipalIdealRing(P) : RngUPol -> BoolElt
P eq Q : RngUPol, RngUPol -> BoolElt
P ne Q : RngUPol, RngUPol -> BoolElt
P lt Q : RngUPol, RngUPol -> BoolElt
P gt Q : RngUPol, RngUPol -> BoolElt
P le Q : RngUPol, RngUPol -> BoolElt
P ge Q : RngUPol, RngUPol -> BoolElt

Homomorphisms

A ring homomorphism taking a polynomial ring R[x] as its domain requires 2 pieces of information, namely, a map (homomorphism) telling how to map the coefficient ring R, together with the image of the indeterminate x. The map may be omitted.

hom< P -> S | f, y > : RngUPol, Rng, Map, RngElt -> Map
hom< P -> S | y > : RngPol, Rng, RngElt -> Map
Given a polynomial ring P=R[x], a ring S, a map f : R -> S and an element y∈S, create the homomorphism g : P -> S given by that g(∑sixi)=∑f(si)yi.

The coefficient ring map may be omitted, in which case the coefficients are mapped into S by the unitary homomorphism sending 1R to 1S. Also, the image y is allowed to be from a structure that allows automatic coercion into S.

Example RngPol_Homomorphism (H24E4)

In this example we map Z[x] into the reals by sending x to 1/2. Note that we do not have a choice for the coefficient map (since we require it to be unitary), and also that we give the image of x as a rational number that is automatically coerced into the reals.
> Z := Integers();
> P<x> := PolynomialRing(Z);
> Re := RealField(20);
> half := hom< P -> Re | 1/2 >;
> half(x^3-3*x+5);
3.625
V2.28, 13 July 2023