Singular’s Groebner Strategy Objects#

AUTHORS:

  • Martin Albrecht (2009-07): initial implementation

  • Michael Brickenstein (2009-07): initial implementation

  • Hans Schoenemann (2009-07): initial implementation

class sage.libs.singular.groebner_strategy.GroebnerStrategy[source]#

Bases: SageObject

A Wrapper for Singular’s Groebner Strategy Object.

This object provides functions for normal form computations and other functions for Groebner basis computation.

ALGORITHM:

Uses Singular via libSINGULAR

ideal()[source]#

Return the ideal this strategy object is defined for.

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import GroebnerStrategy
sage: P.<x,y,z> = PolynomialRing(GF(32003))
sage: I = Ideal([x + z, y + z])
sage: strat = GroebnerStrategy(I)
sage: strat.ideal()
Ideal (x + z, y + z) of Multivariate Polynomial Ring in x, y, z over Finite Field of size 32003
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import GroebnerStrategy
>>> P = PolynomialRing(GF(Integer(32003)), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> I = Ideal([x + z, y + z])
>>> strat = GroebnerStrategy(I)
>>> strat.ideal()
Ideal (x + z, y + z) of Multivariate Polynomial Ring in x, y, z over Finite Field of size 32003
normal_form(p)[source]#

Compute the normal form of p with respect to the generators of this object.

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import GroebnerStrategy
sage: P.<x,y,z> = PolynomialRing(QQ)
sage: I = Ideal([x + z, y + z])
sage: strat = GroebnerStrategy(I)
sage: strat.normal_form(x*y) # indirect doctest
z^2
sage: strat.normal_form(x + 1)
-z + 1
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import GroebnerStrategy
>>> P = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> I = Ideal([x + z, y + z])
>>> strat = GroebnerStrategy(I)
>>> strat.normal_form(x*y) # indirect doctest
z^2
>>> strat.normal_form(x + Integer(1))
-z + 1
ring()[source]#

Return the ring this strategy object is defined over.

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import GroebnerStrategy
sage: P.<x,y,z> = PolynomialRing(GF(32003))
sage: I = Ideal([x + z, y + z])
sage: strat = GroebnerStrategy(I)
sage: strat.ring()
Multivariate Polynomial Ring in x, y, z over Finite Field of size 32003
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import GroebnerStrategy
>>> P = PolynomialRing(GF(Integer(32003)), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> I = Ideal([x + z, y + z])
>>> strat = GroebnerStrategy(I)
>>> strat.ring()
Multivariate Polynomial Ring in x, y, z over Finite Field of size 32003
class sage.libs.singular.groebner_strategy.NCGroebnerStrategy[source]#

Bases: SageObject

A Wrapper for Singular’s Groebner Strategy Object.

This object provides functions for normal form computations and other functions for Groebner basis computation.

ALGORITHM:

Uses Singular via libSINGULAR

ideal()[source]#

Return the ideal this strategy object is defined for.

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H.<x,y,z> = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: I = H.ideal([y^2, x^2, z^2-H.one()])
sage: strat = NCGroebnerStrategy(I)
sage: strat.ideal() == I
True
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
>>> A = FreeAlgebra(QQ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3)
>>> H = A.g_algebra({y*x:x*y-z, z*x:x*z+Integer(2)*x, z*y:y*z-Integer(2)*y}, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3)
>>> I = H.ideal([y**Integer(2), x**Integer(2), z**Integer(2)-H.one()])
>>> strat = NCGroebnerStrategy(I)
>>> strat.ideal() == I
True
normal_form(p)[source]#

Compute the normal form of p with respect to the generators of this object.

EXAMPLES:

sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H.<x,y,z> = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: JL = H.ideal([x^3, y^3, z^3 - 4*z])
sage: JT = H.ideal([x^3, y^3, z^3 - 4*z], side='twosided')
sage: from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
sage: SL = NCGroebnerStrategy(JL.std())
sage: ST = NCGroebnerStrategy(JT.std())
sage: SL.normal_form(x*y^2)
x*y^2
sage: ST.normal_form(x*y^2)
y*z
>>> from sage.all import *
>>> A = FreeAlgebra(QQ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3)
>>> H = A.g_algebra({y*x:x*y-z, z*x:x*z+Integer(2)*x, z*y:y*z-Integer(2)*y}, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3)
>>> JL = H.ideal([x**Integer(3), y**Integer(3), z**Integer(3) - Integer(4)*z])
>>> JT = H.ideal([x**Integer(3), y**Integer(3), z**Integer(3) - Integer(4)*z], side='twosided')
>>> from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
>>> SL = NCGroebnerStrategy(JL.std())
>>> ST = NCGroebnerStrategy(JT.std())
>>> SL.normal_form(x*y**Integer(2))
x*y^2
>>> ST.normal_form(x*y**Integer(2))
y*z
ring()[source]#

Return the ring this strategy object is defined over.

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H.<x,y,z> = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: I = H.ideal([y^2, x^2, z^2-H.one()])
sage: strat = NCGroebnerStrategy(I)
sage: strat.ring() is H
True
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
>>> A = FreeAlgebra(QQ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3)
>>> H = A.g_algebra({y*x:x*y-z, z*x:x*z+Integer(2)*x, z*y:y*z-Integer(2)*y}, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3)
>>> I = H.ideal([y**Integer(2), x**Integer(2), z**Integer(2)-H.one()])
>>> strat = NCGroebnerStrategy(I)
>>> strat.ring() is H
True
sage.libs.singular.groebner_strategy.unpickle_GroebnerStrategy0(I)[source]#

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import GroebnerStrategy
sage: P.<x,y,z> = PolynomialRing(GF(32003))
sage: I = Ideal([x + z, y + z])
sage: strat = GroebnerStrategy(I)
sage: loads(dumps(strat)) == strat # indirect doctest
True
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import GroebnerStrategy
>>> P = PolynomialRing(GF(Integer(32003)), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> I = Ideal([x + z, y + z])
>>> strat = GroebnerStrategy(I)
>>> loads(dumps(strat)) == strat # indirect doctest
True
sage.libs.singular.groebner_strategy.unpickle_NCGroebnerStrategy0(I)[source]#

EXAMPLES:

sage: from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H.<x,y,z> = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: I = H.ideal([y^2, x^2, z^2-H.one()])
sage: strat = NCGroebnerStrategy(I)
sage: loads(dumps(strat)) == strat   # indirect doctest
True
>>> from sage.all import *
>>> from sage.libs.singular.groebner_strategy import NCGroebnerStrategy
>>> A = FreeAlgebra(QQ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3)
>>> H = A.g_algebra({y*x:x*y-z, z*x:x*z+Integer(2)*x, z*y:y*z-Integer(2)*y}, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3)
>>> I = H.ideal([y**Integer(2), x**Integer(2), z**Integer(2)-H.one()])
>>> strat = NCGroebnerStrategy(I)
>>> loads(dumps(strat)) == strat   # indirect doctest
True