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[x_1^{\pm 1}, x_2^{\pm 1}, \ldots, x_n^{\pm 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()
R.<x1,x2> = LaurentPolynomialRing(QQ)
R.category()
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
R = LaurentPolynomialRing(QQ, 2, 'x')
R.change_ring(ZZ)

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
P.<x> = LaurentPolynomialRing(QQ, 1)
P
K.<i> = CyclotomicField(4)                                                        # needs sage.rings.number_field
P.change_ring(K)                                                                  # needs sage.rings.number_field
characteristic()#

Returns the characteristic of the base ring.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').characteristic()
0
sage: LaurentPolynomialRing(GF(3), 2, 'x').characteristic()
3
LaurentPolynomialRing(QQ, 2, 'x').characteristic()
LaurentPolynomialRing(GF(3), 2, 'x').characteristic()
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 \(\infty\), 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
P.<x> = LaurentPolynomialRing(QQ); P
PP = P.completion(x); PP
f = 1 - 1/x
PP(f)
g = 1 / PP(f); g
1 / g
# needs sage.combinat
PP = P.completion(x, prec=oo); PP
g = 1 / PP(f); g
1 / g == f
construction()#

Return the construction of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x,y').construction()
(LaurentPolynomialFunctor,
 Univariate Laurent Polynomial Ring in x over Rational Field)
LaurentPolynomialRing(QQ, 2, 'x,y').construction()
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)
L.<x> = LaurentPolynomialRing(QQ)
L.fraction_field()
(x^-1 + 2) / (x - 1)
gen(i=0)#

Returns the \(i^{th}\) 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
LaurentPolynomialRing(QQ, 2, 'x').gen()
LaurentPolynomialRing(QQ, 2, 'x').gen(0)
LaurentPolynomialRing(QQ, 2, 'x').gen(1)
ideal(*args, **kwds)#

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').ideal([1])
Ideal (1) of Multivariate Laurent Polynomial Ring in x0, x1 over Rational Field
LaurentPolynomialRing(QQ, 2, 'x').ideal([1])
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
LaurentPolynomialRing(QQ, 2, 'x').is_exact()
LaurentPolynomialRing(RDF, 2, 'x').is_exact()
is_field(proof=True)#

EXAMPLES:

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

EXAMPLES:

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

Return True if self is an integral domain.

EXAMPLES:

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

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
L = LaurentPolynomialRing(ZZ, 'X')
L['Y']
is_noetherian()#

Return True if self is Noetherian.

EXAMPLES:

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

EXAMPLES:

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

Return the number of generators of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').ngens()
2
sage: LaurentPolynomialRing(QQ, 1, 'x').ngens()
1
LaurentPolynomialRing(QQ, 2, 'x').ngens()
LaurentPolynomialRing(QQ, 1, 'x').ngens()
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
LaurentPolynomialRing(QQ, 2, 'x').polynomial_ring()
LaurentPolynomialRing(QQ, 1, 'x').polynomial_ring()
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
LaurentPolynomialRing(QQ, 2, 'x').random_element()
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
R = LaurentPolynomialRing(QQ,'x,y,z')
R.remove_var('x')
R.remove_var('x').remove_var('y')
term_order()#

Returns the term order of self.

EXAMPLES:

sage: LaurentPolynomialRing(QQ, 2, 'x').term_order()
Degree reverse lexicographic term order
LaurentPolynomialRing(QQ, 2, 'x').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')
T = LaurentPolynomialRing(QQ, 'x')
S = LaurentPolynomialRing(T, 'y')
R = LaurentPolynomialRing(S, 'z')
R.variable_names_recursive()
R.variable_names_recursive(2)