These take ordinary expressions plus a variable name; the named variable
becomes the main polynomial variable and every other free variable rides
along symbolically in the coefficients. An expression that is not polynomial
in the variable (a transcendental call of it, a non-integer power of it)
makes the query decline — None for degree, an error for the others.
Degree in variable. None when the expression is not polynomial in
variableor is identically zero (the zero polynomial has no degree
under the core convention).
Greatest common divisor of the two expressions as polynomials in variable
(primitive, with the core's sign normalisation). Errors when either input is
not polynomial in variable.
One (lower, upper) rational isolating interval per distinct real root,
sorted ascending; a collapsed pair (r, r) marks an exact rational root.
Requires a non-zero univariate polynomial with rational coefficients.
Notes: WASM returns IsolatingInterval objects with lower/upper
getters.
These operate over the polynomial ring Q[variables]. Generators are passed
as an expression list; the ring variables are named by a string list; the
monomial order is named by a string ("lexicographic" / "lex",
"degree_lexicographic" / "deglex", or "degree_reverse_lexicographic" /
"degrevlex", the computational default). Any generator that is not a
polynomial over Q in the named variables — a transcendental call, a non-integer
power, an unnamed symbol, or an irrational coefficient — makes the operation
decline cleanly (Python None, WASM null); it never returns a wrong or
partial answer. Within Q[variables] the results are exact and complete: a
returned basis is the canonical reduced Gröbner basis, membership is a genuine
decision, and elimination is exact by the Elimination Theorem.
Performance. The basis is computed by F4 (Faugère's
batched Macaulay-matrix reduction), with a signature-based engine (F5 / GVW)
available internally; the reference Buchberger algorithm is retained as the
differential oracle these are checked against. The choice of engine is an
internal acceleration only: the result is identical to the reference
Buchberger basis for every input, and the monomial-order argument and the whole
binding surface are unchanged. These entry points simply run faster — there is
no new method to call.
The canonical reduced Gröbner basis of the ideal <generators> under the named
monomial order — monic, autoreduced, and sorted, so it is unique for the
(ideal, order) pair. None when any generator is outside Q[variables].
Whether element lies in the ideal <generators>, decided by reducing it to
its normal form modulo the Gröbner basis (zero exactly when it is a member).
The verdict is independent of the order. None when the element or a generator
is outside Q[variables].
A generating set of the ideal intersection I∩J, computed by the standard
tag-variable elimination construction tI+(1−t)J. None on a
non-Q[variables] generator.
A Gröbner basis of the elimination ideal ⟨generators⟩∩Q[surviving variables], projecting away the variables named in eliminate via the
Elimination Theorem (a block order ranks the eliminated variables high and the
generators free of them are kept). Exact: it neither drops nor introduces
components. None on a non-Q[variables] generator. Example: eliminating t
from {x−t2,y−t3} returns the twisted-cubic implicit equation y2−x3.
These consume a Gröbner basis rather than compute one from scratch. The order
change runs the standard FGLM algorithm; implicitisation is parameter
elimination with the rational-parametrisation saturation wired in.
Convert a Gröbner basis of a zero-dimensional ideal from source_order to
target_order by FGLM (Faugère–Gianni–Lazard–Mora) — linear algebra in the
finite-dimensional quotient ring Q[variables]/I, far cheaper than computing
the target basis directly (the msolve route to a lexicographic basis is a cheap
degrevlex basis followed by this conversion). The result is the canonical
reduced Gröbner basis under target_order, identical to a direct
groebner_basis call. None when the ideal is positive-dimensional (the
quotient ring is infinite-dimensional, so FGLM does not apply) or any generator
is outside Q[variables].
The implicit ideal of a parametric curve or surface xi=fi(parameters) (the
i-th coordinate paired with the i-th parametric expression), returned as a
generator list over Q[coordinates] — the elimination of the parameters
(Cox–Little–O'Shea ch. 3). A polynomial parametrisation eliminates the
parameters directly; a rational one fi=pi/qi clears denominators and
saturates by the denominator product through a fresh tag variable, so the
eliminant is the true implicit equation rather than a multiple carrying spurious
components. None when a parametric expression is outside Q(parameters) or
there are no parameters. Examples: {x=t2,y=t3} returns y2−x3;
{x=(1−t2)/(1+t2),y=2t/(1+t2)} returns x2+y2−1.
Polynomial structure is read through explicit generators.
Python
import symi
x = symi.symbol("x")
polynomial = x**3-2* x +1print(symi.degree(polynomial,"x"))print(symi.leading_coefficient(polynomial,"x"))print(symi.coefficient(polynomial,"x",1))print(symi.polynomial_gcd(x**2-1, x -1,"x"))print(symi.resultant(x**2-1, x -1,"x"))