Coefficient ring of a polynomial
This functionality does not run in MATLAB.
polylib::coeffRing(p) returns the coefficient ring of p.
polylib::coeffRing(p) allows to query in a uniform way the coefficient ring of the polynomial p or the polynomial domain P.
P can also be of the form polylib::Poly([x,y],K). If K is Expr or IntMod(n), then the corresponding domains Dom::ExpressionField() or Dom::IntegerMod(p) is returned. See poly for the details about Expr and IntMod(n).
p can be a kernel polynomial (DOM_POLY), or an element of one of the above domains
We define a polynomial ring over the ring of integers modulo 4, and query for its coefficient ring:
P := Dom::UnivariatePolynomial(x, Dom::IntegerMod(4)): polylib::coeffRing(P)
The coefficient ring of the elements of this domain can be queried the same way:
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):
This makes it possible to plug the result right away as coefficient ring of some other domain: