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_basis — Function
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.
Symbolics.polynomial_coeffs — Function
polynomial_coeffs(expr, vars)
Find coefficients of a polynomial in vars.
Returns a tuple of two elements:
- A dictionary of coefficients keyed by monomials in
vars - A residual expression which is the constant term
(Same as semipolynomial_form(expr, vars, Inf))
Symbolics.semilinear_form — Function
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.
Symbolics.semipolynomial_form — Function
semipolynomial_form(
expr,
vars,
degree::Real;
consts
) -> Tuple{Any, Any}
Returns a tuple of two objects:
- A dictionary of coefficients keyed by monomials in
varsupto the givendegree, - 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.
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.
Symbolics.semiquadratic_form — Function
semiquadratic_form(
exprs,
vars
) -> Tuple{SparseArrays.SparseMatrixCSC{Num, Int64}, SparseArrays.SparseMatrixCSC{Num, Int64}, Any, Any}
Returns a tuple of 4 objects:
- a matrix
Aof dimensions (m x n) - a matrix
Bof dimensions (m x (n+1)*n/2) - a vector
v2of length (n+1)*n/2 containing monomials ofvarsupto degree 2 and zero where they are not required. - a residual vector
cof 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.