Solvers
Several types of solvers are available in the packages. They differ in the way the truncated normal form is computed.
Solvers using resultant constructions
AlgebraicSolvers.solve_macaulay
— FunctionXi = solve_macaulay(P, rho ; verbose = false)
P
polynomial systemrho
(optional) degree of regularity for the Sylvester matrix construction (optional)
Solve the system P=[p1, ..., pn], building Sylvester matrix of all monomial multiples mi*pi in degree ≤ ρ.
The default value for ρ is ∑ deg(pi) - n + 1.
Example
using AlgebraicSolvers, DynamicPolynomials
X = @polyvar x y
P = [2-x*y+x^2,y^2+x-2]
Xi = solve_macaulay(P)
AlgebraicSolvers.solve_toric
— Functionsolve_toric(P; verbose = false)
P
polynomial systemX
array of variables
Solve the system P=[p1, ..., pn]
, building Sylvester matrix of all monomial multiples mi*pi for mi in supp(∏_{j != i} pj).
Example
using AlgebraicSolvers, DynamicPolynomials
X = @polyvar x y
P = [y - x*y + x^2, 1 + y + x + x^2]
Xi = solve_toric(P)
Solvers using Groebner basis computation
AlgebraicSolvers.solve_groebner
— FunctionXi, G, B = solve_groebner(P::Vector; verbose = false)
Solve the system of polynomials P
. It outputs:
Xi
the complex solution points, one per column ofXi
G
the computed Groebner basisB
the basis of the quotient by the ideal of the equations
Example:
using AbstractAlgebra
R, (x,y) = QQ["x","y"]
P = [x^2-y, x^2*y-4]
Xi, G, B = solve_groebner(P)
Truncated Normal Forms
AlgebraicSolvers.tnf_macaulay
— FunctionN, L = tnf_macaulay(P, rho)
Compute the Truncated Normal Form of P=[p1, ..., pn], using Macaulay matrix of all monomial multiples mi*pi in degree ≤ ρ.
The default value for ρ is ∑ deg(pi) - n + 1.
AlgebraicSolvers.tnf_toric
— FunctionN, L = tnf_toric(P, A = support.(P))
Compute the Truncated Normal Form of P=[p1, ..., pn], using toric resultant matrix of all monomial multiples mi*pi in degree ≤ ρ.
The default value for ρ is ∑ deg(pi) - n + 1.
Linear algebra in the quotient
AlgebraicSolvers.matrix_mult
— FunctionM = matrix_mult(p, g::AbstractVector, Idx::Dict)
Compute the matrix of multication by p
modulo g
in the basis associated to the basis dictionary Idx
. It is assumed that g
is a Groebner basis and that the quotient is finite dimensional.
M = matrix_mult(p, G::AbstractVector, B::AbstractVector)
Compute the matrix of multication by p
modulo G
in the basis B
. It is assumed that G
is a Groebner basis and that the quotient is finite dimensional.
AlgebraicSolvers.quotient_basis
— FunctionB, Idx = quotient_basis(g::AbstractVector)
Compute the monomial basis of the quotient by g
, as the complementary of the initial ideal of g
, assuming that g
is a Groebner basis and it is finite. It outputs:
B
the basis of monomlials in increasing monomial order.Idx
the dictionary associting to a monomial its index in the basis.