The main structure related to a polynomial ring is its coefficient ring. Univariate polynomial rings belong to the Magma category RngUPol.
Return the coefficient ring of polynomial ring P (the parent of f).
The ChangeRing function enables changing coefficient rings on a polynomial ring.
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.
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.
> 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
The characteristic can be obtained for any polynomial ring, the rank for free polynomial rings and the cardinality only for finite quotients.
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.
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.
The usual ring functions returning Boolean values are available on polynomial rings.
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.
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.
> Z := Integers(); > P<x> := PolynomialRing(Z); > Re := RealField(20); > half := hom< P -> Re | 1/2 >; > half(x^3-3*x+5); 3.625