# groebner_basis() algorithm

How to define the default algorithm in the function groebner_basis()?

I only found "If only a system is given - e.g. ‘magma’ - the default algorithm is chosen for that system."

groebner_basis() algorithm

How to define the default algorithm in the function groebner_basis()?

I only found "If only a system is given - e.g. ‘magma’ - the default algorithm is chosen for that system."

add a comment

2

The method `groebner_basis`

for ideals in polynomial rings is documented at
http://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/multi_polynomial_ideal.html#sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal.groebner_basis.

This documentation can also be accessed by creating an ideal in a polynomial ring

```
sage: x, y = QQ['x, y'].gens()
sage: J = ideal(x^5 + y^4 - 1, x^3 + y^3 - 1)
```

and typing

```
sage: J.groebner_basis?
```

The method `groebner_basis`

takes an optional `algorithm`

argument.

Choices for this argument are

- ‘singular:groebner’
- ‘singular:std’
- ‘singular:stdhilb’
- ‘singular:stdfglm’
- ‘singular:slimgb’
- ‘libsingular:groebner’
- ‘libsingular:std’
- ‘libsingular:slimgb’
- ‘libsingular:stdhilb’
- ‘libsingular:stdfglm’
- ‘toy:buchberger’
- ‘toy:buchberger2’
- ‘toy:d_basis’
- ‘macaulay2:gb’
- ‘magma:GroebnerBasis’
- ‘ginv:TQ’
- ‘ginv:TQBlockHigh’
- ‘ginv:TQBlockLow’
- ‘ginv:TQDegree’
- ‘giac:gbasis’

In other words, the algorithm is described by a string of the form `'<system>:<command>'`

where
`<system>`

can be one of `singular`

, `libsingular`

, `toy`

, `macaulay2`

, `magma`

,
`ginv`

, `giac`

and each system has one or more possible `<command>`

values.

The documentation says that "If only a system is given - e.g. ‘magma’ - the default algorithm is chosen for that system."

This means that

`algorithm='magma'`

will work as`algorithm='magma:GroebnerBasis'`

`algorithm='singular'`

will work as`algorithm='singular:groebner'`

`algorithm='libsingular'`

will work as`algorithm='libsingular:groebner'`

`algorithm='macaulay2'`

will work as`algorithm='macaulay2:gb'`

`algorithm='toy'`

will work as`algorithm='toy:buchberger2'`

`algorithm='giac'`

will work as`algorithm='giac:gbasis'`

One way to figure out which is the default algorithm for each system is to read the code
for the method `groebner_basis`

, which you can access by typing

```
sage: J.groebner_basis??
```

Asked: **
2016-10-30 23:36:46 -0500
**

Seen: **122 times**

Last updated: **Nov 04 '16**

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.