betaFeedback

WorksComputer Science

On Presburger Arithmetic Expanded with Prime Numbers

Abstract

We prove unconditionally that the first-order theory of Presburger arithmetic expanded by a predicate for the primes is undecidable. Bateman, Jockusch and Woods proved this in 1993 assuming Dickson's conjecture. We use the counter-machine framework of Karimov, Nieuwveld and Ouaknine and their idea of using `arbitrary permutations', and the number-theoretic input comes from Hildebrand and Maier's 1988 proof that the limit points of kk consecutive normalised prime gaps have positive measure. We use a discrete version, which they obtain before limits are taken. The key lemma is that although Hildebrand and Maier's result does not seem to give arbitrary permutations of consecutive prime gaps, it gives arbitrary permutations for the differences pi−qip_i - q_i for two finite blocks of consecutive primes p0<⋯<pkp_0 < \cdots < p_k and q0<⋯<qkq_0 < \cdots < q_k. Moreover, with the same key lemma, we show that Presburger arithmetic expanded with the function that maps nn to the nnth prime defines multiplication.

Introduction

Presburger arithmetic, the first-order theory of ⟨N;+⟩\langle\mathbb{N};+\rangle, denoted FO(N;+)(\mathbb{N};+), is well known to be decidable. Naturally, the question arose of which seemingly weaker versions of multiplication can be added to Presburger arithmetic to obtain undecidability and which define multiplication. For instance, expanding Presburger arithmetic with a predicate for divisibility, coprimality, or the set of squares makes multiplication definable; see the survey of Bès [3] for these and other examples. One obvious candidate remained open: Is access to knowing whether a number is prime sufficient to establish undecidability? Can one define multiplication?

Bateman, Jockusch, and Woods [2] studied two expansions of Presburger arithmetic by the predicate P of primes using Dickson’s conjecture, which is also sometimes referred to as the linear case of Schinzel’s Hypothesis H.

Conjecture 1.1 (Dickson’s conjecture). Let a1,…,ak≥1a_1,\ldots,a_k\ge1 and b1,…,bk∈Zb_1,\ldots,b_k\in\mathbb{Z} such that for every prime number pp, there is a number xx such that none of a1x+b1,…,akx+bka_1x+b_1,\ldots,a_kx+b_k is divisible by pp. Then there are infinitely many nn such that a1n+b1,…,akn+bka_1n+b_1,\ldots,a_kn+b_k are simultaneously prime.

The conjecture is strong: it implies the twin prime conjecture. Bateman, Jockusch, and Woods show that FO(N;<,P)(\mathbb{N};<,\mathrm{P}) is decidable assuming Dickson’s conjecture (and even more strongly, that the monadic second-order theory of this expansion would be decidable). An unconditional proof of this decidability would effectively settle the twin prime conjecture. Moreover, they showed that Dickson’s conjecture implies that multiplication is definable in ⟨N;+,P⟩\langle\mathbb{N};+,\mathrm{P}\rangle, which implies the theory is undecidable. They showed that for any NN, there are numbers aa and cc such that ax+cax+c, ax+c+2ax+c+2, ax+c+6,…,ax+c+N2+Nax+c+6,\ldots,ax+c+N^2+N satisfies the premise of the conjecture while no number in between is ever prime. Hence, one gets access to the image of a quadratic polynomial and thus multiplication.

Assuming Dickson’s conjecture, Kaplan and Shelah [8] showed that FO(Z;0,1,+,P∪{−p:p∈P})(\mathbb{Z};0,1,+,\mathrm{P}\cup\{-p:p\in\mathrm{P}\}) is decidable and does not define order. As order is implicit in Presburger arithmetic via x≤y⟺∃z∈N:x+z=yx\le y\Longleftrightarrow\exists z\in\mathbb{N}:x+z=y, order seems essential for undecidability. For instance, Goldbach’s conjecture is easily expressed in FO(N;+,P)(\mathbb{N}; +, P), whereas, in Kaplan and Shelah’s structure, one can naturally express only a weaker version: every even number is a sum or difference of two primes.

An unconditional proof of the undecidability of FO(N;+,P)(\mathbb{N}; +, P) has remained open; the problem is discussed by Bès [3], Cégielski, Richard, and Vsemirnov [4], Kaplan and Shelah [8], and Karimov, Nieuwveld, and Ouaknine [10]. We show undecidability in this note.

Theorem 1.2. The theory FO(N;+,P)(\mathbb{N}; +, P) is undecidable.

Despite establishing undecidability, we do not obtain a definition of multiplication. We also study the theory FO(N;+,pr⁡)(\mathbb{N}; +, \operatorname{pr}), where pr⁡(n)\operatorname{pr}(n) is the nnth prime, whose decidability was questioned in [3, 4]. So pr⁡(1)=2\operatorname{pr}(1) = 2. To make pr⁡\operatorname{pr} total, we set pr⁡(0)=0\operatorname{pr}(0) = 0, but this choice does not matter.

Theorem 1.3. Multiplication is definable in the structure ⟨N;+,pr⁡⟩\langle\mathbb{N}; +, \operatorname{pr}\rangle.

Intuition of the proof.

We prove Theorem 1.2 using the recent framework of Karimov, Nieuwveld and Ouaknine [10]: it is enough to show that a structure simulates counter machines. A counter machine is a (Minsky) machine with finitely many states and counters that can be incremented, decremented and tested for zero, whose halting problem is undecidable in general. A structure simulates counter machines if every counter machine can be translated into a first-order sentence that holds if and only if the machine halts. Halting asserts the existence of an encoded trace of the halting computation, i.e., the successive configurations of the machine for which initial and halting configurations and a transition relation must be first-order expressible. Karimov et al. informally call structures that simulate counter machines rich as they need to realise every suitable pattern of some sort. Although the primes are expected to behave quite randomly within the set of natural numbers, controlling exact prime configurations remains difficult.

A first attempt would be to look at the results on arithmetic progressions in primes of Green and Tao [5]. Kaplan and Shelah [9 Propostion 3.6] note that it implies that for any set S⊂{1,…,k}S \subset\{1, \ldots, k\}, there are infinitely many numbers a,ba, b such that for 0≤i≤k0 \le i \le k, ai+bai + b is prime if and only if i∈Si \in S. That is, the primes contain every finite pattern. However, we need to multiply by the parameter aa, which is impossible in Presburger arithmetic.

A second attempt would be to look at consecutive prime gaps and presume that they have arbitrary permutations. That is, for any kk and permutation σ\sigma of {1,…,k}\{1, \ldots, k\}, there is a finite sequence of consecutive primes p0<⋯<pkp_0 < \cdots< p_k such that pσ(1)−pσ(1)−1<⋯<pσ(k)−pσ(k)−1p_{\sigma(1)} - p_{\sigma(1)-1} < \cdots< p_{\sigma(k)} - p_{\sigma(k)-1}. In this case, we would only need inequalities and subtraction, which are definable in ⟨N;+,P⟩\langle\mathbb{N}; +, P\rangle, and the argument of [10] would apply almost verbatim.

Unfortunately, it is not known whether consecutive prime gaps have arbitrary permutations. There are two kinds of results in this direction. First, monotone patterns occur infinitely often [1], but we are not aware of any generalisation to any other fixed pattern. Secondly, there is a result by Hildebrand and Maier.

Theorem 1.4 (Hildebrand–Maier [6]). Let k≥1k \ge1. Then there is a constant ck>0c_k > 0 such that for all sufficiently large TT, the set of limit points of

{(pr⁡(n+1)−pr⁡(n)log⁡(n),…,pr⁡(n+k)−pr⁡(n+k−1)log⁡(n)):n∈N≥1}∩[0,T]k\left\{\left(\frac{\operatorname{pr}(n+1)-\operatorname{pr}(n)}{\log(n)}, \ldots, \frac{\operatorname{pr}(n+k)-\operatorname{pr}(n+k-1)}{\log(n)}\right) : n \in\mathbb{N}_{\ge1}\right\} \cap[0,T]^k

has Lebesgue measure at least ckTkc_kT^k.

If ckc_k were larger than 1−1/k!1 - 1/k!, consecutive prime gaps would have arbitrary permutations. Although ckc_k is not explicitly computed, it appears to be much smaller, and so we cannot conclude arbitrary permutations. Differences of two limit points would allow arbitrary permutations, but the two limit points may arise at unrelated scales log⁡(n)\log(n). We therefore work with the discrete count (Theorem 4.1), where any two runs, i.e., finite blocks of consecutive primes, can be compared directly.

Lemma 1.5 (Two-run lemma). For every k≥1k \ge1 and every permutation σ\sigma of {1,…,k}\{1,\ldots,k\} there are two runs

p0<p1<⋯<pkandq0<q1<⋯<qkp_0 < p_1 < \cdots< p_k \qquad\text{and}\qquad q_0 < q_1 < \cdots< q_k

with the following property. Put ei=pi−qie_i = p_i-q_i and Δ=max⁡1≤i≤k∣ei−e0∣\Delta= \max_{1 \le i \le k} |e_i-e_0|. Then

(a) eσ(1)<eσ(2)<⋯<eσ(k)e_{\sigma(1)} < e_{\sigma(2)} < \cdots< e_{\sigma(k)}, and

(b) every gap of the second run exceeds 2Δ2\Delta: qj−qj−1>2Δq_j-q_{j-1} > 2\Delta for 1≤j≤k1 \le j \le k.

From this lemma, item (a) gives arbitrary permutations while item (b) allows us to determine whether a given pip_i and qjq_j have the same index and thus whether their difference is used in the encoding. We make this precise in the proof of Theorem 1.2 in § 2.

The functional version of the result, Theorem 1.3, follows similarly. Consider two runs (pr(n+i))i=1k(p_{r(n+i)})_{i=1}^{k} and (pr(r+i))i=1k(p_{r(r+i)})_{i=1}^{k}, and let ψ(i):=pr(n+1)−pr(r+1)≥pr(n+i)−pr(r+i)\psi(i) := p_{r(n+1)} - p_{r(r+1)} \ge p_{r(n+i)} - p_{r(r+i)}. By Lemma 1.5, there are rr and nn such that for 1≤i≤k1 \le i \le k, ψ(i)\psi(i) holds exactly when ii is a square. Conversely, if ψ(4)\psi(4) holds and i3=2i2−i1+2i_3 = 2i_2-i_1+2 for all 0<i1<i2<i30 < i_1 < i_2 < i_3 that are consecutive numbers satisfying ψ\psi, any number satisfying ψ\psi is a square. Hence, multiplication is definable.

From two runs to undecidability

We prove Theorem 1.2 using the counter-machine framework of [10] while assuming Lemma 1.5.

Counter-machine simulation

We recall the notion from [10 §1.2], specialised to index tuples of length one. A structure M\mathcal{M} with domain N\mathbb{N} simulates counter machines if there are ℓ≥1\ell\ge1, maps Seq⁡:Nℓ→N∗\operatorname{Seq}: \mathbb{N}^{\ell} \to\mathbb{N}^{*} and Rep⁡:Nℓ→N∗\operatorname{Rep}: \mathbb{N}^{\ell} \to\mathbb{N}^{*} (the encoded sequence and the elements representing its terms, respectively), and formulas rep⁡(x,y)\operatorname{rep}(x,y), cnst⁡K(x,y)\operatorname{cnst}_{K}(x,y) (computable from KK), succ⁡(x,y,z)\operatorname{succ}(x,y,z), inc⁡(x,y,z)\operatorname{inc}(x,y,z) and eq⁡(x,y,z)\operatorname{eq}(x,y,z), such that for all x∈Nℓx \in\mathbb{N}^{\ell}:

(1) Seq is surjective onto the finite sequences of natural numbers;

(2) ∣Seq⁡(x)∣=∣Rep⁡(x)∣|\operatorname{Seq}(x)| = |\operatorname{Rep}(x)|, and the entries of Rep⁡(x)\operatorname{Rep}(x) are distinct;

(3) Representation: rep⁡(x,y)\operatorname{rep}(x,y) holds if and only if yy occurs in Rep⁡(x)\operatorname{Rep}(x);

(4) Constant value KK: cnst⁡K(x,y)\operatorname{cnst}_{K}(x,y) holds if and only if y=Rep⁡(x)iy = \operatorname{Rep}(x)_i for some ii with Seq⁡(x)i=K\operatorname{Seq}(x)_i = K;

(5) Successor: succ⁡(x,y,z)\operatorname{succ}(x,y,z) holds if and only if y=Rep⁡(x)iy = \operatorname{Rep}(x)_i and z=Rep⁡(x)i+1z = \operatorname{Rep}(x)_{i+1} for some ii;

(6) Increment: inc⁡(x,y,z)\operatorname{inc}(x,y,z) holds if and only if y=Rep⁡(x)iy = \operatorname{Rep}(x)_i, z=Rep⁡(x)jz = \operatorname{Rep}(x)_j and Seq⁡(x)j=Seq⁡(x)i+1\operatorname{Seq}(x)_j = \operatorname{Seq}(x)_i + 1;

(7) Equality: eq⁡(x,y,z)\operatorname{eq}(x,y,z) holds if and only if y=Rep⁡(x)iy = \operatorname{Rep}(x)_i, z=Rep⁡(x)jz = \operatorname{Rep}(x)_j and Seq⁡(x)i=Seq⁡(x)j\operatorname{Seq}(x)_i = \operatorname{Seq}(x)_j.

Theorem 2.1 ([10 Theorem 2]). Every structure that simulates counter machines has an undecidable first-order theory.

The proof of this theorem translates a given counter machine into a first-order sentence φ\varphi that simulates its trace. To check that this is indeed a valid trace, one only needs to compare nearby terms in the trace. If the counter machine halts, this trace is finite, which some x∈Nℓx \in\mathbb{N}^{\ell} witnesses. That is, ∃xφ(x)\exists x\varphi(x) holds, and for this xx, Seq⁡(x)\operatorname{Seq}(x) is exactly the trace of the counter machine and Rep⁡(x)\operatorname{Rep}(x) encodes the corresponding sequence over which one iterates in the first-order formula.

In Presburger arithmetic, we write x≤yx \le y for ∃z (x+z=y)\exists z\,(x+z=y), x<yx < y for x≤y∧x≠yx \le y \land x \ne y, and x−yx-y for the unique zz satisfying x=z+yx=z+y when y≤xy \le x. Statements such as “pp is a prime in [a,c][a,c]” and “p,p′p,p' are consecutive primes” are thus first-order.

Applying counter machines to prime gaps

We use ℓ=6\ell= 6 and write x=(a,b,c,a′,c′,δ)\mathbf{x} = (a,b,c,a',c',\delta). For primes p∈[a,c]p \in[a,c] and q∈[a′,c′]q \in[a',c'] write p∼xqp \sim_{\mathbf{x}} q if ∣(p−q)−(a−a′)∣≤δ|(p-q)-(a-a')| \le\delta, that is,

p+a′≤q+a+δandq+a≤p+a′+δ.p+a' \le q+a+\delta\qquad\text{and}\qquad q+a \le p+a'+\delta.

Let Valid⁡(x)\operatorname{Valid}(\mathbf{x}) be the formula stating that a≤b≤ca \le b \le c and that for every prime p∈[a,c]p \in[a,c] there is exactly one prime q∈[a′,c′]q \in[a',c'] with p∼xqp \sim_{\mathbf{x}} q. For valid x\mathbf{x} and a prime p∈[a,c]p \in[a,c] we call this qq the match of pp and write Match⁡(p)\operatorname{Match}(p). Both Valid and the graph of Match are first-order definable in ⟨N;+,P⟩\langle\mathbb{N}; +, P\rangle. Put v(p)=p−Match⁡(p)∈Zv(p)=p-\operatorname{Match}(p)\in\mathbb{Z}. We use vv only in comparisons: v(p)≤v(p′)v(p)\le v(p') stands for the formula p+Match⁡(p′)≤p′+Match⁡(p)p+\operatorname{Match}(p')\le p'+\operatorname{Match}(p), and similarly for <<.

Proposition 2.2. If Lemma 1.5 holds, then ⟨N;+,P⟩\langle\mathbb{N}; +, P\rangle simulates counter machines.

Proof. If Valid(x) fails, let Seq(x) and Rep(x) be empty sequences. Otherwise, call the primes in (a,b](a,b] marks, let Rep(x) list the primes in (b,c](b,c] in increasing order, and set

Seq⁡(x)i=#{p′ a mark:v(p′)≤v(Rep⁡(x)i)}.\operatorname{Seq}(x)_i=\#\{p' \text{ a mark}:v(p')\le v(\operatorname{Rep}(x)_i)\}.

Writing p,p′p,p' for elements of Rep(x), the formulas are:

  • rep⁡(x,p)\operatorname{rep}(x,p): Valid(x), b<p≤cb<p\le c, and P(p)P(p);

  • cnst⁡K(x,p)\operatorname{cnst}_{K}(x,p): rep⁡(x,p)\operatorname{rep}(x,p), and exactly KK marks p′p' satisfy v(p′)≤v(p)v(p')\le v(p);

  • succ⁡(x,p,p′)\operatorname{succ}(x,p,p'): rep⁡(x,p)\operatorname{rep}(x,p), rep⁡(x,p′)\operatorname{rep}(x,p'), p<p′p<p', and no prime lies strictly between pp and p′p';

  • inc⁡(x,p,p′)\operatorname{inc}(x,p,p'): rep⁡(x,p)\operatorname{rep}(x,p), rep⁡(x,p′)\operatorname{rep}(x,p'), and exactly one mark p′′p'' satisfies v(p)<v(p′′)≤v(p′)v(p)<v(p'')\le v(p');

  • eq⁡(x,p,p′)\operatorname{eq}(x,p,p'): rep⁡(x,p)\operatorname{rep}(x,p), rep⁡(x,p′)\operatorname{rep}(x,p'), and no mark p′′p'' satisfies v(p)<v(p′′)≤v(p′)v(p)<v(p'')\le v(p') or v(p′)<v(p′′)≤v(p)v(p')<v(p'')\le v(p).

“Exactly KK” is a first-order statement computable from KK.

Items (2)–(7). If Valid(x) fails, every formula is false and both sequences are empty. Otherwise (2)–(5) are immediate. For (6) and (7), let p=Rep⁡(x)ip=\operatorname{Rep}(x)_i and p′=Rep⁡(x)jp'=\operatorname{Rep}(x)_j. If v(p)≤v(p′)v(p)\le v(p'), then Seq⁡(x)j−Seq⁡(x)i\operatorname{Seq}(x)_j-\operatorname{Seq}(x)_i is the number of marks p′′p'' with v(p)<v(p′′)≤v(p′)v(p)<v(p'')\le v(p'). If instead v(p)>v(p′)v(p)>v(p'), Seq⁡(x)j≤Seq⁡(x)i\operatorname{Seq}(x)_j\le\operatorname{Seq}(x)_i and no mark p′′p'' satisfies v(p)<v(p′′)≤v(p′)v(p)<v(p'')\le v(p'). Hence inc⁡(x,p,p′)\operatorname{inc}(x,p,p') holds if and only if Seq⁡(x)j=Seq⁡(x)i+1\operatorname{Seq}(x)_j=\operatorname{Seq}(x)_i+1. Likewise eq⁡(x,p,p′)\operatorname{eq}(x,p,p') holds if and only if Seq⁡(x)i=Seq⁡(x)j\operatorname{Seq}(x)_i=\operatorname{Seq}(x)_j, by the same argument applied to both orders of pp and p′p'.

Item (1). The empty sequence comes from any x with Valid(x) false. Let (t1,…,tτ)(t_1,\ldots,t_\tau) be non-empty, choose r≥max⁡(1,t1,…,tτ)r\ge\max(1,t_1,\ldots,t_\tau), and set k=r+τk=r+\tau. Order the positions 1,…,k1,\ldots,k by the keys

κ(j)=j(1≤j≤r),κ(r+i)=ti+iτ+1(1≤i≤τ).\kappa(j)=j\quad(1\le j\le r),\qquad\kappa(r+i)=t_i+\frac{i}{\tau+1}\quad(1\le i\le\tau).

The keys are distinct, and exactly tit_i of the first rr positions have a key below κ(r+i)\kappa(r+i). Let σ\sigma list the positions in increasing order of key, and let p0<⋯<pkp_0<\cdots<p_k and q0<⋯<qkq_0<\cdots<q_k be the runs given by Lemma 1.5 applied to σ\sigma. Put

x=(p0,pr,pk,q0,qk,Δ).\mathbf{x}=(p_0,p_r,p_k,q_0,q_k,\Delta).

For 0≤i≤k0\le i\le k we have pi∼xqip_i\sim_{\mathbf{x}}q_i, since ∣(pi−p0)−(qi−q0)∣=∣ei−e0∣≤Δ\lvert(p_i-p_0)-(q_i-q_0)\rvert=\lvert e_i-e_0\rvert\le\Delta. For j≠ij\ne i we have ∣qj−qi∣>2Δ\lvert q_j-q_i\rvert>2\Delta by (b), so ∣(pi−p0)−(qj−q0)∣>2Δ−Δ=Δ\lvert(p_i-p_0)-(q_j-q_0)\rvert>2\Delta-\Delta=\Delta. Hence x\mathbf{x} is valid and Match⁡(pi)=qi\operatorname{Match}(p_i)=q_i, so v(pi)=eiv(p_i)=e_i. The marks are p1,…,prp_1,\ldots,p_r and Rep⁡(x)=(pr+1,…,pk)\operatorname{Rep}(x)=(p_{r+1},\ldots,p_k). By (a), ej≤er+ie_j\le e_{r+i} holds if and only if κ(j)≤κ(r+i)\kappa(j)\le\kappa(r+i), so Seq⁡(x)i=ti\operatorname{Seq}(x)_i=t_i.

Proof of Theorem 1.2, given Lemma 1.5. Combine Proposition 2.2 with Theorem 2.1.

Remark 2.3. Inspecting the sentence constructed in the proof of [10 Theorem 2] shows that it has the form ∃x [Valid⁡(x)∧ψ(x)]\exists\mathbf{x}\,[\operatorname{Valid}(\mathbf{x})\land\psi(\mathbf{x})] with ψ\psi a Π2\Pi_2-formula. Hence already the ∃6∀∗∃∗\exists^6\forall^*\exists^*-fragment of FO⁡(N;+,P)\operatorname{FO}(\mathbb{N};+,P) is undecidable, where the 6 comes from x∈N6\mathbf{x}\in\mathbb{N}^6. In fact c′c' can be eliminated: taking c′=c+a′+δ−ac'=c+a'+\delta-a and applying Lemma 1.5 with k+1k+1 in place of kk, with the extra index placed last in σ\sigma, so that qk+1−qk>2Δq_{k+1}-q_k>2\Delta, the interval [a′,c′][a',c'] contains exactly q0,…,qkq_0,\ldots,q_k in the proof of Proposition 2.2, since c+a′−a=qk+(ek−e0)c+a'-a=q_k+(e_k-e_0) and the gaps of the qq-run exceed 2Δ2\Delta. This gives the ∃5∀∗∃∗\exists^5\forall^*\exists^*-fragment. The number of inner quantifiers in our construction is unbounded, since cnst⁡K\operatorname{cnst}_K uses K+1K+1 quantifiers of both kinds.

The nth prime function and multiplication

We next prove Theorem 1.3 while assuming Lemma 1.5. We first recall a classical result from Putnam [11]. Let Sq⁡\operatorname{Sq} be the predicate for the square numbers.

Lemma 3.1. The structure ⟨N;+,Sq⁡⟩\langle\mathbb{N}; +, \operatorname{Sq}\rangle defines multiplication.

Proof. First note that x=y2x=y^{2} if and only if xx is a square, x+2y+1x+2y+1 is also a square and no square lies in between. Then the identity (x+y)2=x2+y2+2xy(x+y)^{2}=x^{2}+y^{2}+2xy shows that z=xyz=xy if and only if (x+y)2=x2+y2+2z(x+y)^{2}=x^{2}+y^{2}+2z.

Proof of Theorem 1.3, given Lemma 1.5. By Lemma 3.1 it suffices to define Sq⁡\operatorname{Sq}. The positive squares are the sequence u0=1u_{0}=1, u1=4u_{1}=4, uj+2=2uj+1−uj+2u_{j+2}=2u_{j+1}-u_{j}+2, which we encode as follows. For k,n,r∈Nk,n,r\in\mathbb{N} write x=(k,n,r)x=(k,n,r), and let ψx(i)\psi_x(i) be the formula

1≤i≤k ∧ pr⁡(n+i)+pr⁡(r+1)≤pr⁡(n+1)+pr⁡(r+i).1\leq i\leq k\ \wedge\ \operatorname{pr}(n+i)+\operatorname{pr}(r+1)\leq\operatorname{pr}(n+1)+\operatorname{pr}(r+i).

Let φ(x)\varphi(x) be the formula

ψx(4) ∧ ∀i1,i2,i3: i1<i2<i3→[(⋀j=13ψx(ij)∧∀i: i1<i<i3→(¬ψx(i)∨i=i2))→i3+i1=2i2+2].\psi_x(4)\ \wedge\ \forall i_1,i_2,i_3:\ i_1<i_2<i_3\to \left[\left(\bigwedge_{j=1}^{3}\psi_x(i_j)\wedge\forall i:\ i_1<i<i_3\to(\neg\psi_x(i)\vee i=i_2)\right)\to i_3+i_1=2i_2+2\right].

Note that ψx(1)\psi_x(1) holds whenever k≥1k\geq1, and φ(x)\varphi(x) implies ψx(4)\psi_x(4). If i1<i2<i3i_1<i_2<i_3 are consecutive among the numbers satisfying ψx\psi_x, then i3+i1=2i2+2i_3+i_1=2i_2+2.

If φ(x)\varphi(x) holds, then k≥4k\geq4 and every number that satisfies ψx\psi_x is a square. Indeed, if ψx(2)\psi_x(2) held, the next number satisfying ψx\psi_x would be 5, contradicting ψx(4)\psi_x(4). Similarly, ψx(3)\psi_x(3) cannot hold. By induction along the recurrence, ψx(i)\psi_x(i) holding means ii is a square.

Conversely, let k≥4k\geq4, and let σ\sigma list first the squares in {2,…,k}\{2,\ldots,k\}, then 1, then the non-squares in {2,…,k}\{2,\ldots,k\}. Lemma 1.5 applied to σ\sigma gives runs of consecutive primes, so let pi=pr⁡(n+i)p_i=\operatorname{pr}(n+i) and qi=pr⁡(r+i)q_i=\operatorname{pr}(r+i) for suitable n,rn,r. By (a), pi+q1≤p1+qip_i+q_1\leq p_1+q_i holds exactly for the squares i≤ki\leq k, so φ(k,n,r)\varphi(k,n,r) holds. Therefore,

Sq⁡(i)⟺i=0∨∃n,r(φ(4i,n,r)∧ψ4i,n,r(i)).\operatorname{Sq}(i)\Longleftrightarrow i=0\vee\exists n,r\left(\varphi(4i,n,r)\wedge\psi_{4i,n,r}(i)\right).

Proof of Lemma 1.5

We begin with the discrete version of Hildebrand and Maier’s Theorem 1.4. For a run p0<⋯<pkp_0<\cdots<p_k, define its gap vector as (p1−p0,…,pk−pk−1)(p_1-p_0,\ldots,p_k-p_{k-1}). For x>1x>1, T>0T>0, N≥1N\geq1, and n∈{1,…,N}k\mathbf{n}\in\{1,\ldots,N\}^{k}, let

Bn=∏j=1k((nj−1)Tlog⁡xN,njTlog⁡xN].\mathcal{B}_{\mathbf{n}}=\prod_{j=1}^{k}\left((n_j-1)\frac{T\log x}{N},n_j\frac{T\log x}{N}\right].

A box is hit if it contains the gap vector of a run of k+1k+1 consecutive primes.

Theorem 4.1 ([6]). For every k≥1k \ge1 there are c∈(0,1]c \in(0,1] and T>0T > 0 such that for all N≥1N \ge1 there are arbitrarily large xx (depending on NN) for which at least cNkcN^k of the boxes Bn\mathcal{B}_n are hit.

This is precisely inequality (17) in Hildebrand and Maier’s paper. To recall the argument, they construct a matrix containing ≫R\gg R tuples of k+1k+1 consecutive primes (their equation (14)), and show that each of the NkN^k boxes contains at most O(R/Nk)O(R/N^k) such tuples (their equation (19)). Hence ≫Nk\gg N^k boxes contain such tuples, proving (17). This holds at a single value of xx, and for arbitrarily large values of xx.

The next lemma is a pigeonhole-principle argument showing that, for a given vector w\mathbf{w}, a large enough subset of {1,…,N}k\{1,\ldots,N\}^k contains two points that differ by a small multiple of w\mathbf{w}.

Lemma 4.2. Let w∈Zk∖{0}\mathbf{w}\in\mathbb{Z}^k\setminus\{\mathbf{0}\}, L≥2L\ge2, and H⊆{1,…,N}k\mathcal{H}\subseteq\{1,\ldots,N\}^k with #H>Nk/L+∥w∥1Nk−1\#\mathcal{H}>N^k/L+\|\mathbf{w}\|_1N^{k-1}. Then there are b∈H\mathbf{b}\in\mathcal{H} and 1≤t≤L−11\le t\le L-1 with b+tw∈H\mathbf{b}+t\mathbf{w}\in\mathcal{H}.

Proof. The lines {b+tw:t∈Z}\{\mathbf{b}+t\mathbf{w}:t\in\mathbb{Z}\} partition the box {1,…,N}k\{1,\ldots,N\}^k. Each line ℓ\ell meets {1,…,N}k\{1,\ldots,N\}^k in consecutive points bℓ,bℓ+w,…,bℓ+(sℓ−1)w\mathbf{b}_{\ell},\mathbf{b}_{\ell}+\mathbf{w},\ldots,\mathbf{b}_{\ell}+(s_{\ell}-1)\mathbf{w} for some bℓ\mathbf{b}_{\ell} and sℓ≥1s_{\ell}\ge1. Cut each such progression into pieces of LL consecutive points, the first possibly shorter. As two points in the same piece differ by twt\mathbf{w} with 1≤t≤L−11\le t\le L-1, it suffices to show there are fewer than #H\#\mathcal{H} pieces.

The number of pieces is at most Nk/LN^k/L (at most the number of pieces containing no bℓ\mathbf{b}_{\ell}) plus the number of lines meeting {1,…,N}k\{1,\ldots,N\}^k (the number of pieces containing a bℓ\mathbf{b}_{\ell}). A point bℓ\mathbf{b}_{\ell} satisfies bℓ−w∉{1,…,N}k\mathbf{b}_{\ell}-\mathbf{w}\notin\{1,\ldots,N\}^k, so bℓ,j≤wjb_{\ell,j}\le w_j for some jj with wj>0w_j>0, or bℓ,j>N+wjb_{\ell,j}>N+w_j for some jj with wj<0w_j<0. This occurs at most ∑j=1k∣wj∣Nk−1=∥w∥1Nk−1\sum_{j=1}^k|w_j|N^{k-1}=\|\mathbf{w}\|_1N^{k-1} times, and so there are at most Nk/L+∥w∥1Nk−1<#HN^k/L+\|\mathbf{w}\|_1N^{k-1}<\#\mathcal{H} pieces. □

We can now prove Lemma 1.5.

Proof of Lemma 1.5. Fix k≥1k\ge1 and a permutation σ\sigma of {1,…,k}\{1,\ldots,k\}, let s(i)=σ−1(i)s(i)=\sigma^{-1}(i) be the desired rank of 1≤i≤k1\le i\le k, and set s(0)=0s(0)=0. The idea is to find two runs p0<⋯<pkp_0<\cdots<p_k and q0<⋯<qkq_0<\cdots<q_k where we set ei=pi−qie_i=p_i-q_i for 0≤i≤k0\le i\le k. Then we ensure that each ei−e0e_i-e_0 is, up to a common scaling factor, approximately 4ks(i)4ks(i), with an error of less than kk on the same scale. That is, the gap vectors (pi−pi−1)i=1k(p_i-p_{i-1})_{i=1}^k and (qi−qi−1)i=1k(q_i-q_{i-1})_{i=1}^k differ by roughly a multiple of w\mathbf{w}, where wj=4k(s(j)−s(j−1))w_j=4k(s(j)-s(j-1)). To find such runs, we apply Lemma 4.2 to the boxes hit in Theorem 4.1.

Let c∈(0,1]c\in(0,1] be as in Theorem 4.1, LL an integer with L>4cL>\frac{4}{c}, and NN an integer with

c4kN≥max⁡(8k2L,∥w∥1).\frac{c}{4k}N\ge\max(8k^2L,\|\mathbf{w}\|_1).

Take TT and xx as in Theorem 4.1, let H⊂{1,…,N}k\mathcal{H}\subset\{1,\ldots,N\}^k be the set of indices n\mathbf{n} of hit boxes Bn\mathcal{B}_{\mathbf{n}}, let H~\widetilde{\mathcal{H}} those with nj≥c4kN+1n_j\ge\frac{c}{4k}N+1 for all jj, and write u=Tlog⁡xNu=\frac{T\log x}{N} for the side length of the boxes. Then, #H≥cNk\#\mathcal{H}\ge cN^k. As 1<c4kN1<\frac{c}{4k}N, at most k⋅(c4kN+1)Nk−1<c2Nkk\cdot(\frac{c}{4k}N+1)N^{k-1}<\frac{c}{2}N^k boxes have some nj<c4kN+1n_j<\frac{c}{4k}N+1, so

#H~>#H−c2Nk≥c4Nk+c4Nk>NkL+∥w∥1Nk−1.\#\widetilde{\mathcal{H}}>\#\mathcal{H}-\frac{c}{2}N^k\ge\frac{c}{4}N^k+\frac{c}{4}N^k>\frac{N^k}{L}+\|\mathbf{w}\|_1N^{k-1}.

Lemma 4.2 gives b,b+tw∈H~\mathbf{b},\mathbf{b}+t\mathbf{w}\in\widetilde{\mathcal{H}} with 1≤t≤L−11\le t\le L-1. Take a run q0<⋯<qkq_0<\cdots<q_k with gap vector (qj−qj−1)j=1k(q_j-q_{j-1})_{j=1}^k in Bb\mathcal{B}_{\mathbf{b}}, and a run p0<⋯<pkp_0<\cdots<p_k with gap vector (pj−pj−1)j=1k(p_j-p_{j-1})_{j=1}^k in Bb+tw\mathcal{B}_{\mathbf{b}+t\mathbf{w}}. Since the side-length uu boxes are twj=t⋅4k(s(j)−s(j−1))tw_j=t\cdot4k(s(j)-s(j-1)) steps apart in coordinate jj, we have

∣ej−ej−1−4tuk(s(j)−s(j−1))∣<u.\left|e_j-e_{j-1}-4tuk(s(j)-s(j-1))\right|<u.

Summing over j≤ij\le i gives two telescoping sums, which imply

∣(ei−e0)−4kt s(i) u∣<iu<ku.\left|(e_i-e_0)-4kt\,s(i)\,u\right|<iu<ku.

If s(i′)=s(i)+1s(i')=s(i)+1, then (ei′−e0)−(ei−e0)>4tku−2ku≥2ku>0(e_{i'}-e_0)-(e_i-e_0)>4tku-2ku\ge2ku>0, which proves (a). For (b), Δ=max⁡i∣ei−e0∣≤4k2tu+ku<4k2Lu≤c8kNu\Delta=\max_i|e_i-e_0|\le4k^2tu+ku<4k^2Lu\le\frac{c}{8k}Nu, while every gap of the qq-runs is at least c4kNu>2Δ\frac{c}{4k}Nu>2\Delta. □ৰাকী

Discussion

The proof of Theorem 1.2 does not show that multiplication is definable in ⟨N;+,P⟩\langle\mathbb{N}; +, P\rangle, while Theorem 1.3 shows it is definable in ⟨N;+,pr⁡⟩\langle\mathbb{N}; +, \operatorname{pr}\rangle. The key difference is that the functional version allows arithmetic on prime indices. Hence, we expect that the techniques from this note cannot settle definability of multiplication in ⟨N;+,P⟩\langle\mathbb{N}; +, P\rangle, and that one needs more precise information about linear relations between primes such as those coming from Dickson’s conjecture.

By Remarks 2.3 and 3.2, the ∃∗∀∗∃∗\exists^*\forall^*\exists^*-fragments of both FO⁡(N;+,P)\operatorname{FO}(\mathbb{N}; +, P) and FO⁡(N;+,pr⁡)\operatorname{FO}(\mathbb{N}; +, \operatorname{pr}) are undecidable. We expect that these results are not optimal, and that the ∃∗\exists^*-fragments of both theories are also undecidable. For example, assuming Dickson’s conjecture, for every finite sequence (ti)i=1τ(t_i)_{i=1}^{\tau} of natural numbers, there is a number nn such that pr⁡(n+2i+1)−pr⁡(n+2i)=2ti+2\operatorname{pr}(n+2i+1)-\operatorname{pr}(n+2i)=2t_i+2 for 1≤i≤τ1\leq i\leq\tau. Using the techniques from § 2.1, we can encode a given counter machine in the ∃∗∀∗\exists^*\forall^*-fragment of FO⁡(N;+,pr⁡)\operatorname{FO}(\mathbb{N}; +, \operatorname{pr}), giving undecidability. Meanwhile, we expect that the existential fragment of FO⁡(N;+,P)\operatorname{FO}(\mathbb{N}; +, P) is decidable again assuming Dickson’s conjecture.

Although order is implicit in Presburger arithmetic, it is also definable in the structure ⟨Z;+,P⟩\langle\mathbb{Z}; +, P\rangle: By a result of Tao [12], every odd number at least 3 is the sum of at most 5 primes, so every non-negative even number is the sum of at most 6 primes. Thus, x≥0x\geq0 if and only if 2x2x is the sum of at most 6 primes. Hence, we can recover the natural numbers in the structure ⟨Z;+,P⟩\langle\mathbb{Z}; +, P\rangle, making its first-order theory undecidable. Definability of order seems necessary, as Kaplan and Shelah [8] showed that FO⁡(Z;0,1,+,P∪{−p:p∈P})\operatorname{FO}(\mathbb{Z}; 0, 1, +, P\cup\{-p:p\in P\}) is decidable assuming Dickson’s conjecture.

Acknowledgements

The author was supported by the Glasstone Benefaction, University of Oxford [Violette and Samuel Glasstone Research Fellowships in Science 2025].

AI declaration. Claude Opus 5.5 was used to prepare this note. In particular, when prompted with Lemma 1.5 and Hildebrand and Maier’s paper [6], it returned a first draft of the proof presented in § 3.1. The remainder of the proof is our own, although AI helped frame and smooth our construction. Furthermore, AI was used to proofread this note and suggest improvements. The author takes full responsibility for the correctness of the results.

References

Department of Computer Science, University of Oxford

References

  1. [1]W. D. Banks, T. Freiberg, and C. L. Turnage-Butterbaugh, Consecutive primes in tuples, Acta Arith. 167 (2015), 261–266.DOI
  2. [2]P. T. Bateman, C. G. Jockusch, and A. R. Woods, Decidability and undecidability of theories with a predicate for the primes, J. Symbolic Logic 58 (1993), 672–687.DOI
  3. [3]A. Bès, A survey of arithmetical definability, Bull. Belg. Math. Soc. Simon Stevin (2001), no. suppl., 1–54, Suppl. (A tribute to Maurice Boffa).
  4. [4]P. Cégielski, D. Richard, and M. Vsemirnov, On the additive theory of prime numbers, Fund. Inform. 81 (2007), 83–96.DOI
  5. [5]B. Green and T. Tao, Linear equations in primes, Ann. of Math. (2) 171 (2010), 1753–1850.arxiv.org/abs/math/0606088
  6. [6]A. Hildebrand and H. Maier, Gaps between prime numbers, Proc. Amer. Math. Soc. 104 (1988), 1–9.DOI
  7. [8]I. Kaplan and S. Shelah, Decidability and classification of the theory of integers with primes, J. Symbolic Logic 82 (2017), 1041–1050.arxiv.org/abs/1601.07099
  8. [9]Itay Kaplan and Saharon Shelah, Decidability and classification of the theory of integers with primes, Journal of Symbolic Logic 82 (2017), no. 3, 1041–1050.arxiv.org/abs/1601.07099
  9. [10]T. Karimov, J. J. Nieuwveld, and J. Ouaknine, Rich sequences and decidability of arithmetic theories, 2026, Preprint, arXiv:2609.20415.arxiv.org/abs/2609.20415
  10. [11]H. Putnam, Decidability and essential undecidability, J. Symbolic Logic 22 (1957), 39–54.DOI
  11. [12]T. Tao, Every odd number greater than 1 is the sum of at most five primes, Math. Comp. 83 (2014), 997–1038.arxiv.org/abs/1201.6656

Paper details

vlnc:W_bj3h3r7f
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Claude Opus 5.5 (bare)

View statement
Looking for related papers…
Contents