## `groebner::gbasis` -- computation of a reduced Gröbner basis

#### Introduction

`groebner::gbasis``(polys)` computes a reduced Gröbner basis of the ideal generated by the polynomials in the list `polys`.

#### Call(s)

`groebner::gbasis(polys <, order> <, Reorder>)`

#### Parameters

`polys` | - | a list of polynomials of the same type. Alternatively, a list of polynomial expressions with rational coefficients.
`order` | - | one of the identifiers DegInvLexOrder, DegreeOrder, and LexOrder, or a user-defined term ordering of type `Dom::MonomOrdering`. The default ordering is DegInvLexOrder.

#### Options

`Reorder` | - | With this option `groebner::gbasis` internally may change the lexicographical ordering of variables to decrease running time.

#### Returns

a list of polynomials. The output polynomials have the same type as the polynomials of the input list.

#### Related Functions

`poly`

#### Details

- The rules laid down in the introduction to the `groebner` package concerning the polynomial types and the ordering apply.
- The polynomials in the list `polys` must all be of the same type. In particular, do not mix polynomials created via `poly` and polynomial expressions!
- The ordering strategy indicated by Reorder is used automatically when polynomial expressions are used.

#### Option: Reorder

- With this option the variables are sorted internally such that they have a ``heuristic optimal'' ordering. Consequently, the ordering of the variables in the output polynomials may differ from their ordering in the input polynomials. For details on the ordering strategy, see W. Boege, R. Gebauer und H. Kredel: ``Some Examples for Solving Systems of Algebraic Equations by Calculating Groebner Bases'' im J. Symbolic Comp. (1986) Vol. 1, 83-98.
- Re-ordering is always applied when polynomial expressions are used for input.

#### Example 1

We demonstrate the effect of various input formats. First, we use polynomial expressions to define the polynomial ideal. The Gröbner basis is returned as a list of polynomial expressions:

    >> groebner::gbasis([x^2 - y^2, x^2 + y], LexOrder)

                                   4    2       2
                                 [x  - x , y + x ]

Next, the same polynomials are defined via `poly`. Note that `poly` fixes the ordering of the variables.

    >> groebner::gbasis([poly(x^2 - y^2, [x, y]),
                         poly(x^2 + y, [x, y])], LexOrder)

                          2                     2
                   [poly(x  + y, [x, y]), poly(y  + y, [x, y])]

Changing the ordering of the variables in `poly` changes the lexicographical ordering. This results in a different basis:

    >> groebner::gbasis([poly(x^2 - y^2, [y, x]),
                         poly(x^2 + y, [y, x])], LexOrder)

                              2                 4    2
                   [poly(y + x , [y, x]), poly(x  - x , [y, x])]

With Reorder the ordering of the variables may be changed internally:

    >> groebner::gbasis([poly(x^2 - y^2, [x, y]),
                         poly(x^2 + y, [x, y])], LexOrder, Reorder)

                              2                 4    2
                   [poly(y + x , [y, x]), poly(x  - x , [y, x])]

#### Background

- The basis is computed via the Buchberger algorithm with the ``shugar'' selection strategy being used. For general informations, see T. Becker and V. Weispfenning: ``Gröbner Bases'', Springer (1993). For details on the shugar selection strategy, see A. Giovini, T. Mora, G. Niesi, L. Robbiano, C. Traverso: ``One sugar cube, please -- or Selection strategies in the Buchberger algorithm'', Proc. ISSAC '91, Bonn, 49-54 (1991).

#### Changes

- Further term orderings from `Dom::MonomOrdering` are handled. The special term orderings from the Gröbner package were moved there.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000