polylib::coeffRing – coefficient ring of a polynomial

polylib::coeffRing(p) returns the coefficient ring of p.

→ Examples

Calls:

polylib::coeffRing(P)

polylib::coeffRing(p)

Parameters:

P

a polynomial domain or free module

p

a polynomial or free module element

Return Value:

A domain

Details:

Example 1:

We define a polynomial ring over the ring of integers modulo math, and query for its coefficient ring:

P := Dom::UnivariatePolynomial(x, Dom::IntegerMod(4)):

polylib::coeffRing(P)

math

The coefficient ring of the elements of this domain can be queried the same way:

polylib::coeffRing(P(x))

math

polylib::coeffRing(Dom::Matrix(Dom::IntegerMod(3)))

math

Example 2:

When no coefficient ring is specified, poly currently constructs kernel polynomials over the fake domain Expr instead of the mathematically equivalent field Dom::ExpressionField() of arbitrary expression (this happens to be more efficient with the current kernels):

extop(poly(x))

math

polylib::coeffRing(poly(x))

math

This makes it possible to plug the result right away as coefficient ring of some other domain:

Dom::UnivariatePolynomial(x, polylib::coeffRing(poly(x)))

math