Function reference · Algebra

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 · nerdamer API · Direct API

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

NameTypeDescription
expressionArrayExpressionInput[]Polynomial-like generators of the ideal.
varsstring[]Variable order, from highest to lowest lexicographic priority.

Returns

Vector — A new vector containing expression representations of the basis.

Browse the nerdamer API →

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

NameTypeDescription
expressionArrayExpressionInput[]Polynomial-like generators of the ideal.
varsstring[]Variable order, from highest to lowest lexicographic priority.

Returns

Vector — A new vector containing expression representations of the basis.

Browse nerdamer/algebra

← Back to Reference