On the equivalence of some approaches to computability on the real line

Similar documents
Effectivity and Effective Continuity of Multifunctions

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

Math 455 Some notes on Cardinality and Transfinite Induction

Monotonically Computable Real Numbers

Sets, Structures, Numbers

arxiv: v1 [cs.pl] 19 May 2016

Analysis I. Classroom Notes. H.-D. Alber

Informal Statement Calculus

Chapter 1. Measure Spaces. 1.1 Algebras and σ algebras of sets Notation and preliminaries

This chapter contains a very bare summary of some basic facts from topology.

Lecture Notes in Advanced Calculus 1 (80315) Raz Kupferman Institute of Mathematics The Hebrew University

Equational Logic. Chapter Syntax Terms and Term Algebras

Part III. 10 Topological Space Basics. Topological Spaces

2. The Concept of Convergence: Ultrafilters and Nets

Notes on ordinals and cardinals

Introduction and Preliminaries

Topology. Xiaolong Han. Department of Mathematics, California State University, Northridge, CA 91330, USA address:

Real PCF extended with is universal (Extended Abstract )

Complete Partial Orders, PCF, and Control

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

Comparing hierarchies of total functionals

Theory of Computation

On the expressive power of existential quantification in polynomial-time computability (Extended abstract)

Universal Algebra for Logics

REVIEW OF ESSENTIAL MATH 346 TOPICS

G δ ideals of compact sets

Analysis Finite and Infinite Sets The Real Numbers The Cantor Set

CHAPTER 2. Computability

Some Background Material

CSE 1400 Applied Discrete Mathematics Definitions

Extending Algebraic Operations to D-Completions

Chapter 1. Sets and Mappings

The complexity of recursive constraint satisfaction problems.

Logical Connectives and Quantifiers

Chapter 1 The Real Numbers

Fundamental Inequalities, Convergence and the Optional Stopping Theorem for Continuous-Time Martingales

1/12/05: sec 3.1 and my article: How good is the Lebesgue measure?, Math. Intelligencer 11(2) (1989),

Topological properties of Z p and Q p and Euclidean models

König s Lemma and Kleene Tree

A LITTLE REAL ANALYSIS AND TOPOLOGY

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Exercises for Unit VI (Infinite constructions in set theory)

Part II. Logic and Set Theory. Year

INITIAL POWERS OF STURMIAN SEQUENCES

Introduction to Real Analysis

Probability and Measure

P-adic Functions - Part 1

Measures and Measure Spaces

Contents Ordered Fields... 2 Ordered sets and fields... 2 Construction of the Reals 1: Dedekind Cuts... 2 Metric Spaces... 3

On Subrecursive Representability of Irrational Numbers, Part II

MATH31011/MATH41011/MATH61011: FOURIER ANALYSIS AND LEBESGUE INTEGRATION. Chapter 2: Countability and Cantor Sets

A Non-Topological View of Dcpos as Convergence Spaces

0 Sets and Induction. Sets

MORE ON CONTINUOUS FUNCTIONS AND SETS

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory

1 Differentiable manifolds and smooth maps

Automata Theory and Formal Grammars: Lecture 1

Herbrand Theorem, Equality, and Compactness

4 Countability axioms

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

5 Set Operations, Functions, and Counting

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Boolean Algebras, Boolean Rings and Stone s Representation Theorem

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Chapter One. The Real Number System

Isomorphisms between pattern classes

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

Metric Spaces and Topology

DO FIVE OUT OF SIX ON EACH SET PROBLEM SET

Congruence Boolean Lifting Property

Principles of Real Analysis I Fall I. The Real Number System

Convex Analysis and Economic Theory Winter 2018

Walker Ray Econ 204 Problem Set 3 Suggested Solutions August 6, 2015

Notes on Ordered Sets

CHAPTER 7. Connectedness

Maths 212: Homework Solutions

MATH 102 INTRODUCTION TO MATHEMATICAL ANALYSIS. 1. Some Fundamentals

Uncountable Automatic Classes and Learning

A Monad For Randomized Algorithms

Reverse Mathematics of Topology

LECTURE 15: COMPLETENESS AND CONVEXITY

Chapter 1. Sets and Numbers

8 Complete fields and valuation rings

ClC (X ) : X ω X } C. (11)

Topological properties

Recursion and Topology on 2 ω for Possibly Infinite Computations. Verónica Becher Departamento de Computación, Universidad de Buenos Aires, Argentina

Supplementary Notes for W. Rudin: Principles of Mathematical Analysis

ACS2: Decidability Decidability

A topological set theory implied by ZF and GPK +

Week Some Warm-up Questions

Formal power series rings, inverse limits, and I-adic completions of rings

Theory of Computation

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Chapter 1 : The language of mathematics.

Sets, Models and Proofs. I. Moerdijk and J. van Oosten Department of Mathematics Utrecht University

Tree sets. Reinhard Diestel

Eilenberg-Steenrod properties. (Hatcher, 2.1, 2.3, 3.1; Conlon, 2.6, 8.1, )

Measure and integration

s P = f(ξ n )(x i x i 1 ). i=1

Transcription:

On the equivalence of some approaches to computability on the real line Dieter Spreen, Holger Schulz Fachbereich Mathematik, AG Theoretische Informatik, Universität Siegen 57068 Siegen, Germany Abstract There have been many suggestions for what should be a computable real number or function. Some of them exhibited pathological properties. At present, research concentrates either on an application of Weihrauch s Type Two Theory of Effectivity or on domain-theoretic approaches, in which case the partial objects appearing during computations are made explicit. A further, more analysis-oriented line of research is based on Grzegorczyk s work. All these approaches are claimed to be equivalent, but not in all cases proofs have been given. In this paper it is shown that a real number as well as a real-valued function are computable in Weihrauch s sense if and only if they are definable in Escardó s functional language Real PCF, an extension of the language PCF by a new ground type for (total and partial) real numbers. This is exactly the case if the number is a computable element in the continuous domain of all compact real intervals and/or the function has a computable extension to this domain. For defining the semantics of the language Real PCF a full subcategory of the category of bounded-complete ω-continuous directed-complete partial orders is introduced and it is defined when a domain in this category is effectively given. The subcategory of effectively given domains contains the interval domain and is Cartesian closed. 1 Introduction The question which real numbers are computable has interested logicians and computer scientists since the early days of computability theory [21], and various definitions have been proposed. (The relationship of most of them is studied in [4].) The central idea with these approaches is that real numbers are limit points of certain sets (or sets of sets) of rationals (Dedekind cuts, Cauchy sequences, Cauchy sequences with a fixed convergence rate, sequences of nested rational intervals with length approaching zero, n-adic expansions,... ). Rational numbers are easy to encode objects. A real is then computable, if the set and/or sequence (of codes) of approximating objects can effectively be generated. Unfortunately, though these notions are derived from equivalent characterizations of the reals, they partly lead to different classes of computable real numbers. Moreover, in some approaches simple operations such as multiplication are not computable [22], where a real-valued function is computable, if there is a Turing machine which operates on the infinite input words given by (the code of) the objects approximating the arguments and produces as output the sequence of (codes of the) objects approximating the function value. An analysis of these approaches led Weihrauch to the development of his Type Two Theory of Effectivity (TTE) [14, 22, 23, 24]. Here infinite entities like the reals are represented by infinite words over a finite alphabet. If such a word is computable (as a sequence of letters), then also the corresponding entity is considered as computable. A map between spaces of such The paper mainly contains results from the second author s diploma thesis [18] written under the supervision of the first author. Corresponding author. E-mail: spreen@informatik.uni-siegen.de. 1

entities is computable, if there is a Turing machine which, working on the word representing the argument, step by step produces a word representing the value of the map. Note that such computations are necessarily infinite, but that each finite part of the output is produced in finite time. Different representations of a space can be compared in a canonical way. This allows to distinguish certain representations as admissible. They induce the same computability notion on the represented space. In the case of the real numbers the representations defined by Cauchy sequences of rationals with a fixed convergence rate and/or sequences of nested rational intervals with length approximating zero turn out to be admissible. All basic operations on the reals are computable with respect to these representations. A machine independent and more analysis-oriented computability definition for real-valued functions has been proposed by Grzegorczyk [12, 13]. He defines real numbers to be computable, if they are limits of computable Cauchy sequences of rationals with a fixed convergence rate (e.g. 2 n ). Similarly, a sequence of real numbers is computable, if there is a double sequence of rationals converging pointwise with fixed rate to the given sequence. A real-valued function is then computable, if it maps computable sequences to computable sequences and is effectively uniformly continuous on compact rational intervals. Note that these computability notions are also used in Pour-El/Richards [17]. Quite a different approach to computability on the reals goes back to an early paper of D. Scott [19], in which he considers the countably based continuous domain of all closed real intervals as well as the whole real line ordered by converse inclusion. The real numbers are just the maximal elements of this domain. There is an elaborated computability theory for such domains [25] (see also [8]). Thus, one obtains a computability notion for the reals as a special case. Note that in this approach a real number turns out to be computable if and only if it is the intersection of a computable sequence of nested closed rational intervals. Every continuous real-valued function has a continuous extension to the whole domain. It is said to be computable if it has a computable extension. As is shown by Edalat and Sünderhauf [8], these computability notions coincide with the ones used by Grzegorczyk as well as Pour-El and Richards. There has recently been a considerable amount of work on using continuous domains in computable analysis. A large class of spaces can be recovered as maximal elements of domains which in addition to the ideal elements of the mathematical universe also contain the partial entities necessarily appearing in constructions (computations). Furthermore, an important part of analytical mathematics has be extended to such domains. (See [9] for an overview.) Working with continuous domains has certain drawbacks, especially when one is interested in considering higher type functions and computability. Therefore, some authors [2, 20, 6, 7] prefer to work with Scott domains. In the case of the reals one considers the ideal completion of the class of all closed rational intervals ordered by converse inclusion. Now, the real numbers are no longer the maximal elements of the domain, but can be obtained by factorizing its total elements [2, 3]. A real number is computable in this case, if it has a computable representative in the corresponding equivalence class, and a real-valued function is computable, if it has a computable extension to the domain modulo factorization. Also these computability notions are equivalent to the notions of Grzegorczyk, as is proved by Stoltenberg-Hansen and Tucker [20]. All approaches to computability on the reals mentioned so far are external: with the help of a coding of the rationals and some topological properties a reduction to well known computability notions on discrete sets is used. A totally different, internal approach is due to Escardó [10]. He extends the functional programming language PCF introduced by Plotkin [16] with a type for real numbers. This type is interpreted as the interval domain mentioned above. A real number and a real-valued function, respectively, are computable in this approach, if there is a term in the extended language which denotes the given number or an extension of the given function. In this paper we show that these computability notions for numbers and functions coincide with the ones given via the theory of effectively presented continuous domains, as well as those obtained through the TTE approach. Since all approaches to the computability on the real line reported on above are quite different, this equivalence result together with those cited before shows that also in the continuous case we now have a stable notion of a computable real number and a computable real-valued function, respectively. 2

For interpreting the Real PCF language, a Cartesian closed category of domains is required which contains the interval domain as object. Moreover, to establish the relationship between definability in Real PCF and computability, the domains in this category have to be effectively presented such that a notion of computable object can be introduced. In order to achieve this, either the category of computable retracts of Plotkin s T ω [11] or of effectively given Scott domains [18] has been considered. Here, a new approach is presented. We offer a notion of being effectively given for a subclass of bounded-complete ω-continuous directed-complete partial orders and show that the category of such domains with Scott continuous maps as morphisms is Cartesian closed. Moreover, it contains the interval domain. The paper is organized as follows. In Section 2 the TTE approach to real number computability is recalled. Similarly, Section 3 contains basic definitions and results from domain theory. The aforementioned category of effectively given domains is presented and its Cartesian closure is shown. Moreover, the interval domain is considered. In Section 4 the language Real PCF is introduced. Finally, in Section 5 the equivalence theorems are proved. Concluding remarks are given in Section 6. 2 The TTE approach to real number computations 2.1 Basic definitions Let Σ be some finite alphabet, Σ be the set of all finite words over Σ, and Σ ω be the set of infinite sequences (words) with elements from Σ. The empty word is denoted by ǫ. As is well known, Σ ω is furnished with a canonical topology, the Cantor topology τ C = { AΣ ω A Σ }. Here AΣ ω is the set of all words in Σ ω that have a prefix from A. In order to compute with infinite words Turing machines with a finite number of readonly input tapes and a write-only output tape are used so that on the output tape the head can move only in one direction. They are called type two machines [23]. If M is such a machine, say with k input tapes and input/output alphabets Σ 1,...,Σ k,σ, then the partial map Γ M : Σ ω 1 Σ ω k Σω computed by M is defined as follows: Γ M (p 1,..., p k ) = p, if M with p 1,..., p k written on its input tapes computes forever, writing the infinite sequence p on its output tape. Note that, if Γ M (p 1,..., p k ) is defined then every finite prefix of the output is produced in finite time and is thus dependent only on a finite initial segment of the input. In other words, Γ M is continuous. Definition 2.1 An operator Γ: Σ ω 1 Σ ω k Σω is recursive, if there is a type two machine M with k input tapes and input/output alphabets Σ 1,...,Σ k,σ such that Γ = Γ M. A point p Σ ω is constructive, if the 0-place operator () p is recursive. Constructive elements are also called computable in the literature. A representation δ of a nonempty set T is a partial map δ: Σ ω T (onto) with domain dom(δ). The value of δ at p dom(δ) is denoted, interchangeably, by δ p and δ(p). Example 2.2 Let natural numbers be denoted in binary (without leading zeros) and let ν bin : {0,1} ω map meaningful binary words to their corresponding numbers. For p = u 1 u 2... with u i dom(ν bin ) set M p = { ν bin (u i ) 1 i ω ν bin (u i ) > 0 }, and for any other word p {0,1, } ω let M p be undefined. Then M is a representation of the power set of ω. Representations of T can be compared in a natural way. Definition 2.3 Let δ: Σ ω 1 T and δ : Σ ω 2 T be representations of the set T. 1. δ c δ, read δ is (computably) reducible to δ, if there is a recursive operator Γ: Σ ω 1 Σ ω 2 such that for all p dom(δ), Γ(p) dom(δ ) and δ p = δ Γ(p). 3

2. δ c δ, read δ is (computably) equivalent to δ, if δ c δ and δ c δ. With the help of a representation the canonical computability notions for infinite words and operators on them can be lifted to the represented set. Definition 2.4 Let T, T 1,..., T k be nonempty sets with representations δ, δ 1,..., δ k, respectively. 1. An element z T is called δ-computable, if there is a constructive point p Σ ω with z = δ p. 2. A partial map F : T 1 T k T is (δ 1,..., δ k, δ)-computable, if there is a recursive operator Γ with Γ(p 1,..., p k ) dom(δ) and F(δ 1 p 1,..., δ k p k ) = δ Γ(p1,...,p k ), for all (p 1,..., p k ) (δ 1 δ k ) 1 (dom(f)). Obviously, these computability notions are invariant under the equivalence of representations. There are many ways to represent a set. But not all of them will induce the computability notion one may have in mind. In the case of countably based topological T 0 -spaces there is a natural way to single out a class of representations with the right properties. Definition 2.5 Let (T, τ) be a topological T 0 -space with a countable basis { B i i ω }. For p dom(m) let θ p be the unique point z T such that M p is the set of all numbers n with z B n, if there is such a point, and let θ p be undefined for any other p {0,1, } ω. The map θ is called standard representation of T. Any representation κ of T with κ c θ is said to be admissible. Each representation induces a topology on the represented set, by lifting the Cantor topology. In the case of admissible representations this topology coincides with the given topology τ. Moreover, τ is the coarsest topology induced by a continuous representation (see [23]). 2.2 Admissible representations of the real line We shall now consider representations of the reals. First we introduce a canonical notation for rational numbers. Let to this end Σ 1 = {0, 1,, /, } and define ν Q : Σ 1 Q as follows. For u dom(ν bin ), ν Q (u) = ν bin (u), for u dom(ν bin ) \ {0}, ν Q ( u) = ν bin (u), and for u, v dom(ν bin ) with u 0 and v {0, 1} such that ν bin (u) and ν bin (v) have no common divisor, ν Q (u/v) = ν bin (u)/ν bin (v) and ν Q ( u/v) = ν bin (u)/ν bin (v). In any other case ν Q is undefined. Obviously, ν Q is surjective. Definition 2.6 For u 0, v 0, u 1, v 1,... dom(ν Q ) such that sup { ν Q (u i ) i ω } = inf{ ν Q (v i ) i ω } set ρ(u 0 v 0 u 1 v 1...) = sup { ν Q (u i ) i ω }. For any other p Σ ω 1 let ρ(p) be undefined. The map ρ is called interval representation of R. As is shown in [23], this representation is admissible. A word representing a real number with respect to ρ contains information about approximations of the number from below and above. If this requirement is relaxed, one obtains representations that are no longer admissible. Definition 2.7 For u 0, u 1,... dom(ν Q ) let 1. ρ L (u 0 u 1...) = sup { ν Q )(u i ) i ω }, if ν Q (u i ) < sup { ν Q )(u i ) i ω }, for all i ω, 2. ρ R (u 0 u 1...) = inf { ν Q )(u i ) i ω }, if ν Q (u i ) > inf { ν Q )(u i ) i ω }, for all i ω, and let ρ L p and ρ R p be undefined for any other p Σ ω 1. The maps ρ L and ρ R, respectively, are called Dedekind left- and right-cut representations of R. Lemma 2.8 4

1. Up to computational equivalence the representation ρ is the infimum of the representations ρ L and ρ R with respect to computational reducibility. 2. The representations ρ L and ρ R are not comparable with respect to computational reducibility. 3. A real number is ρ-computable just if it is both ρ L - and ρ R -computable. Proof: (1) Let ξ R and u 0 v 0 u 1 v 1... dom(ρ) with ρ(u 0 v 0 u 1 v 1...) = ξ. Then we have for all i ω that ν Q (u i ) ξ ν Q (v i ). In the definitions of representations ρ L and ρ R strict inequalities are required. Define an operator Γ: Σ ω 1 Σ ω 1 as follows. For p = u 0 v 0 u 1 v 1... with u i, v i dom(ν Q ), for i ω, let Γ(p) = u 0 u 1..., where for every i ω, u i is the uniquely determined word in dom(ν Q ) with ν Q (u i ) = ν Q(u i ) 1/(i + 1). In any other case let Γ(p) be undefined. Then Γ is computable and witnesses that ρ c ρ L. Analogously, it follows that ρ c ρ R. If δ: Σ ω R is any other representation of the reals with ρ c δ c ρ L, ρ R, there are computable operators Γ L, Γ R : Σ ω Σ ω 1 with Γ L (p) dom(ρ L ), Γ R (p) dom(ρ R ), and ρ L Γ L (p) = δ p = ρ R Γ R (p), for p dom(δ). For p Σω 1 set Γ(p) = Γ L (p)(0) Γ R (p)(0) Γ L (p)(2) Γ R (p)(2).... Then Γ is computable and for p dom(δ) we have that Γ(p) dom(ρ) and δ p = ρ Γ(p). Thus δ c ρ. (2) Assume that ρ L c ρ R. Then ρ L c ρ by (1), which means that ρ L is admissible. As is easily verified, admissible representations are continuous. Thus, there are an index set I and u j Σ 1 (j I), say u j = u j 0... uj m j, with u j i dom(ν Q ) so that (ρ L ) 1 ((0,1)) = dom(ρ L ) { u j Σ ω 1 j I }. By definition, representations are surjective. Hence, we have that (0,1) = { ρ L (u j Σ ω 1 ) j I }. But ρ L (u j Σ ω 1 ) = { ξ R ξ > max { ν Q (u j i ) i m j } }. In the same way it follows that ρ R c ρ L. (3) The only if -part is a consequence of (1). For the if -part let ξ R be both ρ L - and ρ R -computable. Then there are infinite constructive words u 0 u 1... and v 0 v 1... with ρ L (u 0 u 1...) = ξ = ρ R (v 0 v 1...). It follows that also u 0 v 0 u 1 v 1... is constructive and ξ = ρ(u 0 v 0 u 1 v 1...). In numerical computations one usually works with the decimal representation of the real numbers or a variation thereof. But, as shown in [23], the decimal representation is not admissible. Moreover, a simple operation like multiplication by 3 is not computable with respect to this representation (see e.g. [23]). Similar phenomena can also be observed with respect to any other b-adic representation. Again, the reason is that these representations are obtained from one-sided approximations. In order to overcome this deficiency one allows also negative digits in the representation. Definition 2.9 Let b ω with b 2 and Σ b = { b + 1,..., b 1,.}. Set κ (b) (a n... a 0.a 1 a 2...) = n i= a i b i, if a i { b + 1,..., b 1}, and let κ (b) p be undefined for any other p Σ ω b. The map κ(b) is called negative digit b-adic representation. Note that in the case of the negative digit binary representation we simply write κ instead of κ (2). Lemma 2.10 The negative digit b-adic representation is admissible. 5

Proof: We show that κ (b) c ρ. Let us first verify that κ (b) c ρ. This is witnessed by the following operator Γ: Σ ω b Σω 1. For p dom(κ (b) ), say p = a n... a 0.a 1 a 2..., set Γ(p) = u 0 v 0 u 1 v 1..., where for i 0, u i and v i, respectively, are the unique elements in dom(ν Q ) with ν Q (u i ) = n a k b k b (i+1) and ν Q (v i ) = k= i n a k b k + b (i+1). In any other case let Γ(p) be undefined. For the converse reduction define Γ: Σ ω 1 Σ ω b as follows. If p Σω 1 is not of the form u 0 v 0 u 1 v 1... with u i, v i dom(ν Q ), let Γ(p) be undefined. Otherwise, set Γ(p) = a n... a 0.a 1 a 2..., where n ω and a n,..., a 0, a 1,... { b+1,..., b 1} are inductively given in the subsequent way. First, find k 0, m 0 ω such that ν Q (u k0 ) ν Q (v m0 ) 1. Let a = ν Q (u k0 ) and set n = log b a. Now, for i = n,...,0, define k= i a i = max { j b + 1 j b 1 n l=i+1 a lb l + jb i a }. Obviously, n l=0 a lb l = a. Next, assume for i > 0 that the digits a n,..., a 0, a 1,..., a i+1 have already been computed and that indices k n, m n ω with ν Q (u kn ) ν Q (v mn ) b n have been found, for n < i. Then find k i, m i ω such that ν Q (u ki ) ν Q (u ki 1 ) and ν Q (u ki ) ν Q (v mi ) b i. In case that i+1 l=n a lb l ν Q (u ki ) b i, set a i = 0, if i+1 l=n a lb l ν Q (u ki ), and a i = 1, if not. In the opposite case determine 0 < j < b with jb i < i+1 l=n a lb l ν Q (u ki ) (j + 1)b i and define a i = j, if i+1 l=n a lb l > ν Q (u ki ) + jb i, and a i = min{j + 1, b 1}, otherwise. If p dom(ρ), we can always find indices k, m as required. By induction we now show that for i 0, i l=n a lb l [ν Q (u ki ), ν Q (u ki ) + b i ], or if this is not true and ī is the greatest stage below i in the construction for which it holds, then i l=n a lb l [ν Q (u kī) + i l=ī+1 (b 1)b l, ν Q (u ki )]. Obviously, the statement is valid for i = 0. Suppose that it holds for i 1 and let s = i+1 l=n a lb l. Since ρ p [ν Q (u ki 1 ),min { ν Q (u kl ) + b l l < i }] and ν Q (u ki 1 ) ν Q (u ki ) ρ p, we have that also ν Q (u ki ) [ν Q (u ki 1 ), min { ν Q (u kl ) + b l l < i }]. Thus, either s, ν Q (u ki ) [ν Q (u ki 1 ), ν Q (u ki 1 ) + b i+1 ], or s [ν Q (u kī) + i 1 l=ī+1 (b 1)b l, ν Q (u ki 1 )] and ν Q (u ki ) [ν Q (u ki 1 ), ν Q (u kī) + b ī ]. It follows that in both cases s ν Q (u ki ) b i+1, which means that in the definition of a i a number j < b can be found as specified. Now, assume that s [ν Q (u ki 1 ), ν Q (u ki 1 ) + b i+1 ]. Then in all but one of the cases in the definition of a i it is easily verified s + a i b i [ν Q (u ki ), ν Q (u ki ) + b i ]. The exception is the case in which (b 1)b i < s ν Q (u ki ) b i+1 and s < ν Q (u ki ) (b 1)b i. The last inequality means that s + a i b i < ν Q (u ki ). By the assumption we moreover have that s + a i b i ν Q (u ki 1 ) + (b 1)b i. Thus, the second part in the above statement holds. Note that ī = i 1 in this case. Next, suppose that there is some ī as specified in the above statement and s [ν Q (u kī) + i 1 l=ī+1 (b 1)b l, ν Q (u ki 1 )]. Again we obtain in all cases in the definition of a i except the one mentioned that the first part of the above statement holds. The second part is obviously valid in the exceptional case. It follows from this consideration that Γ(p) is defined. By construction, Γ(p) dom(κ (b) ). As a further consequence we have that i l=n a lb l ρ p b i, which implies that ρ p = κ (b) Γ(p). 6

3 The domain-theoretic approach to real number computability 3.1 Basic definitions and facts Let (D, ) be a partial order with smallest element. For a subset S of D, S = { x D ( y S)y x } is the upper set generated by S. The subset S is called compatible if it has an upper bound. S is directed, if it is nonempty and every pair of elements in S has an upper bound in S. D is a directed-complete partial order (dcpo) if every directed subset S of D has a least upper bound S in D, and D is bounded-complete if every compatible subset has a least upper bound. For a detailed treatment of the theory of directed-complete partial orders the reader is referred to [1]. If (D, ) is a dcpo and x, y D then one says that x approximates y, and writes x y if for every directed subset S of D with y S there is some u S such that x u. The relation is transitive. It is also called way-below relation. Definition 3.1 Let (D, ) be dcpo. 1. A subset Z of D is a basis of D, if for any x D the set Z x = { z Z z x } is directed and x = Z x. 2. D is called continuous if it has a basis, and ω-continuous if it has a countable basis. The next lemma lists some important properties of the order of approximation. Lemma 3.2 Let D be a continuous dcpo with basis Z, M a finite subset of D, and u, v, x, y D. Then the following three statements hold: 1. If x y then x y. 2. If u x y v then u v. 3. If w x, for all w M, then there is some z Z such that z x and w z, for all w M. Statement (3) is known as the interpolation property. As a consequence of the lemma we have for u, v D such that u v exists, if u, v x then also u v x. For z Z let {z} = { y D z y }. Note that by the interpolation property there is always a descending sequence in {z}. But in general one cannot force it to have z as its greatest lower bound. We say that the basis Z of a continuous dcpo D has the inverse approximation property, if for every z Z and every y {z} there is an infinite sequence (y i ) i ω with z y i+1 y i y, for i ω, which has z as its greatest lower bound. Definition 3.3 A bounded-complete ω-continuous dcpo D with basis Z which is closed under the operation of taking least upper bounds of bounded finite subsets and has the inverse approximation property is called domain. The following technical result will be used later. Lemma 3.4 Let D be a continuous dcpo with a basis Z that has the inverse approximation property. Moreover, let z Z, and let S be a finite subset of D with {z} S. Then z S. Proof: Let y {z}. Then there is an infinite descending sequence (y i ) i ω with z y i y, which has z as its greatest lower bound. It follows that y i S, for all i ω. Thus, there is some x i S with x i y i, for each i. Since S is finite, we can assume without restriction that all x i are equal, i.e., there is some x S such that x y i, for all i ω. Because z is the greatest lower bound of the y i, we have that x z. 7

As is well known, on each dcpo D there is a canonical T 0 topology σ: the Scott topology. A subset X of Q is open in σ if X is an upper set and with each x X there is some y X such that y x. If D is continuous, this topology is generated by the sets {z} with z Z. With respect to set inclusion, the Scott topology is itself a dcpo. Its way-below σ relation can be characterized in the following way. Lemma 3.5 Let D be a continuous dcpo with open subsets O and U. Then O σ U if and only if O S U, for some finite set S. Definition 3.6 Let D and E be dcpo s. A map F : D E is Scott continuous if it is monotone and for any directed subset S of D, F( S) = F(S). As is well known, a map between dcpo s is Scott continuous, exactly when it is continuous with respect to the Scott topologies. The collection of all Scott continuous maps from D to E is denoted by [D E]. It is endowed with the pointwise order, i.e., F G if F(x) G(x), for all x D, which makes it into a dcpo. The categorical product of two dcpo s is obtained by taking the ordinary Cartesian product and furnishing it with the componentwise partial order. The product of two domains is again a domain. In general, the function space of two continuous dcpo s is not a continuous dcpo again, in other words, the category of continuous dcpo s and Scott continuous maps is not Cartesian closed. This is the case, however, if we restrict our attention to the full subcategory DOM of domains. Definition 3.7 Let D and E be bounded-complete continuous dcpo s. 1. For basic elements d D and e E the single-step function (d ց e): D E is defined by { e if d x, (d ց e)(x) = E otherwise. 2. A step function is the join of a bounded finite collection of single-step functions. Note that a finite family (d i ց e i ), i = 1,..., n, of single-step functions is bounded, exactly if the set { e i d i x } is bounded for each x D. As follows from the next lemma, for domains D, E the collection of all step functions is a basis of [D E]. Lemma 3.8 Let D, E be domains with bases Z D and Z E, respectively. Moreover, let F [D E], and for some finite index set I, let d i Z D and e i Z E, for i I, such that { (di ց e i ) i I } exists. Then the following two statements hold: 1. F = { (d ց e) e F(d) }. 2. { (d i ց e i ) i I } F ( i I)e i F(d i ). Proof: In [5] it is shown that F = { (d ց e) {d} σ F 1 ( {e}) }, and { (d i ց e i ) i I } F if and only if {d i } σ F 1 ( {e i }), for all i I. But as follows from Lemmas 3.4 and 3.5, {d} σ F 1 ( {e}) just if e F(d). Theorem 3.9 The category DOM of domains and Scott continuous maps is Cartesian closed. 8

Proof: It remains to show that the collection of all step functions has the inverse approximation property. Let to this end F [D E] and I be a finite index set such that { (di ց e i ) i I } F, where d i Z D and e i Z E, for i I. Then there are finitely many subsets J of I, say J 0,..., J n, so that the set of all d j with j J is bounded. It follows that { e j j J k } exists, for k n, and { e j j J k } F( { d j j J k }). Let d k = { d j j J k } and e k = { e j j J k }. Since Z E has the inverse approximation property, there are sequences (y k l ) l ω, for k n, with e k... y k 1 y k 0 F(d k ) such that (y k l ) l ω has e k as its greatest lower bound. Set z l = { (d k ց y k l ) k n }, for l ω. Then z l F and z l+1 z l. Moreover { (d i ց e i ) i I } z l and the sequence (z l ) l ω has { (d i ց e i ) i I } as its greatest lower bound. 3.2 Effectively given domains In what follows, let, : ω 2 ω be a recursive pairing function with corresponding projections π 1 and π 2 such that π i ( a 1, a 2 ) = a i. We extend the pairing function in the usual way to an n-tupel encoding. The projections are then denoted by π (n) i, for 1 i n. Moreover, let : ω P f (ω) be a canonical indexing of all finite subsets of natural numbers and let P (n) (R (n) ) denote the set of all n-ary partial (total) recursive functions. Definition 3.10 Let D be a domain with countable basis Z = {d 0, d 1, d 2,... }. D is effectively given (relative to d), if the following three conditions hold: 1. The set { i, j d i d j } is recursive. 2. The set { n {d i i n } is bounded } is recursive. 3. There is a function q R (1) such that d q(n) = { d i i n }, if { d i i n } is bounded. We say in this case that {d 0, d 1,... } is a canonical basis of D. Definition 3.11 Let D be an effectively given domain. An element x D is computable, if the set { i ω d i x } is recursively enumerable. For any countable set A = {a 0, a 1,... } the set A = A { } with partial order given by x y, if x = or x = y, is an effectively given domain: set d 0 = and d n+1 = a n, for n ω. Any of its elements is computable. The product of two effectively given domains D and E with canonical bases, say {d 0, d 1,... } and {e 0, e 1,... }, respectively, is again effectively given, with canonical basis {b 0, b 1,... }, where b i,j = (d i, e j ). Definition 3.12 Let D and E be continuous dcpo s with countable bases {d 0, d 1,... } and {e 0, e 1,... }, respectively. A continuous map F : D E is Scott computable, if the set { i, j e j F(d i ) } is recursively enumerable. Scott computable maps between effectively given domains map computable elements to computable elements. As has been shown in the preceding section, the category of domains with Scott continuous maps as morphisms is Cartesian closed. We shall now see that the same holds for the full subcategory of effectively given domains. Proposition 3.13 Let D and E be effectively given domains. Then the domain of continuous maps [D E] is also effectively given. The Scott computable maps are its computable elements. 9

Proof: As has already been said, the collection of all step functions is a basis of [D E]. Let {d 0, d 1,... } and {e 0, e 1,... }, respectively, be canonical bases of D and E and set M = { n ω {(d i ց e j ) i, j n } is bounded }. Obviously, M is recursive. Therefore we can define an enumeration of all step functions as follows: For n M set f n = { (d i ց e j ) i, j n }. Otherwise, let f n be the smallest element of the function domain. It remains to check the requirements in Definition 3.10. For the first requirement let q R (1) witness that 3.10(3) holds for E. Without restriction, assume that k, k M. Then it follows with Lemmas 3.2 and 3.8 that { (di ց e j ) i, j k } { (d n ց e m ) n, m k } ( i, j k )(d i ց e j ) { (d n ց e m ) n, m k } ( i, j k )e j { (d n ց e m ) n, m k }(d i ). But { (dn ց e m ) n, m k }(d i ) = { e m ( l π 1 ( k )) l, m k d l d i } = e q(h(k,i)), where h R (2) with h(k,i) = { m ( l π 1 ( k )) l, m k d l d i }. Thus, condition (1) holds. The same is true for condition (2), as there is a function g R (2) with g(n) = { j j n }, and hence the set { f i i n } is bounded just if n g 1 (M). If { f i i n } is bounded, we have that { fi i n } = { (d k ց e l ) k, l g(n) } = f g(n), which verifies requirement 3.10(3). In order to derive the second statement, let F [D E] be Scott computable and A = { i, j e j F(d i ) }. Then A is recursively enumerable (r.e.). As is shown in [5], F = { (di ց e j ) {d i } σ F 1 ( {e j }) }, and by Lemmas 3.4 and 3.5, {d i } σ F 1 ( {e j }) exactly if e j F(d i ). Therefore, we have that F = { (d i ց e j ) i, j A } = { { (d i ց e j ) i, j k } k A } = { f q(k) k A }, where the function q R (1) is as in condition 3.10(3). Since { k k A } is r.e., this shows that F is a computable element of [D E]. Conversely, assume that F is a computable element of [D E]. Then the set { k f k F } is r.e. Since e j F(d i ) (d i ց e j ) F ( k)f k F i, j k, we obtain that F is also Scott computable. Theorem 3.14 The category EDOM of effectively given domains and Scott continuous maps is Cartesian closed. 3.3 The interval domain As we have already seen in Section 2, in order to compute with real numbers one has to approximate them from both sides, e.g. by using compact intervals. In the domain-theoretic approach to computation the objects used for approximation are considered as part of the 10

computational structure. Following this idea in the case of the real numbers, one obtains the interval domain. It is the collection of all nonempty compact intervals, endowed with a least element which we concretely take as the intervall (, + ): R = { [a, b] R a, b R a b } {(, + )}. The order is reversed subset inclusion, i.e., x y if y x. Therefore directed least upper bounds correspond to filtered intersections. The way-below relation on R is given by x y if and only if int(x) y, where int(x) is the interior of x with respect to the standard topology on the real line. Thus, (,+ ) x, for all x R, and [a, b] [c, d] if and only if a < c and d < b. The maximal elements are the intervals [a, a], i.e., the singleton sets. Proposition 3.15 R is a domain with basis Q = { [a, b] a, b Q a b } {(, + )}. Following Escardó [10] we call R the partial real line and its elements partial real numbers. The left and right end-points of a partial real number x will be denoted by x and x, respectively, so that x = [x,x]. A base for the Scott topology on R is given by the whole space as well as the sets {[a, b]} = { x R x (a, b) } with a, b R so that a < b. So a base for the relative Scott topology on the set Max R of maximal elements is of the form {[a, b]} Max R = { {ξ} ξ (a, b) }. Under the canonical map {ξ} ξ: Max R R this is mapped onto the open interval (a, b). Lemma 3.16 The set of maximal elements with the relative Scott topology is homeomorphic to the real line with the standard topology. Let α Q : ω Q be a canonical indexing of the extended rationals Q = Q {,+ }, e.g., let α Q be given by i j if k 0, k α Q ( i, j, k ) = + if k = 0 and j i, otherwise. Moreover, set r i,j = [α Q (i), α Q (j)], if α Q (i) α Q (j) +, and r i,j = (,+ ), otherwise. Then r 0, r 1,... is an enumeration of the basis Q of the interval domain such that the set { n, m r n r m } is recursive. Thus condition (1) in Definition 3.10 holds. Since a finite set {[a 0, b 0 ],...,[a n, b n ]} of rational intervals is bounded just if max { a i i n } min { b i i n }, and { [a i, b i ] i n } = [max { a i i n },min { b i i n }] in this case, the other requirements in 3.10 are satisfied as well. Proposition 3.17 The interval domain R is effectively given. Let us now consider its computable elements. Lemma 3.18 An partial real number x R is computable if and only if its end-points x and x, respectively, are ρ L - and ρ R -computable. Proof: Let cd: ω dom(ν Q ) be a bijective computable coding function such that α(i) = ν Q (cd(i)), for all i ω. Now, assume that x is computable. Then there is some effective enumeration n 0, n 1,... of the set { m r m x }. For m ω let u m = cd(π 1 (m)). Then u n0, u n1,... is a computable sequence of words in dom(ν Q ) such that ν Q (u ni ) < x, for all i 0, and x = sup { ν Q (u ni ) i ω }. Hence x = ρ L (u n0 u n1...), i.e., x is ρ L -computable. In the same way it follows that x is ρ R -computable. Next, conversely, suppose that x is ρ L - and x is ρ R -computable. Then there are constructive infinite words u 0 u 1..., v 0 v 1... Σ ω 1 such that ρ L (u 0 u 1...) = x and ρ R (v 0 v 1...) = x. Let n i = cd 1 (u i ),cd 1 (v i ), for i ω. It follows that {n 0, n 1,... } is an r.e. subset of { m r m x } with { r ni i ω } = x, which shows that x is a computable element of R. 11

Corollary 3.19 Let δ be an admissible representation of the real line. Then a real number ξ R is δ-computable, if and only if the singleton set {ξ} is computable in R. There is a correspondence between continuous functions F : R n R and Scott continuous maps G: R n R (n > 0). Definition 3.20 Let G: R n R and let Ǧ: Rn R be defined in the following way: For ξ R n such that G({ ξ}) = {ζ}, set Ǧ( ξ) = ζ. In any other case let Ǧ( ξ) be undefined. Ǧ is called restriction of G to R n and G extension of Ǧ to Rn. The next lemma shows that every continuous real-valued function has a Scott continuous extension to the partial reals. To ease notation we restrict ourselves to functions of arity one. Lemma 3.21 Let F : R R be continuous and ˆF : R R be defined by [sup z x inf ξ z dom(f) F(ξ),inf z x sup ξ z dom(f) F(ξ)] if sup z x inf ξ z dom(f) F(ξ), ˆF(x) = inf z x sup ξ z dom(f) F(ξ) R, otherwise, for x R. Then ˆF is Scott continuous and for all ξ domf, ˆF({ξ}) Max R and ˆF({ξ}) = {F(ξ)}. Proof: Obviously, ˆF is well-defined and monotone. Let X be a directed subset of R. In order to derive Scott continuity it is sufficient to verify that ˆF( X) ˆF(X). We show to this end that sup z X inf ξ z dom(f) F(ξ) sup x X sup z x inf ξ z dom(f) F(ξ). Let z X. Then we have by Lemma 3.2 that z x, for some x X. Hence, inf ξ z dom(f) F(ξ) sup z x inf ξ z dom(f) F(ξ) sup x X sup z x inf ξ z dom(f) F(ξ), from which the above inequality follows. In the same way we obtain that inf x X inf z x sup ξ z dom(f) F(ξ) inf z X sup ξ z dom(f) F(ξ). Now, let ξ dom(f). Then sup z {ξ} inf ζ z dom(f) F(ζ) = F(ξ) = inf z {ξ} sup ζ z dom(f) F(ζ), by the continuity of F. Hence, ˆF(ξ) MaxR and ˆF({ξ}) = {F(ξ)}. As a consequence of Lemma 3.16 we have conversely that the restriction of a Scott continuous map to R n is a continuous function on the reals. This gives rise to a domain-theoretic definition of computability for real number functions. Definition 3.22 A function F : R n R is R-computable if it has a Scott computable extension G: R n R. A convenient computational model for the unit interval [0,1] is defined in the same manner as the domain R. We denote by I the unit interval domain consisting of all compact intervals contained in [0,1]: I = { [a, b] [0,1] a b }. The order is reversed inclusion as before. Note that [0,1] is itself a compact interval, so [0,1] I and we do not need to add a least element. The above results for R concerning the Scott topology and extensions of functions do also hold for I. 12

Proposition 3.23 I is a domain with basis Q I = { [a, b] I a, b, Q }. Observe that I is a sub-order of R: The domain order and the way-below relation are the restriction to I of the corresponding relations on R. Moreover, the least upper bounds of directed subsets of I are the same as in R. The Scott topology on I is the relative Scott topology of R on the set I. Set r I i = r i [0, 1]. Then r I 0, r I 1,... is an enumeration of the basis Q I of the unit interval domain such that there is some function h R (1) with r I i = r h(i), for i ω. Proposition 3.24 The unit interval domain I is effectively given. 4 The language Real PCF 4.1 Computing with partial real numbers The language Real PCF invented by M. Hötzel Escardó [10] is an extension of Plotkin s language PCF [16], which itself is an extension of the simply typed lambda calculus by arithmetical operations and a fixed point operator for each type. Real PCF allows the the computation with intervals. Definition 4.1 The concatenation : I I I of intervals is given by [x,x] [y, y] = [(x x)y + x,(x x)y + x]. The idea in the definition of this operation is the following: Given x, y I, rescale the unit interval so that it becomes x, and define x y to be the interval which results from applying the same rescaling and translation to y. It follows that x y is a subinterval of x. The rescaling factor is the diameter of x, namely x x, and the translation constant is the left end-point of x. If x is maximal, then its diameter is zero, so that x y = x. Obviously, concatenation is associative. Moreover, it is Scott continuous in the second parameter, but not in the first. Therefore, instead of the binary concatenation operation a family of unary operations is considered. For each a I define the map cons a : I I by cons a (x) = a x. For nonmaximal a I the map cons a has a Scott continuous left inverse tail a : I I, which is given by tail a (x) = [max{0,min{(x a)/(a a),1}},max{0,min{(x a)/(a a),1}}]. The concatenation defined above makes also sense for x and y ranging over the whole interval domain with the restriction that x should not be the smallest element. But in this general case y = a x does no longer mean that y is contained in a, which holds, however, if x I. For a R \ { } define the map ricons a : I R by ricons a (x) = a x. Then ricons a is Scott continuous. For nonmaximal elements a R \ { }, this map too has a Scott continuous left inverse irtail a : R I, given in the same way as the map tail a. Finally, for each nonmaximal a R \ { }, define the map rrcons a : R R by rrcons a (x) = a x. Let B = {tt,ff} be the truth-value set and define b 2n = tt and b 2n+1 = ff, for n ω. Then B is an effectively given domain. In addition to the above operations there are Scott continuous inequality tests < I : I I B and < I : R R B. For D {I, R} and x, y D set tt if x < y, x < D y = ff if y < x, otherwise. Then both maps are Scott continuous. 13

Lemma 4.2 The maps cons a, tail a, ricons a, irtail a, rrcons a, < I and <R with a I and/or a R \ { } are Scott computable. In the subsequent sections we also need the parallel conditional pif D : B D D D. For an effectively given domain D, b B and x, y D it is defined by x if b = tt, pif D (b, x, y) = y if b = ff, x y otherwise. Obviously, pif D is Scott computable. As we have seen above, real numbers in the unit interval can be approximated by concatenations of intervals. By this way infinite concatenations of certain intervals can be used to represent the reals in [0,1]. Let E be a finite set of subintervals of [0,1] with rational end-points such that E = [0,1] and 0 < x < x < 1, for every x E. Definition 4.3 For x 0, x 1,... E such that { x 0 x 1 x n n ω } = {ξ} with ξ [0, 1], set φ E (x 0 x 1...) = ξ. For any other p E ω, let φ E p be undefined. Lemma 4.4 The map φ E is a representation of [0,1] with φ E c ρ I, where ρ I is the corestriction of the interval representation ρ to [0,1]. Proof: Let E = {a 0,..., a k } and ξ [0,1]. For j ω define i j ω recursively by i 0 = min { n ξ a n } i j+1 = min { n ξ a i0 a ij a n }. Note that the sets in this definition are not empty, since the union of the intervals in E is [0, 1]. Moreover, the intervals in E are strictly included in [0, 1]. Therefore, the sequence (a i0 a in ) n ω is a sequence of nested intervals with length converging to zero. Hence φ E (a i0 a i1...) = ξ. Now, let x 0, x 1,... dom(φ E ) and for i ω let u i, v i dom(ν Q ) such that [ν Q (u i ), ν Q (v i )] = x 0 x 1 x i. Then ρ I (u 0 v 0...) = φ E (x 0 x 1...), which shows that φ E c ρ I. If the intervals in E are chosen appropriately, even computational equivalence with the representation ρ I can be achieved. Lemma 4.5 1. Let L = [0, 1 2 ], C = [1 4, 3 4 ] and R = [1 2,1]. Then φ{l,c,r} c κ I, where κ I is the restriction of the negative digit binary representation κ to {0.1} { 1,0,1} ω. 2. Let 0 < ξ < ζ < 1 and l = [0, ζ] as well as r = [ξ,1]. Then φ {l,r} c ρ I. Proof: (1) Because of Lemma 2.10 and the above result it suffices to show that κ I c φ {L,C,R}. For 0.1c 0 c 1... {0.1} { 1, 0,1} ω let Γ(0.1c 0 c 1...) = d 0 d 1... with d i = L, if c i = 1, d i = C, if c i = 0, and d i = R, otherwise. In any other case let Γ(p) be undefined. Then Γ: Σ ω 2 {L, C, R} ω witnesses that κ I c φ {L,C,R}. (2) Again we only have to show that ρ I c φ {l,r}. For p Σ ω 1 let Γ(p) = x 0 x 1..., where the x i {l, r} are obtained as follows. Suppose we have already computed x 0,..., x n 1. Then, if p has a prefix u 0 v 0... u m v m and there are i, j m such that [ν Q (u i ), ν Q (v j )] x 0 x n 1 l, set x n = l. Otherwise, set x n = r. It follows that Γ(dom(ρ I )) dom(φ {l,r} ) and ρ I p = φ {l,r} Γ(p). Note that in the last case the representation uses only a two-letter alphabet. Digit based representations need at least three letters to be admissible. Let us finally see how intervals can be used to represent all real numbers. Let E = {[ 1,0], [0,1],[1,2], [ 1 2, 1 2 ], L, C, R} and for x 0x 1... E ω set ψ(x 0 x 1...) = ξ, in case that { x0 x 1 x n n ω } = {ξ} and there is some k ω such that x i {[1,2],[ 1,0]}, if i < k, x i {[0,1],[ 1 2, 1 2 ], [ 1, 0]}, if i = k, and x i {L, C, R}, if i > k. For any other p E ω let ψ p be undefined. 14

Lemma 4.6 ψ c κ. Proof: We first show that ψ c κ. Let the operator witnessing the reducibility be computed as follows. First read all of the input x 0 x 1... till some k ω with x k {[0,1],[ 1 2, 1 2 ], [ 1, 0]} and x k+1 {L, C, R} is found. Then output c n... c 0.c 1, where c n,..., c 0 are such that n c i 2 i = {i 0 i < k x i = [1,2] } {i 0 i < k x i = [ 1,0] } i=0 and c 1 = 1, if x k = [ 1,0], c 1 = 0, if x k = [ 1 2, 1 2 ], and c 1 = 1, if x k = [0,1]. After this has been done, for n = 1,2,..., read x k+n and output c (n+1) with c (n+1) = 1, if x k+n = L, c (n+1) = 0, if x k+n = C, and c (n+1) = 1, if x k+n = R. For the converse reduction the operator is computed in the subsequent way. Initially, the machine scans the input string to find the first occurrence of a dot. If, later on, it will again find a dot, it stops working. Suppose now that the input word contains exactly one dot and let it be c n... c 0.c 1.... Set c = n i=0 c i2 i and k = c. Then the output x 0 x 1... is obtained as follows. If c < 0, set x i = [ 1,0], for i < k, otherwise set x i = [1,2]. Moreover, define x k = [ 1,0], if c 1 = 1, x k = [ 1 2, 1 2 ], if c 1 = 0, and x k = [0,1], if c 1 = 1. The remaining x k+n (n 1) are given by x k+n = L, if c (n+1) = 1, x k+n = C, if c (n+1) = 0, and x k+n = R, if c (n+1) = 1. 4.2 Syntax of Real PCF Real PCF is an applied lambda calculus. For the reader s convenience we introduce the basic notions of Real PCF needed in this paper. Given a collection of symbols called ground types, the set of types is the least set containing the ground types and containing the formal expression (β γ) whenever it contains β and γ. The Greek letters β and γ range over types. Starting with a collection L of formal constants, each having a fixed type, and denumerably many formal variables α β i (i ω) for each type β, the L-terms are given by the following inductive rules: 1. Every variable α β i is an L-term of type β. 2. Every constant of type β is an L-term of type β. 3. If M and N are L-terms of types (β γ) and β respectively then (MN) is an L-term of type γ. 4. If M is an L-term of type γ then (λα β i.m) is an L-term of type (β γ). When L is understood from the context it need not be used as prefix. The letters M and N range over terms. The letter c range over constants. The fact that a term has type β is denoted by M : β. Note that every term has a unique type. The set of free variables of a term M is FV(M), inductively defined by: FV(α β i ) = {αβ i }; FV(c) = ; FV((MN)) = FV(M) FV(N); FV((λα β i.m)) = FV(M) \ {αβ i }. A term M is closed if FV(M) is empty. The ground types for the language L RPCF of Real PCF are N, T, I and R, and its constants 15

are tt : T, ff : T, k n : N (for each natural number n), (+1) : N N, ( 1) : N N, (= 0) : N T, cons a : I I, tail a : I I, head r : I T (for each a Q I with 0 < a < a < 1 and each rational r (0,1)), rrcons a : R R, ricons a : I R, irtail a : R I, rhead r : R T (for each a Q with < a < a < + and each rational number r), Y β : ((β β) β) if β : (T (β (β β))) pif β : (T (β (β β))) (for each type β), 4.3 Semantics of Real PCF (for each ground type β), (for each ground type β). A collection of domains for Real PCF is a family of {D β } β of domains, one for each type β, such that D (β γ) = [D β D γ ]. It is standard if D T = B, D N = ω, D I = I, and D R = R. It follows that in case of a standard collection of domains for Real PCF the domains constitute a Cartesian closed subcategory of EDOM. An interpretation of Real PCF is a collection {D β } β of domains for Real PCF together with a mapping A: L RPCF { D β β type } which is type-respecting, in the sense that if c : β then A[[c]] D β. The standard interpretation of the language L RPCF is the standard collection {D β } β of domains together with the mapping A R : L RPCF { D β β type } such that the cases in Table 1 hold. An interpretation ({D β } β, A) induces a denotational semantics  for L RPCF. First, the set Env of environments is the set of type-respecting maps from the set of variables to { D β β type }. It is ranged over by η. If x D β then η[x/α β i ] is the environment which maps α β i to x and any other variable α to η(α). The undefined environment maps each variable α β i to the bottom element of the domain D β. The denotational semantics  : Terms (Env { D β β type }) is inductively defined by: Â[[α β i ]](η) = η(αβ i ), Â[[c]](η) = A(c), Â[[(MN)]](η) = Â[[M]](η)( Â[[N]](η) ), Â[[(λα β i.m)]](η)(x) = Â[[M]](η[x/αβ i ]) (x D β). If a term M is closed then its denotation does not depend on the environment, in the sense that Â[[M]](η) = Â[[M]](η ) for all η and η. In order to simplify notation, we let [[M]] stand for the denotation A ˆ R [[M]]( ) of a closed term M with respect to the standard interpretation A R. The next result follows by induction on the term structure. Proposition 4.7 The denotation [[M]] of each closed term M : β is a computable element of D β. 16

A R [[tt]] = tt, A R [[ff]] = ff, A R [[k n ]] = n (n ω), { x + 1 if x A R [[(+1)]](x) = (x D N ), if x = { x 1 if x 1 A R [[( 1)]](x) = (x D N ), if x {,0} tt if x = 0 A R [[(= 0)]](x) = ff if x > 0 (x D N ), if x = A R [[cons a ]] = cons a, A R [[tail a ]] = tail a, A R [[head r ]](x) = x < I [r, r] (x D I ), A R [[rrcons a ]] = rrcons a, A R [[ricons a ]] = ricons a, A R [[irtail a ]] = irtail a, A R [[rhead r ]](x) = x < R [r, r] (x D R ), A R [[Y β ]](F) = n ω F n ( ) (F D (β β) ), x if b = tt A R [[if β ]](b)(x)(y) = y if b = ff if b = A R [[pif β ]](b)(x)(y) = pif Dβ (b, x, y) (b D T, x, y D β and β a ground type), (b D T, x, y D β and β a ground type). Table 1: The standard interpretation of L RPCF As is well known, not every computable element of D β is the denotation of a closed L RPCF - term [11]. Definition 4.8 Let β be a type. An element x D β is definable in Real PCF, if there is a closed term M : β with [[M]] = x. If f : ω ω then we let f : ω ω with f(n) = f(n), for n dom(f), and f(n) =, otherwise, be the extension of the function f to ω. The subsequent lemma, which will be used in the next section, is due to Plotkin [16] (see also [15]). Lemma 4.9 The extension to ω of every partial recursive function is definable in Real PCF. 5 The equivalence results Real PCF is a functional programming language. Therefore, definability in Real PCF determines a computability notion for real numbers and real-valued functions. Let us now study how it is related to the computability notions introduced in the preceding sections. We shall first consider the number case. 17