base_ring, [variable=False], [sparse=x]) |
sage: import rings sage: Q = rings.RationalField() sage: R = PolynomialRing(Q) sage: x = R.gen() sage: R(-1) + R(1) 0 sage: (x - '2/3')*(x**2 - 8*x + 16) x^3 - 26/3*x^2 + 64/3*x - 32/3
base_ring,
characteristic,
cyclotomic_polynomial,
gen,
is_field,
is_sparse,
name,
ngens,
polynomial,
quotient,
random,
set_variable,
variable
Further documentation:
n) |
The nth cyclotomic polynomial.
sage: R = PolynomialRing(QQ) sage: R.cyclotomic_polynomial(8) x^4 + 1 sage: R.cyclotomic_polynomial(12) x^4 - x^2 + 1 sage: S = PolynomialRing(GF(7)) sage: S.cyclotomic_polynomial(12) x^4 + 6*x^2 + 1
[n=0]) |
If this is R[x], return x.
degree, [bound=10]) |
Return a random polynomial.
INPUT: degree -- an int bound -- an int OUTPUT: Polynomial -- A polynomial whose coefficients of x^i, for i up to degree, are coercisions to the base ring of random integers between -bound and bound.
) |
Returns the string which is used to print the generator of the polynomial ring.
OUTPUT: str - generator name
Instances of class PolynomialRing also have the following special functions:
__call__,
__cmp__,
__contains__
See About this document... for information on suggesting changes.