arXiv:2609.31146cs.LOSep 2026

Manuscript Offprint

arXiv:2609.31146

The existence of polyhedral invariants is undecidable for linear systems

David Monniaux

Abstract

The existence of polyhedral inductive invariants suitable for proving that a given control location is unreachable is undecidable for programs using only linear arithmetic over Z or Q, by reduction from 2-counter machines.

1 Introduction

Static analysis by abstract interpretation [Cousot and Cousot, 1977, Cousot, 1978] seeks to automatically infer program invariants within a fixed abstract domain. These invariants may prove that a safety property is verified or, equivalently, that some bad states are unreachable. An invariant is a property that holds at every program step, and an inductive invariant is one where this can be shown by induction on the number of program steps: it holds initially and is preserved by every transition. Most often, and as is the case here, the invariant is decomposed into a family of invariants per control location in the program. An invariant is suitable for proving that a control location is unreachable if it is empty at this location.

A classical example is interval analysis: for all variables in the program at all locations, infer intervals of variation in which the variables are guaranteed to lie. If the abstract domain is finite, or more generally if it has no infinite ascending chains, then the usual approach is to compute the strongest inductive invariant in the abstract domain as the stationary limit of ascending Kleene iterations. However, the domain of intervals, and more generally many domains for numerical abstractions, has infinite ascending chains. Many heuristics have been suggested to solve static analysis problems in such circumstances: widening operators, narrowing iterations, thresholds extracted from the syntax of the program, guided iterations and so on. None of these guarantees finding the strongest inductive invariant in the domain. These approaches are heuristic: they may fail to find an inductive invariant suitable for proving the desired safety property even if one exists in the abstract domain.

For certain abstract domains, certain safety properties and certain classes of instructions in the program, the existence of suitable inductive invariants is known to be decidable. Consider the case where the domain is defined by a polynomial template (a formula built from conjunction, disjunction, and polynomial equalities and inequalities over program variables and some parameters), the safety condition is defined using polynomials, the program consists only of polynomial conditions and nondeterministic assignments, and the program uses variables in R\mathbb{R}—interval analysis is the case where the template consists of inequalities lx≤x≤uxl_x \leq x \leq u_x for every variable xx. Then, the inductiveness condition and the safety property can be expressed as a constraint on the parameters of the template in the theory of real closed fields, which is decidable by quantifier elimination. Similarly, if everything is affine linear, if the parameters occur linearly in the template, and the program uses variables in Q\mathbb{Q}, this boils down to the theory of linear real arithmetic, and if over Z\mathbb{Z}, to Presburger arithmetic (also known as linear integer arithmetic), which are likewise decidable. 1^1 This includes in particular template polyhedra (fixed AA, parameters bb, system of inequalities Ax≤bAx \leq b), including octagons (systems of ±x≤b\pm x \leq b, ±x±y≤b\pm x \pm y \leq b) and intervals.

The domain of convex polyhedra [Cousot and Halbwachs, 1978, Halbwachs, 1979] is of particular interest. A convex polyhedron is defined by a finite system of affine linear inequalities and equalities or, equivalently, a finite system of generators (vertices and, if unbounded, rays and lines) [Schrijver, 1998]. Note that, contrary to templates, we do not bound in advance the number of inequalities. There exist several libraries (NewPolka / Apron, PPL, VPL...) implementing this domain for static analysis, including several variants of widening operators. Again, these approaches are heuristic, and fragile—for instance, the analysis may succeed in proving properties on a program, but just adding some observer computation to that program (a computation that does not feed back into the program and does not influence the safety property) may cause the analysis to fail [Monniaux and Le Guen, 2012]. The question whether these heuristics are actually necessary because of undecidability was thus raised [Monniaux, 2019].

It is known that, for a system of transitions defined using linear integer or rational arithmetic plus a quadratic guard, the existence of polyhedral inductive invariants suitable for proving the unreachability of a location is undecidable [Monniaux, 2019]. Fijalkow et al. [2025] proved undecidability for unguarded affine linear programs with semilinear sets as inductive invariants, and decidability for closed semilinear invariants and simple affine loops; the original problem over polyhedra has so far remained open.

In this paper, we show that the existence of polyhedral invariants is undecidable for programs with integer or rational variables and linear arithmetic only. We assume general knowledge of results on convex polyhedra, and refer the reader to, e.g., Schrijver [1998].