Ideals in Laurent polynomial rings¶
For \(R\) a commutative ring, ideals in the Laurent polynomial ring \(R[x_1^{\pm 1}, x_2^{\pm 1}, \ldots, x_n^{\pm 1}]\) are implemented as ideals in the ordinary polynomial ring \(R[x_1, \ldots, x_n]\) which are saturated with respect to the ideal \((x_1 \cdots x_n)\).
AUTHORS:
Kiran S. Kedlaya (2020): initial implementation
- class sage.rings.polynomial.laurent_polynomial_ideal.LaurentPolynomialIdeal(ring, gens, coerce=True, hint=None)[source]¶
Bases:
Ideal_genericCreate an ideal in a Laurent polynomial ring.
To compute structural properties of an ideal in the Laurent polynomial ring \(R[x_1^{\pm},\ldots,x_n^{\pm}]\), we form the corresponding ideal in the associated ordinary polynomial ring \(R[x_1,\ldots,x_n]\) which is saturated with respect to the ideal \((x_1 \cdots x_n)\). Since computing the saturation can be expensive, we employ some strategies to reduce the need for it.
We only create the polynomial ideal as needed.
For some operations, we try some superficial tests first. E.g., for comparisons, we first look directly at generators.
The attribute
hintis a lower bound on the associated polynomial ideal. Hints are automatically forwarded by certain creation operations (such as sums and base extensions), and can be manually forwarded in other cases.
INPUT:
ring– the ring the ideal is defined ingens– list of generators for the idealcoerce– whether or not to coerce elements intoringhint– an ideal in the associated polynomial ring (optional; see above)
EXAMPLES:
sage: R.<x,y> = LaurentPolynomialRing(IntegerRing(), 2, order='lex') sage: R.ideal([x, y]) Ideal (x, y) of Multivariate Laurent Polynomial Ring in x, y over Integer Ring sage: R.<x0,x1> = LaurentPolynomialRing(GF(3), 2) sage: R.ideal([x0^2, x1^-3]) Ideal (x0^2, x1^-3) of Multivariate Laurent Polynomial Ring in x0, x1 over Finite Field of size 3 sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([~x + ~y - 1]) sage: print(I) Ideal (-1 + y^-1 + x^-1) of Multivariate Laurent Polynomial Ring in x, y over Rational Field sage: I.is_zero() False sage: (x^(-2) + x^(-1)*y^(-1) - x^(-1)) in I True sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I1 = P.ideal([x*y*z + x*y + 2*y^2, x + z]) sage: I2 = P.ideal([x*y*z + x*y + 2*y^2 + x + z, x + z]) sage: I1 == I2 True sage: I3 = P.ideal([x*y*z + x*y + 2*y^2 + x + z, x + z, y]) sage: I1 < I3 True sage: I1.minimal_associated_primes() (Ideal (-1/2*z^2 + y - 1/2*z, x + z) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field,) sage: K.<z> = CyclotomicField(4) # needs sage.rings.number_field sage: J = I1.base_extend(K) # needs sage.rings.number_field sage: J.base_ring() # needs sage.rings.number_field Cyclotomic Field of order 4 and degree 2
- apply_coeff_map(f, new_base_ring=None, forward_hint=True)[source]¶
Apply a function to coefficients.
This operation forwards hints by default.
EXAMPLES:
sage: # needs sage.rings.number_field sage: K.<z> = CyclotomicField(3) sage: P.<x,y> = LaurentPolynomialRing(K, 2) sage: I = P.ideal([x + z, y - z]) sage: h = K.hom([z^2]) sage: I.apply_coeff_map(h) Ideal (x - z - 1, y + z + 1) of Multivariate Laurent Polynomial Ring in x, y over Cyclotomic Field of order 3 and degree 2 sage: K1.<z1> = CyclotomicField(12) sage: h1 = K.hom([z1^4]) sage: I.apply_coeff_map(h1, new_base_ring=K1) Ideal (x + z1^2 - 1, y - z1^2 + 1) of Multivariate Laurent Polynomial Ring in x, y over Cyclotomic Field of order 12 and degree 4
- apply_map(f, new_ring=None, new_base_ring=None, apply_to_hint=None)[source]¶
Return the new ideal obtained by applying
fto each generator.By default, this does not forward hints. To do so, set
apply_to_hintto specify a function to apply to generators ofhint.EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x + 1, y - 1]) sage: I.apply_map(lambda z: z + 2) Ideal (x + 3, y + 1) of Multivariate Laurent Polynomial Ring in x, y over Rational Field sage: K.<i> = CyclotomicField(4) # needs sage.rings.number_field sage: I.apply_map(lambda z: z + 2, new_base_ring=K) # needs sage.rings.number_field Ideal (x + 3, y + 1) of Multivariate Laurent Polynomial Ring in x, y over Cyclotomic Field of order 4 and degree 2
- associated_primes()[source]¶
Return associated primes of this ideal.
These are computed from the polynomial ideal, but it is not necessary to saturate. Instead, we omit primes containing any polynomial generator.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: p = z^2 + 1; q = z^3 + 2 sage: I = P.ideal((p*q^2, y - z^2)) sage: tuple(sorted(I.associated_primes(), key=str)) (Ideal (y + 1, z^2 + 1) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field, Ideal (z^2 - y, y*z + 2, y^2 + 2*z) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field)
- base_extend(F)[source]¶
Form the base extension of
selfto the base ringF.This operation forwards hints.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x + y]) sage: K.<z> = CyclotomicField(3) # needs sage.rings.number_field sage: I.base_extend(K) # needs sage.rings.number_field Ideal (x + y) of Multivariate Laurent Polynomial Ring in x, y over Cyclotomic Field of order 3 and degree 2
- change_ring(R, hint=None)[source]¶
Coerce an ideal into a new ring.
This operation does not forward hints, but a new hint can be specified manually.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x + y]) sage: Q.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I.change_ring(Q) Ideal (x + y) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field
- dimension()[source]¶
Return the dimension of this ideal.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal(((x+1)^2, (y+1)^3, ((x+1)*z)^4 + (y+1)^3 + 10*(x+1)^2)) sage: I.dimension() 1
- gens_reduced()[source]¶
Return a reduced system of generators.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ) sage: J = P.ideal([x^2 - y^-2, x * y^3 + 2 * y^2+ y]) sage: J.gens_reduced() (x + 6*y + 5, 3*y^2 + 4*y + 1)
- groebner_basis(saturate=True)[source]¶
Return the reduced Groebner basis for the specified term order.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x + y]) sage: J = P.ideal([y + 1]) sage: (I + J).groebner_basis() (x - 1, y + 1)
- hint()[source]¶
Return the hint of this ideal.
The hint is an ideal of the associated polynomial ring, which is assumed to be contained in the associated ideal. It is used internally to speed up computation of the associated ideal in some cases; normally the end user will have no need to work with it directly.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal([x^2*y + 3*x*y^2]) sage: I.hint() Ideal (0) of Multivariate Polynomial Ring in x, y, z over Rational Field
- is_binomial(groebner_basis=False)[source]¶
Determine whether every generator of
selfis a binomial.If
groebner_basisisTrue, this becomes intrinsic (for a choice of term order).EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x + y]) sage: I.is_binomial() True
- is_one()[source]¶
Determine whether or not
selfis the unit ideal.This requires saturation of the polynomial ideal.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([~x + ~y - 1, x + y]) sage: I.is_one() True
- minimal_associated_primes(saturate=False)[source]¶
Return minimal associated primes of this ideal.
These are computed from the polynomial ideal, but it is not necessary to saturate. Instead, we omit primes containing any polynomial generator.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: p = z^2 + 1; q = z^3 + 2 sage: I = P.ideal((p*q^2, y - z^2)) sage: tuple(sorted(I.minimal_associated_primes(), key=str)) (Ideal (z^2 + 1, -z^2 + y) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field, Ideal (z^3 + 2, -z^2 + y) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field)
- normalize_gens()[source]¶
Redefine the ideal with a normalized set of generators.
For two ideals returned by this function, equality testing can be done by comparing generators.
This operation forwards hints.
EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([~x+y]) sage: J = P.ideal([y+1]) sage: I + J Ideal (y + x^-1, y + 1) of Multivariate Laurent Polynomial Ring in x, y over Rational Field sage: (I + J).normalize_gens() Ideal (x - 1, y + 1) of Multivariate Laurent Polynomial Ring in x, y over Rational Field
- polynomial_ideal(saturate=True)[source]¶
Return the associated polynomial ideal.
By default, the ideal is saturated with respect to the product of the polynomial ring generators; this is necessary for testing equality and inclusion. As saturation can be quite time-consuming, it can be disabled by setting
saturate=False; however, the result will then depend not just on the original ideal but also on the choice of generators.EXAMPLES:
sage: P.<x,y> = LaurentPolynomialRing(QQ, 2) sage: I = P.ideal([x^2*y + 3*x*y^2]) sage: I.polynomial_ideal() Ideal (x + 3*y) of Multivariate Polynomial Ring in x, y over Rational Field sage: P.<t> = LaurentPolynomialRing(QQ) sage: J = P.ideal(t^2 - t^-1) sage: J.polynomial_ideal() Principal ideal (t^3 - 1) of Univariate Polynomial Ring in t over Rational Field sage: J = P.ideal([t^2 - t^-1, t + t^-1]) sage: J.polynomial_ideal() Principal ideal (1) of Univariate Polynomial Ring in t over Rational Field sage: J = P.ideal([t^2 - t^-1, t - t^-1]) sage: J.polynomial_ideal() Principal ideal (t - 1) of Univariate Polynomial Ring in t over Rational Field
- radical()[source]¶
Return the radical of this ideal.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal(((x+1)^2, (y+1)^3, ((x+1)*z)^4 + (y+1)^3 + 10*(x+1)^2)) sage: I.radical() Ideal (y + 1, x + 1) of Multivariate Laurent Polynomial Ring in x, y, z over Rational Field
- set_hint(hint)[source]¶
Set the hint of this ideal.
The hint is an ideal of the associated polynomial ring, which is assumed to be contained in the associated ideal. It is used internally to speed up computation of the associated ideal in some cases; normally the end user will have no need to work with it directly.
EXAMPLES:
sage: P.<x,y,z> = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal([x^2*y + 3*x*y^2]) sage: I.hint() Ideal (0) of Multivariate Polynomial Ring in x, y, z over Rational Field sage: I.set_hint(P.polynomial_ring().ideal([x + 3*y])) sage: I.hint() Ideal (x + 3*y) of Multivariate Polynomial Ring in x, y, z over Rational Field
- toric_coordinate_change(M, forward_hint=True)[source]¶
Compute the toric change of coordinates defined by the integer matrix
M.This operation forwards hints by default.
EXAMPLES:
sage: # needs sage.rings.number_field sage: K.<z> = CyclotomicField(3) sage: P.<x,y> = LaurentPolynomialRing(K, 2) sage: I = P.ideal([x + 1, y - 1]) sage: M = Matrix([[2,1], [1,-3]]) sage: I.toric_coordinate_change(M) Ideal (x^2*y + 1, -1 + x*y^-3) of Multivariate Laurent Polynomial Ring in x, y over Cyclotomic Field of order 3 and degree 2