## `groebner::spoly` -- the S-polynomial of two polynomials

#### Introduction

`groebner::spoly``(p1, p2)` computes the S-polynomial of the polynomials `p1` and `p2`.

#### Call(s)

`groebner::spoly(p1, p2 <, order>)`

#### Parameters

`p1, p2` | - | polynomials of the same type or 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.

#### Returns

a polynomial of the same type as the input polynomials. If polynomial expressions are used as input, then a polynomial expression is returned.

#### 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 must be of the same type. In particular, do not mix polynomials created via `poly` and polynomial expressions!

#### Example 1

The polynomials

    >> p1 := poly(x^2 - x + 2*y^2, [x, y]):
       p2 := poly(x + 2*y - 1, [x, y]):

generate the following S-polynomial with respect to lexicographical ordering:

    >> groebner::spoly(p1, p2, LexOrder)

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

    >> delete p1, p2:

#### Background

- The S-polynomial of two polynomials p1,p2 is defined to be

        lcm(lterm(p[1]),lterm(p[2]))/lmonomial(p[1])*p[1]
             - lcm(lterm(p[1]),lterm(p[2]))/lmonomial(p[2])*p[2],

  where `lterm` and `lmonomial` are used in the same sense as the MuPAD functions of the same name. This formula is constructed such that the leading terms of the two summands cancel.

#### 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