The SagbiHomotopy.jl package for solving polynomial systems

This page contains auxiliary code, data and visualizations to the paper:
Barbara Betti and Viktoriia Borovik: 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:

../_images/MatrixA.png
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.

../_images/Table11.png

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:

../_images/Table21.png ../_images/Table3.png

The functionalties of the package are explained in the following Jupyter Notebook tutorial:

The Notebook can be downloaded here Tutorial_SagbiHomotopy.ipynb


Project page created: 10/06/2025
Project contributors: Barbara Betti and Viktoriia Borovik
Corresponding author of this page: Barbara Betti, betti@mis.mpg.de
Software used: Julia (Version 1.10.5), Oscar.jl (Version 1.2.2), HomotopyContinuation.jl (Version 2.13.0), SagbiHomotopy (Version 1.0.0)
License for code of this project page: MIT License (https://spdx.org/licenses/MIT.html)
License for all other content of this project page (text, images, …): CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Last updated 23/06/2025