14.1 Univariate Polynomial Rings

Module: sage.rings.polynomial_ring

Author Log:

Module-level Functions

PolynomialRing( base_ring, [name=False], [sparse=None], [names=None], [order=False], [macaulay2=None])

Return a univariate or multivariate polynomial ring.

INPUT:
    base_ring -- the base ring
    name -- (str) the name of the generator
    sparse -- (bool; default: False) whether or not elements are
represented using
              sparse methods; note that multivariate polynomials are always
sparse
    names -- names of the generators (for multivariate poly)
    order -- term order of ring
    macaulay2 (bool; default: False) -- whether or not to use Macaulay2
(multivariate only)

sage: PolynomialRing(ZZ)
Univariate Polynomial Ring in x over Integer Ring
sage: PolynomialRing(ZZ, 'y')
Univariate Polynomial Ring in y over Integer Ring
sage: PolynomialRing(PolynomialRing(QQ,'z'), 'y')
Univariate Polynomial Ring in y over Univariate Polynomial Ring in z over
Rational Field
sage: PolynomialRing(QQ, name='abc')
Univariate Polynomial Ring in abc over Rational Field
sage: PolynomialRing(QQ, name='abc', sparse=True)
Sparse Univariate Polynomial Ring in abc over Rational Field
sage: PolynomialRing(QQ, 3, sparse=True)
Polynomial Ring in x0, x1, x2 over Rational Field
sage: PolynomialRing(QQ, 3, macaulay2=True)
Polynomial Ring in x0, x1, x2 over Rational Field

is_PolynomialRing( x)

polygen( base_ring, [name=x])

Class: PolynomialRing_dense_mod_n

class PolynomialRing_dense_mod_n
PolynomialRing_dense_mod_n( self, base_ring, [name=x])

Special Functions: __call__,$  $ _ntl_set_modulus

Class: PolynomialRing_dense_mod_p

class PolynomialRing_dense_mod_p
PolynomialRing_dense_mod_p( self, base_ring, [name=x])

Special Functions: __call__

Class: PolynomialRing_field

class PolynomialRing_field
PolynomialRing_field( self, base_ring, [name=False], [sparse=x])

Class: PolynomialRing_generic

class PolynomialRing_generic
Univariate polynomial ring over a commutative ring.
PolynomialRing_generic( self, base_ring, [name=False], [sparse=None])

sage: R, x = Q['x'].objgen()
sage: R(-1) + R(1)
0
sage: (x - Q('2/3'))*(x**2 - 8*x + 16)
x^3 - 26/3*x^2 + 64/3*x - 32/3

Functions: base_extend,$  $ base_ring,$  $ characteristic,$  $ cyclotomic_polynomial,$  $ gen,$  $ is_field,$  $ is_sparse,$  $ krull_dimension,$  $ ngens,$  $ parameter,$  $ quotient_by_principal_ideal,$  $ random_element

cyclotomic_polynomial( self, n)

The nth cyclotomic polynomial.

sage: R = Q['x']
sage: R.cyclotomic_polynomial(8)
x^4 + 1
sage: R.cyclotomic_polynomial(12)
x^4 - x^2 + 1
sage: S = PolynomialRing(FiniteField(7))
sage: S.cyclotomic_polynomial(12)
x^4 + 6*x^2 + 1

gen( self, [n=0])

If this is R[x], return x.

quotient_by_principal_ideal( self, f, [names=None])

Return the quotient of this polynomial ring by the principal ideal generated by $ f$ .

random_element( self, degree, [bound=0])

Return a random polynomial.

INPUT:
    degree -- an int
    bound -- an int (default: 0, which tries to spread choice across ring,
if implemented)

OUTPUT:
    Polynomial -- A polynomial such that the coefficient of x^i,
    for i up to degree, are coercisions to the base ring of
    random integers between -bound and bound.

Special Functions: __call__,$  $ __cmp__,$  $ __reduce__,$  $ __repr__,$  $ _coerce_,$  $ _is_valid_homomorphism_,$  $ _latex_,$  $ _PolynomialRing_generic__set_polynomial_class

Class: PolynomialRing_integral_domain

class PolynomialRing_integral_domain
PolynomialRing_integral_domain( self, base_ring, [name=False], [sparse=x])

See About this document... for information on suggesting changes.