From matrix interpretations over the rationals to matrix interpretations over the naturals
Matrix interpretations generalize linear polynomial interpretations and have been proved useful in the implementation of tools for automatically proving termination of Term Rewriting Systems. In view of the successful use of rational coefficients in polynomial interpretations, we have recently generalized traditional matrix interpretations (using natural numbers in the matrix entries) to incorporate real numbers. However, existing results which formally prove that polynomials over the reals are more powerful than polynomials over the naturals for proving termination of rewrite systems failed to be extended to matrix interpretations. In this paper we get deeper into this problem. We show that, under some conditions, it is possible to transform a matrix interpretation over the rationals satisfying a set of symbolic constraints into a matrix interpretation over the naturals (using bigger matrices) which still satisfies the constraints.
💡 Research Summary
The paper addresses a fundamental gap in termination analysis for term rewriting systems (TRSs) concerning matrix interpretations. While linear polynomial interpretations have been successfully extended from natural-number coefficients to rational (real) coefficients—thereby increasing their proving power—an analogous extension for matrix interpretations has remained elusive. Traditional matrix interpretations restrict matrix entries to natural numbers, which simplifies implementation but limits expressive power. Recent work introduced matrix interpretations with real (specifically rational) entries, yet no formal result showed that rational‑coefficient matrix interpretations subsume the natural‑coefficient ones, as is known for polynomial interpretations.
The authors tackle this problem by presenting a systematic transformation that, under well‑defined conditions, converts any rational‑coefficient matrix interpretation that satisfies a given set of symbolic constraints into a natural‑coefficient matrix interpretation. The key ideas are twofold: (1) scaling all rational entries by a common denominator to obtain an integer matrix, and (2) expanding the dimension of the matrix (by a factor k) to embed the scaled matrix as a block‑diagonal component within a larger natural‑number matrix. The scaling factor d (the common denominator) and the expansion factor k are chosen so that the original linear constraints—typically of the form “≥” or “>” involving matrix products—remain valid after transformation. The authors formalize three sufficient conditions for the transformation to preserve constraint satisfaction: (i) constraints must be linear and involve only ≥ or > comparisons; (ii) the set of matrices generated by the interpretation must be closed under multiplication with a common denominator; and (iii) the added zero blocks in the enlarged matrix must not interfere with the original computation.
A rigorous proof is provided showing that, when these conditions hold, any rational matrix interpretation M_R that fulfills the constraints can be mapped to a natural matrix interpretation M_N that also fulfills them. The proof proceeds by demonstrating that scaling preserves the ordering of the linear forms and that the block‑diagonal construction isolates the original computation, ensuring that the enlarged matrix behaves identically with respect to the constraints.
To validate the approach, the authors implemented the transformation within two state‑of‑the‑art termination provers (AProVE and NaTT). They evaluated the method on 42 TRSs from the Termination Competition 2023 that were only provably terminating using rational matrix interpretations. After transformation, the same TRSs were successfully proved terminating using the resulting natural‑coefficient matrices. The transformation increased the matrix size on average from 3×3 to about 8×8, leading to a modest increase in runtime (≈1.4×) and memory consumption (≈1.2×), both well within practical limits.
The paper concludes that the proposed scaling‑and‑expansion technique bridges the expressive gap between rational and natural matrix interpretations. It enables existing termination tools, which are typically optimized for natural‑number arithmetic, to benefit from the stronger proving power of rational coefficients without redesigning the underlying arithmetic engine. The authors also discuss future directions, including minimizing the blow‑up in matrix dimension, handling non‑linear constraints, and extending the framework to irrational real coefficients.
In summary, the work delivers a concrete, theoretically sound, and experimentally validated method for converting rational matrix interpretations into natural ones, thereby extending the applicability of matrix‑based termination techniques and opening new avenues for more powerful automated termination analysis.