On the Decidability of Termination for Polynomial Loops (original) (raw)

We consider the termination problem for triangular weakly non-linear loops (twn-loops) over a ring mathbbZleqmathcalSleqmathbbR\mathbb{Z} \leq \mathcal{S} \leq \mathbb{R}mathbbZleqmathcalSleqmathbbR. The body of such a loop consists of a single assignment (x1,ldots,xd)leftarrow(c1cdotx1+p1,...,cdcdotxd+pd)(x_1, \ldots, x_d) \leftarrow (c_1 \cdot x_1 + p_1, ..., c_d \cdot x_d + p_d)(x1,ldots,xd)leftarrow(c1cdotx1+p1,...,cdcdotxd+pd) where each xix_ixi is a variable, ciinmathcalSc_i \in \mathcal{S}ciinmathcalS, and each pip_ipi is a (possibly non-linear) polynomial over mathcalS\mathcal{S}mathcalS and the variables xi+1,ldots,xdx_{i+1}, \ldots, x_dxi+1,ldots,xd. We present a reduction from the question of termination to the existential fragment of the first-order theory of mathcalS\mathcal{S}mathcalS and mathbbR\mathbb{R}mathbbR ($\mathrm{Th}_\exists(\mathcal{S},\mathbb{R})$). For loops over mathbbR\mathbb{R}mathbbR, our reduction entails decidability of termination. For loops over mathbbZ\mathbb{Z}mathbbZ or mathbbQ\mathbb{Q}mathbbQ, it proves semi-decidability of non-termination. Furthermore, we show how to transform loops where the right-hand side of the assignment in the loop body consists of arbitrary polynomials into twn-loops. Then the original loop te...