On the -adic Skolem Problem
Abstract
The Skolem Problem asks to determine whether a given linear recurrence sequence (LRS) has a zero term. Showing decidability of this problem is equivalent to giving an effective proof of the Skolem-Mahler-Lech Theorem, which asserts that a non-degenerate LRS has finitely many zeros. The latter result was proven over 90 years ago via an ineffective method showing that such an LRS has only finitely many -adic zeros. In this paper we consider the problem of determining whether a given LRS has a -adic zero, as well as the corresponding function problem of computing exact representations of all -adic zeros. We present algorithms for both problems and report on their implementation. The output of the algorithms is unconditionally correct, and termination is guaranteed subject to the -adic Schanuel Conjecture (a standard number-theoretic hypothesis concerning the -adic exponential function). While these algorithms do not solve the Skolem Problem, they can be exploited to find natural-number and rational zeros under additional hypotheses. To illustrate this, we apply our results to show decidability of the Simultaneous Skolem Problem (determine whether two coprime linear recurrences have a common natural-number zero), again subject to the -adic Schanuel Conjecture.
Keywords and phrases:
Skolem Problem, -adic Schanuel Conjecture, Skolem Conjecture, Exponential Local-Global Principle, exponential polynomialFunding:
Piotr Bacik: Supported by EPSRC grant EP/X033813/1.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Logic and verificationAcknowledgements:
The authors would like to thank Naoki Fujita for helpful comments on the main algorithm. Joël Ouaknine is also affiliated with Keble College, Oxford as an emmy.network Fellow.Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim ThắngSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
1.1 The Skolem Problem
A linear recurrence sequence (LRS) is a sequence of integers satisfying a linear recurrence relation:
| (1.1) |
where and . We call the order of the recurrence. If is the minimum order of a recurrence satisfied by then we call the order of .
The zero set of an LRS is . The celebrated Skolem-Mahler-Lech theorem [26, 19, 17] states that the zero set is comprised of a union of a finite set and finitely many arithmetic progressions. The statement may be refined via the concept of non-degeneracy. Define the characteristic polynomial111Note that the minimal-order recurrence for an LRS is unique, and so the characteristic polynomial of is also unique. of the recurrence (1.1) to be
| (1.2) |
Let be the distinct roots of ; these are called the characteristic roots of . We say is non-degenerate if no ratio of distinct characteristic roots is a root of unity. A given LRS can be effectively decomposed as the interleaving of finitely many non-degenerate LRS [14, Theorem 1.6]. The core of the Skolem-Mahler-Lech Theorem is that a non-degenerate LRS that is not identically zero has finitely many zero terms. Unfortunately, the proof of this result remains ineffective: there is no known algorithm to determine whether a non-degenerate LRS has a zero. This is the famous Skolem Problem:
Problem 0 (The Skolem Problem).
Given an LRS specified by a non-degenerate linear recurrence and a set of initial values, determine whether there exists such that .
One can also formulate a corresponding function version of this problem in which the task is to compute the finite set of zeros of a given non-degenerate LRS. We denote the decision version by and the function version by . This notation makes explicit that we are looking for natural-number zeros of the LRS.
It is folklore that computability of reduces to decidability of . Assuming the latter, given an LRS , the finitely many zeros in each non-degenerate subsequence of can be found by brute-force search and, since the infinite suffix of an LRS remains an LRS, one can use a decision procedure for to certify that no zeros remain to be found. However, decidability of the Skolem Problem has remained open for close to a century, with only partial results known from restricting the order (see the exposition of [5] on results of [28, 29, 1]), restricting to reversible sequences of low order [18], or restricting to simple LRS and assuming certain number-theoretic conjectures [6].
In the remainder of this section we introduce various relaxations of the Skolem Problem that arise by extending LRS to larger domains and seeking zeros of such extensions.
1.2 The Bi-Skolem Problem
The first variant of the Skolem Problem involves bi-infinite (that is, two-way infinite) sequences. Indeed, given a recurrence (1.1) and initial values , there is a unique bi-infinite sequence that satisfies the recurrence. We call a linear recurrent bi-sequence (LRBS). For example, the Fibonacci sequence extends to an LRBS .
Problem 0 (Bi-Skolem Problem).
Given an LRBS , specified by a non-degenerate linear recurrence and a set of initial values, determine whether there exists such that .
We use the notation to refer to the above decision problem and we write for the corresponding function version, in which we output the finite set of zeros of a given non-degenerate bi-infinite sequence.
For function problems , write if there is a Turing reduction from to . Here for purposes of comparison we view decision problems as function problems with outputs in . Write if and . Then it is easy to see that
Indeed, the reduction is realised by splitting a given bi-infinite LRS around the index zero into forward and backward sequences (both of which are LRS) and computing the respective zeros of each of the two one-way infinite sequences.
Unlike for Skolem’s Problem, it is not known whether the function version of the Bi-Skolem Problem reduces to its decision version, i.e., it is not known whether ; however the reduction holds if one assumes the weak -adic Schanuel Conjecture [6].
1.3 The Rational Skolem Problem
Having expanded the index set of an LRS to in the Bi-Skolem Problem, we consider a further expansion of its domain to , which leads us to consider rational zeros of an LRS. One way to realise this generalisation is via the exponential-polynomial formulation of LRS. It is classical that an LRS of order with characteristic roots admits the following representation:
| (1.3) |
where the are polynomials with algebraic coefficients and degree one less than the multiplicity of as a root of the characteristic polynomial of . We say that is a rational zero of if , where denotes any -th root of . For example, the sequence has a rational zero at that is witnessed by setting . The Rational Skolem Problem asks to determine whether a given LRS has a rational zero, while its function analogue asks to compute all rational zeros of a non-degenerate sequence. We note that the definition of rational zeros is consistent with that of integer zeros, that is, the integer rational zeros of are precisely the zeros of the bi-infinite extension of .
A recent result [7, Proposition 4.7] shows that the denominator of any rational zero can be effectively bounded. This allows us to determine the relationship of the Rational Skolem Problem with the Bi-Skolem Problem and the usual Skolem Problem. We have
where, as noted earlier, is an equivalence assuming the weak -adic Schanuel Conjecture. Indeed, suppose is an LRS satisfying (1.3). We may compute a bound on the largest denominator of any rational zero of using [7, Proposition 4.7]. For the reduction (1) we note that deciding is equivalent to deciding on every LRS defined by , where . The reduction (3) is similar.
1.4 The -adic Skolem Problem
The main contributions of this paper concern the -adic zeros of an LRS, that is, zeros lying in a -adic completion of the integers with respect to a given prime . Roughly speaking, the idea is to extend a given LRS to a map such that for all . We then determine whether has any zeros in and, if yes, we compute exact representations and approximate them to arbitrary precision. By an exact representation of a -adic zero of we mean a disc in such that is the unique zero of in .222This notion may be compared to exact representations of algebraic numbers given by their minimal polynomial and an approximation that distinguishes the number from other roots of the minimal polynomial. It turns out that can have -adic zeros other than the integer or rational zeros of the original LRS . Hence the ability to determine the existence of -adic zeros does not directly solve Skolem’s Problem. Nevertheless, as our results and experiments show, working -adically offers a practical approach to finding integer zeros of an LRS that can moreover find all integer zeros subject to additional assumptions and hypotheses.
By way of example, consider the ring of 3-adic integers, which is the Cauchy completion of with respect to the absolute value . The latter is defined by writing , where is the order of 3 as a divisor of (the larger , the smaller the absolute value). It turns out that the LRS extends uniquely to a continuous map . It is not difficult to see that . Indeed, write for all . Then in . On the other hand, it can be shown by induction that for all and hence in . By continuity we conclude that .
In general, given an LRS satisfying (1.1), pick a prime such that does not divide the last coefficient of the recurrence (1.1). Then there exists and analytic functions such that for each we have for all . Let us call a zero of one of the above functions a -adic zero of . The proof of the Skolem-Mahler-Lech Theorem shows that has finitely many -adic zeros – but it does not allow one to determine whether a given has any -adic zeros and, if so, how to compute them (hence the proof does not tell us anything about computing the integer zeros either). This motivates:
Problem 0 (The -adic Skolem Problem).
Given a non-degenerate LRS and prime not dividing the last coefficient of the recurrence satisfied by , determine whether has a -adic zero.
The function version of this problem asks to compute a finite representation of all -adic zeros of (see Definition 4), allowing us both to count the number of -adic zeros and to approximate them to arbitrary precision (with respect to the -adic absolute value). As shorthand we denote the decision and function problems respectively by and .
We remark that -adic zeros have a concrete interpretation requiring little -adic terminology to understand. A -adic zero can be interpreted as a coherent collection of zeros mod for all , that is, is a -adic zero of if and only if there is an infinite sequence such that and . We then have if this sequence can be taken eventually constant.
It is open whether any of the above-mentioned variants of Skolem’s Problem can be reduced to or . The essential problem is that we do not know how to determine in general whether a -adic zero of a given LRS is rational or not. While our decision procedure can approximate such a zero to arbitrary precision, it cannot in general certify that it is irrational or even non-integer. Note also that not all rational zeros will be -adic zeros for a given prime . See Sections 3.7 and 4.1 for further discussion on these points.
1.5 Main Results
Our main theoretical result is the following.
Theorem 1.
Assuming the -adic Schanuel Conjecture, is decidable and is computable.
In the case when all characteristic roots of lie in (which occurs for infinitely many primes by the Chebotarev density theorem), we have implemented the algorithm for in the Skolem tool [2].333Skolem may be experimented with online at https://skolem.mpi-sws.org/?padic. For the algorithm described in this paper, toggle the switch labelled “Use p-adic algorithm”.
The main technical lemma (also subject to the -adic Schanuel Conjecture) behind the proof of Thm. 1 shows that if two exponential polynomials are coprime in the ring of exponential polynomials, then every common -adic zero must be rational (and thus may be found by enumerating the rationals). This lemma has consequences for the Simultaneous Skolem Problem: determine whether two LRS have a common integer zero.
Theorem 2.
Assuming the -adic Schanuel Conjecture, the Simultaneous Skolem Problem is decidable for coprime LRS.
An in-principle decision procedure for may be deduced from the doctoral thesis of Mariaule [20] that shows the first-order theory of the structure is decidable assuming the -adic Schanuel Conjecture (where ). The -adic Schanuel Conjecture is used in [20] via a desingularisation construction; given a zero of an exponential polynomial, there exists a system of exponential polynomials of which is a non-singular zero. This approach is not practical to implement however, as the algorithm entails enumerating systems of integer multivariate polynomials. In contrast, our algorithm only requires enumerating rational numbers to check for repeated zeros of a given LRS. Such a search can moreover be done efficiently in practice by searching for rational numbers close to the approximations of -adic zeros that the algorithm identifies. Using -adic approximation to speed up the search for integer zeros of LRS is explored further in [4].
2 Preliminaries
2.1 -adic numbers
We briefly recall relevant notions about -adic numbers. More details may be found in algebraic number theory textbooks such as [23, 24].
Given a prime number , every non-zero rational number may be written as for some integers coprime to , with non-zero, and . We define the valuation , and . From this derivation we see that satisfies the ultrametric inequality for all .
We define an absolute value on by . The ultrametric inequality on translates to the strong triangle inequality: for all . Define the set of -adic numbers as the completion of with respect to . If one completes with respect to then one gets the -adic integers , which may also be defined as the unit disc in :
The absolute value on extends uniquely to an absolute value on the algebraic closure . Specifically, given , we define , where is the degree of over and is the norm of , that is the determinant of the -linear transformation given by . We correspondingly extend the valuation to by . With these definitions the identity holds for all . While is not complete with respect to , taking the Cauchy completion we obtain a field that is both algebraically closed and complete under the extension of to . Denote the valuation ring of by .
2.2 Computing with -adic numbers
We will require a generalisation of the above discussion to deal with algebraic numbers lying outside of . Given a number field , let denote its ring of integers. Previous ideas of factorising to define a valuation do not carry over directly as is no longer a unique factorisation domain, instead one generalises to consider factorisations of (fractional) ideals. Define a fractional ideal of to be a non-zero finitely generated -submodule of ; equivalently, is a fractional ideal if and only if there is such that is an ideal of . Any fractional ideal has a unique factorisation
where and each is a prime ideal, [23, p. 22]. If is an ideal then . Define the valuation by if the exponent of in the prime factorisation of the ideal is , and . Any prime ideal has for a unique integer prime . We say “divides” or “lies above” . Say ramifies in if ; call the ramification index. Define the residue field degree by . Define the -adic absolute value by .444There are many conventions for the normalization of -adic absolute values as they are equivalent and induce the same completions. Denote the completion of with respect to by , which may be embedded into . Let the valuation ring be denoted by
A uniformiser is an element such that . For example, let and . Then is a uniformiser in , and the ramification index . Informally, the uniformiser takes the analogous role in that does in .
Any element can be represented as an infinite series , where each , for a choice of representatives for the residue field . In the algorithm, using this fact, and are used to enumerate elements , and to easily compute their valuations , since is equal to , where is the smallest integer for which . Practically, since only finitely many digits may be stored, for such computations one works with approximations – that is, reductions mod . This is equivalent to truncating the series representation, i.e. .
Since is a finite field, is generated by (the reduction modulo of) a single element ; therefore may be taken to be of the form
| (2.1) |
We will not expand much in this article on the intricacies of computations in , for us it suffices to, given a number field and integer prime , pick a prime ideal lying above , compute a uniformiser , and of the form (2.1). This can be handled using Montes’ algorithm, see [22]. In particular one may compute representations of all prime ideals lying above , compute valuations , and a -integral basis of , from which one can find ; a uniformiser can simply be found by enumerating elements until one is found with .
2.3 -adic interpolation of linear recurrence sequences
Consider an LRS satisfying (1.1) that is given by the formula (1.3) and let be the field generated by the characteristic roots of . As mentioned in Section 1.1, by [14, Theorem 1.6] we may effectively decompose into non-degenerate or identically zero subsequences; we may thus assume in the rest of this article that any given LRS is non-degenerate.
Pick a prime ideal lying above prime that does not divide the last coefficient of the recurrence for (so that for all ). Choose to be the smallest positive integer such that for all , where is the ramification index. For we define the -th -adic interpolant of to be the analytic function555The -adic analytic functions have the usual series definitions, see [24, section 5.4]. In particular, maps to , and converges on and maps to , when .
| (2.2) |
with . Then for each and so (2.2) defines an extension of to . In fact, the right-hand side of (2.2) converges for any and we call such an an extended -adic zero if for some . Note that since for all , by continuity for all . Thus we have a power series representation
for . We will often implicitly restrict the domain to and write that is a -adic interpolant of .
Given characteristic roots , say they are multiplicatively dependent if there is an integer tuple such that . The group of all multiplicative relations has generators which are effectively bounded by Masser’s theorem [21], this may be used to find all multiplicative relations (see also [11] for a polynomial-time algorithm) and hence find a multiplicatively independent set of algebraic numbers such that each may be expressed as a Laurent monomial in (they can be expressed in this way by non-degeneracy). Therefore may be expressed as a Laurent polynomial with algebraic coefficients
may easily be factored as , where is a Laurent monomial in and are irreducible polynomials in , . Since is never zero, finding zeros of reduces to working on each irreducible factor individually. Note also that corresponds to an order-1 LRS; in effect we are factorising as a product of irreducible (algebraic-valued) LRS.
We must still explain how -adic zeros are represented and stored. The following is a key lemma for finding zeros of power series on (a proof may be found in e.g. [12, Thm. 9.2] or [25, Thm. 27.6]).
Theorem 3 (Hensel’s Lemma for power series).
Let be a power series with coefficients in that converges on . If satisfies
then there is a unique such that and .
The following definition explains how we treat -adic zeros of power series:
Definition 4.
A specification of an extended -adic zero of an analytic function is an integer , such that , and .
Hensel’s Lemma ensures that is defined uniquely. The proof of Hensel’s lemma also provides an efficient method for computing approximations of , via the iteration and .
The next theorem is a generalisation of Strassman’s Theorem, commonly known via the notion of the Newton Polygon; see [24], page 307.
Theorem 5.
Let be a prime, and let be a nonzero convergent power series. Given , suppose are the extreme indices for which . Then has exactly zeros (counting multiplicities) on the sphere .
Thm. 5 allows us to determine how many -adic zeros we are searching for and provides a certificate when we have found them all.
Conjecture 6 (The -adic Schanuel Conjecture).
Let and linearly independent over , such that for all ). Then
where denotes the transcendence degree of over .
3 Decidability of the -adic Skolem Problem
3.1 Informal Outline of the Algorithm
In this section we prove Thm. 1, assuming the -adic Schanuel Conjecture. We start with an informal description of an algorithm that attempts to find the -adic zeros of an LRS using only brute-force search and Hensel’s Lemma. We note the problem with this approach, which motivates the subsequent development involving the -adic Schanuel Conjecture.
Let be an interpolant of a given LRS . We would like to compute specifications of all the zeros of in . The idea is to search for zeros lying in the residue classes of modulo for . Consider a representative of a residue class of . Since (e.g. [23, Ch. II, Prop. 2.4]), may be taken to be an integer in .
If then the residue class of does not contain a zero of , and we can proceed to search other residue classes. If and then the residue class contains a unique zero of by Hensel’s Lemma (Thm. 3). If neither of the above cases hold then the residue class may contain any number of zeros of . Note that we can use Thm. 5 to determine the exact number of extended -adic zeros (lying in the extension of ) of in the residue class of .666Let be a power-series expansion of around and calculate the respective smallest and largest indices for which by computing each derivative for increasing powers . By Thm. 5 there are extended -adic zeros in the same residue class as modulo . If this number is zero then we can again proceed to consider other residue classes. If the number is positive then we can refine our search by looking at residue classes modulo contained in the current class. If all the zeros of in are simple then this search will eventually terminate. However, if there is a zero in of multiplicity two or more then the search will run forever (as the inequality will never hold). The key challenge is thus to identify multiple zeros of in and determine their multiplicity.
It so happens that for irreducible factors of , assuming -adic Schanuel’s Conjecture, the only possible zeros of multiplicity two or more are rational. This is the content of the main technical results in this section and it allows us to amend the above algorithm so that it always terminates. Specifically, in parallel with the above-described process, we search by enumeration for rational zeros of . We thus find all -adic zeros either by specifying them with Hensel’s Lemma or by enumerating rationals and checking directly. We use Thm. 5 to certify that all zeros have thereby been found.
3.2 Simultaneous Zeros of Coprime Exponential Polynomials
We will now introduce our main technical lemma. We prove that every common zero of two coprime exponential polynomials over is rational. It is interesting to compare this result with [10, Proposition 3.4], which shows that two coprime exponential polynomials over in which all numerical constants are algebraic have no common zeros whatsoever, assuming Schanuel’s Conjecture over .
Let be a number field with ring of integers , and be a prime ideal lying above prime . Choose multiplicatively independent such that the -adic logarithms are defined. Note then that are linearly independent over . Let be a polynomial. Define its associated exponential polynomial by
Lemma 7.
Let be coprime polynomials with associated exponential polynomials . Suppose also that are coprime to any irreducible polynomial of the form , for , with not all zero. Then assuming the -adic Schanuel Conjecture, if , then .
Proof.
Suppose satisfies . Suppose that . First, assume that the set is linearly independent over . By the -adic Schanuel Conjecture,
| (3.1) |
Now implies that is comprised of at most algebraically independent elements. Indeed, pick some element of with positive degree in . Then implies that the component of corresponding to is algebraic over the remaining components of . Now implies that the remaining components of are algebraically dependent. Indeed, if does not appear in then this is obviously true, otherwise since and are coprime, the multivariate resultant is a non-zero polynomial in the remaining components of with a zero at (see, e.g., [13, pp. 163–164]). Thus
| (3.2) |
which contradicts (3.1).
We deduce that the set must be linearly dependent over . Consequently, we have
for some , , with the not all zero. Without loss of generality, assume that . Suppose now that is a -linearly independent set. Then the -adic Schanuel Conjecture gives
| (3.3) |
Note that the multivariate polynomial is irreducible. Indeed, if were reducible then with and linear polynomials with rational coefficients. Since , so , which contradicts -linear independence of .
Now we have , and the multivariate polynomials and are all coprime. Hence, by repeating the earlier argument with resultants several times on , the set is comprised of at most algebraically independent elements. Therefore,
| (3.4) |
which contradicts (3.3). We conclude that the elements are linearly dependent over . So
for , and , . Therefore,
| (3.5) |
and hence
| (3.6) |
This is a non-trivial algebraic relationship between . Indeed, suppose the coefficients of any monomial in in the equation (3.6) are all zero. This gives the system of equations
By taking the equation corresponding to , and imply that . Therefore, we have
so for all . Therefore (3.5) gives , contradicting our assumption that .
But since are -linearly independent, the -adic Schanuel Conjecture implies they are algebraically independent. This contradicts (3.6). We conclude finally that our initial assumption that must have been false, and so .
There are several interesting consequences.
Remark 8.
Call an exponential polynomial with algebraic coefficients if does not appear in with positive degree for . Then Lem. 7 shows that any irrational zero of an exponential polynomial with algebraic coefficients has a unique irreducible exponential polynomial with algebraic coefficients that it is a root of (if is algebraic this is just its normal minimal polynomial). Therefore, just as in the case of algebraic numbers, we may associate to any exponential-algebraic number (i.e., a root of an exponential polynomial with algebraic coefficients) a unique minimal exponential polynomial with algebraic coefficients that it is a root of.
Remark 9.
The condition that are coprime to irreducible polynomials of the form obviously holds when have no components, which is exactly when are exponential polynomials with algebraic coefficients, which is the form taken by algebraic-valued LRS.
Remark 10.
The result also holds if we work instead with Schanuel’s Conjecture on elements of , and logarithms and exponentials over .
Remark 11.
By taking to be an integer polynomial in in the statement of Lemma 7, one sees that irrational algebraic numbers cannot be zeros of irreducible exponential polynomials that are not polynomials in the usual sense.
The application of this result to LRS is the following corollary.
Corollary 12.
Let , be as in Lem. 7. Let be non-zero and irreducible and such that do not appear with positive degree in . Assuming the -adic Schanuel Conjecture, if is a zero of with multiplicity then .
Proof.
Let be the polynomial such that
Suppose have an common zero in . We are done if we show are coprime to each other and to any irreducible polynomial for any such that not all are zero, as then we can apply Lem. 7.
Since is irreducible, only fail to be coprime if . Note that
Since has no component for each , we have is a non-zero polynomial dividing for any subset . In particular this implies that , hence since it has strictly lower total degree than . Now using for each , we also have . If then has no zeros, contradicting our starting assumption. Therefore we must have , implying since it has strictly smaller total degree than . We conclude that must be constant as all of its partial derivatives vanish. This is impossible as we assume has a zero, so and are coprime.
Now, since has no component for , are obviously coprime.
Finally, only fail to be coprime if . Suppose that for some . Then we have
But this implies that has no component, so neither does , thus cannot divide , which this is a contradiction. Thus, are all coprime for any choice of as described, so Lem. 7 applies. This completes the proof. We may now ask, do there exist rational zeros of exponential polynomials with irreducible underlying multivariate polynomials, with multiplicity greater than 1? Unfortunately, the answer is yes.
Example 13.
Let . Then is a prime ideal in which divides exactly once and does not divide the coefficient of , so by Eisenstein’s criterion is irreducible in . Now let . It is easy to see that is a multiplicity 2 root of .
3.3 The Algorithm and the Proof of Termination and Correctness
With Corollary 12 in hand, we may amend the algorithm outlined earlier for finding the -adic zeros of an LRS. First we define a recursive subroutine given by Algorithm 1, which finds specifications of all the zeros in of a suitable analytic function .
Next, the idea is as follows. Following the process explained in Section 2.3, we find the -adic interpolants of a given LRS , that is, analytic functions interpolating each subsequence for each , for some integer . Since any interpolant maps to , we have by continuity that maps to . We compute a multiplicatively independent set of algebraic numbers that generates the characteristic roots of as explained in Section 2.3, and for each interpolant compute the associated Laurent polynomial such that for all .
Now, factorise , where are irreducible polynomials, and is some Laurent monomial. Next, pass the associated analytic function to Algorithm 1 to find specifications of all extended -adic zeros in of each . Unfortunately, we cannot guarantee that maps to so we require one more step to identify the -adic zeros (i.e. those in ). Note however, that for an irrational zero of that has multiplicity 1, will also be a zero of of multiplicity 1. Therefore for a suitable approximation of , we can identify as a zero of using Hensel’s lemma when we certify . Since does map to , if then Hensel’s lemma certifies that . Otherwise, if , one can certify this by computing its -adic series expansion. Thus, to find all the zeros of in , simply run through each zero of each , and in parallel do the following:
-
1.
Compute approximations of and check if one may take and whether the Hensel condition holds.
-
2.
Enumerate rationals matching the -adic expansion of and check algebraically whether .
Checking for rationals deals with the situation when a rational zero is shared by several . Pseudocode for the entire algorithm is given in Algorithm 2.
Theorem 1 follows from the next result.
Proposition 14.
Assuming the -adic Schanuel Conjecture, Algorithm 2 always terminates. Upon termination it outputs all -adic zeros of the given LRS .
Proof.
Since each factor defined on line 8 of Algorithm 2 is irreducible, by Cor. 12 the -adic Schanuel Conjecture implies that every zero in of either has multiplicity 1 or is rational. Therefore, will terminate.
Indeed, for each pair (line 6, Algorithm 1), there are 3 possibilities for extended -adic zeros detected on line 16 using Thm. 5.
-
1.
. In this case will no longer be detected in higher iterations for large enough as . Therefore this case may be discarded for large enough .
-
2.
and has multiplicity . In this case for some coprime and for large enough this will be found in the search on line 12. Note that the multiplicity of as a root of may be found as each is a polynomial in with algebraic coefficients, so pick the smallest such that this polynomial is not identically zero and -adic Schanuel’s conjecture implies . One may approximate -adically to certify it is non-zero.
-
3.
and has multiplicity 1. In this case will be detected by Hensel’s lemma using the check on line 9. Note that this check is done in the following way. If then one can check algebraically (using the -adic Schanuel Conjecture) whether or , and if they are non-zero then one can compute their valuations by computing sufficiently many -adic digits. Otherwise if then by Cor. 12 either or so by computing sufficiently many -adic digits of both quantities one can determine whether .
When terminates, lines 14-30 of Algorithm 2 pick out the zeros identified that actually lie in and outputs them. Indeed, for every pair corresponding to zero (line 14, Algorithm 2), there are three possibilities:
-
1.
. In this case, since is finite, for large enough there will not exist with , so this case is thrown out (lines 17-18).
-
2.
. In this case, Lem. 7 ensures is not a zero of for , so is a zero of with multiplicity exactly . Hence is confirmed as a zero of with Hensel’s lemma by the check on line 27, which confirms .
-
3.
. In this case could be a zero of several of the , so would be a zero of of multiplicity larger than , so the if statement on line 27 never triggers. However, for large enough , would be identified by the checks on lines 20-25.
Remark 15.
We stress that the -adic Schanuel Conjecture is required only for termination, not for correctness. When the algorithm terminates, its output is unconditionally correct.
3.4 Implementation
In the case where the characteristic polynomial of splits in , it is straightforward to implement Algorithm 2. We have written an implementation in SageMath that we have integrated into the Skolem Tool, first developed as part of [6]. The source code is available at [2]. We report on experiments in the extended version of this paper [3]. In summary, the implementation runs well for LRS of order at most 4, with the majority of instances terminating within 60 seconds, but the performance degrades at higher orders. In practice, a shortened version of the algorithm that assumes all zeros have multiplicity one can be used as zeros of higher multiplicity are rather rare. This shortened algorithm still manages to terminate within 60 seconds for around half of order-5 instances tested, but this success rate drops to 10% at order 6 and to 1% at order 7.
3.5 Simultaneous Skolem Problem
Lem. 7 has important consequences for the Simultaneous Skolem Problem. Given two non-degenerate LRS , , suppose their exponential-polynomial expansions may be written in terms of multiplicatively independent algebraic numbers . Suppose the multivariate Laurent polynomials defined by the respective exponential-polynomial expansions are coprime.777Note that two LRS that are coprime in the sense of [15] are coprime in our sense. In this case we say that and are coprime. Equivalently, and are coprime if there are no algebraic-valued LRS such that has order at least 2 and for all . We define the Simultaneous Skolem Problem to be the problem of deciding whether two LRS and share an integer zero.
Theorem 2. [Restated, see original statement.]
Assuming the -adic Schanuel Conjecture, the Simultaneous Skolem Problem is decidable for coprime LRS.
Proof.
Pick a prime not dividing the characteristic roots of and consider the LRS defined by . For some , and all , their interpolants with respect to are related by . For all , iff . Indeed, if are non-zero then is even, and is odd, so .
By Thm. 1, we may find all -adic zeros of . By coprimality of , all the -adic zeros found must be rational according to Lem. 7. Therefore they may be found by a brute-force guess-and-check search, which in particular identifies all common integer zeros. The Simultaneous Skolem Problem arises naturally in the study of the higher-dimensional Kannan-Lipton Orbit Problem [16, 9]. Given a matrix , initial vector and subspace , the Orbit Problem asks to decide whether there is such that . Now, one may write as the orthogonal space of the span of linearly independent vectors for some , that is . Then if and only if for all . Note that defines LRS whose recurrence relation is given by the characteristic polynomial of . Therefore the Orbit Problem on reduces to the Simultaneous Skolem Problem on . Thus Thm. 2 may be used to decide many cases of the Orbit Problem when , however, we do not expand on this further here.
3.6 Algebraic-valued LRS
Throughout the present article we have taken our LRS to be integer valued. The benefit of this is that integer-valued LRS always have interpolants . However, -adic interpolants of algebraic-valued LRS do not in general map to .
One can still decide the -adic Skolem Problem for algebraic-valued LRS by reducing to the integer case. First, given an algebraic LRS , assume all its recurrence coefficients and initial values are algebraic integers - if not, then there’s a such that is algebraic integer valued; consider instead. Next, define to be the number field containing all the characteristic roots and initial values of . Consider
| (3.7) |
Then is an integer LRS, and we may solve the -adic Skolem Problem on . We now claim has identical -adic zeros to .
Indeed, is a -adic zero of an (algebraic) LRS if and only if there’s a sequence such that and as . Using (3.7) and the fact that for all , , we see that if such a sequence converging to a -adic zero of exists, then we must have also, so must be a -adic zero of also, and vice versa. This proves the claim.
3.7 The Skolem Conjecture and the Skolem Problem
As noted earlier, it is open whether there is a Turing reduction between and . For a given sequence , if we happen to choose a prime such that all -adic zeros of are rational, then they can all be identified, and the output of Algorithm 2 gives a certificate that we have found all the integer zeros. This solves for . One may ask whether such a prime always exists. It turns out that a generalisation of this idea is equivalent to the Skolem Conjecture, also known as the Exponential Local-Global Principle.
Conjecture 16 (The Skolem Conjecture [27]).
Let be a simple rational LRBS taking values in the ring for some integer . Then has no integer zero iff, for some integer with , we have that for all .
Theorem 17.
The Skolem Conjecture is equivalent to the following statement: if is a simple rational LRBS taking values in the ring for some integer , then has no integer zero iff there exists and primes coprime to such that for all , there exists such that has no -adic zeros.
Proof.
Suppose is a simple rational LRBS of order taking values in the ring for some integer and that has no integer zeros (the reverse implication is trivial for both statements).
Suppose the Skolem Conjecture holds, then there’s an integer with and for all . Write
Since has finitely many elements, the vector takes only finitely many values mod and thus eventually repeats. Since has order , this means that is periodic, with some period . Let . Then each subsequence for is constant mod . In particular, for each there’s such that . Therefore there are no -adic zeros of .
Now suppose there exist , as in the theorem statement. Then for each , the subsequence has no -adic zeros for some , which means that for some integer . Let . Then the Skolem Conjecture holds for with .
4 Concluding Remarks
4.1 A Remark on Rational Zeros
Note that rational non-integer zeros can be found as -adic zeros for certain , but not always. This is because, informally, interpolating an LRS using some prime ideal fixes a definition of each for each , whereas the notion of rational zero allows to be any -th root of . This phenomenon can be seen in the example below.
Example 18.
Consider the Tribonacci sequence, defined by and , . In [7] it is shown that the set of rational zeros of the Tribonacci sequence is exactly .
The characteristic polynomial of the Tribonacci sequence splits in for (among others). Let the -th interpolant with respect to be denoted , that is, the analytic function such that for . Here we used for respectively. We used our tool to compute all the -adic zeros of for each . Define to be the set of tuples , where is the -adic zero of such that .
For each tuple corresponding to a rational zero of , recover the rational zero as .
-
For and , all the rational zeros of are correctly identified and there are no transcendental -adic zeros.
-
For and , each integer zero gives rise to three -adic zeros. For example, gives rise to . However, the rational zeros of do not appear as -adic zeros of . There are also no transcendental -adic zeros of .
-
For and , again each integer zero gives rise to three -adic zeros. Similarly to the rational zeros of do not appear as -adic zeros, but there are several transcendental -adic zeros of .
It is also possible that a rational -adic zero of a subsequence of some LRS does not correspond to a “true” zero of the original sequence, i.e, but .
Example 19.
Let . Using our tool with , we find that the analytic function satisfying for all has . Yet . This is because for the characteristic roots of embedded in . It so happens that in , up to relabelling we have , , so . Informally, what went wrong is that roots of unity were introduced by the “wrong” square roots of being chosen. In this situation we say is a twisted rational zero of . See [7] for a definition and exploration of this phenomenon. It should be noted however, that every genuine integer zero of will arise as a -adic zero for all primes . Indeed, if , then for every integer there exists such that , and will be a zero of any -adic interpolant of since for all characteristic roots , so .
References
- [1] Piotr Bacik. Completing the Picture for the Skolem Problem on Order-4 Linear Recurrence Sequences. TheoretiCS, Volume 4, December 2025. doi:10.46298/theoretics.25.28.
- [2] Piotr Bacik, Joris Nieuwveld, and David Purser. Skolem tool, August 2025. Tool available online at https://skolem.mpi-sws.org/?padic. doi:10.5281/zenodo.16794130.
- [3] Piotr Bacik, Joël Ouaknine, David Purser, and James Worrell. On the -adic skolem problem, 2025. doi:10.48550/arXiv.2504.14413.
- [4] Piotr Bacik, Joël Ouaknine, and James Worrell. On the Complexity of the Skolem Problem at Low Orders, July 2025. doi:10.48550/arXiv.2507.11234.
- [5] Yuri Bilu. Skolem Problem for Linear Recurrence Sequences with 4 Dominant Roots (after Mignotte, Shorey, Tijdeman, Vereshchagin and Bacik), March 2025. doi:10.48550/arXiv.2501.16290.
- [6] Yuri Bilu, Florian Luca, Joris Nieuwveld, Joël Ouaknine, David Purser, and James Worrell. Skolem Meets Schanuel. In 47th International Symposium on Mathematical Foundations of Computer Science (MFCS 2022), volume 241 of Leibniz International Proceedings in Informatics (LIPIcs), pages 20:1–20:15, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.MFCS.2022.20.
- [7] Yuri Bilu, Florian Luca, Joris Nieuwveld, Joël Ouaknine, and James Worrell. Twisted rational zeros of linear recurrence sequences. Journal of the London Mathematical Society, 111(3), March 2025. doi:10.1112/jlms.70126.
- [8] Frank Calegari and Barry Mazur. Nearly ordinary Galois deformations over arbitrary number fields. Journal of the Institute of Mathematics of Jussieu, 8(1):99–177, 2009. doi:10.1017/S1474748008000327.
- [9] Ventsislav Chonev, Joël Ouaknine, and James Worrell. The orbit problem in higher dimensions. In Proceedings of the Forty-Fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 941–950, New York, NY, USA, 2013. Association for Computing Machinery. doi:10.1145/2488608.2488728.
- [10] Ventsislav Chonev, Joel Ouaknine, and James Worrell. On the zeros of exponential polynomials. J. ACM, 70(4), August 2023. doi:10.1145/3603543.
- [11] Thierry Combot. Computing linear relations between polynomial roots. Mathematics of Computation, March 2025. doi:10.1090/mcom/4081.
- [12] Keith Conrad. Hensel’s Lemma. URL: https://kconrad.math.uconn.edu/blurbs/gradnumthy/hensel.pdf.
- [13] David A. Cox, John Little, and Donal O’Shea. Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Undergraduate Texts in Mathematics. Springer International Publishing, Cham, 2015. doi:10.1007/978-3-319-16721-3.
- [14] Graham Everest, Alf Van der Poorten, Igor Shparlinski, and Thomas Ward. Recurrence sequences. Number v. 104 in Mathematical surveys and monographs. American Mathematical Society, Providence, RI, 2003.
- [15] Graham R. Everest and Alf J. van der Poorten. Factorisation in the ring of exponential polynomials. Proceedings of the American Mathematical Society, 125(5):1293–1298, July 2002. doi:10.1090/S0002-9939-97-03919-1.
- [16] Ravindran Kannan and Richard J. Lipton. Polynomial-time algorithm for the orbit problem. J. ACM, 33(4):808–821, August 1986. doi:10.1145/6490.6496.
- [17] Christer Lech. A note on recurring series. Arkiv för Matematik, 2(5):417–421, August 1953. doi:10.1007/BF02590997.
- [18] Richard Lipton, Florian Luca, Joris Nieuwveld, Joël Ouaknine, David Purser, and James Worrell. On the Skolem Problem and the Skolem Conjecture. In Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 1–9, Haifa Israel, 2022. ACM. doi:10.1145/3531130.3533328.
- [19] Kurt Mahler. Eine arithmetische Eigenschaft der Taylor-Koeffizienten rationaler Funktionen. Proc. Akad. Wet. Amsterdam, 38:50–60, 1935.
- [20] Nathanaël Mariaule. On the decidability of the p-adic exponential ring. PhD thesis, University of Manchester, 2013. URL: https://research.manchester.ac.uk/en/studentTheses/on-the-decidability-of-the-p-adic-exponential-ring.
- [21] David W. Masser. Linear relations on algebraic groups, pages 248–262. Cambridge University Press, 1988.
- [22] Enric Nart. Okutsu-Montes representations of prime ideals of one-dimensional integral closures. Publicacions Matemàtiques, 55(2):261–294, January 2011.
- [23] Jürgen Neukirch. Algebraic Number Theory, volume 322 of Grundlehren der mathematischen Wissenschaften. Springer Berlin Heidelberg, Berlin, Heidelberg, 1999. doi:10.1007/978-3-662-03983-0.
- [24] Alain Robert. A course in p-adic analysis. Number 198 in Graduate texts in mathematics. Springer, New York, NY, 2000. doi:10.1007/978-1-4757-3254-2.
- [25] W. H. Schikhof. CALCULUS, pages 56–144. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1985.
- [26] Thoralf Skolem. Ein Verfahren zur Behandlung gewisser exponentialer Gleichungen und diophantischer Gleichungen. 8. Skand. Mat.-Kongr., 163-188 (1935)., 1935.
- [27] Thoralf Skolem. Anwendung exponentieller Kongruenzen zum Beweis der Unlösbarkeit gewisser diophantischer Gleichungen. Avhdl. Norske Vid. Akad. Oslo I, 12:1–16, 1937.
- [28] Robert Tijdeman, Maurice Mignotte, and Tarlok N. Shorey. The distance between terms of an algebraic recurrence sequence. Journal für die reine und angewandte Mathematik (Crelles Journal), 1984(349):63–76, May 1984. doi:10.1515/crll.1984.349.63.
- [29] Nikolay K. Vereshchagin. Occurrence of zero in a linear recursive sequence. Mathematical Notes of the Academy of Sciences of the USSR, 38(2):609–615, 1985. doi:10.1007/BF01156238.
