from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing # create a polynomial ring over the rational field with one variable x R = PolynomialRing(QQ, 'x')
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing # create a polynomial ring over the ring of integers (mod 17) with one variable x R = PolynomialRing(ZZ/17, 'x')
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.finite_rings.finite_field_constructor import GF # create a polynomial ring over the finite field GF(5) with one variable x F = GF(5) R = PolynomialRing(F, 'x')Overall, the sage.rings.polynomial.polynomial_ring_constructor package library provides useful tools for working with polynomial rings over fields and rings, and the PolynomialRing class is a fundamental tool in this regard.