Bernard Boigelot
email: bernard.boigelot@uliege.be

Pascal Fontaine
email: pascal.fontaine@uliege.be

Baptiste Vergain
email: bvergain@uliege.be

Decidability of Difference Logic over the Reals with Uninterpreted Unary Predicates

Keywords: First-order logic, Decidability, SMT, Arithmetic, Uninterpreted predicates

First-order logic fragments mixing quantifiers, arithmetic, and uninterpreted predicates are often undecidable, as is, for instance, Presburger arithmetic extended with a single uninterpreted unary predicate. In the SMT world, difference logic is a quite popular fragment of linear arithmetic which is less expressive than Presburger arithmetic. Difference logic on integers with uninterpreted unary predicates is known to be decidable, even in the presence of quantifiers. We here show that (quantified) difference logic on real numbers with a single uninterpreted unary predicate is undecidable, quite surprisingly. Moreover, we prove that difference logic on integers, together with order on reals, combined with uninterpreted unary predicates, remains decidable.

Introduction

The success of satisfiability modulo theories (SMT) solvers in verification can be attributed to several things, but one of them is indisputably the omnipresence, in the combination of theories, of arithmetic reasoners. As SMT solvers get stronger in quantified reasoning, it becomes more interesting to get a clear picture of decidability frontiers when arithmetic is used in a quantified SMT context. Some pure arithmetic theories are already undecidable, even in their quantifier-free fragment, e.g., Peano arithmetic [START_REF] Matiyasevich | Hilbert's Tenth Problem[END_REF], i.e., a first-order theory of the natural numbers with addition and multiplication. However, Presburger arithmetic, somehow the linear restriction of Peano arithmetic, is decidable even in the quantified case [START_REF] Haase | A survival guide to Presburger arithmetic[END_REF], but augmenting Presburger arithmetic with a single unary uninterpreted predicate already yields undecidability [START_REF] Downey | Undecidability of Presburger arithmetic with a single monadic predicate letter[END_REF][START_REF] Halpern | Presburger arithmetic with unary predicates is Π 1 1 complete[END_REF][START_REF] Speranski | A note on definability in fragments of arithmetic with free unary predicates[END_REF]. To obtain a decidable fragment mixing arithmetic and uninterpreted predicates, one must further restrict the expressiveness.

In the SMT world, difference logic used to be a popular fragment of arithmetic, because of its low complexity in the quantifier-free case. In this fragment, arithmetic is limited to difference constraints of the form x -y ▷◁ c where x and y are variables, c is an integer constant and ▷◁ belongs to {<, ≤, =, ≥, >}.

Difference constraints can, e.g., express conditions on the distance between two variables, the atomic formula x-y = 2 stating that the distance between the values of x and y must be exactly 2. Notice that since difference constraints involve only two variables (c is an integer constant) those constraints are strictly less expressive than linear constraints in Presburger arithmetic. The decidability of the logic mixing difference constraints and unary uninterpreted predicates, when interpreted over N (or similarly Z) reduces to the decidability of the monadic second-order theory of one successor, usually referred to as S1S. The decidability of S1S has been established thanks to the concept of infinite-word automaton [START_REF] Büchi | On a decision method in restricted second order arithmetic[END_REF].

On the real domain, it is well known that the first-order theory of realclosed fields, which is in a sense the real counterpart of Peano arithmetic, is decidable [START_REF] Tarski | A Decision Method for Elementary Algebra and Geometry[END_REF] even in the presence of quantifiers. Whereas this might give the impression that decidability is more often obtained on the reals than on the integers, we here prove that the logic mixing difference constraints and unary uninterpreted predicates, when interpreted over R, is undecidable.

Further restricting the arithmetic language, and considering order on the real domain only, it is known that the monadic second-order theory of order is undecidable [START_REF] Gurevich | Monadic theory of order and topology in ZFC[END_REF][START_REF] Shelah | The monadic theory of order[END_REF], but its universal fragment is decidable [START_REF] Burgess | The decision problem for linear temporal logic[END_REF]. In this work, we establish that the fragment mixing unary uninterpreted predicates, difference constraints over integer variables, and order constraints over real variables is decidable.

Section 2 provides some prerequisites and the precise definition of the studied fragments. In Section 3, we prove the decidability of the fragment mixing unary uninterpreted predicates, difference constraints over integer variables, and order constraints over real variables. This was already the subject of a work-in-progress workshop paper [START_REF] Boigelot | Decidability of difference logics with unary predicates[END_REF]. In Section 4, we prove that the fragment of quantified difference constraints over real variables extended with a single unary uninterpreted predicate is undecidable.

Preliminaries

We refer to e.g., [START_REF] Enderton | A mathematical introduction to logic (2nd edition)[END_REF] for a general introduction to first-order logic with equality, and assume that the reader is familiar with the notions of signature, term, variable, and formula. We use the usual logical connectives (∨, ∧, ¬, ⇒, ⇔) and first-order quantification ∃x. φ and ∀x. φ, respectively equivalent to writing ∃x (φ) and ∀x (φ), i.e., the dot stands for an opening parenthesis that is closed at the end of the formula. Variable symbols are denoted by x, y, z, . . . and are meant to be interpreted as real numbers.

Our signature contains the interpreted arithmetic symbols 0, 1, +, -, <, ≤, ≥, >, =, and other constants in N that stand for terms 1 + 1 + • • • + 1. We furthermore use a monadic (i.e., unary) interpreted predicate x ∈ Z to denote that x has an integer value. The signature also contains uninterpreted predicate symbols P , Q, . . . In the whole article, we only consider unary predicate symbols. Indeed, including binary uninterpreted predicates without restriction on firstorder quantification directly yields undecidability. Our language is the set of all well-formed formulas, in the usual sense, built using symbols from the signature. Further specific restrictions will be introduced later.

An interpretation specifies a domain (i.e., a set of elements), assigns a value in the domain to each free variable, and assigns relations of appropriate arity on the domain to predicate symbols in the signature. Throughout the article, the interpretation domain is always R. The arithmetic symbols 0, 1, +, -, <, ≤, ≥, >, = are interpreted as expected on R, and x ∈ Z is true if and only if x has an integer value2 . An interpretation assigns an arbitrary subset of the domain R to each unary predicate. By extension, an interpretation assigns a value in R to every term, and a truth value to every formula. We denote the interpretation I of a variable x by I[x], and the interpretation of a predicate P by I[P ]. A model of a formula is an interpretation that assigns true to this formula. A formula is satisfiable on a domain (here R) if it has a model on that domain.

Difference Arithmetic with Unary Predicates

We consider several fragments where the language is restricted, in particular in the way that the arithmetic relations can be used. A fragment is decidable if there exists a procedure to check whether a given formula in this fragment is satisfiable.

In the various fragments introduced below, all arithmetic atoms are either order constraints of the form x ▷◁ y, or difference constraints of the form x-y ▷◁ c, where x and y are variables, c is a constant in Z, and ▷◁ ∈ {<, ≤, =, ≥, >}. As a reminder, the language of our formulas only contains unary predicates. The only atoms besides the arithmetic ones are of the form P (x) where P is an uninterpreted predicate symbol and x is a variable, and x ∈ Z where x is a variable. Note that the addition of constraints of the form x ▷◁ c, where x is a variable and c is an integer constant, to fragments that already admit difference constraints does not increase their expressive power: constraints x ▷◁ c can be replaced by difference constraints x -v 0 ▷◁ c, where v 0 is a particular variable in Z intended to be interpreted as zero. Indeed, shifting an interpretation by a fixed integer j -i.e., the new interpretation of any variable x is the old value of x plus j, and the new value of any predicate P for a real number d + j is the old value of P for d -preserves the assigned value of formulas in our fragments. Therefore any model where v 0 is an arbitrary integer can be shifted into a model where v 0 is zero.

As syntactic sugar, conjunctions of order constraints will be merged to improve readability, i.e., we will often write x < y < z rather than x < y ∧ y < z. Finally, we use the shorthand P (x + c) instead of ∃y. y -x = c ∧ P (y), where x is a free variable and c ∈ Z.

We now introduce our fragments of interest. Their names are inspired from the SMT-LIB nomenclature, where acronyms stand for the theories that appear in the combinations:

-uf1: the theory of uninterpreted functions, with the restriction that uninterpreted symbols may only correspond to monadic predicates; ro: the theory of order on the reals only; iro: the theory of order on the reals and integers; idl: difference logic on the integers; rdl: difference logic on the reals. uf1•ro. The fragment uf1•ro is the fragment with unary uninterpreted predicates and order constraints between variables interpreted over R. Difference logic constraints and atoms of the form x ∈ Z are not allowed.

Example: The formula ∀x ∃ y, z . y < x < z ∧ ∀t . (y < t < z ∧ P (t)) ⇒ t = x describes a predicate P that is true only on isolated real numbers. uf1•iro. The fragment uf1•iro is the extension of uf1•ro where atoms of the form x ∈ Z are allowed. This fragment can express order relations between real and integer variables.

Example: The formula ∀x, y. (x < y ∧ x ∈ Z ∧ y ∈ Z) ⇒ ∃v. x < v < y ∧ P (v) describes a predicate P that is true for at least one value located between any two integers. uf1•idl•iro. The fragment uf1•idl•iro is an extension of the fragment uf1•iro (and therefore of uf1•ro). It is also interpreted over R. Order constraints between variables and atoms of the form x ∈ Z are allowed. Additionally, difference logic constraints are allowed, but they can only involve integer-guarded variables.

In order to enforce this integer-guard restriction on difference logic constraints, uf1•idl•iro formulas must be well-guarded, i.e., difference logic constraints can only appear in the two following contexts:

-x ∈ Z ∧ y ∈ Z ∧ x -y ▷◁ c, -(x ∈ Z ∧ y ∈ Z) ⇒ x -y ▷◁ c,
where x and y are variables, c ∈ Z is a constant, and ▷◁ ∈ {<, ≤, =, ≥, >}.

Example:

The following formula describes a predicate that is either true on all odd numbers and false on all even numbers, or the opposite, as well as true on all non-integer numbers:

∀x, y. x ∈ Z ∧ y ∈ Z ∧ y -x = 2 ⇒ P (x) ⇔ P (y) ∧ ∃x, y. x ∈ Z ∧ y ∈ Z ∧ P (x) ∧ ¬P (y) ∧ ∀z. ¬(z ∈ Z) ⇒ P (z)
uf1•rdl. The fragment uf1•rdl is the fragment interpreted over R, where order constraints, difference logic constraints and unary predicate atoms are allowed without any restriction. The use of atoms of the form x ∈ Z is forbidden. Since order constraints are a special case of difference logic constraints, the name of the fragment only refers to rdl and not ro.

Example: The formula ∀x ∃y. 0 < y -x < 3 ∧ P (y) describes a predicate P such that any subinterval of R of length greater or equal to 3 contains a value for which P is true.

Note: It might appear to the reader that a missing logic in this nomenclature is uf1•irdl, with difference logic constraints on both real and integer variables. We will later show that uf1•rdl is already undecidable, so it makes little sense to introduce any extension of it.

Decidability of uf1•idl•iro

The fragment uf1•ro is actually a restriction of the universal fragment of the monadic second-order theory of the real order R, i.e., uf1•ro augmented with universal quantification of predicate variables. It has been established in [START_REF] Burgess | The decision problem for linear temporal logic[END_REF] that the universal fragment of the monadic second-order theory of the real order R is decidable, which trivially implies the decidability of uf1•ro. We show here that its extension uf1•idl•iro (and therefore uf1•iro) is also decidable, by a reduction to uf1•ro.

Theorem 1. uf1•idl•iro and uf1•iro are decidable.

Note that the decidability of uf1•iro is a direct consequence of the decidability of uf1•idl•iro, since uf1•idl•iro is an extension of uf1•iro. The remaining of this section is thus dedicated to proving that uf1•idl•iro is decidable.

Recognizing Integer Values

We first show how to define in uf1•ro a predicate P int over R that is <-isomorphic to Z, i.e., such that there exists a bijection between the sets described by P int and Z that preserves the order relation over their elements. Integer guards in uf1•idl•iro will later be translated using P int . Intuitively, an integer-guarded variable in a uf1•idl•iro formula will correspond to a variable taking its value in the set described by P int in the translated uf1•ro formula.

We axiomatize P int in uf1•ro as follows:

• Every element of P int is isolated:

∀x ∃ y, z. y < x < z ∧ ∀t. [y < t < z ∧ P int (t)] ⇒ t = x. • Every point in R has a unique successor in P int : ∀x ∃ y. x < y ∧ P int (y) ∧ ∀t. x < t < y ⇒ ¬P int (t). • Similarly, every point in R has a unique predecessor in P int : ∀x ∃ y. y < x ∧ P int (y) ∧ ∀t. y < t < x ⇒ ¬P int (t).
The set of all integers is a model for P int , therefore the above axiomatization is consistent. The set of elements satisfying P int is necessarily infinite and does not admit a maximal or a minimal element. This is a direct consequence of the successor and predecessor axioms. More interestingly, this set is also necessarily countable. Indeed, since each point is isolated, there exists an application that maps the elements satisfying P int to disjoint open intervals. Any set of disjoint intervals in R with non-zero length is necessarily countable [START_REF] Sierpiński | Cardinal and ordinal numbers (2nd edition)[END_REF], since each of them contains a rational value that does not belong to the others. It is now possible to define a successor relation on the real numbers satisfying P int with the formula Succ(x, y) = P int (x) ∧ P int (y) ∧ y < x ∧ ∀z. y < z < x ⇒ ¬P int (z), i.e., x is the successor of y, or equivalently, y is the predecessor of x. The axiomatization of P int is, in fact, precise enough to have the following lemma.

Lemma 1. For any model M of P int , the set

M [P int ] is <-isomorphic to Z.
For convenience in the proof, we define 0 int as an arbitrary existentially quantified value that belongs to the set described by P int .

Proof. Given a model M of the axiomatization of P int , we need to define a bijection between the set M [P int ] and Z that preserves order.

Let us define an application f from M [P int ] to Z. We set f (0 int ) = 0, and then define recursively:

-f (y) = f (x) + 1 for each x, y ∈ M [P int ] such that y > 0 int and Succ(y, x), -f (y) = f (x) -1 for each x, y ∈ M [P int ] such that y < 0 int and Succ(x, y).
Thanks to the fact that every element of M [P int ] has a unique predecessor and successor, it follows that f ranges over the whole set Z, proving that f is surjective. Since it is clear that f preserves order, it follows that f is strictly increasing, and therefore injective. It remains to show that f is well defined for every element in

M [P int ].
If there exists some element y ∈ M [P int ] for which f is not defined, it means that f is not well-defined, in the sense that there exists either an element y > 0 int such that the interval [0 int , y] contains an infinite number of elements satisfying P int , or there exists an element y < 0 int such that the interval [y, 0 int ] contains an infinite number of elements satisfying P int . Since both cases are symmetric, we only address the former. There must exist a strictly increasing infinite series of elements in M [P int ] bounded by y. Let us consider its limit z ∈ R. Because there must exist an element of M [P int ] smaller than z and arbitrarily close to z, it follows that z cannot have a predecessor, which contradicts an axiom. Therefore f is well-defined, and every element of M [P int ] is associated to an integer number. The application f is therefore a bijection. ⊓ ⊔

Translating Formulas

We are now able to describe the satisfiability-preserving translation of formulas from uf1•idl•iro to uf1•ro. Consider a uf1•idl•iro formula φ. Without loss of generality, we assume that P int does not appear in φ. The translation of φ is defined as

AXIOMS int (P int ) ∧ φ
where AXIOMS int (P int ) is the conjunction of the axioms of P int , and • is a translation operator. This translation operator • distributes over all Boolean operators and quantifiers, and corresponds to the identity transformation for most considered atoms, except in the following cases:

-x ∈ Z = P int (x); -x -y ▷◁ c = ∃z 0 , . . . z c . (y = z 0 ) ∧ (x ▷◁ z c ) ∧ 0≤i<c Succ(z i+1 , z i ),
for c ∈ N and ▷◁ ∈ {<, ≤, =, ≥, >}. We assume that z 0 , . . . z c are fresh variables w.r.t. x and y.

Example:

x -y ≤ 2 = ∃z 0 , z 1 , z 2 . y = z 0 ∧ Succ(z 1 , z 0 ) ∧ Succ(z 2 , z 1 ) ∧ x ≤ z 2 .
Notice that we only deal with the case c ∈ N since every atom of the form x-y ▷◁ c with c ∈ Z \ N and ▷◁ ∈ {<, ≤, =, ≥, >} can be rewritten as y -x ▷◁ ′ -c with the following correspondences: (▷◁, ▷◁ ′ ) ∈ {(=, =), (<, >), (>, <), (≥, ≤), (≤, ≥)}.

Establishing Equisatisfiability

Given a uf1•idl•iro formula φ, the translation that we have introduced generates a corresponding uf1•ro formula ψ. To establish that they are equisatisfiable, we need to prove that if φ admits a model, then ψ also admits one, and reciprocally.

Lemma 2. Given a uf1•idl•iro formula φ, consider its translation into uf1•ro ψ = AXIOMS int (P int ) ∧ φ . The formulas φ and ψ are equisatisfiable.

Proof. If φ is satisfiable, let M be one of its models. Then, since ψ shares the same free variables and predicates than φ with the only addition of P int , we can directly construct a model M ′ of ψ that is similar to M for the shared variables and predicates, and that interprets P int so that P int (x) holds whenever x ∈ Z. This is always possible since the only constraints on P int generated by the construction of ψ are the axioms stated above. If ψ is satisfiable, then there exists a model M of ψ. Let us construct a model M ′ of φ. Let 0 int ∈ R be an arbitrary element of M [P int ]. We define an automorphism g of R, such that g(0 int ) = 0, and recursively g(y) = g(x) + 1 for x, y ∈ M [P int ], y > 0 int and Succ(y, x), and g(y) = g(x) -1 for x, y ∈ M [P int ], y < 0 int and Succ(x, y). Intuitively, this ensures that in M ′ the difference between the values taken by the integer variables is consistent with the difference logic constraints. It follows that M ′ is a model of φ.

⊓ ⊔

Undecidability of uf1•rdl

The result presented in the previous section establishes a lower bound for the decidability of our family of fragments. A natural follow-up problem is to establish a corresponding upper bound, i.e., to find an extension of this logic that yields undecidability. We show here that, when combined with uninterpreted unary predicates, as soon as difference logic constraints on reals are allowed, the logic becomes undecidable. We actually show a stronger result which is that a single unary predicate symbol is enough to yield undecidability. More precisely, we establish the undecidability of the restriction of uf1•rdl where only one predicate symbol is allowed, by reducing the halting problem of a Turing machine to the satisfiability problem over this restriction of uf1•rdl.

Theorem 2. Satisfiability is undecidable for uf1•rdl with a single predicate.

Corollary 1. Satisfiability is undecidable for uf1•rdl.

The remaining of this section is dedicated to proving Theorem 2. We consider w.l.o.g. Turing machines defined over an alphabet with only two symbols and no explicit blank symbol [START_REF] Shannon | A universal Turing machine with two internal states[END_REF]. This choice leads to a simpler proof.

Definitions

The proof is by reduction from the halting problem for a Turing machine with a single bi-infinite tape, starting from a blank tape (i.e., a tape filled with the symbol 0). Consider a Turing machine M = (Q, Σ, q I , q F , ∆), where

-Q is a finite nonempty set of states, -Σ is the alphabet {0, 1}, -q I ∈ Q is the initial state, -q F ∈ Q is the halting state, -∆ ⊆ {(Q \ {q F }) × Σ × Q × Σ × {L,
R}} is the transition relation, assumed to be total over its first two components, i.e., for any pair (q, α) ∈ (Q\{q F })×Σ, there exists a tuple (q, α, q ′ , α ′ , λ) ∈ ∆.

A configuration C of such a Turing machine is a triplet containing the current state q, the content of the tape t ∈ {0, 1} Z and the position of the head h ∈ Z.

Since the machine starts from a blank tape, the initial configuration is C 0 = (q I , 0 Z , 0). A run ρ of length n ∈ N (resp. n = +∞) of such a Turing machine is a finite (resp. infinite) sequence of configurations (C i ) i∈[0,n] (resp. (C i ) i∈N ), such that for any two consecutive configurations C i = (q i , t i , h i ) and C i+1 = (q i+1 , t i+1 , h i+1 ) there exists a transition (q, α, q ′ , α ′ , λ) ∈ ∆ such that:

q = q i and q ′ = q i+1 , t i [h i ] = α, i.e., the tape cell at position h i contains the symbol α,

-t i+1 [h i ] = α ′ , -t i+1 [k] = t i [k], for every k ∈ Z, k ̸ = h i , -h i+1 = h i + 1 if λ = R, and h i+1 = h i -1 if λ = L.
A halting run is a finite run such that the state of its last configuration is the halting state q F .

Encoding Runs

Our goal is to encode a run of a Turing machine (as described before), i.e., encode the state, the tape content, and the position of the head for each configuration of such a run. Starting from the initial configuration, we must also ensure the coherence of the run w.r.t. the Turing machine transition relation, by connecting every two consecutive configurations. Our idea is to define an infinite sequence of intervals on the real line, such that each interval contains the encoding of its corresponding configuration (i.e., the first interval will contain the first configuration of the run, and so on). Difference constraints can then be used to connect consecutive configurations.

Let N = ⌈log 2 (|Q|)⌉. Each state q ∈ Q of M can therefore be uniquely encoded with N Boolean values b q 1 , . . . b q N . We want to encode consecutive configurations of the Turing machine using a single predicate P over R. In order to do so, we first need to describe a subset of R that will act as a grid supporting the encoding of the state, the tape content, and the head position of the current configuration.

We use the concept of linear ordering [START_REF] Rosenstein | Linear orderings[END_REF] to describe the shape of the grid. A linear ordering J is a totally ordered set, i.e., a set equipped with a binary relation < which is irreflexive (for all j in J, j ̸ < j), asymmetric (for all j, k in J, if j < k, then k ̸ < j), transitive (for all i, j, k in J, if i < j and j < k, then i < k), and complete (for all j, k ∈ J, either j = k, j < k, or k < j). The order type of a linear ordering J is the class of all linear orderings <-isomorphic to J. The order types of a singleton, the set composed of the N first natural numbers, N, and Z are respectively denoted by 1, N , ω, and ζ. The concatenation of two linear orderings J and K (where their associated order relations are respectively < J and < K ) is denoted by J +K. It corresponds to the linear ordering composed of the set of pairs {(j, 1) | j ∈ J} ∪ {(k, 2) | k ∈ K}, and equipped with the order relation <, defined by (j 1 , 1)

< (j 2 , 1) if j 1 < J j 2 , (k 1 , 2) < (k 2 , 2) if k 1 < K k 2 ,
and (j, 1) < (k, 2) for every j ∈ J and k ∈ K. More generally, given two linear orderings J and K, the linear ordering (J) K is the set of pairs (j, k) with j ∈ J and k ∈ K, with the order relation < such that (j 1 , k 1 ) < (j 2 , k 2 ) if either k 1 < K k 2 , or k 1 = K k 2 and j 1 < J j 2 . These operators are naturally extended on order types. For instance, the order type (ω) ω is the class of all linear orderings <-isomorphic to N 2 .

The grid we consider is a linear ordering that is a subset of R, of order type

N + ζ + 1 + ζ
ω . An ordering of order type N + ζ + 1 + ζ within the interval [0, 3) is depicted in Figure 1. Each dot corresponds to a natural number and each vertical line corresponds to an element of the linear ordering. The first N points will support the encoding of a state. The first subordering that is <-isomorphic to Z (i.e., of order type ζ) will be used to encode the position of the head, while the second one will support the encoding of the tape content. The whole grid is composed of an infinite repetition of the subordering N + ζ + 1 + ζ (i.e., it is repeated on the intervals [3k, 3k + 3) for all k ∈ N), hence the ω exponent.

Defining the Support of the Encoding

Let us first define concretely the support of the encoding of the Turing machine configurations. The difficulty lies in describing the grid using a single predicate P , without meddling with the actual encoding of the configurations afterwards.

Our solution is to characterize the points that belong to the grid by enforcing that such a point is surrounded by an open interval where P is uniformly true on the left, and by an open interval where P is uniformly false on the right, such as depicted in Figure 2. We do not specify yet how P behaves on x, as this is how the configurations will actually be encoded later. Such a characterization is easy to express in our restriction of uf1•rdl: Support(x) = (∃y. y < x∧∀z. y < z < x ⇒ P (z))∧(∃y. x < y∧∀z. x < z < y ⇒ ¬P (z))

Let us now partially axiomatize the predicate P such that the set of supporting points constitutes a linear ordering of order type

N + ζ + 1 + ζ ω :
(a) Let 0 be a variable and 1, 2 and 3 be respectively the +1-successor of 0, 1 and 2:

Axiom 1 = (1 = 0 + 1) ∧ (2 = 1 + 1) ∧ (3 = 2 + 1)
These free variables are implicitly existentially quantified in the final formula.

Notice that the variable 0 can be interpreted as any real value, which only acts as a landmark for the beginning of the grid. (b) 0, 1 and 2 are supporting points:

Axiom 2 = Support(0) ∧ Support(1) ∧ Support(2) (c) P is uniformly true before 0, i.e., there are no supporting points before 0:

Axiom 3 = ∀x. x < 0 ⇒ P (x) (d) There are exactly N -2 supporting points within the interval (0, 1):

Axiom 4 = ∃x 1 , x 2 , . . . x N . x 1 = 0 ∧ x N = 1 ∧ 1≤i<N 0 ≤ x i < 1 ∧ Succ Supp (x i+1 , x i )
where Succ Supp (x, y) is a formula that states that x is the first supporting real value that is strictly greater than y, i.e., x is the successor of y on the grid. It is defined as follows: Succ Supp (x, y) = y < x∧Support(x)∧Support(y)∧∀z. y < z < x ⇒ ¬Support(z)

We also define an analogous formula to express that x is the predecessor of y: Pred Supp (x, y) = Succ Supp (y, x). (e) The set of supporting points within (1, 2) is <-isomorphic to Z. This is done similarly to the axiomatization of P int (cf. Section 3.1). But because 1 (resp.

2) is a supporting point, there must exist a uniformly false (resp. true) interval of P at its right (resp. left) where no other supporting points can appear.

All the supporting points will therefore be constrained to appear within a smaller interval (b 1 , b 2 ) with 1 < b 1 < b 2 < 2, as illustrated in Figure 3.

Axiom 5 = [∃b 1 , b 2 . 1 < b 1 < b 2 < 2] (1)
∧ [∀x. (b 1 < x < b 2 ) ⇒ ∃y. x < y < b 2 ∧ Support(y) ∧ ∀z. x < z < y ⇒ ¬Support(z)] (2) ∧ [∀x. (b 1 < x < b 2 ) ⇒ ∃y. b 1 < y < x ∧ Support(y) ∧ ∀z. y < z < x ⇒ ¬Support(z)] (3) ∧ [∀x. (1 < x < 2 ∧ Support(x)) ⇒ b 1 < x < b 2 ] (4)
This axiom can be broken down into these elementary pieces: [START_REF] Boigelot | Decidability of difference logics with unary predicates[END_REF] there exists an open interval (b

1 , b 2 ) such that 1 < b 1 < b 2 < 2, (2)
Axiom 6 = ∀x. 1 < x < 2 ⇒ (Support(x) ⇔ Support(x + 1
)) (g) The pattern of supporting points within [0, 3) is repeated onto every interval [3k, 3k + 3) for k ∈ N:

Axiom 7 = ∀x. x ≥ 0 ⇒ (Support(x) ⇔ Support(x + 3))
Notice that for Axiom 7 , it is not enough that a similar pattern appears within each interval [3k, 3k + 3): there must be an exact offset of 3 with the previous interval. This is mandatory to connect two consecutive configurations and ensure that they are coherent with the transition relation of the Turing machine, as defined later. The same goes for Axiom 6 , where the exact offset of 1 will allow to connect the position of the head to the tape content within a single configuration. Lemma 3. The formula AXIOMS Supp is consistent.

The proof sketch below provides the key ideas to construct a model of AXIOMS Supp . The complete construction is described in [START_REF] Boigelot | Decidability of difference logic over the reals with uninterpreted unary predicates[END_REF].

Proof. Let us construct a subset S of R that is a model of AXIOMS Supp . Firstly, we make every negative number belong to S, which ensures that there do not exist negative supporting points. The interval [0, 1] is then cut into 2N -2 intervals of equal length, which alternate between being included in S, and being disjoint from S. This ensures the existence of exactly N -1 supporting points within the interval (-∞, 1), 0 being the first; 1 will be considered later. These N -1 supporting points are referred to as s 1 , s 2 , . . . s N -1 and are depicted in Figure 4. Recall that the supporting points are exactly those surrounded by an interval of S (i.e., black on the figure) on the left, and an interval disjoint from S (i.e., white) on the right.

In order to make the real value 1 the N -th supporting point, it is enough to make an interval on its right disjoint from S, e.g., the interval (1, 1 + 1 4 ). Symmetrically, we make the interval (2 -1 4 , 2) included in S, satisfying the left part of the requirement for the real value 2 to be a supporting point. We further characterize S such that the set of supporting points within the interval (1 + 1 4 , 2 -1 4 ) is <-isomorphic to Z. This can be done by partitioning the open interval (1+ 1 4 , 2-1 4 ) into a bi-infinite sequence of open intervals alternating between being included and disjoint from S, as depicted in Figure 5. Fig. 5. A model for the axiomatization of P over the interval (1, 2).

The whole pattern described on the interval (1, 2) can be directly transposed onto the interval (2, 3) with an exact offset of +1. Similarly, the distribution of S over the interval (0, 3) can be transposed onto every interval (3k, 3k + 3) with an offset of +3k, for k > 0. The only real values for which we do not describe their relation with S are the points surrounded by an interval included in S on one side, and an interval disjoint from S on the other side. These points never conflict with the axiomatization AXIOMS Supp which only deals with non-empty open intervals.

By construction, S satisfies each axiom of the formula AXIOMS Supp , and is therefore a model of this formula. ⊓ ⊔

Encoding a Configuration of the Turing Machine

Now that the supporting grid has been properly defined, the actual encoding of a given configuration can be addressed. That is, the state, the tape content and the head position of the (k + 1)-th configuration of a run are encoded on the supporting points contained within the interval [3k, 3k + 3).

Encoding the State Encoding the state of a given configuration is rather direct since we defined the grid to contain N consecutive supporting points within every interval [3k, 3k + 1] for k ∈ N, that can support the encoding of a state. We only need to indicate that we start reading the encoding on a multiple of 3. However the logic uf1•rdl does not allow to express periodicity constraints on variables. Nevertheless, thanks to our axiomatization, 0 and every other positive multiple of 3 are the only points that simultaneously have no supporting predecessor, while admitting a supporting successor. These properties are expressible as follows:

NoPred Supp (x) = ∀z. (z < x ∧ Support(z)) ⇒ ∃y. z < y < x ∧ Support(y) HasSucc Supp (x) = ∃z. x < z ∧ Support(z) ∧ ∀y. x < y < z ⇒ ¬Support(y) For convenience, we introduce the formula EncodingBegins to characterize a real value x on which the encoding of a state starts:

EncodingBegins(x) = Support(x) ∧ NoPred Supp (x) ∧ HasSucc Supp (x) Furthermore, the formula State q expresses that a state q ∈ Q is encoded on a given real number x and its N -1 supporting successors: where P (y i ) = b q i is a shorthand for P (y i ) if b q i = ⊤, and ¬P (y i ) if b q i = ⊥.

Encoding the Head Position The position of the head is encoded in the second part of the grid, that is, in the interval (3k + 1, 3k + 2) for the (k + 1)-th configuration (cf. Figure 1). The grid on this interval is <-isomorphic to Z. Each element of this subordering will correspond to a position of the tape. When the predicate P is true at such a point, it means that the head points towards that cell. Since the Turing machines that we consider here have a single read/write head, it must point towards a unique cell for each configuration. Therefore P must be true only for a single element of that subordering.

Encoding the Tape Content Similarly, the tape content is encoded in the third part of the grid, that is, in the interval (3k + 2, 3k + 3) for the (k + 1)-th configuration (cf. Figure 1). Again, the grid on this interval is <-isomorphic to Z. And again, each element x of this subordering will correspond to a cell of the tape, matching the cell that corresponds to x -1 in the head position interval. Figure 6 illustrates the connections between the suborderings, within a single configuration and with the next one. The idea of the encoding is to simply set the value of P to true on the elements of the subordering that correspond to cells containing a 1, and to false for cells containing a 0.

Enforcing a Valid Run

Let us now define formally the formulas characterizing an accepting run of M.

We will decompose the global formula into three main parts: the initial conditions START M , the conditions on the transitions STEP M and the halting condition END M . For the sake of clarity, we use capital letters for these higherlevel formulas. The initial conditions of M are that the state encoded on 0 and its N -1 supporting successors is the initial state q 0 , that the head points towards a unique initial unspecified cell of the tape, and finally that the tape is initially filled with 0's. These conditions are expressed by the following formula:

START M = State q0 (0) ∧ ∃y. 1 < y < 2 ∧ Support(y) ∧ P (y) ∧ ∀x. (1 < x < 2 ∧ Support(x) ∧ P (x)) ⇒ x = y ∧ ∀y. (2 < y < 3 ∧ Support(y)) ⇒ ¬P (y)
The requirements on the transition are more complex. Intuitively, if before reaching the step i ∈ N, we have not yet encountered the halting state q F , then we must ensure that the configuration at Step i can be obtained from the configuration at the previous step i -1 by following a transition (q, α, q ′ , α ′ , λ) ∈ ∆. The overall formula for this condition is the following:

STEP M = ∀y. (y > 0 ∧ EncodingBegins(y) ∧ NotEnded M (y)) ⇒ ∃x. y = x + 3 ∧ Transition M (x, y)
The subformula NotEnded M (y) expresses that no valid real value prior to y (i.e., a positive multiple of 3 strictly smaller than y) encodes the halting state. This formula is defined by:

NotEnded M (y) = ∀x. (x < y ∧ EncodingBegins(x)) ⇒ ¬(State q F (x))
The subformula Transition M (x, y) expresses that there exists a transition (q, α, q ′ , α ′ , λ) ∈ ∆ that allows to move in one step from the configuration encoded at x (i.e., that the encoding of the configuration starts exactly on x), to the configuration corresponding to y. To improve readability, we decompose the condition on the transition relation as follows:

Transition M (x, y) = (q,α,q ′ ,α ′ ,λ)∈∆ State q (x) ∧ State q ′ (y) ∧ Tape α,α ′ (x, y) ∧ Head λ (x, y)
For a given transition (q, α, q ′ , α ′ , λ) ∈ ∆, the conditions on the states, tape and head are expressed as follows:

-The state q must be encoded on the real value x, and the state q ′ on y:

State q (x) ∧ State q ′ (y) -The tape must contain α ∈ {0, 1} at the position of the head for the step corresponding to x. Additionally, for the step corresponding to y, the tape must contain α ′ at the previous position of the head, and remain unchanged at all other positions.

Tape α,α ′ (x, y) = ∀z. (x + 1 < z < x + 2 ∧ Support(z) ∧ P (z)) ⇒ P (z + 1) = α ∧ P (z + 4) = α ′ ∧ ∀z. (x + 1 < z < x + 2 ∧ Support(z) ∧ ¬P (z)) ⇒ (P (z + 1) ⇔ P (z + 4))
Where P (z + k) = α is a shorthand for ∃u. u = z + k ∧ P (u) if α = 1, and ∃u. u = z + k ∧ ¬P (u) if α = 0. The " + 1" operator allows us to connect the encoding of the head position with the encoding of the tape content within the same configuration. The " + 4" operator does the same while jumping to the next configuration (cf. Figure 4). Notice that this formula does not involve y; it assumes (rightfully, given the formula STEP M ) that the equality y = x + 3 holds. -The head is moved in the direction specified by λ ∈ {L, R}, i.e., left for L and right for R. This can be expressed by exploiting the predecessor and successor relations defined for supporting real values.

Head λ (x, y) = ∀z. (x + 1 < z < x + 2 ∧ Support(z) ∧ P (z))

⇒ ∃v. f λ (v, z + 3) ∧ P (v) ∧ ¬P (z)

where f R = Succ Supp and f L = Pred Supp . Since in the initial configuration of the Turing machine the head points towards a single cell, the formula Head λ ensures that this remains the case throughout every run of the Turing machine.

Finally, the existence of a halting run is expressed by the formula:

END M = ∃x. State q F (x)
The global formula that expresses that the Turing machine M halts on some run encoded by the value of the predicate P is the following:

HALT M = START M ∧ STEP M ∧ END M ∧ AXIOMS Supp
where AXIOMS Supp is the axiomatization of the supporting points as described in Section 4.3.

By construction, satisfiability of the global formula HALT M is equivalent to the existence of a halting run for the Turing machine M. It follows that the satisfiability problem for uf1•rdl is undecidable, which proves Theorem 2.

Conclusion

This work provides a lower and an upper bound for the decidability of firstorder fragments with quantifiers mixing uninterpreted unary predicates and weak forms of real arithmetic. This draws a precise picture of the frontier of decidability in fragments mixing real arithmetic and uninterpreted predicates.

We proved the decidability of the fragment uf1•idl•iro, where uninterpreted unary predicates, order constraints between real and integer variables, and difference logic constraints between integer variables are allowed. This result is a consequence of the already established decidability of its restriction uf1•ro, where only uninterpreted unary predicates and order constraints between real values are allowed. To the best of our knowledge, there does not exist yet a practical decision procedure for uf1•ro.

There exist fragments of arithmetic that are more expressive than difference logic, but still weaker than full Presburger arithmetic. It would be interesting to investigate if decidability for these is preserved in presence of uninterpreted unary predicates. Note however that our proof of decidability strongly relies on the translation of the constraints into the first-order theory of order over R, with unary predicates. This translation is not suitable for, e.g., constraints of the form x + y ▷◁ 0, where x and y are variables, and ▷◁ ∈ {<, ≤, =, ≥, >}.

In another result, we established the undecidability of the fragment uf1•rdl, where uninterpreted unary predicates and difference logic constraints between real variables are allowed. It is worth mentioning that this result can be adapted straightforwardly to the same logic interpreted over the domain Q.

Our long term goal is to design an effective decision procedure for the decidable fragment. Complexity results have been established [START_REF] Rabinovich | Temporal logics over linear time domains are in PSPACE[END_REF][START_REF] Cristau | Automata and temporal logic over arbitrary linear time[END_REF][START_REF] Reynolds | The complexity of temporal logic over the reals[END_REF] for the temporal logic counterpart of the theory of order, to which we reduce the decidability of our fragment of interest. We are currently designing a decision procedure relying on the concept of automata on linear orderings introduced in [START_REF] Bruyère | Automata on linear orderings[END_REF]. We hope that the insight we obtained through this decision procedure will eventually guide the design of new powerful instantiation techniques for SMT in a more expressive context, and that these techniques will happen to be complete in particular for this decidable fragment.

  The automorphism g maps each open interval between the k-th and (k+1)-th successors (resp. predecessors) of 0 int in M [P int ], onto the open interval (k, k + 1) (resp. (-(k+1), -k)) while preserving order. M ′ is defined by M ′ [x] = g(M [x]) for each free variable x of the formula φ, and M ′ [P ] = {g(x) | x ∈ M [P ]} for each uninterpreted predicate P of φ. No unary predicate atom can be violated by M ′ by definition. Furthermore, no order constraint can be violated by M ′ either since g preserves order. Regarding the difference logic constraints, the intermediate variables z i introduced in the translation are necessarily mapped to values in M [P int ] since the Succ relation enforces this property. Hence for each such variable, we have g(M [z i ]) ∈ Z.

Fig. 1 .

 1 Fig. 1. A visual representation of a linear ordering of order type N + ζ + 1 + ζ.

Fig. 2 .

 2 Fig. 2. The real number x belongs to the grid, since it is surrounded by a true (black) open interval on the left, and a false (white) open interval on the right.

  each real value in (b 1 , b 2 ) has a supporting successor, (3) each real value in (b 1 , b 2 ) has a supporting predecessor, (4) there are no supporting points within (1, b 1 ), nor within (b 2 , 2). (f) The pattern of supporting points within (1, 2) is repeated onto the interval (2, 3) with an exact offset of 1:

Fig. 3 .

 3 The points of the grid surrounded by open true (black) and false (white) intervals within (1, 2).The formula AXIOMS Supp = 1≤k≤7 Axiom k axiomatizes the predicate P .

Fig. 4 .

 4 Fig. 4. A model for the axiomatization of P over the interval (-∞, 1).

  State q (x) = EncodingBegins(x) ∧ ∃y 1 , . . . y N . x = y 1 ∧ 1≤i<N Succ Sup (y i+1 , y i ) ∧ 1≤i≤N P (y i ) = b q i

Fig. 6 .

 6 Fig. 6. The first two consecutive configuration encodings.

In the current context, this choice of notation for mixed integer-real arithmetic is simpler than using a multi-sorted logic.

Acknowledgments: We are thankful to Tanja Schindler and the reviewers of this paper and of our previous work-in-progress workshop paper for their comments.