On Robustness for the Skolem, Positivity and Ultimate Positivity Problems

The Skolem problem is a long-standing open problem in linear dynamical systems: can a linear recurrence sequence (LRS) ever reach 0 from a given initial configuration? Similarly, the positivity problem asks whether the LRS stays positive from an initial configuration. Deciding Skolem (or positivity) has been open for half a century: the best known decidability results are for LRS with special properties (e.g., low order recurrences). But these problems are easier for"uninitialized"variants, where the initial configuration is not fixed but can vary arbitrarily: checking if there is an initial configuration from which the LRS stays positive can be decided in polynomial time (Tiwari in 2004, Braverman in 2006). In this paper, we consider problems that lie between the initialized and uninitialized variants. More precisely, we ask if 0 (resp. negative numbers) can be avoided from every initial configuration in a neighborhood of a given initial configuration. This can be considered as a robust variant of the Skolem (resp. positivity) problem. We show that these problems lie at the frontier of decidability: if the neighbourhood is given as part of the input, then robust Skolem and robust positivity are Diophantine hard, i.e., solving either would entail major breakthroughs in Diophantine approximations, as happens for (non-robust) positivity. However, if one asks whether such a neighbourhood exists, then the problems turn out to be decidable with PSPACE complexity. Our techniques also allow us to tackle robustness for ultimate positivity, which asks whether there is a bound on the number of steps after which the LRS remains positive. There are two variants depending on whether we ask for a"uniform"bound on this number of steps. For the non-uniform variant, when the neighbourhood is open, the problem turns out to be tractable, even when the neighbourhood is given as input.


Introduction
A rational linear recurrence relation (LRR) of order κ is a relation u n+κ = κ−1 j=0 a j • u n+j defined by a tuple of coefficients (a 0 , . . ., a κ−1 ) ∈ Q κ , a 0 ̸ = 0. Given the initial configuration (u 0 , . . ., u κ−1 ), i.e. the first κ entries of the recurrence, which could be rationals or real algebraic numbers, there is a unique infinite sequence (u n ) n∈N that satisfies the relation.This is called a Linear Recurrence Sequence (LRS).The Skolem problem asks, given an LRS, i.e., a recurrence relation and an initial configuration, whether the sequence ever hits 0, i.e. does there exist n ∈ N with u n = 0.The positivity problem is a variant where the question asked is whether for all n ∈ N, u n ≥ 0. Another variant is the ultimate positivity problem which asks whether there exists an integer N 0 ∈ N, such that for all n ≥ N 0 , u n ≥ 0. All these problems have applications in software verification, probabilistic model checking, discrete dynamic systems, theoretical biology, economics.
While the statements seem innocuous, the decidability of all these problems remains open since their introduction in the 1930's.Only partial decidability results are known, e.g., when the dimension is less than 5 [Ver85].For a subclass of the so-called simple LRS, positivity is known to be decidable for order up to 9 [OW14a], while ultimate positivity is decidable for all orders for that class [OW14c].On the other hand, the authors of [OW14b] prove an important hardness result: solving positivity or ultimate positivity would entail major breakthroughs in Diophantine approximations.More precisely, one would be able to approximate the (Lagrange) type of many transcendental numbers, which deals with how close one can approximate the transcendental number using rational numbers having small denominators.
This hardness result contrasts with positive results obtained for relaxations of the problems: instead of considering a fixed initial configuration, [Tiw04,Bra06] consider every possible configuration as initial, i.e., they ask if there exists an initial configuration starting from which ensures that all entries of the sequence remain positive (this is sometimes called the uninitialised positivity problem).Surprisingly they show that this problem can be decided in PTIME.More recently, this result has been extended to processes with choices [AGV18].
In this article, we consider natural variants that lie between the hard question of fixed initial configuration [OW14b], and the easy question when the initial configuration is completely unconstrained [Tiw04,Bra06].Our goal is to undertake a comprehensive study of what happens when starting from a neighbourhood (ball) around the initial configuration.An immediate question that arises is whether the neighbourhood is part of the input or not and it turns out that this has a significant impact on decidability.Hence, we consider two sub-variants, first by fixing the neighbourhood and the second by asking if there exists a neighbourhood around the initial configuration (the existential variant).In both these cases, starting from any initial configuration in this neighbourhood we ask if shows some form of number theoretic hardness.The asterisks (*) denote that these results hold for LRS of a priori bounded order.
• all entries of the recurrence sequence remain positive.We call this the robust positivity problem.• all entries of the recurrence sequence remain away from zero.We call this the robust Skolem problem.• all the entries of the recurrence sequence eventually (i.e., after a certain number of steps) become and remain positive.We call this the robust ultimate positivity problem.In this last case, it also natural to consider a uniform variant, namely whether there is a uniform bound N 0 on the number of steps, such that all starting configuration within the neighbourhood are positive after N 0 .Our motivation to look at these problems stems from their role in capturing a powerful and natural notion of robustness, where the exact initial configuration cannot be fixed with arbitrarily high precision (which is often the case with real systems).
We start by observing that as we need to tackle multiple initial configurations, we reason about the set of initial configurations from which positivity holds, which is sufficient to answer robustness questions.For this, we revisit the usual algebraic equations in a more graphical manner, which forms the crux of our approach.This allows us to reinterpret and generalise the hardness result of [OW14a], giving our first main contribution: if the neighbourhood is given as a fixed ball with real algebraic centre, then both robust Skolem and robust positivity are Diophantine hard, while robust ultimate positivity is Lagrange hard (these notions are defined formally in Section 2) in all cases except in the non-uniform case when the given ball is open.In this last case, it turns out that the problem can be solved in PSPACE.Note in particular that the Diophantine hardness of robust Skolem is somewhat surprising, since it has recently been shown that the Skolem problem itself, at least in the case of simple LRS, can be solved assuming the Skolem conjecture and the p-adic Schanuel conjecture [BLN + 22], and hence is perhaps not expected to be Diophantine hard.
We then turn to the problems where the ball is not fixed, and ask if there exists a radius ψ > 0 such that 0 or negative numbers can be avoided from every initial configuration in the ψ ball around a given initial configuration.Our main contribution here is to show that the robust variants of the Skolem, positivity and ultimate positivity problems are all decidable in full generality, with PSPACE complexities.We summarise our results in Table 1, with the precise statements in Theorems 3.2, 3.3 in Section 3.

Related work.
As mentioned earlier, the Skolem problem and its variants have received a lot of attention.Given the hardness of these problems, ε-approximate solutions have been considered, e.g., in [BHM14,AAGT15] with different definitions of approximations.In comparison with our work, these are designed towards allowing approximate model checking.More recently, the notion of imprecision in Skolem and related problems was considered in [BFJ + 20, DKM + 21].In [BFJ + 20], the authors consider rounding functions at every step of the trajectory.In [DKM + 21], the so called Pseudo-Skolem problem is defined, where imprecisions up to ε are allowed at every step of the trajectory, which is shown to be decidable in PTIME.These are quite different from our notion of robustness, which faithfully considers the trajectories generated from a ball representing ε-perturbations around the initial configuration.In a very recent extension [DKM + 22] of [DKM + 21], it is shown that the existential robust Skolem question and a special case of the Pseudo-Skolem problem can be solved using o-minimality of the theory of reals with exponentiation.Lastly, [Neu21] considers the problem when specified in a model of computation that takes real numbers, as opposed to rational numbers, as input.In this setting, perturbations are permitted in both the initialisation and the recurrence itself.This approach sidesteps several of the number-theoretic challenges, and decides problems on Linear Recurrence Sequences on all inputs except a set of measure 0.
The novelty of this paper is three-fold: first, we provide the first comprehensive study of robustness focussed with respect to the initial configuration, covering several possible cases and variants; second, we provide and critically use geometric insight combined with the underlying number theory to prove our results; third, we show hardness results, in particular Diophantine hardness for a variant of the Skolem problem.This paper is an extended version of the work [ABGV22] that featured in the proceedings of STACS 2022.The additional content can be summarised as follows: (1) We formalise the distinction between the notions of uniform and non-uniform Robust Ultimate Positivity.(2) We prove decidability results for non-uniform Robust Ultimate Positivity.
(3) We leverage the underlying geometry to derive equivalences between robust Positivity, Uniform Ultimate Positivity and Skolem, in the cases of open and closed balls.(4) We prove Diophantine hardness of the robust problems at higher orders.
Structure of the paper.The structure of this paper is as follows: In Section 2 we define preliminaries, in particular the Skolem and (ultimate) positivity problem as well as known number-theoretic hardness results.In Section 3 we define the problem of our interest, namely robustness with respect to the initial configuration of Skolem as well as (ultimate) positivity and state all our main results.In Section 4 we provide a geometric interpretation of the behaviour of linear recurrences, which allows us to better understand and characterise the number-theoretic hardness results.In Section 5, we build upon the geometric insights to prove the hardness results claimed for robustness.In Section 6, we again use and generalise the geometric interpretation in Section 4 to prove our positive results stated in Section 3 both in terms of decidability and complexity upper bounds.Finally we end with a conclusion in Section 7.

Preliminaries
Let κ be any non-negative integer.We let Q, R denote the set of rationals and reals, respectively.Further, Q κ , R κ denote κ-dimensional vectors over rationals, reals, respectively.Let c, d be two vectors of R κ that can be seen as one dimensional matrices of R κ×1 .The distance between c, d is defined as ||c−d|| = (c − d) T (c − d), the standard ℓ 2 -distance.In this paper, we will consider two ways of "measuring" vectors: the first is the standard ℓ 2 -norm ||c|| for Euclidean length.The second is size(c), denoting the size of its bit representation i.e., number of bits needed to write down c (for complexity).We use the same notation for scalar constants with size(a) denoting the number of bits to represent an algebraic/rational constant a.An algebraic number α is a root of a polynomial p with integer coefficients.It can be represented [Mig82] by a 4-tuple (p, a, b, r) ∈ Z[X] × Q 3 as the only root of p at distance < r from a + ib (also see the Appendix).We define size(α) as the size of the bit representation of (p, a, b, r).
Given c ∈ R κ , an open (resp.closed) ball with centre c and radius ψ > 0, denoted B, refers to the set of all vectors c ′ ∈ R κ such that ||c ′ − c|| < ψ (resp.||c ′ − c|| ≤ ψ).For convenience we sometimes just say ball to mean an open or closed ball.
2.1.Linear Recurrence Sequences.We start by defining linear recurrence relations and sequences.
Definition 2.1.A linear recurrence relation, LRR for short, (u n ) n∈N of order κ is specified by a tuple of coefficients a = (a 0 , . . ., a κ−1 ) with a 0 ̸ = 0. Given an initial configuration c = (c 0 , . . ., c κ−1 ), the LRR uniquely defines a linear recurrence sequence (LRS henceforth), which is the sequence (u n (c)) n∈N , inductively defined as u j (c) = c j for j ≤ κ − 1, and The companion matrix associated with the LRR/LRS (it does not depend upon the initial configuration c) is: The LRS is said to be simple if every root of the characteristic polynomial has multiplicity one.The size s of the LRS is the size of its bit representation and is given by s = κ−1 j=0 (size(a j ) + size(c j )).When the coefficients, i.e., entries of a, of an LRR are rational, we call it a rational LRR.In this paper, we will mostly be concerned with rational LRR, but the initial configuration may have rational or real algebraic entries.Note that arithmetic with algebraic numbers can indeed be performed with perfect precision: see the Appendix for references and a brief explanation.
Notice that given an initial configuration c, we have that M n c = (u n (c), . . ., u n+κ−1 (c)).Reasoning in the κ dimensions (u n , . . ., u n+κ−1 ) is a very useful technique that we will use throughout the paper as it displays the LRR as a linear transformation M.
The characteristic roots of an LRR/LRS are the roots of its characteristic polynomial, and also the eigenvalues of the companion matrix.Let γ 1 , . . ., γ r ∈ C be the characteristic roots of the LRR/LRS.An eigenvalue γ i is called dominant if it has maximal modulus |γ i | = max j≤r |γ j |, and residual otherwise.When a has rational entries, for all j ≤ r, γ j is algebraic and size(γ j ) = s O(1) .We denote by m j the multiplicity of γ j .We have r j=1 m j = κ.Proposition 2.2 (Exponential polynomial solution [EvdPSW03]).Given an initial configuration c, there exists a unique tuple of coefficients (α ij (c)) i≤r,j<mr such that for all n, The coefficients α ij (c) can be solved for from the initial state c [HHHK05].When c has algebraic entries, it is implicit in the solution that for all i, j, both α ij and 1 α ij are algebraic with values and norms upper bounded by 2 s O(1) .A formal proof of this claim can be found in [ABM + 20, Lemmas 4, 5, 6].
In this work, we will be more interested in the complement problem of Skolem: namely, whether u n (c) ̸ = 0 for all n.This is of course equivalent in terms of decidability, but this formulation is more meaningful in terms of robustness, where we want to robustly avoid 0.
The famous Skolem-Mahler-Lech theorem states that when c is algebraic, the set {i | u i (c) = 0} is the union of a finite set F and finitely many arithmetic progressions [Sko34,Mah35,BM76].These arithmetic progressions can be computed but the hard part lies in deciding if the set F is empty: although we know that there is N such that for all n > N , n / ∈ F , we do not have an effective bound on this N in general.The Skolem problem has been shown to be decidable for LRS of order up to 4 [MST84,Ver85] and is still open for LRS of higher order.Also, only an NP hardness bound is known if the order is unrestricted [BP02,ABV17].
For simple LRS, positivity has been shown to be decidable up to order 9 [OW14a].In [OW14c], it is proved that positivity for simple LRS is hard for co∃R, the class of problems whose complements are solvable in the existential theory of the reals.A last result, from [OW14b], shows the difficulty of positivity, linking it to Diophantine approximations: how close one can approximate a transcendental number with a rational number with small denominator.We will follow the reasoning from [OW14b].We start with two definitions.
• The Diophantine approximation type of a real number x is defined as: , for some n, m ∈ Z .• The Lagrange constant of a real number x is defined as: , for infinitely many n, m ∈ Z .As mentioned in [OW14b], the Diophantine approximation type and Lagrange constant of most transcendental numbers are unknown.Let A = {p+qi ∈ C | p, q ∈ Q\{0}, p 2 +q 2 = 1}, i.e., the set of points on the unit circle of C with rational real and imaginary parts, excluding 1, −1, i and −i.The set A consists of algebraic numbers of degree 2, none of which are roots of unity [OW14b].In particular, writing p As argued in [OW14b], the set T is dense in (− 1 2 , 1 2 ], and consists solely of transcendental numbers.We assume that θ ∈ T is specified by p = cos 2πiθ.In general, we don't have a method to compute L(θ) or L ∞ (θ) for θ ∈ T , or approximate them with arbitrary precision.Definition 2.5.We say that a problem is T -Diophantine hard (resp.T -Lagrange hard) if its decidability entails that given any θ ∈ T and ε > 0 as input, one can compute a number Remarkably, in [OW14b], it is shown that (i) if one can solve the positivity problem in general, then one can also approximate L(θ) and (ii) if one can solve the ultimate positivity, then one can approximate L ∞ (θ).That is, Theorem 2.6 [OW14b].Positivity for LRS of order 6 or above is T -Diophantine hard and ultimate positivity for LRS of order 6 and above is T -Lagrange hard.

Robust Skolem, Positivity and Ultimate Positivity
The Skolem and (Ultimate) Positivity problems, as defined in the previous section, consider a single initial configuration c.In this article, we investigate the notion of robustness, that is, whether the property is true in a neighbourhood of c, which is important for real systems, where setting c with an arbitrary precision is not possible.We will consider two variants.The first one fixes the neighbourhood as a ball B, while the second asks for the existence of a ball B centred around a given initial configuration c, such that for every initial configuration in B, the respective condition is satisfied.Definition 3.1 (Robustness for Skolem, Positivity, Ultimate Positivity).Let (u n ) n∈N be the rational linear recurrence relation specified by a rational coefficient vector a, and an initial algebraic configuration c.Consider an algebraic ball B (with algebraic entries for both the centre and the radius).We define the following problems: • The robust Skolem problem is to determine if for all c ′ ∈ B and all n ∈ N, we have u n (c ′ ) ̸ = 0. • The robust positivity problem is to determine if for all c ′ ∈ B and all n ∈ N, we have u n (c ′ ) ≥ 0. • The robust non-uniform ultimate positivity problem is to determine if for all c ′ ∈ B, there exists N c ′ ∈ N such that for all n > N c ′ , we have u n (c ′ ) ≥ 0. • The robust uniform ultimate positivity problem is to determine if there exists N ∈ N such that for all c ′ ∈ B and all n > N , we have u n (c ′ ) ≥ 0.
The ∃-robust variants of each problem asks whether there exists a ball B ′ centred around c such that the above holds over B ′ .
Note that for all the variants of ∃-robustness, there exists an open ball of radius ψ > 0 for which robust Skolem (resp.positivity, uniform ultimate positivity) holds iff there exists a closed ball of radius ψ ′ > 0 (e.g.ψ ′ = ψ 2 ) for which it holds.Further, if there exists a ball with real radius, then there exist balls with algebraic and rational radii with the same centre.Thus we do not need to consider open and closed balls separately, nor do we need to explicitly mention the domain of the radius.For the other, i.e., non existential, variants of robustness as defined above, the case of closed and open balls can be different, and can also depend on whether the radius is rational or just real algebraic.
Our main results investigate the decidability and complexity of these problems.
Theorem 3.2.For rational linear recurrence relations and algebraic balls: These lower bounds hold even for rational linear recurrence relations restricted to order 6 and for balls with rational radius.
We remark that our proof of these lower bounds does not hold for balls whose centres have rational entries.
Our theorem above implies that for uninitialised positivity, one really needs the initial configuration to take a value possibly anywhere in the space rather than in a fixed neighbourhood to obtain decidability via [Tiw04,Bra06].We remark that Diophantine hardness is known for the non-robust variant of positivity [OW14b], but to the best of our knowledge, it was not known for any variant of the Skolem problem.In fact, in light of the latest results in [BLN + 22], Diophantine hardness for (exact) Skolem seems unlikely, unless either of Skolem conjecture or p-adic Schanuel conjecture is falsified.We note that the p-adic techniques used therein rely on the input being integral, or rational, or algebraic.Our Diophantine hardness result, on the other hand, has connections to the positivity problem, and is intrinsically related to the common underlying geometry.In a nutshell, the distinction is that the robust variants of the problem implicitly reason about a continuum of initialisations, including those with transcendental coordinates, for which standard results like the Skolem-Mahler-Lech Theorem do not hold.
Surprisingly, we obtain decidability for every linear recurrence relation and every initial configuration when considering a given open ball for non-uniform robust ultimate positivity, or by relaxing the neighbourhood to be as small as desired for any of the variants.This constitutes our second main result: Theorem 3.3.The following decidability results hold for rational linear recurrence relations: (1) ∃-robust Skolem, ∃-robust positivity and ∃-robust (non)-uniform ultimate positivity are decidable for a centre c with algebraic entries.Further: The main difference between our techniques and several past works (except [AGKV16] which is restricted to eigenvalues being roots of unity) is as follows: given an LRR (u n ) n∈N , our intuition and proofs hinge on representing the set P of initial configurations d from which positivity holds.Formally: We may note that the set P is convex.To see this, observe that for d, d ′ ∈ P , for all α, β > 0 with α + β = 1, we have αd We also remark that a definition similar to P is possible for the set S of initial configurations from which 0 is avoided.But it turns out that that set is much harder to represent (e.g., it is not convex in general).Using P surprisingly suffices to deal with robust Skolem as well.
In Section 4, we provide the geometric intuitions behind our ideas as well as set up the notations for the proofs of the above theorems.We exploit the geometric intuitions from Section 4 in Section 5, to prove Theorem 3.2.In Section 6 we prove Theorem 3.3 providing algorithms for the decidable cases.

Geometrical representation of an LRR for Diophantine hardness
The number-theoretic hardness of the non-robust variants starts at order 6; in this work, we show corresponding hardness results for the robust variants too.Decidability at lower orders is non-trivial: see [Vah23] for an exposition.Hence, in this section and the next, we will focus on a particular LRR of order κ = 6, sufficient for the proofs of hardness, i.e.Theorem 3.2.In Section 6, we will generalise some of the constructions explored here to obtain our decidability results stated in Theorem 3.3.Let θ ∈ T , i.e. e i2πθ = p + qi ∈ A, with both p, q rational and p 2 + q 2 = 1.We want to approximate L(θ) (indeed this is the problem that is "Diophantine hard").For Lagrange hardness, we will adapt the construction and proof in section 5.4, approximating L ∞ (θ) instead of L(θ).
Consider the Linear Recurrence Relation of order 6 defined by a = (−1, 4p + 2, −(4p 2 + 8p + 3), 8p 2 + 8p + 4, −(4p 2 + 8p + 2), 4p + 2).The roots of the characteristic polynomial are 1, e i2πθ , e −i2πθ , each with multiplicity 2, and all dominant (they have the same modulus 1).Example 3 is a particular case of this a, with p = 1 2 = cos( π 3 ).However, notice that θ = 1 3 / ∈ T as it corresponds to q = sin( π 3 ) = the form: The coefficients z dom (c), x dom (c), y dom (c) and z res (c), x res (c), y res (c) are associated with the initial configuration c of the LRS.In the following, we reason in the basis of vectors as the geometrical interpretation is simpler in this basis.We will eventually get back to the original coordinate vector basis at the end of the process.From e.g., [HHHK05, Section 2], we know that we can transform from one basis to the other using an invertible Matrix C with C • c = (z dom (c), x dom (c), y dom (c), z res (c), x res (c), y res (c)).
We study the positivity of u n by studying the positivity of v n = un n , for all n ≥ 1.We denote v dom n (z dom , x dom , y dom ) = z dom − x dom cos(2πnθ) − y dom sin(2πnθ), which we call the dominant part of v n , while we denote v res n (z res , x res , y res ) = 1 n (z res − x res cos(2πnθ) − y res sin(2πnθ)), which we call the residual part of v n .The residual part tends towards 0 when n tends towards infinity because of the coefficient 1 n .
4.1.High-Level intuition and Geometrical Interpretation.We provide a geometrical interpretation of set P .We cannot characterise it exactly, even in this particular LRR of order κ = 6 (else we could decide positivity for this case which is known to be Diophantine hard).To describe P , we define its "section" over (z dom , x dom , y dom ) given (z res , x res , y res ): x dom , y dom , z res , x res , y res ) ≥ 0 for all n}.
It suffices to characterise P (zres,xres,yres) for all (z res , x res , y res ) in order to characterise P , as P = {(z dom , x dom , y dom , z res , x res , y res ) | (z dom , x dom , y dom ) ∈ P (zres,xres,yres) }.Among these sets, one is particularly interesting: P (0,0,0) , as it is the set of tuples (z dom , x dom , y dom ) such that v dom n (z dom , x dom , y dom ) ≥ 0 for all n ∈ N. Our reason for focussing on this representation of P is three-fold.First, unlike P , the set P (0,0,0) can be characterised exactly, as a cone depicted in Figure 1 (this will be formally shown in Lemma 4.1 below).Second, the set P (zres,xres,yres) is in 3 dimensions that we can represent more intuitively than a 6 dimensional set.Last but not least, we can show that P (zres,xres,yres) ⊆ P (0,0,0) for all (z res , x res , y res ) (Lemma 4.3).
We are now ready to represent P (zres,xres,yres) given some value (z res , x res , y res ).We can interpret P (zres,xres,yres) in terms of half spaces: P (zres,xres,yres) = ∞ m=1 H + m (z res , x res , y res ), with H + m (z res , x res , y res ) = {(z dom , x dom , y dom ) | v m (z dom , x dom , y dom , z res , x res , y res )) ≥ 0}.The half space H + m (z res , x res , y res ) is delimited by the hyperplane which is a vector space (cos(2πmθ) and sin(2πmθ) are constant when m is fixed).Consider the case of (z res , x res , y res ) = (0, 0, 0).We denote H + m = H + m (0, 0, 0) and H m = H m (0, 0, 0) for all m.For instance, Define M dom as the matrix that captures the action of the LRS (v dom n ) n∈N in the subspace of dominant coefficients of the exponential polynomial solution space.We have We characterise M dom in Lemma 4.2 as a rotation around −−→ z dom of angle −2πθ, which allows to characterise H m as the hyperplane which is the rotation of H 0 of angle 2mπθ around −−→ z dom .That is, the cone shape for P (0,0,0) is obtained by cutting away chunk of the 3D space delimited by hyperplanes (H m ), the rotation 2nπθ being dense in [−π, π].
Coming back to some value (z res , x res , y res ) ̸ = (0, 0, 0), we have that the hyperplane H n (z res , x res , y res ) is parallel to the hyperplane H n (which is tangent to the cone P (0,0,0) ), because for H n of the form uz dom + vx dom + wy dom = 0, we have H n (z res , x res , y res ) is defined by {(z dom , x dom , y dom ) | uz dom + vx dom + wy dom = C}, for C = zres+xres cos(2πnθ)+yres sin(2πnθ) n a constant as n is fixed.
Thus, with this idea in mind, we can visualise P (zres,xres,yres) as depicted in Figure 2, using P (0,0,0) and the hyperplanes H n (z res , x res , y res ) parallel to H n , with an explicit bound on the distance from H n (z res , x res , y res ) to H n , which further tends towards 0 as n tends towards infinity.Next, we formalise the above intuition/picture into lemmas.4.2.Characterisation of P (0,0,0) and representing P (zres,xres,yres) .We now formalise some of the ideas in the above subsection.First, we start with Lemma 4.1 which shows that P (0,0,0) describes a cone, as displayed on Figure 1.
Proof.We have cos(2πnθ) 2 + sin(2πnθ) 2 = 1 and cos(2πnθ) is dense in [−1, 1] as θ / ∈ Q. Denote X = cos(2πnθ), and study the function Thus, for all (z dom , x dom , y dom ) with z dom ≥ x 2 dom + y 2 dom , we have z dom ≥ max(f (X)) and v n (z dom , x dom , y dom , z res , x res , y res ) ≥ z dom − f (X) ≥ 0 for all n.On the other hand, if z dom < x 2 dom + y 2 dom , then there exists n such that f (cos(2πnθ)) is arbitrarily close to max f (X) > z dom , and in particular v n = z dom − f (cos(2πnθ)) < 0.
We show now that the linear function M dom associated with the LRR (v dom n ) n∈N is actually a rotation of angle −2πθ.Matrix M dom transforms v dom n (z dom , x dom , y dom ) into v dom n+1 (z dom , x dom , y dom ).Using the formulas above with a = 2πnθ, b = 2πθ, we have that for all n ≥ 1, v dom n+1 (z dom , x dom , y dom ) = v dom n (z dom , x dom cos(2πθ) + y dom sin(2πθ), y dom cos(2πθ) − x dom sin(2πθ)) for all n, and thus M dom transforms (z dom , x dom , y dom ) into (z dom , x dom cos(2πθ)+y dom sin(2πθ), y dom cos(2πθ)− x dom sin(2πθ)).
Finally, the following lemma implies that P ⊆ P dom .
Proof.We use the following simple but important observation.Let (u n ) n∈N be an LRS where all roots have modulus 1, i.e., each root is of the form γ = e iθ , with distinct values of θ.Let u j be the j th element of the LRS, with j ∈ N. Then for all ε, N , there exists n > N with |u n − u j | < ε.That is, for each value visited, the LRS will visit arbitrarily close values an infinite number of times.This is the case in particular of v dom n .Now, assume for contradiction that there is a configuration (z dom , x dom , y dom ) in P (zres,xres,yres) \ P (0,0,0) .Since (z dom , x dom , y dom ) / ∈ P (0,0,0) , there exists m with and N such that for all n > N , |v res n | < ε (because it converges towards 0 when n tends towards infinity).From the above observation, we obtain an n > N such that |v dom n (z dom , x dom , y dom ) − v dom m (z dom , x dom , y dom )| < ε.Thus: v n (z dom , x dom , y dom , z res , x res , y res ) = v dom n (z dom , x dom , y dom ) + v res n (z res , x res , y res ) < v dom m (z dom , x dom , y dom ) + ε + ε < 0. A contradiction with (z res , x dom , y dom ) ∈ P (zres,xres,yres) .
5. Proof of Theorem 3.2 5.1.Intuition for hardness of (robust) positivity.Consider a vector d on the surface of P dom , namely d = (z dom , x dom , y dom , z res , x res , y res ), that is, (z dom , x dom , y dom ) ∈ P (0,0,0) .Consider the subset of P (0,0,0) which consists of points whose first coordinate z dom is the same as that of d.For all n, let e n be the point of this section where hyperplane H n is tangent to P (0,0,0) .Let τ be the angle made between the centre b of the section, e 0 and d.Hence, e 0 is at angle 0 and e n at angle 2πnθ mod 2π.We depict this pictorially in Figure 3.
We have that u n (d) ≥ 0 for all n iff d is in the intersection of all half spaces defined by H i (z res , x res , y res ).As 2πnθ mod 2π is dense in [0, 2π), for all β > 0, there is a n such that e n is at angle α n ∈ [τ − β, τ + β], hence H n will be ε-close to d.To know whether d is in the half space defined by H n (z res , x res , y res ), we need to compare the distance ε between H n and d, with the value of n.If the value of n is too large, then the distance between H n (z res , x res , y res ) and H n is smaller than ε, and d is in the half space H + n (z res , x res , y res ).In other words, for (u n (d)) n∈N not to be positive, n needs to be both small enough and such that 2πnθ mod 2π is close to τ .This is similar to L(θ) being small, as shown in Lemma 5.2.Now, for robust positivity (Theorem 3.2.1.a),we consider a ball B entirely in P dom , tangent to the surface of P dom only on point d.The ball will be positive iff the curvature of the ball is steeper than the curvature from hyperplanes H n (z res , x res , y res ) n∈N around d, as shown in Lemma 5.3.This will correspond again to computing L(θ), thus showing hardness.5.2.Formalising the proof for closed balls and robust positivity.In this section, we formalise the intuition given above, in the case of a closed ball and for robust positivity, i.e., Theorem 3.2.1.a.We will extend this to the other cases of Theorem 3.2 in the next subsection.
We recall the following: Figure 3: Representation of a section of P (0,0,0) , with hyperplanes H 0 , H 10 being represented.
• The Diophantine approximation type of a real number x is defined as: • The Lagrange constant of a real number x is defined as: m 2 , for infinitely many n, m ∈ Z .
Further, every d ′ = (z dom , x dom , y dom , z res , x res , y res ) ∈ B ψ \ {d} satisfies • x dom < z dom , and • d ′ is in P dom but not at the surface of P dom .
For the last result, by Lemma 4.1, it suffices to prove that x 2 dom + y 2 dom < z 2 dom .Assume by contradiction that z Adding the two inequalities, we obtain: a contradiction: indeed, the sum of a positive term and a strictly positive term ( x dom < z dom by the above statement) cannot be negative or zero.
In other words, d is the only point where the ball B ψ intersects the surface of P dom .We now explain the relationship between the positivity of (u n (d)) n∈N and L(θ), which is the crux of the proof of Theorem 2.6 by [OW14b].
We reason about the case 2πnθ mod 2π ∈ [π, 2π) symmetrically with respect to the case 2πnθ mod 2π ∈ [0, π): it suffices to consider the configuration d − = (2, 2, 0, 0, 0, −2πℓ).We turn now to the positivity of the balls B ψ ∪ B − ψ .We show that ψ can be chosen small enough such that the following is true: Lemma 5.3.For any ℓ, ε, let d, d ′ be defined as above.Then for any n 1 , we can choose ψ small enough and n 2 > n 1 such that for all n > n 2 , if n Proof.We first consider the initial configuration d ′ ∈ B ψ ∪ B − ψ which minimises u n (d ′ ): Claim 5.4.
Proof.Any point d ′ ∈ B ψ can be expressed as c + r, where c is the centre of one of the two spheres, and r is an arbitrary vector whose length does not exceed √ 2ψ.We know that u n (d ′ ) = x n T (c + r), where x n = [n, n cos(2πnθ), n sin(2πnθ), 1, cos(2πnθ), sin(2πnθ)] T is fixed.As discussed in the previous lemma, the minimum contribution from x n T c is (note that the choice is over the centres of the two spheres) It now remains to independently optimise over r.For this, we note x n T r is minimised when r has longest possible length, and is oriented opposite to x n .In this case, x n T r will be the negative product of the lengths of x n and r.This is − √ 2n 2 + 2 • √ 2ψ, which simplifies to Adding the two contributions gives the result.
Thus, we have 2 − y 4 24 to obtain: n , we have: Hence, we can assume without loss of generality that α n n ≤ 36π.
Proof of Theorem 3.2 for robust positivity and closed balls.Let ε > 0. Assume that an ℓ has been fixed, such that we want to know either L(θ) < ℓ + ε or L(θ) > ℓ − ε.First, we fix n 2 and ψ < 1 3 and ψ < πℓ as per Lemma 5.3.The high level plan is to use the robust positivity oracle to query whether neighbourhoods that are subsets of B ψ (symmetrically B − ψ ) containing d (symmetrically d − ) are positive from iterate n 2 onwards.If yes, it means that d and d − in particular are positive, and we use Lemma 5.2 and its symmetric statement to argue L ≥n 2 (θ) > ℓ − ε.If not, it means that the larger B ψ and B − ψ themselves are not positive, and we use the contrapositive of Lemma 5.3 to argue that L ≥n 2 (θ) < ℓ + ε.
We remark that B ψ (symmetrically B − ψ ) corresponds to a ball in the coordinates (z dom , x dom , y dom , z res , x res , y res ) of the coefficient space.In fact, as outlined in the plan above, our reduction needs to supply the initialisation (v n 2 , . . ., v n 2 +5 ) as input in the original coordinates (v 0 , v 1 , v 2 , v 3 , v 4 , v 5 ).The ball B ψ is mapped to an hyper-ellipsoid O in the original coordinates.We can explicitly define a smaller ball B ′ ⊆ O in the original coordinates, containing (the image of) d ∈ B ′ .Hence B is positive implies that B ′ is.
We symmetrically do the same thing for B − ψ , and query both neighbourhoods, thus implementing the reduction as outlined above.
Finally, we show the statement that we can restrict the balls to having rational radius and centre with real algebraic entries.The radius restriction is simple, as we can choose B ′ arbitrarily small.Hence in particular we can choose the radius to be rational.
For the centre, notice that the initial configuration d = (2, 2, 0, 0, 0, 2πℓ) is not a priori algebraic.We can however restrict ourselves to choosing ℓ of the form q π , with q ∈ Q.This does not impede our search for lower and upper bounds on L ≤n 2 (θ): we can define r, r ′ ∈ Q such that r < q π − 0.45ε < L ≤n 2 (θ) < q π + 0.45ε < r ′ , with r ′ − r < ε.Now, this choice of ℓ = q π makes d = (2, 2, 0, 0, 0, 2πℓ) rational.As the linear operator M n H that transforms the coefficient space to the input space is algebraic, it means that M n Hd is algebraic as well.The normal to B at d is rational, thus the normal to O = M n HB at the algebraic M n Hd is algebraic, and we obtain a centre of B ′ ⊂ O that is algebraic (since the radius is rational).This completes the proof of Theorem 3.2.1.afor closed balls.

Case of Open Balls and robust Skolem.
In this subsection, we extend the proof of Theorem 3.2 to show that considering open or closed balls does not make a difference for the Diophantine hardness.Further, there is also no difference whether we consider the robust Skolem problem (0 is avoided), the robust positivity problem (negative numbers are avoided), or the robust strict positivity problem (negative and 0 are avoided).Thus, this establishes Theorem 3. We show that equivalence results between these statements.This allows us to conclude that having open or closed balls does not make a difference for T -Diophantine hardness of Skolem and (strict) positivity.Formally, we have the following.
Proof.(1) implying (2) is trivial.(2) implies (1): we show the contrapositive.Suppose there exists an initial configuration d on the surface of the ball B ψ and an integer n such that u n (d) = y < 0. Recall that M is the companion matrix, and u n (d) is the first component of (M n .d),so u n (x) is a continuous function.Thus, there exists a neighbourhood of d, such that for all d ′ in the neighbourhood, u n (d ′ ) < y/2 < 0. This neighbourhood intersects the open ball B ψ enclosed by the surface, and picking d ′ in this intersection shows that Robust Positivity does not hold in the open ball.
(2) implies (3): Assume for the sake of contradiction that there is an initial configuration c ′ in the open ball B ψ such that u n (c ′ ) = 0. Consider any open O around c ′ entirely in the open ball B ψ .We have that c ′ is on hyperplane H n by definition.That is, there are initial configurations in O on both sides of H n .In particular, there is an initial configuration c ′′ in O, hence in B ψ , with c ′′ / ∈ H + n , i.e. u n (c ′′ ) < 0, a contradiction with B ψ being robustly positive.
(3) implies (4) is trivial.(4) implies (3): We consider the contrapositive: if we have an initial configuration d 1 of B ψ which is not strictly positive, then u n (d 1 ) ≤ 0 for some n, and there is a barycenter d 2 between d 0 , d 1 which satisfies u n (d 2 ) = 0, i.e. negation of (4).To be more precise, we can choose un(d 1 )−un(d 0 ) d 1 .Now, (5) and ( 6) are equivalent for balls containing at least one initial configuration d 0 that is strictly positive in its interior (same proof as for the equivalence between (3) and (4) above).However, notice that (5,6) are not equivalent with (1,2,3,4) in general.
We are now ready to prove Theorem 3.2 for open balls B ψ .It suffices to remark that the centre c of B ψ is strictly in the interior of P dom , and thus it will be eventually strictly positive by Lemma 4.1, that is there exists n 2 > n 1 such that u n (c) > 0 for all n > n 2 , and we can choose d 0 = M n 2 c.Hence by Lemma 5.6, robustness (for n > max(n 1 , n 2 )) of positivity, strict positivity and Skolem are equivalent on B, and these are equivalent with robust positivity of cl(B) which was proved T -Diophantine hard in the previous section.
It remains to prove Theorem 3.2 for robust Skolem for closed balls B. For that, it suffices to easily adapt Lemma 5.2, replacing (u n (d)) n>n 2 positive by strictly positive, and obtain the T -Diophantine hardness for robust strict positivity of closed balls.We again apply Lemma 5.6 ((5) and (6) are equivalent) to obtain hardness for robust Skolem of closed balls.5.4.Case of Robust Ultimate Positivity.We now turn to approximating L ∞ (θ) using robust ultimate positivity, i.e., to show Theorem 3.2.1.c.The idea is similar to approximating L(θ) that we developed in previous sections.
Assume that B ψ is (uniformly) ultimately positive.Then in particular d is positive.Applying Lemma 5.2, we obtain that n[2πnθ] < 2πℓ − ε for only finitely many n, and hence the limit infimum L ∞ (θ) ≥ ℓ − ε.Now, assume that B ψ is not (uniformly) ultimately positive.Then by Lemma 5.3, which we can apply as ψ is sufficiently small, for infinitely many n > n 2 , we have that This settles the case of closed balls.Now, when we have a uniform constant on ultimate positivity, the case of open balls is equivalent to the case of closed balls, as shown in the following Lemma: Lemma 5.8.Let B ψ be an open ball.Then cl(B ψ ) is robustly uniformly ultimately positive iff B ψ is robustly uniformly ultimately positive.
Proof.One implication is obvious as B ψ ⊆ cl(B ψ ).For the other, assume that B ψ is robustly uniformly ultimately positive.Let N be the uniform constant for ultimate positivity over B ψ .So for all n > N , we know that for all d ′ ∈ B ψ , u n (d ′ ) ≥ 0. Fix a n > N .By continuity, we obtain that for all d ′ ∈ cl(B ψ ), we also have u n (d ′ ) ≥ 0. Hence cl(B ψ ) is robustly uniformly ultimately positive with the same uniform ultimate positive constant.This terminates the proof of the last cases of Theorem 3.2.Notice that this last Lemma is not true when the constant on ultimate positivity is not uniform over the ball.And indeed, we will show a major complexity difference in the next section.

Proof of Theorem 3.3
We now turn to the proof of Theorem 3.3, generalising elements from Section 4. 6.1.Intuitions for the proof of Theorem 3.3.Let (u n ) n∈N be a recurrence relation defined by coefficients a ∈ Q κ .As before, we will consider (v n ) n∈N = ( un fn ) n∈N , for f n such that the dominant coefficients of (v n ) n∈N are of the form αe inθ .We will then decompose the exponential solution of (v n ) n∈N into two: a dominant term (v dom n ) n∈N made of coefficients αe inθ , and a residue (v res n ) n∈N with (v res n ) n∈N −→ n→+∞ 0. Recall that, denoting by c dom the projection of an initial configuration c on dominant space, we defined The non-negativity of v dom n (c) for all n, and thus membership in P dom , is necessary for the Ultimate Positivity of the LRS initialised by c.However, the decidability of this prerequisite is unclear from the above formulation of P dom .We define a function dominant(c, t), whose second argument t comes from a continuous domain, namely the Masser Torus T [Mas88].This torus T is compact, and Lemma 6.4 establishes an important closure property: P dom can equivalently be defined as the set of points c for which µ(c) = min t∈T dominant(c, t) is non-negative.This definition is more accessible: Renegar's theorem [Ren92] states that µ(c) can be computed explicitly, which we will use in some cases but manage to avoid in others, as detailed below.
Before giving the formal proofs, we provide our intuitions for all 4 decidable cases.We start with the simplest case ∃-robust ultimate positivity, then move to robust non-uniform ultimate positivity, then ∃-robust positivity and finally ∃-robust Skolem.
(1) For ∃-robust uniform ultimate positivity, we consider different possibilities for µ = µ(c 0 ), and show the following in Proposition 6.5: • If µ < 0, then c 0 is not in P dom , that is u n (c 0 ) < 0 for an infinite number of indices n ∈ N, so c 0 cannot be ultimately positive and we are done.• If µ = 0, then c 0 is on the surface of P dom , so it is arbitrarily close to point not in P dom , so c 0 cannot be robustly ultimately positive.• The last case µ > 0, means that c 0 is in the interior of P dom , and so in particular there exists a closed ball B around c 0 entirely in the interior of P dom .In particular, for some N large enough, B is in the intersection of all the half-space H n , n > N , and thus c 0 is robustly uniformly ultimately positive for the uniform bound N .Thus, we have reduced deciding ∃-robust uniform ultimate positivity to checking the sign of µ(c 0 ).As mentioned earlier we can explicitly compute µ(c 0 ) using Renegar's result [Ren92] and see whether it is positive or not.In this case, we actually do not need to compute µ(c 0 ) explicitly, only test whether it is strictly positive (since that is the only case where we can be ∃-robust ultimately positive), which can be formulated as an FO formula over Reals.
(2) The next case is robust non-uniform ultimate positivity for an open ball B of algebraic radius ψ, centred in c 0 .We show in Proposition 6.8 that B is robustly non-uniformly ultimately positive iff B ⊆ P dom , i.e. iff µ(c) > 0 (the inequality is strict as B is open and P dom is closed) for all c ∈ B, which can be effectively tested in PSPACE using a FO formula over reals.(3) For ∃-robust positivity, we again do a case analysis according to the signs of µ = µ(c 0 ), by observing that: • if µ < 0, that is c 0 / ∈ P dom , then there exists a n such that the LRS initialised by c 0 is negative, so (u n (c 0 )) n∈N is not robustly positive; • if µ = 0, that is c 0 is at the surface of P dom , then there exists a configuration arbitrarily close to c such that the LRS from that configuration is negative, i.e. (u n (c 0 )) n∈N is not robustly positive either; • if µ > 0, that is c 0 ∈ P dom and not on the surface, then as the residue has negligible contribution to (v n ) n∈N for large n, we show that the LRS will ultimately avoid negative numbers beyond a threshold index n thr depending in the exact value of µ, which can be computed using Renegar's result [Ren92].
Having assured ourselves of the long run behaviour, it suffices to check the value of the LRS up to n thr , where the residue can have significant contribution, to see whether the LRS is strictly positive, in which case it satisfies robust positivity.(4) The last case is for ∃-robust Skolem.Analogous to robust positivity problem that sought to avoid negative numbers and hence required v dom n to be always positive, here we seek to avoid 0 and thus require v dom n to be non-zero, i.e. have strictly positive absolute value.We thus concern ourselves with ν = min t∈T |dominant(c, t)|, where T is the continuous, compact torus.We split our analysis based on the possible values of ν, which we show in Proposition 6.11 can be computed effectively: • ν > 0. Then as the residue has negligible contribution to (v n ) n∈N for large n, we show that the LRS will ultimately avoid zero beyond a threshold index n thr .Having assured ourselves of the long run behaviour, it suffices to check the value of the LRS up to n thr , where the residue can have significant contribution, to see whether the LRS satisfies robust Skolem.• ν = 0. Then we show in Proposition 6.12 that the LRS does not satisfy robust Skolem: no matter how small we pick a neighbourhood around c 0 , there will always exist a c in that neighbourhood that hits zero at some iteration.The rest of this section formalises the above intuitions to prove Theorem 3.3.6.2.Masser's Torus and relation with P dom .We first define the normalised exponential polynomial solution (v n ) n∈N : Definition 6.1.Let (u n ) n∈N be an LRS of general term u n (c) = r i=1 mr−1 j=0 p ij n j γ n i , with ρ being the modulus of the dominant roots and m + 1 the maximal multiplicity of a dominant root.Define v n (c) = un(c) n m ρ n for n > 0, and v 0 (c) = u 0 (c).We call every term of v n which converges towards 0 as n tends towards infinity residual, while the other terms, of the form αe iθ are dominant.We denote {θ j | j = 1, . . ., k} the set of θ in dominant terms, and α j (c) the associated coefficient.We denote the total contribution from the dominant terms of the form α j (c)e inθ j by v dom n (c).We have that: As we explained in Section 6.1, knowing whether (v dom n ) n∈N > 0 for all n ∈ N is crucial in order to solve ∃-robust Skolem, positivity, and (uniform or not) ultimate positivity.In 11:23 Proof.Let us denote P ′ dom = {c | ∀t ∈ T, dominant(c, t) ≥ 0}.Remember that the definition is P dom = {c | ∀n ∈ N, v dom n (c) ≥ 0}.We now prove that P ′ dom = P dom .As for all n and all c, we have v dom n (c) = dominant(c, s n ), we have that P ′ dom ⊆ P dom directly.We now prove that P dom ⊆ P ′ dom .Let c ∈ P dom , i.e. ∀n ∈ N, v dom n (c) ≥ 0. Assume by contradiction that c / ∈ P ′ dom .Hence there exists t ∈ T with dominant(t, c) < 0. Denote ε = − dominant(t,c) 2 > 0. Using (6.1), we obtain an n with v dom n (c) < − ε 2 < 0, a contradiction with c ∈ P dom .6.3.Relation between sign of µ(c) and (robust) positivity.Let c be an initial configuration and let T be Masser's Torus as described above.Then, we define µ(c) = min t∈T dominant(c, t). (6.2) We now state the crucial proposition that will allow us to relate the sign of µ(c) with the position of c with respect to P dom , which will be used to characterise ∃-robust positivity and ultimate positivity around c. Proposition 6.5.
(1) If µ(c) < 0, then (i) c / ∈ P dom and (ii) there exist an infinite number of n such that v n (c) < 0.
(2) If µ(c) = 0, then (i) c is on the surface of P dom and (ii) ∀ε > 0, ∃c ε such that |c−c ε | ≤ ε and an infinite number of n with v n (c ε ) < 0. (3) If µ(c) > 0, then (i) c is in the interior of P dom and for all ε > 0, (ii) there exists N , such that for all c ε with |c − c ε | ≤ ε and all n > N , we have v n (c ε ) > 0.
Proof.First, we will prove a useful claim, relating v n (c) and the distance from c to hyperplane H n : For every n, let distance(c, H n ) be the distance between an initial configuration c and the hyperplane Claim 6.6.There exists C such that for all n, distance(c, H ||y|| for y the first row of M n by basic geometry.Let H be the transformation matrix between the basis of initial configurations and the basis of the exponential polynomial solution of (u n ) n∈N .Let x = (x 1 , . . ., x κ ) with x i = n k ρ n j so that to cover every root ρ j and multiplicities k = 1, . . ., m j .We have ) for all initial configurations c, i.e., y = x • H.That is, there exists a constant D > 0 depending upon H with ||y|| ≥ Dn m ρ n for ρ the modulus of a dominant root and m + 1 the highest multiplicity of a root of modulus ρ.We obtain Now we prove the relationship between the sign of µ(c) and the position wrt P dom .
• The last case is µ(c) = 0. Then by the previous reasoning, c ∈ P dom , but not necessarily in the interior.To see that it is on the surface of P dom , it suffices to use Equation (6.1) again.By contradiction, assume that it is not the surface of P dom .Hence there exists a distance ε > 0 to the surface, hence at least ε away from all hyperplanes H n .Taking t ∈ T realising the minimum value µ(c), we have an n such that |v dom n (c) − dominant(c, t)| ≤ ε 2C .In particular, v dom n (c) ≤ ε 2C , a contradiction with distance(c, H n ) > ε using Claim 6.6.This completes the proof of 1(i), 2(i) and 3(i).
We now turn to the existence of counterexamples of positivity in the neighbourhood of c or of a neighbourhood of c entirely positive, i.e., proof of 1(ii), 2(ii) and 3(ii).For this, we use Claim 6.6 in the following way: if for all α > 0, there exist an infinite number of n α with |v nα (c)| < α, then there exists an infinite number of n with distance(c, H n ) < ε (choose n = n α for α = ε 2C ).This means that for any neighbourhood we pick, there will be a violation of positivity in it for infinitely many n.
• Let µ = 0. We prove that for all α > 0, we have a n α such that |v nα (c)| ≤ α, which suffices by Claim 6.6.Let α > 0 arbitrarily small, and let N such that for all n > N , |v res n (c)| ≤ α 2 .This N exists as v res n (c) → n→∞ 0. By Equation (6.1), as µ = 0, there exists an (infinite number as n can be chosen arbitrarily large of) Again by Equation 6.1, we have an infinite number of n > N such that v dom n (c) < µ 2 , and we get v n (c) = v dom n (c)+v res n (c) < µ, and thus 1(ii) follows.
• The last statement is with µ(c) > 0. We have that c is guaranteed to be ε away from all hyperplanes H n for sufficiently large n (i.e.≥ N ).Hence considering the ball B of radius ε 2 and of centre c, all the initial configurations c ε ∈ B are at distance at least ε 2 to all hyperplanes H n , and in particular we also have v n (c ε ) > 0.
6.4.Deciding ∃-robust ultimate positivity and robust non-uniform ultimate positivity for open balls.We are now ready to provide the algorithms and proof for the decidable cases of robust ultimate positivity.First, we consider ∃-robust ultimate positivity.For this case, there is no difference on uniformity of open/closed ball.Proposition 6.7.Let c 0 be an initial configuration.c 0 is ∃-robustly ultimately positive iff µ(c 0 ) > 0. Further, this condition can be checked in PSPACE.
Proof.We adapt a similar analysis as the one that appeared in [OW14a].In one direction, if µ(c 0 ) > 0, then by Proposition 6.5 3., we infer that c 0 is ∃-robust ultimately positive.In the other direction, suppose µ(c 0 ) ≤ 0, then by Proposition 6.5 1. or 2. we obtain that for all ϵ-neighbourhoods of c 0 there are an infinite number of n such that v n (c ε ) < 0, i.e., c 0 is not ∃-robust ultimately positive.
For the complexity, we observe that to check whether µ(c 0 ) > 0, its complement can be checked by a call to an oracle for existential/universal first order theory of reals (which is decidable in PSPACE).That is, c 0 is ∃-robust ultimately positive if the following first order (universal) theory of reals sentence holds: ∀t ∈ T, dominant(c 0 , t) > 0.
(6.3) rational, and the a priori bound on the order of the LRS is hard-wired into the decision problem.The assumption on the bounded order ensures both µ and 1/µ = 2 s O(1) are bounded by [Ren92].We have N thrpos = 2 s O(1) because v res n (c 0 ) = O( 1 n ).This is the number of iterates we have to explicitly check, which gives the PSPACE complexity for rational input.This is because our strategy involves guessing the index of violation in coNP, constructing an integer straight line program that computes the term at the guessed step via iterated squaring, and then using a PosSLP oracle to check whether the centre of the neighbourhood is strictly positive at the guessed iterate.PosSLP was famously shown by Allender et.al. to be in PSPACE [ABKPM06].A rational LRS can easily be scaled up to an integer LRS 1 , that preserves the signs of each term, and enables it to be cast as a division-free integer straight line program.
We now turn to deciding Robust ∃-Skolem.While for ∃-Robust positivity we considered µ, for Skolem we will need its absolute value counterpart.Namely, we define: ν = min t∈T |dominant(c 0 , t)|. (6.5) We now show how to adapt Renegar's result [Ren92, Theorems 1.1 and 1.2] to effectively compute ν when the order of LRS is bounded a priori.Theorem 6.9 (Tarski [Tar51]).For every formula τ (y) in the First Order Theory of the Reals, we can compute an equivalent quantifier-free formula χ(y).
In specific scenarios, this computation can be considered efficient.Theorem 6.10 (Renegar).Let M ∈ N be fixed.Let τ (y) be a First Order formula with free variables y, interpreted over the Theory of the Reals.Assume that the total number of free and bound variables in τ (y) is bounded by M .Denote the maximum degree of the polynomials in τ (y) by d and the number of atomic predicates in τ (y) by n.Then there is a procedure which computes an equivalent quantifier-free formula χ(y) = I i=1 J i j=1 h i,j (y) ∼ i,j 0 in disjunctive normal form, where each ∼ i,j is either > or =, with the following properties: (1) Each of the i and J i (for 1 ≤ i ≤ I) is bounded by a polynomial in (nd).
(2) The degree of χ(y) is bounded by a polynomial in (nd).
(3) The height of χ(y), i.e. the largest coefficient in the polynomials in χ is bounded by 2 size(τ (y))(nd) O(1) Moreover, the procedure runs in time polynomial in the size of the input formula τ (y).
Proof.We obtain the statement directly from Renegar [Ren92], i.e. µ, ν are roots of polynomials obtained via quantifier elimination on the following formulae that can be expressed in the First Order Theory of Reals.µ is the unique satisfying assignment to (6.7) Computability follows by performing quantifier elimination on the above formulae, which, as discussed in the proof of Proposition 6.7, will have size polynomial in that of the input.This yields polynomial equations, of which µ (resp.ν) are roots, and hence algebraic.Now, if the order of the LRS is bounded by K, then this ensures that formulae (6.6) and (6.7) use boundedly many variables (depending on K).This is seen by generalising the arguments made in [OW14a, Section 3.1].Essentially, from the bound on order one can derive bounds on the dimension of the torus T and the number of constraints that define it, and thus the number of variables.Hence, we can apply Theorem 6.10.From this the complexity bounds on µ, ν follow as quantifier elimination runs in polynomial time under these assumptions.The equivalent quantifier free formula, and hence µ, ν themselves have degree polynomial and height single exponential in the size of the original formula (and thus the input).
The procedure to decide ∃-robust Skolem is given in Algorithm 3. Basically, we compute ν ← min t∈T |dominant(c, t)| using Proposition 6.11, for c 0 the initial configuration around which we are looking for a neighbourhood.If ν = 0, we declare ∃-robust Skolem does not hold, according to Proposition 6.12.
Otherwise, we compute N thrSk such that |v res n (c 0 )| < ν 2 for all n > N thrSk .Then we check if v n (c 0 ) = 0 for some n ≤ N thrSk .If yes, then ∃-robust Skolem does not hold.Otherwise we know that ∃-robust Skolem holds.
Indeed, if ν > 0, for all n > N thrSk , |v n (c 0 )| = |v dom n (c 0 ) + v res n (c 0 )| > ν − ν 2 ≥ ν 2 > 0, and this remains > 0 in a neighbourhood of c 0 .Similarly, by hypothesis, |v n (c 0 )| > 0 for the finite number of n < N thrSk , and in particular we have a lower bound > 0 that ensure it stays strictly positive in a neighbourhood of c 0 .

( 1 )
for open and closed balls, (a) the robust positivity problem is T -Diophantine hard, (b) the robust Skolem problem is T -Diophantine hard, (c) the robust uniform ultimate positivity problem is T -Lagrange hard (2) for closed balls, the robust non-uniform ultimate positivity is T -Lagrange hard.
(a) Deciding ∃-robust (non)-uniform ultimate positivity can be done in PSPACE.(b) When the centre c has rational entries, for any K ∈ N, deciding ∃-robust Skolem and ∃-robust positivity for LRS of order at most K can be done in PSPACE.(2) Robust non-uniform ultimate positivity is decidable in PSPACE for open algebraic balls.
2.1.b;and 1.a for open balls.Let B ψ be an open ball and cl(B ψ ) its topological closure, which is the closed ball consisting of B ψ and its surface.With the next lemma, we argue that open and closed balls can very often be reasoned about interchangeably.Consider the following statements: (1) Robust positivity holds for the closed ball cl(B ψ ).(2) Robust positivity holds for the open ball B ψ .(3) Robust strict positivity holds for the open ball B ψ .(4) Robust Skolem holds for the open ball B ψ (5) Robust strict positivity holds for the closed ball cl(B ψ ) (6) Robust Skolem holds for the closed ball cl(B ψ )

Table 1 :
Complexity results for different variants of Skolem/Positivity/Uniform Positivity.The most surprising results of our paper are in bold.∃ robustness is tractable in all cases.On the other hand, Robust Skolem is Diophantine hard while it is not the case for usual Skolem.Further, non-uniform robust ultimate positivity is tractable for open balls while every other variant of robust (ultimate) positivity