4. Computability on the Real Numbers
Real numbers are the basic objects in analysis. For most non-mathematicians a real number is an infinite decimal fraction, for example π = 3•14159 ... . Mathematicians prefer to define the real numbers axiomatically as follows: · (R, +, , 0, 1,<) is, up to isomorphism, the only Archimedean ordered field satisfying the axiom of continuity [Die60]. The set of real numbers can also be constructed in various ways, for example by means of Dedekind cuts or by completion of the (metric space of) rational numbers. We will neglect all foundational problems and assume that the real numbers form a well-defined
set R with all the properties which are proved in analysis. We will denote the R
real line topology, that is, the set of all open subsets of ,byτR. In Sect. 4.1 we introduce several representations of the real numbers, three of which (and the equivalent ones) will survive as useful. We introduce a rep- n n resentation ρ of R by generalizing the definition of the main representation
ρ of the set R of real numbers. In Sect. 4.2 we discuss the computable real numbers. Sect. 4.3 is devoted to computable real functions. We show that many well known functions are computable, and we show that partial sum- mation of sequences is computable and that limit operator on sequences of real numbers is computable, if a modulus of convergence is given. We also prove a computability theorem for power series. Convention 4.0.1. We still assume that Σ is a fixed finite alphabet con- taining all the symbols we will need.
4.1 Various Representations of the Real Numbers
According to the principles of TTE we introduce computability on R by nam-
∗ ⊆ → R ing systems. Since the set R is not countable, it has no notation ν : Σ (onto) but only representations. Most of its numerous representations have no applications. In this section we introduce three representations ρ, ρ< and ρ> of the set of real numbers (and some equivalent ones) which induce the most important computability concepts. We will also discuss some other represen- tations which, for various reasons, are only of little interest in computable analysis.
86 4. Computability on the Real Numbers R Since the set Q of rational numbers is dense in , every real number has arbitrarily tight lower and arbitrarily tight upper rational bounds. Every real number x can be identified by the set { | ∈ } (a; b) a, b Q, a
Convention 4.1.1. In the following we will abbreviate νQ(w)bywwhere
ν Qis our standard notation of the rational numbers (Definition 3.1.2). First, we introduce a standard notation In of all rational n-dimensional cubes with edges parallel to the coordinate axes and rational vertices. Definition 4.1.2 (notation of rational cubes). Assume n ≥ 1. n 1. For (a1,...,an)∈ R define the (maximum) norm
||(a1,...,an)|| := max |a1|,...,|an| n
and for x, y ∈ R define the (maximum) distance by d(x, y):=||x − y|| .
(n) n
∈ Q } 2. Let Cb := {B(a, r) | a ∈ Q ,r ,r>0 be the set of open rational n| } balls (or cubes), where B(a, r):={x∈ R d(x, a) n 4. By I (w) we denote the closure of the cube In(w) . In particular, Cb(1) is the set of all open intervals with rational endpoints and I1(ι(v)ι(w)) is the open interval (v − w; v + w), Cb(2) is the set of all open squares with rational vertices (edges parallel to the coordinate axes) 2 and I (ι(v1)ι(v2)ι(w)) is the open square (v1 − w; v1 + w) × (v2 − w; v2 + w), Cb(3) is the set of all open cubes with rational vertices (edges parallel to the coordinate axes), etc. . We introduce representations ρ, ρ< and ρ> as our standard representa- tions of computable topological spaces as follows. 4.1 Various Representations of the Real Numbers 87 Definition 4.1.3 (the representations ρ, ρ< and ρ>). Define computa- ble topological spaces (1) 1 • S= := (R, Cb , I ) , • ∞ S< := (R,σ<,ν<),ν<(w):=(w; ), • −∞ S> := (R,σ>,ν>),ν>(w):=( ; w) , and let ρ := δS= , ρ< := δS< and ρ> := δS> . (The sets σ< and σ> are defined implicitly.) Notice that S=, S< and S> are computable topological spaces (Definition 3.2.1), since the properties νQ(u)= 1 1 νQ(v)andI(u)=I (v) are decidable in (u, v). By Definition 3.2.2, ⇐⇒ { ∈ (1) 1 } ρ(p)=x J Cb | x ∈ J} = {I (w) | ι(w) p , or roughly speaking, iff p is a list of all J ∈ Cb(1) such that x ∈ J. Similarly, ρ<(p)=x,iffpis a list of all rational numbers a such that a numbers a with a The final topologies of the above representations can be characterized easily (Definition 3.1.3.2, Lemma 3.2.5.3): Lemma 4.1.4 (final topologies of ρ, ρ< and ρ>). 1. The final topology of ρ is the real line topology τR. { ∞ | ∈ R} 2. The final topology of ρ< is τρ< := (x; ) x . { −∞ | ∈ R} 3. The final topology of ρ> is τρ> := ( ; x) x . (1) Proof: Cb generates τR, σ< generates τρ< and σ> generates τρ> . Another important representation of the real numbers is the Cauchy rep- resentation. Since every real number is the limit of a Cauchy sequence of rational numbers, such sequences can be used as names of real numbers. However, the “naive Cauchy representation” which considers all converging sequences of rational numbers as names is not very useful (Example 4.1.14.1). 88 4. Computability on the Real Numbers For the Cauchy representation we consider merely the “rapidly converging” sequences of rational numbers. Definition 4.1.5 (Cauchy representation). Define the Cauchy repre- ω sentation ρC :⊆ Σ → R by ∈ there are words w0,w1... dom(ν Q) ρC(p)=x:⇐⇒ such that p = ι(w0)ι(w1)ι(w2) ..., −i |wi −wk|≤2 for i The representation ρ, the Cauchy representation ρC and many variants of them are equivalent: Lemma 4.1.6 (representations equivalent to ρ). The following repre- sentations of the real numbers are equivalent to the standard representation ω ρ :⊆ Σ → R: 1. the Cauchy representation ρC, 0 00 000 2. the representations ρC, ρC and ρC obtained by substituting −i −i −i |wi − wk| < 2 , |wi − x| < 2 or |wi − x|≤2 , −i respectively, for |wi − wk|≤2 in the definition of ρC, 3. 1 there are words u0,u1...∈dom(I ) such that p = ι(u0)ι(u1) ..., a ⇐⇒ ρ (p)=x: ∀ 1 ⊆ 1 1 −k ( k) I (uk+1) I (uk) and length(I (uk)) < 2 1 1 and {x} =I (u0)∩I (u1)∩... , 4. \ n o b 1 ρ (p)=x :⇐⇒ { x } = I ( v ) | ι ( v ) p . 0 00 000 The representations ρC, ρC and ρC are inessential modifications of the Cauchy representation, and ρa is a representation by strongly nested, rapidly converging sequences of open intervals. A ρb-name of x is a list of closed rational intervals for which x is the only common point. While a ρ-name of x is a list of all open rational intervals containing x, these characterizations show that it suffices to list merely “sufficiently many” of them. Proof: b a ρ ≤ ρ : Define representations δ1 and δ2 of R by δ1(p)=x,iff 1 1 1 1 p=ι(u0)ι(u1)..., I (uk+1) ⊆ I (uk )and{x}=I(u0)∩I(u1)∩... , and δ2(p)=x,iff 4.1 Various Representations of the Real Numbers 89 1 1 1 1 p = ι(u0)ι(u1) ..., I (uk+1) ⊆ I (uk )and{x}=I (u0)∩I (u1)∩... . There is a computable function h :⊆ Σω → Σω such that \n o 1 1 | h(p)=ι(v0)ι(v1)... where I (vi)= I (v) ι(v) p ∈ 1 where ip is the smallest number k such that ι(v) p I1(w)=B(a, r)=⇒I1◦g(i, w)=B(a, (1 + 2−i) · r) . There is a computable function f :⊆ Σω → Σω such that f(ι(w0)ι(w1)ι(w2) ...)=ι◦g(0,w0)ι◦g(1,w1)ι◦g(2,w2)... . Then f translates δ1 to δ2. It remains to select from any δ2-name a rapidly converging subsequence of intervals. There is a Type-2 machine M which on ∈ input p = ι(u0)ι(u1) ... dom(δ2) computes a sequence q = ι(um0 )ι(um1 ) ... 1 −k where mk is the smallest number i>mk−1 such that length(I (ui)) < 2 . a Then fM , the function computed by the machine M,translatesδ2 to ρ . Therefore, ρb ≤ ρa. a ≤ 0 a ≤ 00 ⊆ ω → ω ρ ρC and ρ ρC: There is a computable function f : Σ Σ a mapping any p = ι(u0)ι(u1)ι(u1) ...∈dom(ρ )toq=ι(v0)ι(v1)ι(v1)...such 1 a that ν Q(vi)=inf(I (ui)) for all i.Ifρ(p)=x,thenv0 1 − 000 where u is a word with I (u)=(w0 2; w0 +2).IfρC (p)=x,thenqis a list ∈ 1 000 of all words v such that x I (v). Therefore, the function fM translates ρC to ρ. 90 4. Computability on the Real Numbers ρ ≤ ρb:TheidentityonΣω translates ρ to ρb. Therefore, the given representations are equivalent. The representation δ informally introduced in Sect. 1.3.2 has the property ρa ≤ δ ≤ ρb (Lemma 4.1.6) and so is equivalent to ρ. By definition, a ρ-name of x is a list of all intervals (a; b) with rational endpoints such that x ∈ (a; b). Every arbitrarily tight lower and every arbi- trarily tight upper rational bound of x can be obtained from a finite prefix of p. This is the characteristic common property of all representations equiv- alent to ρ: Lemma 4.1.7 (characterization of ρ). For every representation ω δ :⊆ Σ → R, × Q | } { ∈ R ≤ ⇐⇒ ( x, a) a δ ρ { ∈ R × Q | } (x, a) x This is essentially a special case of Theorem 3.2.10. For a proof see Exer- cise 4.1.3. Therefore, ρ is up to equivalence the “poorest” representation δ of the real numbers such that the properties “a Lemma 4.1.8 (representations equivalent to ρ<). The following rep- resentations of the real numbers are equivalent to the representation ω ρ< :⊆ Σ → R: ∈ there are u0,u1... dom(ν Q) a ⇐⇒ 1. ρ<(p)=x: such that p = ι(u0)ι(u1) ..., u0 b } ⇐⇒ { | 2. ρ<(p)=x : x =sup v ι(v) p . The proof is left as Exercise 4.1.5. However, if we force rapid conver- gence, we obtain a representation equivalent to ρ (Exercise 4.1.6). Lemma 4.1.7 holds correspondingly for ρ< replacing ρ. Therefore, ρ< is the “poor- est” representation δ of the real numbers such that the property “a Lemma 4.1.9. 1. ρ ≡ ρ< ∧ ρ> (that is, ρ is the greatest lower bound of ρ< and ρ>), in particular, ρ ≤ ρ< and ρ ≤ ρ> . 2. ρ< 6≤t ρ , ρ> 6≤t ρ , ρ< 6≤t ρ> and ρ> 6≤t ρ< . 4.1 Various Representations of the Real Numbers 91 Proof: 1. By Definition 3.3.7, (ρ< ∧ ρ>)hp, qi = x ⇐⇒ ρ < ( p )=ρ>(q)=x. There is a Type-2 machine M which on input p ∈ dom(ρ) produces a list of all ι(w) for which there is some word v such that ι(v) p and w is the left 1 endpoint of the interval I (v). Then the function fM translates ρ to ρ< .For a similar reason, ρ ≤ ρ>. By Lemma 3.3.8, ρ ≤ ρ< ∧ ρ>. a ∧ a ≤ b For the other direction it suffices to prove ρ< ρ> ρ .ThereisaType-2 h i∈ a ∧ a machine M which on input p, q dom(ρ< ρ>), where p = ι(u0)ι(u1) ... and q = ι(v0)ι(v1) ... , produces a sequence ι(w0)ι(w1) ... , such that 1 a ∧ a b I (wi)=(ui;vi). The function fM translates ρ< ρ> to ρ . 2. This follows from the simple observation that a lower bound cannot be obtained from a finite set of upper bounds and vice versa. More formally we 0 can use the fact γ ≤t γ =⇒ τγ ⊆ τγ0 from Theorem 3.1.8: ρ< 6≤t ρ since 6⊆ τρ τρ< etc. . To sum up, one can roughly say that for a real number x,aρ<-name consists of all rational lower bounds of x,aρ>-name consists of all rational upper bounds of x,andaρ-name consists of all rational lower bounds and all rational upper bounds of x. Since by Corollary 3.2.12 for admissible representations only continuous functions can be computable, Lemma 4.1.4 tells us which of the three computability concepts is adequate in a given topological setting. Computability of elements and functions induced by the representations ρ, ρ< and ρ> will be discussed in the following sections. As an instructive example we discuss the problem of finding a rational upper bound for a real number. Example 4.1.10. Consider the multi-valued function Q { ∈ R × Q | } F : R , RF := (x, a) x 1. F is not (ρ<,νQ)-continuous. Q 2. F is (ρ>,νQ)-computable (and therefore, (ρ, ν )-computable). Q 3. F has no (ρ, ν Q)-continuous choice function (and therefore, no (ρ>,ν )- continuous choice function). Remember, that νQis admissible with discrete final topology τ (Example νQ 3.2.4.1) . b Q 1. Suppose F is (ρ<,νQ)-continuous. Then F has a continuous (ρ<,ν )- ⊆ ω → ∗ b realization g : Σ Σ (Lemma 4.1.8). Consider ρ<(p)=x. By assump- ∈ ∗ tion, g(p)=wwith x<νQ(w)=wfor some w Σ .Sincegis continuous, ω there is some number n with g[p fix of p ∈ p = ι(w0)ι(w1) ... dom(ρ>). Therefore, fM is a (ρ>,νQ)-realization of the relation R. 3. Since the final topology τRof the admissible representation ρ is con- nected, every (ρ, ν Q)-continuous function is constant by Corollary 3.2.13. But a choice function of F cannot be constant. The definitions of ρ, ρC, ρ< and ρ> (and their variants) can be modified in various other ways without affecting the induced continuity or computabil- ity, respectively. So far we have used the set Q of the rational numbers as a “standard” dense countable subset of the real numbers and ν Qas its standard notation. Can we replace ν Qby some other notation νQ of a dense subset Q of R such that the resulting representations induce the same continuity or computability concepts on R? The following “robustness” theorem gives an answer. Theorem 4.1.11 (robustness). For any representation δ of the real num- bers introduced in Definitions 4.1.3, 4.1.5, 4.1.6 and 4.1.8 consider δ as a Q function of ν Q,thatis,δ=D(ν ). Then for every notation νQ of a dense subset Q ⊆ R, 1. δ ≡t D(νQ), ≡ 2. δ D(νQ), ifνQand νQ are r.e.-related { || − | −i} (that is, if (v, w, i) νQ(v) νQ(w) <2 is r.e.). The proof is left as Exercise 4.1.8. Examples for notations r.e.-related to Q Q ν Qare any notation of equivalent to ν and any standard notation of the n { | ∈ Z ∈ N} binary rational numbers Q2 := z/2 z ,n . Computability concepts introduced via robust definitions are not sensitive to “inessential” modifications. It can be expected that they occur in many applications. On the other hand, computability concepts introduced via non- robust definitions are not very relevant. The Turing machine is another famous example of a robust definition. Numerous variants of the original definition are used in the literature, all of which define the same notion of computable functions. Usually the repre- sentation by infinite decimal fractions is considered to be the most natural representation of the real numbers. Definition 4.1.12 (finite and infinite base-n fractions). For n ≥ 2 define the notation νb,n of the finite base-n fractions and the representation ω ρb,n :⊆ Σ → R of the real numbers by infinite -n fractions as follows: ∗ ∗ ∗ dom(νb,n):={λ, -}(Γ \ 0Γ )•Γ , ∗ ∗ ω dom(ρ ):={λ, -}(Γ \ 0Γ )•Γ , b,n X i νb,n(sak ...a0•a−1a−2 ...a−m):=s· ai · n , ≥≥− kXi m i ρb,n(sak ...a0•a−1a−2...):=s· ai·n, i≤k 4.1 Various Representations of the Real Numbers 93 where ai ∈ Γn := {0, 1,...,n−1} for all i ≤ k, s := 1,ifs=λ,ands:= −1, if s = -. (We assume tacitly Γn ⊆ Σ.) (Remember that λ is the empty word.) The following theorem summarizes some interesting properties of the representations by infinite base-n fractions. Theorem 4.1.13 (infinite base-n fractions). For any m, n ≥ 2 (assum- ing Γm,Γn ⊆Σ) Ir Ir \ Q 1. ρb,n| ≡ ρ| (where Ir := R is the set of irrational real numbers), 2. x is ρb,n-computable, iff x is ρ-computable. 3. ρb,n ≤ ρ and ρ 6≤t ρb,n, 4. ρb,m ≤ ρb,n,ifpd(n)⊆pd(m), ρb,m 6≤t ρb,n otherwise (where pd(n) denotes the set of prime divisors of n), 5. ρb,n has the final topology τR. 6. ρb,n is not admissible, → R 7. f :⊆ R is (ρb,n,ρ)-computable (-continuous), iff it is (ρ, ρ)-computable (-continuous). Proof: 1. and 2. See Exercise 4.1.10 3. There is a Type-2 machine M which maps any sequence p = sak ...a0•a−1a−2 ...∈dom(ρb,n) to a sequence ι(u0)ι(u1) ...with uj = νb,n(sak ...a0•a−1a−2 ...a−j). Then M translates ρb,n to ρC. The relation ρ 6≤t ρb,n will be concluded from Property 4. ∈ N 4. Suppose, pd(n) ⊆ pd(m). Then for each k ∈ N numbers lk ,bk can lk k be determined such that m = bk · n . For computing a ρb,n-name of x = k ρb,m(p), it suffices to compute integers c0,c1,...such that ck ≤ n ·x ≤ ck +1 for all k. There is a Type-2 machine M, which on input (p, u)(x:= ρb,m(p), lk k ∈ N · k := νN(u)) determines (names of) numbers lk,bk such that m = bk n and then (a name of) a number ck such that lk ck · bk ≤ m · x ≤ (ck +1)·bk . (For this purpose, M must read only the first lk digits of p after the dot.) lk k k Since m = bk · n , we obtain immediately ck ≤ n · x ≤ ck + 1, as required. Therefore, ρb,m can be translated to ρb,n by a Type-2 machine. ∈ Now consider that the prime number r N divides n but not m.There ≤ · is some c ∈ N,1 c 3. (continued) Suppose ρ ≤t ρb,n. Choose some prime number m which does not divide n.Thenρb,m ≤t ρ ≤t ρb,n by Property 1, but ρb,m 6≤t ρb,n as proved above (contradiction). This shows ρ 6≤t ρb,n. ⊆ ≤ 5. If X R is open, then it is ρ-open by Lemma 4.1.4. Since ρb,n ρ by Property 3, X is ρb,n-open by Theorem 3.1.8. Let X ⊆ R be ρb,n-open. Then −1 ω ∩ ⊆ ∗ ∈ ρb,n[X]=AΣ dom(ρb,n)forsomeA Σ .Considerx X,x>0. Case 1: x = a/nj for some integer a and some natural number j. Then x has two ρb,n-names p := “ak ...a0•a−1 ...”andq:= “bk ...b0•b−1...”, such that there is some some m ≤ k with am > 0, ai =0fori τR. By Theorem 3.2.8.1 any two admissible representations with final topology τRare continuously equivalent. Since the representation ρb,n has the final topology τRbut is not continuously equivalent to ρ, it cannot be admissible. 7. See Exercise 4.1.12. Restricted to the irrational numbers, ρb,n and ρ are equivalent. Therefore, arealnumberxis ρb,n-computable, iff it is ρ-computable (notice that the rational numbers are ρb,n-computable and ρ-computable). Since ρb,n is not admissible, a ρb,n-name cannot be interpreted as a (suf- ficiently rich) list of atomic properties from a subbase of its final topology τR. Although ρb,n-names are richer than ρ-names by Property 3, this ad- ditional information is useless for computing real functions by Property 7. From Property 7 we conclude also that every (ρb,n,ρb,m)-computable func- tion is (ρ, ρ)-computable. However, already the simple (ρ, ρ)-computable real function x 7→ 3 · x is not (ρb,10,ρb,10)-continuous (Example 2.1.4.7). We discuss some further representations of the real numbers which, how- ever, have only very few applications. Example 4.1.14 (further representations of R). 1. Naive Cauchy representation: Define the naive Cauchy representation ρCn of the real numbers by ρCn(p)=x:⇐⇒ p = ι ( w 0 ) ι ( w 1 ) ... and lim wi = x. i→∞ 4.1 Various Representations of the Real Numbers 95 Since ρC, ρ< and ρ> are restrictions of ρCn,wehaveρC,ρ<,ρ> ≤ ρCn. } ρCn has the final topology {∅, R (no property of x = ρCn(p)canbe concluded from a finite prefix w of p). From this fact and Theorem 3.1.8 we conclude ρCn 6≤t ρC, ρCn 6≤t ρ< and ρCn 6≤t ρ>. 2. Cut representations: Define computable topological spaces • R ∞ S≤ =( ,σ≤,ν≤)byν≤(w):=[νQ(w); )and • R −∞ S≥ =( ,σ≥,ν≥)byν≥(w):=( ; ν Q(w)] (cf. Definition 4.1.3). Define the left cut representation and the right cut representation by ρ≤ := δS≤ and ρ≥ := δS≥ , respectively. ≤ ≥ If ρ≤(p)=x(ρ≥(p)=x), then p is a list of all a ∈ Q with a x (a x). ∪ The final topology of ρ≤ is τρ< σ≤, that is, also intervals (“atomic ≤ properties”) [a; ∞)witha∈ Q are called “open”. We have ρ≤ ρ<, but neither ρ<, ρ>, ρC nor ρ≥ are t-reducible to ρ≤. ≤ ⊆ As an example assume ρC t ρ≤.Thenτρ≤ τρ by Theorem 3.1.8. But ∞ ∈ \ [0; ) τρ≤ τρ. Restricted to the irrational numbers ρ< and ρ≤ are Ir Ir equivalent: ρ<| ≡ ρ≤| . (The properties hold accordingly for ρ≥.) The definitions of ρ≤ and ρ≥ are not topologically robust, that is, replacement of Q in the definitions by another dense subset Q yields representations which are not continuously equivalent to ρ≤ and ρ≥, respectively. 3. Continued fraction representation: For any real number x ≥ 0 define its continued fraction fr(x):=[a0,a1,...](ai ∈N) inductively by: x0 := x, 1 if a =6 x a := bx c ,x := xn−an n n n n n+1 0otherwise. Then, informally 1 x = a + , 0 a + 1 1 a2+... where the fraction is finite (an =0foralln≥n0), iff the number x is rational. Define the continued fraction representation ρcf of the real a0 a1 numbers by ρcf (p)=x,iff(x≥0andp=1 01 0 ... where fr(x):= a0 a1 [a0,a1,...]) or (x<0andp=-1 01 0 ...where fr(−x):=[a0,a1,...]). One can show ρcf ≡ ρ≤ ∧ ρ≥ , in particular, ρcf ≤ ρ≤ and ρcf ≤ ρ≥.Furthermore,ρcf ≤ ρb,n for all n ≥ 2. Neither ρ≤, ρ≥ nor ρb,n for n ≥ 2 are t-reducible to ρcf . Restricted Ir Ir to the irrational numbers, ρ and ρcf are equivalent: ρ| ≡ ρcf | . The definitions of the cut representations ρ≤ and ρ≥ are not even topolog- ically robust. Neither the representations by infinite base-n fractions and the naive Cauchy representation nor the cut representations ρ≤ and ρ≥ and their greatest lower bound ρcf are of much interest in computable analysis. Fig. 4.2 shows the reducibility order of the representations of the real numbers we 96 4. Computability on the Real Numbers have introduced so far. Many other representations of the real numbers are introducedandcomparedin[Hau73,Dei84]. ρCn