The topic of this paper is the study of the possibility of effective conversions between different representations of irrational numbers. We are interested in subrecursive computations, in which we disallow the use of unbounded search. It is well-known that the base expansion of an irrational number can be subrecursively computed from its Dedekind cut, but in the reverse direction this is not subrecursively possible. Thus it would be natural to try to understand how additional properties of the base expansion, such as the presence of specific patterns of zero digits, correlate with the complexity of the Dedekind cut. Our first result roughly states that if large parts of zero digits dominate over smaller parts of arbitrary digits and the base expansion has elementary complexity, then the Dedekind cut also has elementary complexity. Much more interesting is the case when one allows large parts of zero digits to alternate with large parts of arbitrary digits. We compare the complexity of the Dedekind cuts of an arbitrary irrational number and another irrational number, obtained by inserting long sequences of zero digits in its base expansion. We provide examples in which (1) both numbers have elementary Dedekind cuts, (2) the first number has complex Dedekind cut and elementary base expansion, but the second number has elementary Dedekind cut and (3) both numbers have complex Dedekind cuts and elementary base expansions. An open question remains, whether it is possible for the first number to have elementary Dedekind cut, while the second number has complex Dedekind cut.
There are many ways to represent irrational numbers. Some are more traditional, such as Cauchy sequences, Dedekind cuts or decimal expansions, while others have been introduced rather recently, like general sum approximations or left and right best approximations. Interestingly, all these representations are equivalent, that is they give rise to one and the same class of computable real numbers. Moreover, restricted to irrational numbers, any representation can be computably transformed into any other. Our main concern is the complexity of these transformations. It is known since the early days of computable analysis, that the representations of irrational numbers are not equivalent with respect to the class of primitive recursive functions. For example, there exist irrational numbers with a primitive recursive Cauchy sequence, whose Dedekind cut is not primitive recursive. Therefore we cannot transform a Cauchy sequence into a Dedekind cut by a primitive recursive algorithm.
We formulate our complexity framework in a more general way. We want to formalize computations, which do not use unbounded search. Any such computation can be modelled in a sufficiently large subrecursive class, having natural closure properties. Let and be two representations of irrational numbers. If there exists an arbitrarily large subrecursive class , such that some irrational number ξ has at least one -representation in , while the same ξ has no -representations in , then we can safely deduce that -representations cannot be transformed into -representations without using unbounded search.
Lars Kristiansen in [7,8] initiated an extensive study of irrational number representations in this general framework. Further collaboration with Frank Stephan and the present author led to several difficult results in [4], among them incomparability of the general sum approximations from below and from above. Previously, a number of papers study questions on real number representations in concrete complexity classes: Specker [17], Mostowski [13], Lehman [12], Lachlan [11] consider the primitive recursive functions, Ko [5,6] and Labhalla & Lombardi [10] the functions computable in polynomial time and more recently Skordev, Weiermann and the present author [1,15,16] subclasses of the second Grzegorczyk class.
The focus of the current paper is on Dedekind cuts and base expansions in a fixed base . A standard linear algorithm converts the Dedekind cut into the base-b expansion. But conversely, a main result in [8] is that the base-b expansion cannot be transformed subrecursively into the Dedekind cut, that is without the use of unbounded minimization. We are motivated by the following general question:
In what way is the presence of patterns of zeros in the base expansion of an irrational number connected with the complexity of its Dedekind cut?
To our knowledge the question has not been studied from the perspective of complexity theory. The present paper aims to provide techniques, which will further be used for a more comprehensive treatment of the matter.
In our first result we consider a general situation, where the base expansion contains long intervals of consecutive zero digits in positions , followed by much shorter intervals of arbitrary digits. In this case the Dedekind cut turns out to be subrecursively computable from the base expansion.
After that we want to allow long intervals of zero digits to alternate with long intervals of arbitrary digits. Let d be a sufficiently fast-growing function. We will construct an irrational number, whose base expansion contains zeros in all positions , but whose Dedekind cut is not subrecursively computable from its base expansion.
In more detail, for a fixed base b and any irrational number ξ we define the irrational number by inserting zero digits in positions for all i and retaining the other digits of ξ by shifting them to the right. For a fixed subrecursive class , let () be the set of irrational numbers with base-b expansion (Dedekind cut) in the class . We provide examples for irrational numbers ξ, α, β in , such that: (1) , , (2) , , (3) , . The last fourth case, whether there exists δ with , , remains unsolved.
The present paper is based on an invited lecture at Mal’tsev meeting, 2022 and also on a conference paper [2], which contains concise versions of some of the presented results.
The reader interested in other topics on computable real numbers and real functions should consult the textbook [18] on computable analysis.
Basic facts on base expansions
In this section we will define base expansions of real numbers and we will prove some simple facts, regarding the distribution of digits of rational numbers.
Any natural number will be called a base and the numbers in the set will be regarded as base-b digits.
For any base-b digit we define the complement digit .
For a number and a finite sequence of base-b digits, we denote by the rational number .
For and an infinite sequence of base-b digits, we will say that is the base-b expansion of if for all
We identify the base-b expansion with the function , such that
Since the second inequality is strict, every real number has a unique base-b expansion and is well defined. Base expansions ending with infinite sequence of digits are not allowed according to this definition.
Let ξ be a rational number. If for some n we have with , then we say ξ has a finite base-b expansion and the number n is called the base-b length of ξ. Clearly, the base-b expansion of ξ stabilizes in digits. If such an n does not exist, then we say ξ has an infinite base-b expansion. In this case, it is well-known that the base-b expansion is periodic (we give a proof below) and the period will not consist entirely of digits or entirely of digits.
Now we will present a standard algorithm to compute the base-b digits of a rational number and then use it to give upper bounds on the number of consecutive -s or -s in its base-b expansion.
Let,, where,,. Let b be a base andbe the base-b expansion of q. Consider the sequenceso thatis the remainder ofdivided by n. Letbe the quotient of the same division,. Then we havefor all.
Since we have and
for all , thus is indeed a base-b digit. By induction on i we show that
for all i. The claim is obvious for . Now assume it holds for some i. Then
and by definition
which is the same as
and the claim is settled. Now since we have
which clearly implies what we need, since q has a unique base-b expansion. □
Observe that if for some i, then for all , therefore q has a finite base-b expansion. Conversely, let q have a finite base-b expansion, so there exists i, such that for all . An easy induction shows that for all s. But this is only possible if , because the sequence r is bounded. We have proved that
In addition, iff is divisible by n. Therefore, if is in its lowest terms, iff n divides . So we can determine if q has a finite base-b expansion by checking if its denominator n divides some power of b, or equivalently if all prime factors of n are also prime factors of b.
Now let q have an infinite base-b expansion. Thus for all i, hence . By the pigeonhole principle, there exist i, j with , such that and this implies and for all . Thus the base-b expansion of q has the periodic form
Letbe a rational number and b be a base, such that q has an infinite base-b expansion. Assume also thatsatisfies. Then for every x, at least one of the base-b digitsof q is different fromand at least one of them is different from.
Suppose that for all . This clearly implies that for all such i. Therefore, . But we know that , since q has an infinite base-b expansion. Thus we obtain
which clearly contradicts the assumed inequality .
Now suppose that for all . This implies
for all such i, therefore . Since q has an infinite base-b expansion, we have . Thus we obtain consecutively
and by using , we infer , which leads to the same contradiction as above.
Note that we could have used the first part of the proof applied to , which also has an infinite base-b expansion, to prove the second part of the theorem. □
Letand b be a base with. If the base-b digitsof q are all equal to, then q has a finite base-b expansion of length. If they are all equal to, then,and.
An inspection of the above proof shows that in the first case , therefore the base-b length of q is at most x. In the second case, and the base-b length of q is exactly , because . It follows that q in its lowest terms has denominator , therefore . But we also have . The only possibility for these two inequalities to hold simultaneously is and . □
For a real number ξ, the function will be called the Dedekind cut of ξ if for and for .
Of course, if ξ is irrational, then the second inequality is strict.
Subrecursive classes
In this section we define formally our complexity framework. A measure for the complexity of a particular representation of some irrational number will be its membership in different subrecursive classes. If the representation belongs to a small enough subrecursive class, then we regard it as simple. If the representation does not belong to a sufficiently large subrecursive class, then we considered it complex.
Let ϕ and ψ be total functions of several arguments in .
We denote (ϕ is elementary in ψ), if ϕ can be generated from ψ and the initial elementary functions (, , , and the projections ) by composition and bounded primitive recursion (this is ordinary primitive recursion with the additional assumption that the resulting function is bounded above by an already generated function). We say that ϕ is elementary, if ϕ is elementary in the constant 0.
Let us fix an elementary coding of finite sequences of natural numbers: is the code of the list , so that the function is elementary. We assume the code of a sequence is monotonically increasing in each of its elements and also with respect to taking extensions.
Let be a class of total computable functions in .
We say that is computably enumerable if there exists a computable function , such that if and only if for some e.
A subrecursive class is a computably enumerable class, which contains the initial elementary functions and is closed under composition and bounded primitive recursion.
Note that for the purposes of the current paper we use bounded primitive recursion, as opposed to ordinary primitive recursion. Of course, ordinary primitive recursion can be formalized by an algorithm, which does not use unbounded search, so it would be natural to use it in our definition, but our results remain true with this stronger growth preserving condition.
Observe that a subrecursive class is closed also under bounded summation, bounded product and under all other familiar bounded schemata. The elementary functions form the least subrecursive class with respect to set inclusion.
By exploiting the elementary coding from above, we may also allow the integers and the rationals as arguments or values of the total functions that we use. As an example, by fairly standard techniques, we can define an elementary ternary function
which gives the n-th base-b digit of the rational number q in any base .
A unary function is honest, if , for all and the graph of f is elementary (the relation is elementary in x, y).
The k-th iterate of f is defined as follows: , for all .
We will need the function and the relation from Kleene’s Normal Form Theorem, which are both elementary. For any unary we can choose e, k, such that for all
and the μ-operator always succeeds in finding the corresponding t.
For any honest function f we define the jump of f by: . It is straightforward to show that is also honest and that if , then for all sufficiently large x.
For any subrecursive class there exists an honest function f, such that for all . Such an honest function can be obtained effectively from a computable index of the enumeration function U. Observe that , because grows faster than all functions in .
For every honest function f and natural numbers x, y:
,
,
,
,
.
Straightforward, since f is increasing and . □
From now on we will tacitly use Lemma 3.2 in all inequalities, which involve estimating the growth rate of honest functions.
In case the reader is not comfortable with the presented level of details, we recommend Sections 2, 3 in [4] for full proofs of the stated results. See also [9] for more extensive treatment of honest functions and [14] of subrecursive classes.
For a subrecursive class , we denote
A simple algorithm, which computes the base-b digits of ξ successively using at most calls to for each digit can be formalized by bounded primitive recursion (the integer part of ξ may be used as a constant). It shows that (even uniformly in b) and therefore . But as proven in Section 6 in [8], the inclusion is strict. Our motivation is to better understand how the presence of patterns in the base expansion of an irrational number correlates with the complexity of its Dedekind cut.
Long parts of zero digits dominating over shorter parts of arbitrary digits
As in the previous section, is a subrecursive class, f is an honest function, such that implies . Thus the jump of f grows faster than any function in .
We will use a fixed sequence d, such that and for all i. We consider the intervals as long, because one cannot reach when having by means of a function from for sufficiently large i. However, the graph of d is elementary, because is honest.
Let b be any base and ξ be an irrational number,. Assume there exist a strictly increasing function, such thatandfor all x and all sufficiently large i. Then.
The idea here is that given a rational number q, we will be able to compute i, such that q cannot have a string of zero digits in all positions in its base b-expansion, unless q has a finite base-b expansion. Therefore, we can compare q and ξ using only .
First observe that d is strictly increasing and grows faster than , so that . Since , we may choose , such that
holds for all . Let us suppose that (4.1) also holds for all .
We will now describe an algorithm for the Dedekind cut of ξ, which shows that .
Start of algorithm. Given a rational number q:
Step 1. Compute m, n such that and .
Step 2. Search for the unique , such that .
Step 3. Compute .
Step 4. If give output 0, otherwise give output 1. End of algorithm.
All steps are formalizable in the class . In Step 1, is a fixed number and can be hardcoded as a constant in the algorithm. In Step 2, the search for i is bounded as . Furthermore, and the graph of d is elementary, which allows to check the two inequalities. In Step 3, we have , therefore we can compute using the graph of d. Since , we can also compute . Step 4 is obviously elementary in q and .
It remains to prove that the algorithm correctly computes . The easy case is when , because obviously and . Suppose now that . Then the algorithm outputs 1 and assume by way of a contradiction that , so we have . We will prove the inequality
Indeed, if it follows easily from (4.2) and if we have
due to the choice of i and the fact that g is increasing. Now has base-b length and (4.1) implies that the base-b digits of ξ in positions are all equal to , thus the same is true for q. By Corollary 2.4 this is only possible if q has a finite base-b expansion of length , since q has denominator n. This clearly implies , because the first base-b digits of and ξ coincide. But we are in the case – contradiction. □
Observe that is very small compared to , because grows faster than any function in . For all sufficiently large i the base-b expansion of ξ has the following form:
and this is the reason why long stretches of zeros are followed by (relatively) small parts of arbitrary digits. Note that the lengths of the underlined parts are commensurable, being functions of .
In the following corollary we provide examples of irrational numbers ξ, which satisfy the premises of Theorem 4.1. The function can be chosen in arbitrary way, as long as it has non-zero values. There are similar examples in [7,8], in which h is a constant function.
Let b be any base and let the functionssatisfy the following conditions:
andfor all. Then the seriesis convergent and its sum ξ is an irrational number, such that.
Let us take , such that for all and g is strictly increasing. In order to apply the theorem, we need to prove that and that (4.1) holds for all x and all sufficiently large i. We again choose , such that (4.2) is true for all . Then we obtain
for all and this easily implies for all . It follows that the series is indeed convergent and by the same token
for all . Let ξ be the sum of the series. Note that the rational number has a finite base-b expansion of length and since the inequalities
hold for all . It follows that (4.1) is true for all x and all and also that ξ is irrational.
Now we give an algorithm, computing the base-b expansion .
Start of algorithm. Given a natural number n:
Step 1. Search for the unique , such that , where .
Step 2. Compute and . If output . Otherwise, go to Step 3.
Step 3. Compute and . Output . End of algorithm.
The correctness of the algorithm follows from the fact that the first base-b digits of and ξ are the same for any . Note also that in case we have by (4.1).
Finally, we argue that . Indeed, in Step 1 the search is bounded () and can be formalized using the graph of d, which is elementary ( is fixed). In Step 2, we have for all , thus we can compute and also , since and for all non-zero k ( can be used as constant). Therefore, we can also compute . After that using we can obtain and test the inequality using the graph of d again. Step 3 is invoked only when , so in this case we can compute and then as above. Of course, we are allowed to use the elementary function . □
Long parts of zero digits alternating with long parts of arbitrary digits
Now what happens if we allow longer parts of arbitrary digits? In the present section we will consider specific irrational numbers, in which long sequences of zeros alternate with long sequences of arbitrary digits. An irrational number of this form is considered in the last example on page 22 in [8] and it is shown that its Dedekind cut is elementary. Motivated by this example we asked the following question:
Is it possible to modify the proof of Theorem 4.1, so that we can prove by only assuming that and that ξ has long stretches of -s in its base-b expansion with no restriction on the remaining base-b digits of ξ?
We will see that the answer to this question is negative. In the example from [8], all non-zero digits of ξ are equal to and this is crucial to deduce that . On the other hand, we shall see the other extreme in this section, where the remaining digits may constitute an irrational number of very high complexity, but still we may have elementary Dedekind cut.
We will again use the fixed sequence d with and for all i, where grows faster than any function in a subrecursive class .
For the sake of brevity, let us denote . Note that can be computed elementarily from and that for all .
For an arbitrary irrational number ξ we define in the following manner:
where .
In other words, we produce by inserting a string of -s in the base-b expansion of ξ in positions for all i and by preserving the base-b digits of ξ by properly shifting them to the right. To compute the position in the original number ξ we subtract from x the number of added -s preceding the position x. Clearly, is irrational, because its base-b expansion is neither finite, nor periodic.
Note also that : given x we can compute the unique i, such that using the graph of d. We can also check if and compute in case it is true, because is elementary in x and .
We will need two auxiliary function and for insertion and deletion of finite portions of digits in the base-b expansions.
For and : let the real number be obtained from δ by inserting -s in the base-b expansion of δ in positions for all and let be obtained from δ by deleting the base-b digits of δ in the same positions, so that .
The numbersandcan be computed elementarily from i, q andfor anyand.
We have the following equalities: ( is a shorthand for )
It is easy to obtain an upper bound for the denominators of and , which is elementary in i, q and . Since the integer parts of and are equal to the integer part of q, a similar upper bound can be obtained for their numerators. Therefore, and can be produced by bounded primitive recursion as functions of i, q and . □
Our aim will be to explore how complex the Dedekind cuts of ξ and are relative to one another. In the next theorem we show that if ξ satisfies the premises of Theorem 4.1, then this suffices to prove .
Let ξ be an irrational number, such thatand assume there exist a strictly increasing functionand a natural number, such that (
4.1
) is true for all x and all. Then.
First of all, implies . The idea of the algorithm for the Dedekind cut of will be to try to produce a position P, up to which there will be a guaranteed difference between the base-b expansions of and the input q. After that we can compute the first P base-b digits of and q (using and ) and then easily determine the value .
Start of algorithm. Given a rational number q:
Step 0. If q has an infinite base-b expansion proceed with Step 1. Otherwise, compute the base-b length s of q and . If give output 0 and if give output 1.
Step 1. Compute m, n, such that and . Search for the unique i, such that .
Step 2. Check whether the following relation holds: . If it is true, proceed with Step 4 (), otherwise go to Step 3.
Step 3. Compute , and . Check the inequality: . If it holds, proceed with Step 4 (). If it does not, compute and proceed with Step 4 ().
Step 4 (parameter P). Compute the least , such that .
If return 0, otherwise return 1. End of algorithm.
We argue that the algorithm can be formalized in .
In Step 0, we can check elementarily whether q has finite or infinite base-b expansion and in the former case compute its base-b length s. Since and is closed under bounded summation, we can compute . The rest of Step 0 is obviously elementary.
In Step 1, the computation of m, n is trivially elementary, because is a fixed number. The search for i is bounded () and we can check the two inequalities using the graph of d, which is elementary. Observe that at the end of Step 1, we do not know if we will be able to compute or .
In Step 2, we can compute () and check the inequality again using the graph of d. In Step 3, we have , so we can compute , () and also , because it is elementary in . After that, we check in a similar way the inequality and compute in case it is false.
In Step 4, we have previously calculated the parameter P, so we can execute the bounded search using the functions and , which belong to the class .
Now we prove the correctness of the algorithm.
In Step 0, if q has a finite base-b expansion of length s, then clearly we need to check only the first s base-b digits of in order to compare and q.
The output in Step 4 is obviously correct, provided that the search for k is successful. So it remains to prove that in the three cases where Step 4 is invoked, the value of the parameter P is correct, that is the base-b expansions of and q differ in at least one position .
Let us assume that in Step 2. On one hand, by Theorem 2.3 at least one base-b digit of q in positions is different from . On the other hand, by definition has base-b digit in all positions in . Thus is a correct value in this case.
Suppose that in Step 3. We have and , which implies , therefore we can use (4.1) and the definition of to obtain successively
Note that , which is implied by and . Now the supposed inequality and give
and we may reason as in the previous Step 2: some base-b digit of q in a position in the interval is different from , while has only -s in the same positions. Therefore, the value is correct.
Finally, since , the number q possesses a non-zero base-b digit in at least one position in , while by definition does not. Therefore, is a correct value in this last case. □
Note that the above algorithm works, because we have the additional property (4.1) of ξ, which we use substantially in Step 3. It allows us to resolve the case where we can compute , but we cannot compute .
Now we will consider another property, which combined with implies .
The function will be called a trace function from below for the irrational number ξ if
for any .
Trace functions are connected with other representations of the irrational numbers, which we will not define formally. It is shown in [3] that if the general sum approximation from below of ξ is in the class , then one can construct a trace function from below for ξ, which belongs to . Such a construction is also possible, provided that the continued fraction of ξ belongs to (see [7]).
One of the anonymous referees posed the question whether the existence of a trace function from below in for ξ is sufficient to infer that the Dedekind cut is also in . Of course, there does not exist a uniform computable conversion from to , simply because can be a trace function from below for more that one irrational number. But it turns out that a non-uniform subrecursive conversion (which depends on external information about ξ) is also not possible. One can construct a computable irrational number ξ, such that , but ξ has elementary trace function from below. The next lemma shows that the situation changes if we add the additional assumption that the base-b expansion of ξ belongs to .
Letand let there exist a trace function from belowfor ξ, such that. Then.
We will give an algorithm for the Dedekind cut , which is elementary in and . Note that the difficulty here is that if the inequality holds, then alone will not reveal whether or .
Start of algorithm. Given a rational number q:
Step 1. Compute . If give output 1, else go to Step 2.
Step 2. Compute the least n, such that .
Step 3. If there exists , such that , go to Step 4. Otherwise, give output 1.
Step 4. Compute the least with . If return 0, otherwise return 1. End of algorithm.
For the correctness of the algorithm, we only need to justify the output in Step 3. Assume . Then and since the base-b expansions of q and differ in position n, the base-b expansions of q and ξ differ in at least one position . It follows that the output 1 in Step 3 is indeed correct.
The algorithm is obviously elementary in and . Note that the search for n in Step 2 is bounded by the product of the denominators of q and . Since and , we obtain , that is . □
Now we are ready to prove our result, which connects the complexity of with the existence of a trace function from below.
Letand let there exist a trace function from belowfor ξ. Then.
Our algorithm for will be very similar to the one in Theorem 5.3 with modifications starting from Step 3 onwards.
Start of algorithm. Given a rational number q:
Step 0. If q has an infinite base-b expansion proceed with Step 1. Otherwise, compute the base-b length s of q and . If give output 0 and if give output 1.
Step 1. Compute m, n, such that and . Search for the unique i, such that .
Step 2. Check whether the following relation holds: . If it is true, proceed with Step 7 (), otherwise go to Step 3.
Step 3. Compute . Search for , such that . In case such an x exists, proceed with Step 7 (), otherwise go to Step 4.
Step 4. Compute . If , return 1. Otherwise, go to Step 5.
Step 5. Compute . Search for the least l, such that and compute .
Step 6. Check the inequality: . If it holds, proceed with Step 7 (). If it does not, compute and proceed with Step 7 ().
Step 7 (parameter P). Compute the least , such that .
If return 0, otherwise return 1. End of algorithm.
It is not hard to see that the algorithm can be formalized in . The five important points are: (1) , since and ; (2) the graph of d is elementary; (3) we have access to in Steps 3, 4, 5; (4) can be computed in Step 3 using Lemma 5.2; (5) by assumption and by Lemma 5.5.
It remains to check the correctness of the modified steps. In Step 4 the base-b expansions of q and are identical in all positions . Therefore and implies . So the output 1 in Step 4 is correct. In Step 5 we have and clearly, the base-b expansions of and ξ differ in at least one position , which guarantees that the base-b expansions of and will differ in a position . In the case , and coincide in all positions , therefore is a correct value for the parameter of Step 7. □
So far we have seen irrational numbers ξ, such that and . It is important to note that the proofs of Theorem 5.3 and Theorem 5.6 both used additional properties of ξ besides . By a closer inspection of the algorithm, it becomes clear that it is not possible to advance from to without such properties. Indeed, we will see in the next section that the sole assumption is not sufficient to prove . However, we do not know if there exists (a stronger assumption than ), such that .
Our next task will be to produce α with and , but .
In order to do that we turn to the construction from Theorem 5.3 in [8]. Since it is crucial for understanding the rest of the paper, we reproduce the proof with some slight modifications.
Let p be a prime, which does not divide b and .
Let the sequence be defined by
and let .
Claim 1. For all :
Proof of Claim 1. Induction on i. Clearly, can be written in the form . Now assume we have for some i. Let s be the number of consecutive -s in the base-b expansion of , starting at position . Since p does not divide b, has an infinite base-b expansion and it follows from Theorem 2.3 that , therefore
The other equality is proved analogously by taking the number of consecutive -s. Now or and the denominators of both summands are powers of p with exponents . This establishes the induction step.
Applying again Theorem 2.3 and noting that , we obtain that for all :
Claim 2..
Proof of Claim 2. We have . Now assume . Then
because using (5.1) we can infer
The proof of the second part is symmetric.
Claim 3., therefore .
Proof of Claim 3. Assume the opposite , so that . Then , where . We choose e and k, so that (3.1) holds for all n. We can pick i and j, such that and (since is strictly increasing in j). Now we have:
First case:. Then by construction and by Claim 2,
which is impossible, because .
Second case:. Note that , therefore by Claim 1, both numbers and have finite base-p expansions of length . So the first position, in which these base-p expansions are different is . It follows that and by Claim 2, while by construction - a contradiction.
Claim 4. The base-b expansions of and α coincide in all positions less than , that is
Proof of Claim 4. Suppose . By Claim 2, we have and following a similar argument:
because . We have obtained . It remains to note that and . In the other case , we have the inequalities and , so the claim follows analogously.
Claim 5. can be computed elementarily in , and is elementary.
Proof of Claim 5. By the definition of and (5.1), there exists an elementary function H, such that . Moreover, the denominator and nominator of are bounded by an elementary function of . Therefore, can be computed with bounded primitive recursion as a function of .
Now given : we search for the unique i, such that and give output . Clearly, this is an elementary algorithm, which by Claim 4 computes .
It will be convenient to introduce a notation for the function ,
so that is a shorthand for the predicate used in the construction of α. Note that by Claim 5, can be computed elementarily in .
The intuition behind the construction of α is the following: in order to obtain , we make sure that α stays far enough from certain rational numbers q with finite base-p expansion, generated using the class . When we take a left turn () α is guaranteed to be different from such a and similarly, when we take a right turn (), α is guaranteed to be different from such a . Of course, the subtle point is to obtain at the same time.
While it is clear that , it turns out that . The reason seems to be that adding strings of zero digits in positions for all i destroys the effect of the right turns (though the effect of the left turns is preserved).
The Dedekind cut ofis elementary, where α is the irrational number constructed in Definition
5.7
.
We will describe an algorithm to compute the Dedekind cut of using the method from Theorem 5.3 and Theorem 5.6.
Start of algorithm. Given a rational number q:
Step 0. If q has an infinite base-b expansion proceed with Step 1. Otherwise, compute the base-b length s of q and . If give output 0 and if give output 1.
Step 1. Compute m, n, such that and . Search for the unique i, such that .
Step 2. Check whether the following relation holds: . If it is true, proceed with Step 5 (), otherwise go to Step 3.
Step 3. Compute , and . If , then give output 1, otherwise go to Step 4.
Step 4. Compute the least s, such that . Check the inequality: . If it holds, proceed with Step 5 (). If it does not, compute and proceed with Step 5 ().
Step 5 (parameter P). Compute the least with .
If return 0, otherwise return 1. End of algorithm.
It is easy to see that the algorithm is elementary: is elementary, since and can be computed in Step 3 using Lemma 5.2, because we have access to .
As for the correctness, only the new Steps 3, 4 require justification.
In Step 3, we know by Claim 4 that the first base-b digits of α and coincide. The same is true for and , because they are obtained by inserting -s in the same positions. Of course, and are also identical in all positions . Now implies that for all . But , thus by Theorem 2.3 at least one base-b digit of q in positions is not , whereas has only -s in the same positions. We conclude that and the output 1 is correct. Note that we cannot use Step 5 to produce this output, because we do not have access to a position P in which the base-b expansions of and q are different.
In Step 4, if , then the base-b expansions of and q are different in position s, since . We conclude that the value is correct for the parameter in Step 5. □
An irrational number with a complex Dedekind cut, which remains complex after adding long sequences of zeros
Our goal in this section will be to produce an irrational number β with an elementary base-b expansion, such that and .
We will again exploit the construction of the number α from Definition 5.7, but this time in a more sophisticated manner. The idea is roughly the following: firstly, we construct the number γ, whose base-b expansion is obtained from the base-b expansion of α by simultaneously inserting -s in all positions with () and -s in all positions with (). Unlike the real number from the previous section, whose definition destroyed the effect of the right turns in the construction of α, the definition of γ is consistent with both the left and the right turns. Therefore, we will be able to show that . After that we produce by adding to the last digit in each string of -s in positions with . Clearly, each of these strings will be transformed into a string of -s and we will see that only a small portion of other digits is altered. Moreover, since the added -s are sparse enough, the complexity of the Dedekind cut will not change, that is . Finally, it turns out that after removing the strings of -s from , the produced number β will still have a Dedekind cut outside .
We emphasize again the reason for the different complexity of and . The number is close enough to γ, which is defined in such a way as to preserve the effects of the construction of α. The number is not close enough to α and its definition destroys the effects of the construction of α.
More formally, we begin by defining γ:
where . First of all is elementary: and the graph of d are elementary, is elementary in x when and is elementary in x in the case . Also note that γ is irrational, because α is irrational or as a corollary of the following theorem.
.
We will need to use the function (very similar to from the previous section) defined by
So to compute we insert -s in the base-b expansion of ξ in positions for all and in the case we change them to -s. Note that for , is elementary in i, q and , which follows from Lemma 5.2 and the fact that the bounded sum in the second summand is elementary in i, .
Suppose by way of a contradiction that , so that .
Part 1. In this part we will prove we can choose i, such that
To this end we will need the auxiliary functions and
and also the function ψ, defined by . All of them are easily seen to be elementary.
It will be instructive to follow the proof of Claim 3 from the previous section. Let us define the function ϕ by
where . We have assumed , so it easily follows that . Hence we can choose e, k, such that (3.1) holds for all n and we also pick i, j with and . For this choice of i, we obtain exactly as in Claim 3 that
so we must show that
But this is easily done by substitution of for n in the definition of ϕ, noting that
Part 2. Now we consider two cases after choosing i from Part 1.
Case 1. is true. Since the base-b expansions of α and are identical in all positions less than , the same is true for γ and , because they are obtained from α and by adding strings of -s or -s in the same positions. In positions by definition γ has only -s, because . On the other hand, will have at least one non-zero base-b digit in these positions. Indeed, in all positions the base-b expansion of coincides with the shifted base-b expansion of . Therefore by (5.2), we can choose j, such that
and in addition, . We have proved that , which contradicts (6.1), because we are in the case .
Case 2. is true. The argument here is symmetric. We may choose j by (5.3), such that
moreover γ and coincide in all positions less than and γ has -s in . Therefore, , which contradicts (6.1) and . □
Let us define for an arbitrary i
and
Note that the summands of the series contribute only in the case , that is when γ has -s in the positions .
For all n, i
By the definitions of and γ, the base-b expansion of in positions coincides with the shifted base-b expansion of and α. Note also that , because . Now we apply (5.3) to obtain j, such that
Clearly, by adding to we will only change its base-b digits from position j onwards, thus (6.3) holds for all n.
Observe that (6.3) is also true with the stronger antecedent .
Now we turn to the other two statements from the lemma.
Case 1. Suppose that . Then γ has -s in positions and we have
The first inequality in (6.4) follows trivially:
As for the second one, we have , but the base-b length of the right-hand side is less than , hence using (6.3) we infer
and since the inequality is strict and the base-b length of both sides is less than ,
This implies (using )
which proves the second part of (6.4).
Case 2. Now assume . Then γ has -s in positions , thus
The first inequality in (6.5) follows easily:
Then using , similarly to Case 1 we obtain
Therefore
□
For all n, i
Let n, i satisfy the inequalities in the antecedent. Since and the base-b length of is strictly smaller than we have that the base-b expansions of and are identical in all positions .
In the case , (6.4) and give
and in the case , (6.5) and (6.3) give
so we have the needed equality in both cases. □
It is evident from (6.4) and (6.5) that has -s in positions in its base-b expansion for all i, due to the fact that the base-b length of both and is strictly smaller than . Since γ is irrational, its base-b expansion does not stabilize in -s. Therefore, by Corollary 6.4 the base-b expansion of also does not stabilize in -s. This clearly implies that is irrational, because its base-b expansion has arbitrarily long strings ot -s and thus it cannot be periodic.
is elementary and.
In both algorithms below we will use the rational numbers and from Definition 6.2 (both are elementary in ). We begin with an algorithm for .
Start of algorithm. Given a natural number n:
Step 0. If , give the output directly, otherwise go to Step 1.
Step 1. Compute the unique i, such that .
Step 2. If is true, give output . Otherwise, go to Step 3.
Step 3. Compute and check the inequality . In case it is true, give the output . In case it is false, go to Step 4.
Step 4. Compute and the number from (6.2). If , give the output . If , give the output . End of algorithm.
This algorithm is elementary: in Step 0, is a fixed number, so we can use a table for the needed values. All computations involving d are elementary, because so is the graph of d. In Step 3 we use the elementary function . In Step 4, and are elementary in .
As for correctness: the output of Step 2 agrees with the fact that the base-b expansion of has -s in positions . In Step 3 the output is correct due to Corollary 6.4. In Step 4 we use and (6.4) in the case , as well as (6.5) in the case .
For the second part of the theorem, we show that . Since we know that , this will imply . We only prove the correctness of the algorithm and leave the reader to check it is elementary in .
Start of algorithm. Given a rational number q:
Step 0. If q has an infinite base-b expansion proceed with Step 1. Otherwise, compute , where s is the base-b length of q. If give output 0 and if give output 1.
Step 1. Compute m, n, such that and .
Step 2. Find the unique i, such that and compute .
Step 3. Use to check: . If false, give output 1. If true, go to Step 4.
Step 4. Check the inequality . If it holds, give output 0. Otherwise, go to Step 5.
Step 5. Compute and . Use to check: . If false, return 1. If true, return 0. End of algorithm.
The output in Step 0 is clearly correct in case q has a finite base-b expansion of length s. Note that after Step 0, both (in Step 2) and (in Step 5) have infinite base-b expansion, because so does q.
In Step 3, consider the case . We have
therefore and the output 1 is correct.
Suppose the inequality in Step 4 holds and that the output 0 is wrong, that is . We also have after Step 3, hence
Let us denote by the denominator of . Clearly we have . By Theorem 2.3 we can choose j, such that and . It follows that for all s
On one hand, we know that the base-b expansion of has only -s in positions . Therefore, the same is true for in positions . On the other hand, we have , since due to the assumed inequality in Step 4. Applying Corollary 2.4 we infer that has a finite base-b expansion, which contradicts the assumption on q after Step 0. We conclude that the output 0 is correct.
If in Step 5, we have , therefore and the output 1 is correct. Now let and assume the output 0 is wrong, that is . Similarly to Step 4 we have
Let us denote by the denominator of . By applying Theorem 2.3 in the same way as in Step 4, we obtain that for all s
Since has -s in positions in its base-b expansion, also has -s in positions . Now is the product of the denominators of q and and , therefore:
So we have and has -s in these positions. By Corollary 2.4, has a finite base-b expansion, which contradicts the assumption on q after Step 0. Therefore, the output 0 is correct. □
Now we proceed with the study of the irrational number β, obtained by removing the -s in positions for all i from the base-b expansion of .
The following picture aims to clarify how the numbers α, β, are related:
Sample values of and are shown. The α-parts contain the digits of the base-b expansion of α. The starred part represents the changed digits after adding in position . Observe that the weight of the added is changed to after removing the zeros before position to obtain β.
We define the base-b expansion of β by
(in agreement with Definition 5.1).
Formally, we must check that for any there exist unique x and i, such that the second disjunct of the right-hand side holds. Indeed, suppose and that for some , we have
so that
Since d is increasing, the last equality implies . But according to the above assumptions , a contradiction. This establishes the uniqueness of x and i, because clearly implies .
Now for a given , let us choose k, such that . Let us also denote . Clearly, . We have:
because in the second case and
This establishes the existence.
is elementary.
Observe that we always have , but in general . Nevertheless, in our concrete case we can use , because we know it is elementary by Theorem 6.5. We will also use the elementary function .
Start of algorithm. Given a natural number n:
Step 0. If , return , otherwise go to Step 1.
Step 1. Compute the unique k, such that .
Step 2. If is true, return . Otherwise, go to Step 3.
Step 3. Compute and the number . Check the inequality . In case it is true, return . In case it is false, return . End of algorithm.
We leave the reader to check that the algorithm is elementary and we will only discuss correctness. In Step 2, consider the case . Now is well-defined, though we do not know if we can compute it. Still we have the inequalities
Therefore, by (6.6), Corollary 6.4 and the definition of γ we have
In Step 3, in the case we again have by (6.6). And finally, assume . Then (6.7) gives , where . Now we have
By Corollary 6.4 and the definition of γ,
because . □
The next lemma gives an important relation between the Dedekind cuts of α and β.
For natural numbers j, i, let us denoteThen the following equivalence is true:
We begin with the following auxiliary fact: for any n, i
Let , that is . Then using (6.4) and (6.5) we obtain
and we also have
because the base-b expansions of and coincide in all positions less than (with the base-b expansions of γ and α).
Now let and assume (6.9) holds for some i and all n. We show it holds also for and all n. First consider the case . We have
Let us denote . Then . Hence by Definition 6.6 and (6.4), (6.5)
The last equality is true, because and the base-b length of is strictly less than . We proceed:
For the last row, observe that the base-b expansions of α and coincide in all positions less than and that the base-b length of is strictly less than .
Now the case remains. By the inductive hypothesis we have
Recall that and coincide with α in all positions less than .
By Corollary 6.4, for all x, such that , we have
where . It follows that
Consider the rational number . We know that its base-b expansion is identical to β in positions . On one hand, by (6.10) it is also identical to α in . On the other hand, also coincides with α in the same positions. Since the difference between the two numbers and is , it follows that they also coincide in all positions less than and we conclude that
We are now ready to prove (6.8). On one hand, and α coincide in base b in all positions less than . On the other hand, (5.1) easily implies that and thus the base-b expansions of and differ in at least one position .
First, let . This clearly implies and . Therefore,
By (6.9), β coincides with in all positions . Moreover, the rational numbers and differ in at least one position . Hence, .
Second, let . Then and . So in this case we have
and the first difference is in some position in . Using (6.9), we obtain that β and are the same in all positions less than . Furthermore, (6.10) gives that β coincides with α and thus also with in all positions in . But the latter interval contains , because
It follows that . □
We are ready to prove our last theorem.
.
It suffices to show that , because we know that . In the algorithm we will use the rational number , defined in Lemma 6.8. Note that is elementary in .
Start of algorithm. Given a rational number q:
Step 1. Compute m, n, such that and .
Step 2. Find the unique i, such that and compute and .
Step 3. If , go to Step 4. If , then ask to check . If true, give output 0, otherwise give output 1.
Step 4. Compute the least s, such that . Check: . In case it is false go to Step 5. In case it is true: Check . If true, give output 0, otherwise give output 1.
Step 5. Compute , and . If , go to Step 6. If , then ask to check . If true, give output 0, otherwise give output 1.
Step 6. Check: . If true, return 0, otherwise return 1. End of algorithm.
We will only show that the algorithm correctly computes .
In Step 3, case and Step 5, case the output is correct thanks to (6.8).
Assume is true in Step 4, so that q and differ in at least one position less than . Since and α coincide in all positions less than , is equivalent to . The same argument, applied in Step 6, gives that if and only if , provided that the least t, such that is less than , so it remains to prove this is indeed the case.
Note that q has denominator n, has denominator by (5.1) and t is the first position in which their base-b expansions differ, therefore:
which implies
□
Conclusion
We have examined the connection between the presence of some patterns of zeros in base expansions of irrational numbers and the complexity of their Dedekind cuts.
In our first result, we have proved that the complexity of the Dedekind cut of an irrational number is the same as the complexity of its base expansion, provided that long sequences of zero digits are followed by relatively small sequences of arbitrary digits.
After that we allowed long sequences of zero digits to alternate with long sequences of arbitrary digits in the base expansion. For any irrational number ξ we consider another irrational number , which is obtained from ξ by inserting long sequences of zeros in its base expansion. For any subrecursive class , we have given examples of irrational numbers with elementary base expansions, which show that three of the four cases are possible:
(1) ξ and have Dedekind cut in ; (2) α does not have Dedekind cut in , but does; (3) both β and do not have Dedekind cut in .
The only case, which remains unsettled is whether there exists an irrational number δ, such that and . The proofs of Theorem 5.3 and Theorem 5.6 where we obtain depend on special properties of ξ. Moreover, we know that does not imply . Therefore, if indeed implies , some new argument, which makes clever use of bases different from b, will likely be required.
The present line of research considers a rather specific problem on two well-known representations of irrational numbers. There are a number of unexplored representations, such as graphs of trace functions or base expansions with restricted digits. It will be interesting to see how they fit in the already complicated picture of representations.
And finally, at least for some of the results, it might be interesting to formulate and study them relative to subrecursive classes below the elementary level, for example, the second Grzegorczyk class , the class of lower elementary functions or the class , considered in [16]. The machinery becomes much weaker on this level, where we (presumably) do not have access to uniform coding of sequences.
Footnotes
Acknowledgements
This paper is supported by the Bulgarian National Science Fund through contract KP-06-Austria-04/06.08.2019 and by the Sofia University Science Fund through continuation of contract 80-10-180/17.05.2023.
References
1.
I.Georgiev, Continued fractions of primitive recursive real numbers, Mathematical Logic Quarterly61 (2015), 288–306. doi:10.1002/malq.201400013.
2.
I.Georgiev, Dedekind cuts and long strings of zeros in base expansions, in: Connecting with Computability, Computability in Europe 2021, L.De Mol, A.Weiermann, F.Manea and D.Fernández-Duque, eds, LNCS, Vol. 12813, Springer, 2021, pp. 248–259. doi:10.1007/978-3-030-80049-9_23.
3.
I.Georgiev, L.Kristiansen and F.Stephan, On general sum approximations of irrational numbers, in: Sailing Routes in the World of Computation, Computability in Europe 2018, F.Manea, R.G.Miller and D.Nowokta, eds, LNCS, Vol. 10936, Springer, 2018, pp. 194–203. doi:10.1007/978-3-319-94418-0_20.
4.
I.Georgiev, L.Kristiansen and F.Stephan, Computable irrational numbers with representations of surprising complexity, Annals of Pure and Applied Logic172(2) (2021), 102893. doi:10.1016/j.apal.2020.102893.
5.
K.Ko, On the definitions of some complexity classes of real numbers, Mathematical Systems Theory16 (1983), 95–109. doi:10.1007/BF01744572.
6.
K.Ko, On the continued fraction representation of computable real numbers, Theoretical Computer Science47 (1986), 299–313. doi:10.1016/0304-3975(86)90154-4.
7.
L.Kristiansen, On subrecursive representability of irrational numbers, Computability6 (2017), 249–276. doi:10.3233/COM-160063.
8.
L.Kristiansen, On subrecursive representability of irrational numbers, part II, Computability8 (2019), 43–65. doi:10.3233/COM-170081.
9.
L.Kristiansen, J.-C.Schlage-Puchta and A.Weiermann, Streamlined subrecursive degree theory, Annals of Pure and Applied Logic163 (2012), 698–716. doi:10.1016/j.apal.2011.11.004.
10.
S.Labhalla and H.Lombardi, Real numbers, continued fractions and complexity classes, Annals of Pure and Applied Logic50 (1990), 1–28. doi:10.1016/0168-0072(90)90052-4.
11.
A.H.Lachlan, Recursive real numbers, The Journal of Symbolic Logic28(1) (1963), 1–16. doi:10.2307/2271331.
12.
R.S.Lehman, On primitive recursive real numbers, Fundamenta Mathematica49(2) (1961), 105–118. doi:10.4064/fm-49-2-105-118.
13.
A.Mostowski, On computable sequences, Fundamenta Mathematica44 (1957), 37–51. doi:10.4064/fm-44-1-37-51.
14.
H.E.Rose, Subrecursion, Functions and Hierarchies, Clarendon Press, Oxford, 1984.
15.
D.Skordev, Computability of real numbers by using a given class of functions in the set of the natural numbers, Mathematical Logic Quarterly48(Suppl. 1) (2002), 91–106. doi:10.1002/1521-3870(200210)48:1+<91::AID-MALQ91>3.0.CO;2-L.
16.
D.Skordev, A.Weiermann and I.Georgiev, -Computable real numbers, Journal of Logic and Computation22(4) (2008), 899–925. doi:10.1093/logcom/exq050.
17.
E.Specker, Nicht konstruktiv beweisbare Sätze der Analysis, Journal of Symbolic Logic14 (1949), 145–158. doi:10.2307/2267043.