macaulay2

Interface to macaulay2.

sage_acsv.backends.macaulay2.compute_groebner_basis(ideal)[source]

Return a Groebner basis of an ideal, computed via Macaulay2.

INPUT:

  • ideal - A polynomial ideal

EXAMPLES:

sage: # optional -- macaulay2
sage: from sage_acsv.backends.macaulay2 import *
sage: R = PolynomialRing(QQ, 'x,y')
sage: x,y = R.gens()
sage: id = R.ideal([y*y-x,x-4])
sage: compute_groebner_basis(id)
[x - 4, y^2 - 4]
sage_acsv.backends.macaulay2.compute_primary_decomposition(ideal)[source]

Return the primary decomposition of an ideal, computed via Macaulay2.

INPUT:

  • ideal - A polynomial ideal

EXAMPLES:

sage: # optional -- macaulay2
sage: from sage_acsv.backends.macaulay2 import *
sage: R = PolynomialRing(QQ, 'x,y')
sage: x,y = R.gens()
sage: id = R.ideal([y*x*(x-y)])
sage: list(compute_primary_decomposition(id))
[Ideal (y) of Multivariate Polynomial Ring in x, y over Rational Field,
 Ideal (x) of Multivariate Polynomial Ring in x, y over Rational Field,
 Ideal (x - y) of Multivariate Polynomial Ring in x, y over Rational Field]
sage_acsv.backends.macaulay2.compute_radical(ideal)[source]

Return the radical of an ideal, computed via Macaulay2.

INPUT:

  • ideal - A polynomial ideal

EXAMPLES:

sage: # optional -- macaulay2
sage: from sage_acsv.backends.macaulay2 import *
sage: R = PolynomialRing(QQ, 'x,y')
sage: x,y = R.gens()
sage: id = R.ideal([y*y,(x-5)**2])
sage: compute_radical(id)
Ideal (y, x - 5) of Multivariate Polynomial Ring in x, y over Rational Field