Ring of Laurent Polynomials (base class)#

If R is a commutative ring, then the ring of Laurent polynomials in n variables over R is R[x1±1,x2±1,,xn±1].

AUTHORS:

  • David Roe (2008-2-23): created

  • David Loeffler (2009-07-10): cleaned up docstrings

class sage.rings.polynomial.laurent_polynomial_ring_base.LaurentPolynomialRing_generic(R)#

Bases: CommutativeRing, Parent

Laurent polynomial ring (base class).

EXAMPLES:

This base class inherits from CommutativeRing. Since github issue #11900, it is also initialised as such:

sage: R.<x1,x2> = LaurentPolynomialRing(QQ)
sage: R.category()
Join of Category of unique factorization domains
    and Category of commutative algebras
        over (number fields and quotient fields and metric spaces)
    and Category of infinite sets
sage: TestSuite(R).run()
change_ring(base_ring=None, names=None, sparse=False, order=None)#

EXAMPLES:

sage: R = LaurentPolynomialRing(QQ, 2, 'x')
sage: R.change_ring(ZZ)
Multivariate Laurent Polynomial Ring in x0, x1 over Integer Ring

Check that the distinction between a univariate ring and a multivariate ring with one generator is preserved:

sage: P.<x> = LaurentPolynomialRing(QQ, 1)
sage: P
Multivariate Laurent Polynomial Ring in x over Rational Field
sage: K.<i> = CyclotomicField(4)                                                        # needs sage.rings.number_field
sage: P.change_ring(K)                                                                  # needs sage.rings.number_field
Multivariate Laurent Polynomial Ring in x over
 Cyclotomic Field of order 4 and degree 2
characteristic()#

Returns the characteristic of the base ring.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').characteristic()
0
sage: LaurentPolynomialRing(GF(3), 2, 'x').characteristic()
3
completion(p=None, prec=20, extras=None)#

Return the completion of self.

Currently only implemented for the ring of formal Laurent series. The prec variable controls the precision used in the Laurent series ring. If prec is , then this returns a LazyLaurentSeriesRing.

EXAMPLES:

sage: P.<x> = LaurentPolynomialRing(QQ); P
Univariate Laurent Polynomial Ring in x over Rational Field
sage: PP = P.completion(x); PP
Laurent Series Ring in x over Rational Field
sage: f = 1 - 1/x
sage: PP(f)
-x^-1 + 1
sage: g = 1 / PP(f); g
-x - x^2 - x^3 - x^4 - x^5 - x^6 - x^7 - x^8 - x^9 - x^10 - x^11
 - x^12 - x^13 - x^14 - x^15 - x^16 - x^17 - x^18 - x^19 - x^20 + O(x^21)
sage: 1 / g
-x^-1 + 1 + O(x^19)

sage: # needs sage.combinat
sage: PP = P.completion(x, prec=oo); PP
Lazy Laurent Series Ring in x over Rational Field
sage: g = 1 / PP(f); g
-x - x^2 - x^3 + O(x^4)
sage: 1 / g == f
True
construction()#

Return the construction of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x,y').construction()
(LaurentPolynomialFunctor,
 Univariate Laurent Polynomial Ring in x over Rational Field)
fraction_field()#

The fraction field is the same as the fraction field of the polynomial ring.

EXAMPLES:

sage: L.<x> = LaurentPolynomialRing(QQ)
sage: L.fraction_field()
Fraction Field of Univariate Polynomial Ring in x over Rational Field
sage: (x^-1 + 2) / (x - 1)
(2*x + 1)/(x^2 - x)
gen(i=0)#

Returns the ith generator of self. If i is not specified, then the first generator will be returned.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').gen()
x0
sage: LaurentPolynomialRing(QQ, 2, 'x').gen(0)
x0
sage: LaurentPolynomialRing(QQ, 2, 'x').gen(1)
x1
ideal(*args, **kwds)#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').ideal([1])
Ideal (1) of Multivariate Laurent Polynomial Ring in x0, x1 over Rational Field
is_exact()#

Return True if the base ring is exact.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').is_exact()
True
sage: LaurentPolynomialRing(RDF, 2, 'x').is_exact()
False
is_field(proof=True)#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').is_field()
False
is_finite()#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').is_finite()
False
is_integral_domain(proof=True)#

Return True if self is an integral domain.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').is_integral_domain()
True

The following used to fail; see github issue #7530:

sage: L = LaurentPolynomialRing(ZZ, 'X')
sage: L['Y']
Univariate Polynomial Ring in Y over
 Univariate Laurent Polynomial Ring in X over Integer Ring
is_noetherian()#

Return True if self is Noetherian.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').is_noetherian()
Traceback (most recent call last):
...
NotImplementedError
krull_dimension()#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').krull_dimension()
Traceback (most recent call last):
...
NotImplementedError
ngens()#

Return the number of generators of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').ngens()
2
sage: LaurentPolynomialRing(QQ, 1, 'x').ngens()
1
polynomial_ring()#

Returns the polynomial ring associated with self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').polynomial_ring()
Multivariate Polynomial Ring in x0, x1 over Rational Field
sage: LaurentPolynomialRing(QQ, 1, 'x').polynomial_ring()
Multivariate Polynomial Ring in x over Rational Field
random_element(low_degree=-2, high_degree=2, terms=5, choose_degree=False, *args, **kwds)#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').random_element()
Traceback (most recent call last):
...
NotImplementedError
remove_var(var)#

EXAMPLES:

sage: R = LaurentPolynomialRing(QQ,'x,y,z')
sage: R.remove_var('x')
Multivariate Laurent Polynomial Ring in y, z over Rational Field
sage: R.remove_var('x').remove_var('y')
Univariate Laurent Polynomial Ring in z over Rational Field
term_order()#

Returns the term order of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').term_order()
Degree reverse lexicographic term order
variable_names_recursive(depth=+Infinity)#

Return the list of variable names of this ring and its base rings, as if it were a single multi-variate Laurent polynomial.

INPUT:

OUTPUT:

A tuple of strings.

EXAMPLES:

sage: T = LaurentPolynomialRing(QQ, 'x')
sage: S = LaurentPolynomialRing(T, 'y')
sage: R = LaurentPolynomialRing(S, 'z')
sage: R.variable_names_recursive()
('x', 'y', 'z')
sage: R.variable_names_recursive(2)
('y', 'z')