groebner
Computes a Gröbner basis for a polynomial system.
The public function accepts a collection of polynomial expressions and returns the resulting basis as a Vector. The default public basis uses lexicographic ordering, and the JavaScript / TypeScript API can also receive an explicit variable order.
A Gröbner basis can expose elimination structure or rewrite a polynomial system into an equivalent form that is easier to analyze.
Examples
These examples use Nerdamer Notation.
Rewrite a circle-line system into a triangular form.
groebner([x^2+y^2-1,y-x]) // → [x-y, -1+2*y^2]
Compute the Cyclic-3 basis.
groebner([x+y+z,x*y+x*z+y*z,x*y*z-1]) // → [x+y+z, y^2+y*z+z^2, -1+z^3]
Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
groebner(arg1, [arg2])
nerdamer.groebner
Call the operation through the default nerdamer import.
nerdamer.groebner(expressionArray: ExpressionInput[], vars?: string[]): Vector
Parameters
| Name | Type | Description |
|---|---|---|
expressionArray | ExpressionInput[] | Polynomial-like generators of the ideal. |
vars | string[] | Variable order, from highest to lowest lexicographic priority. |
Returns
Vector — A new vector containing expression representations of the basis.
Direct JavaScript / TypeScript API
Import the operation directly from its package entry point.
import { groebner } from 'nerdamer/algebra';
groebner(expressionArray: ExpressionInput[], vars?: string[]): Vector
Parameters
| Name | Type | Description |
|---|---|---|
expressionArray | ExpressionInput[] | Polynomial-like generators of the ideal. |
vars | string[] | Variable order, from highest to lowest lexicographic priority. |
Returns
Vector — A new vector containing expression representations of the basis.
