Abstract
Let $\mathbb{Q}$ (resp. $\mathbb{R}$) be the field of rational (resp. real) numbers and $X = (X_1, \ldots, X_n)$ be variables. Deciding the non-negativity of polynomials in $\mathbb{Q}[X]$ over $\mathbb{R}^n$ or over semi-algebraic domains defined by polynomial constraints in $\mathbb{Q}[X]$ is a classical algorithmic problem for symbolic computation. The Maple package RealCertify tackles this decision problem by computing sum of squares certificates of non-negativity for inputs where such certificates hold over the rational numbers. It can be applied to numerous problems coming from engineering sciences, program verification and cyber-physical systems. It is based on hybrid symbolic-numeric algorithms based on semi-definite programming.
Introduction
In fields like control theory, program verification, and robotics, it is often necessary to prove that a mathematical function—specifically a polynomial—never drops below zero. This "non-negativity" problem is central to ensuring safety and stability in complex systems.
Historically, researchers have faced a trade-off between speed and rigor. Exact symbolic methods, such as Cylindrical Algebraic Decomposition (CAD), provide definitive answers but suffer from high computational complexity, making them impractical as the number of variables increases. Conversely, numerical methods using Semi-Definite Programming (SDP) can find Sum of Squares (SOS) decompositions quickly, but their reliance on floating-point arithmetic means they lack the formal rigor required for mathematical "proofs." RealCertify bridges this gap by producing exact rational certificates—rigorous proofs using precise fractions—while maintaining the performance benefits of numerical solvers.
Methodology: Hybrid Symbolic-Numeric Approach
RealCertify implements a hybrid workflow, primarily through its multivsos algorithm for multivariate polynomials. The process involves several key steps:
- Newton Polytopes: The tool analyzes the geometry of the polynomial's exponents to identify the specific monomials required for the SOS decomposition, significantly pruning the search space.
- Perturbation: By subtracting a small, controlled amount from the polynomial, the problem is pushed into the "interior" of the SOS cone. This makes the problem numerically more stable for solvers.
- Numerical SDP Solving: External solvers (e.g., SDPA or SDPA-GMP) are used to find an approximate SOS decomposition.
- Symbolic Recovery: This critical step "rounds" the numerical result into an exact rational identity. If the initial numerical precision is sufficient, this yields a rigorous identity $f = \sum c_i s_i^2$ where $c_i$ and $s_i$ have rational coefficients.
For univariate polynomials, the package provides specialized algorithms (univsos1 and univsos2) that utilize root isolation to recursively decompose the polynomial into squared components.
Experimental Evaluation and Results
The performance of RealCertify was evaluated against standard benchmarks from the polynomial optimization community, including both unconstrained and constrained problems.
Unconstrained Problems
On unconstrained benchmarks ranging from degree 12 to 20 and up to 10 variables, RealCertify demonstrated superior scaling compared to traditional CAD-based methods. For instance, for the 10-variable polynomial $r_{10}$, RealCertify generated a certificate in just 2.45 seconds, whereas CAD-based tools often failed to complete the task within a reasonable timeframe.
Constrained Problems
In constrained cases, such as the "heart" or "butcher" benchmarks, RealCertify often outperformed RAGLib. For the "heart" polynomial, RealCertify achieved a result in 2.94 seconds. The package's ability to utilize both double-precision and arbitrary-precision SDP solvers provides the flexibility needed to handle varying problem difficulties.
Discussion and Limitations
While RealCertify offers a significant advancement in certifying non-negativity, it has certain limitations. Not every non-negative polynomial can be represented as a Sum of Squares; in such cases, RealCertify will not find a certificate. Additionally, polynomials that lie on the very boundary of the SOS cone require extremely high numerical precision for successful symbolic recovery.
Despite these challenges, RealCertify serves as an efficient "fast pre-processor." By attempting to find a certificate quickly using hybrid methods, it allows users to reserve slower, exhaustive algebraic tools for the most difficult cases.
Summary updated