The SagbiHomotopy.jl package for solving polynomial systems
Overview
Abstract. We present the Julia package \(\texttt{SagbiHomotopy.jl}\) for solving systems of polynomial equations using numerical homotopy continuation. The package introduces a special choice of a starting system based on SAGBI homotopies. For square systems, where each equation is a linear combination of a given set of polynomials, SAGBI homotopies can significantly reduce the number of solution paths to track compared to polyhedral homotopies currently used by default in software for numerical homotopy continuation. We illustrate our framework with a variety of examples, including problems arising in chemistry and physics.
The Package is available as a Julia registered package (Source code)
To use the package type using Pkg; Pkg.add("SagbiHomotopy")
to install it for the first time and then using SagbiHomotopy
.
Example 4.4 (\(\texttt{VaryLinearPart = true}\))
We report the code for Example 4.4 of the paper. The file Example4.4.txt
contains the entries of the matrix \(A\) below:

using SagbiHomotopy
using HomotopyContinuation, LinearAlgebra, Combinatorics
(x, sagbi, w) = get_sagbi_grassmannian(3,6);
using DelimitedFiles
A = readdlm("matrix.txt")
F1 = A*z;
sagbi_homotopy(F1, sagbi; weight = w, varyLinearPart = false);
# 4 solutions with varyLinearPart = false
# 12 solutions with varyLinearPart = true
eqs = System(A*sagbi);
solve(eqs)
# 12 solutions
Applications
The following table report the computations performed for linear equations Grassmannians.

The Julia code used for creating Table 1 can be downloaded here SlicingGrassmannian.zip
. This folder contains the following Julia files:
\(\texttt{SlicingGrassmannian_sagbi.jl}\): solve linear equations on different Grassmannians using the main function
sagbi_homotopy
with a weight vector as input\(\texttt{SlicingGrassmannian_sagbidetection.jl}\): solve linear equations on different Grassmannians using the main function
sagbi_homotopy
without providing a weight vector and running the SAGBI detection algorithm\(\texttt{SlicingGrassmannian_solve.jl}\): solve linear equations on different Grassmannians using the standard function
HomotopyContinuation.solve
The folders Oscillators.zip
and CCEquations.zip
contain the same type of Julia files as for equations on the Grassmannians for Table 2 and Table 3:


The functionalties of the package are explained in the following Jupyter Notebook tutorial:
The Notebook can be downloaded here Tutorial_SagbiHomotopy.ipynb