Groebner bases

Groebner bases use the implementation of the F4 algorithm from Groebner.jl package as its backend. We refer to the documentation of Groebner.jl, which lists some implementations details and possible use-cases of Groebner bases.

Symbolics.is_groebner_basisFunction
groebner_basis(polynomials)

Checks whether the given polynomials forms a Groebner basis.

This function requires a Groebner bases backend (such as Groebner.jl) to be loaded.

source
Symbolics.polynomial_coeffsFunction
polynomial_coeffs(expr, vars)

Find coefficients of a polynomial in vars.

Returns a tuple of two elements:

  1. A dictionary of coefficients keyed by monomials in vars
  2. A residual expression which is the constant term

(Same as semipolynomial_form(expr, vars, Inf))

source
Symbolics.semilinear_formFunction
semilinear_form(
    exprs::AbstractArray,
    vars
) -> Tuple{SparseArrays.SparseMatrixCSC{Num, Int64}, Any}

Returns a tuple of a sparse matrix A, and a residual vector c such that, A * vars + c is the same as exprs.

source
Symbolics.semipolynomial_formFunction
semipolynomial_form(
    expr,
    vars,
    degree::Real;
    consts
) -> Tuple{Any, Any}

Returns a tuple of two objects:

  1. A dictionary of coefficients keyed by monomials in vars upto the given degree,
  2. A residual expression which has all terms not represented as a product of monomial and a coefficient

degree should be a nonnegative number.

If consts is set to true, then the returned dictionary will contain a key 1 and the corresponding value will be the constant term. If false, the constant term will be part of the residual.

source
semipolynomial_form(
    exprs::AbstractArray,
    vars,
    degree::Real;
    consts
) -> Tuple{Any, Any}

For every expression in exprs computes the semi-polynomial form and returns a tuple of two objects – a vector of coefficient dictionaries, and a vector of residual terms.

If consts is set to true, then the returned dictionary will contain a key 1 and the corresponding value will be the constant term. If false, the constant term will be part of the residual.

source
Symbolics.semiquadratic_formFunction
semiquadratic_form(
    exprs,
    vars
) -> Tuple{SparseArrays.SparseMatrixCSC{Num, Int64}, SparseArrays.SparseMatrixCSC{Num, Int64}, Any, Any}

Returns a tuple of 4 objects:

  1. a matrix A of dimensions (m x n)
  2. a matrix B of dimensions (m x (n+1)*n/2)
  3. a vector v2 of length (n+1)*n/2 containing monomials of vars upto degree 2 and zero where they are not required.
  4. a residual vector c of length m.

where n == length(exprs) and m == length(vars).

The result is arranged such that, A * vars + B * v2 + c is the same as exprs.

source