Real PCF extended with ∃ is universal (Extended Abstract^{∗})

Martín Hötzel Escardó Department of Computing, Imperial College, London SW7 2BZ.

Friday 21 \underline{st} June 1996

Abstract

Real PCF is an extension of the programming language PCF with a data type for the real line, introduced elsewhere. We show that Real PCF extended with ∃ is universal, in the sense that all computable elements of all types of its universe of discourse are definable. We also show that ∃ is not necessary to define first order computable functions in Real PCF. In order to obtain our definability results, we consider a domain-equation-like structure on the real numbers data type. Keywords and phrases: Real number computability, λ-calculus, domain theory.

Introduction

Real PCF is an extension of the programming language PCF [13] with a ground type for the real line [8]. Real PCF has denotational and operational semantics, related by an adequacy relation.

The real numbers data type is interpreted as a domain of compact real intervals, with subspace of maximal elements homeomorphic to the real line. It is natural to effectively present this domain by enumerating its basis of rational intervals in some standard way. Then all Real PCF definable elements are computable. However, as in PCF, the converse fails. For instance, a computable function ∃ : [N → T ] → T is not definable. We show that Real PCF extended with ∃ is universal, in the sense that all computable elements and functions of its universe of discourse are definable. We do not need to add parallel-or, because Real PCF already has a parallel conditional.

It is natural to ask if the notion of computability depends on the choice of bases and their enumerations, and indeed this is the case [10]. We say that an effective presentation of the Real PCF domains is sound if every Real PCF definable element is computable. The idea is that the definable elements are concretely computable, because Real PCF has an effective operational semantics. We show that any two sound effective presentations of the Real PCF domains induce the same notion of computability. In this sense, Real PCF extended with ∃ is absolutely universal.

∗To appear in Proceedings of the 3^{rd} Theory and Formal Methods Workshop, A. Edalat, I.S. Jourdan, G.A. McCusker eds., IC Press

In order to establish universality, we use a technique due to Thomas Streicher [18], originally used by him to establish that PCF extended with recursive types, parallel-or and ∃ is universal. The technique consists of taking a universal PCF domain U, and showing that (in our case) every Real PCF domain is a definable retract of U. Since PCF extended with parallel-or and ∃ is universal [13], all computable x ∈ U and all computable f : U → U are definable, and the universality result follows.

In order to obtain our definability results, we consider a domain-equation-like structure on the real numbers data type.

The Real PCF notion of computability induces classical notions of computability on real numbers and real valued functions of real variables [3, 11, 12, 16, 19, 20], but this material is not included in this extended abstract due lack of space. Also, we only consider the unit interval type of Real PCF, although we indicate how the type for the whole real line can be handled.

Contents

1 The real numbers domains 2

2 Effectively given coherent domains 5

3 Computability and definability 9

1 The real numbers domains

Our main reference to domain theory is [1]; see also [15, 9]. We use several results from [14]. In this paper, a domain is a bounded complete, countably based continuous cpo. Domains are implicitly considered as topological spaces under their Scott topology.

Plotkin [14] defines a coherent domain to be a domain in which every pairwise consistent subset has a join. Notice that the word coherence has been used in several different senses in theoretical computer science and related fields.

We denote by CDom the category of coherent domains and continuous maps. This category is cartesian closed, and closed under lifting, amalgamated sum, and smash product. It contains the flat domains and the domains R_{⊥} and I, where R is the continuous dcpo of compact real intervals ordered by superset, and I is the subdomain of intervals contained in the unit interval [0, 1]. Moreover, CDom is closed under the formation of retracts and canonical solutions of domain equations involving the above constructions. Thus, CDom contains all domains of interest for the purpose of this work.

Let T = {tt, ff}_{⊥} be the domain of truth values. In [14] it is shown that T^{ω} is a universal coherent domain, in the sense that a domain is coherent iff it is a retract of T^{ω}.

Notice that there are two notions of universality in this paper.

The elements of the domains I and R_{⊥} are considered as “partial real numbers”, and their maximal elements (singleton intervals) are identified with real numbers. This identification makes sense from a topological view, because the subspace of maximal elements of R_{⊥} is homeomorphic to the Euclidean real line. We thus sometimes notationally identify real numbers and singleton intervals.

The reason for introducing partial numbers is similar to the reason for introducing partial functions ℕ^{k} → ℕ in recursion theory. For instance, the set of computable real numbers is countable but not r.e. [20], whereas the set of computable partial real numbers is r.e., because the set of computable elements of any domain is r.e. [6, 15]. In particular, no programming language with a real numbers data type can define all computable real numbers without having some divergent programs of real number type. As opposed to natural numbers, in which divergence corresponds to ⊥, divergence is a matter of degree for real numbers; ⊥ is in the worst possible degree, maximal partial numbers are in the best possible degree (no divergence at all), and the remaining partial real numbers are in between.

Let f : ℝ → ℝ be continuous, and define If : R → R by If(x) = f(x), for all x ∈ R. This function is well-defined, because continuous functions preserve compactness and connectedness, so that f(x) is a compact interval if x is a compact interval. Moreover, it is continuous w.r.t. the Scott topology [4]. Similarly, for f : [0, 1] → [0, 1] continuous, the above equation also defines a continuous function If : I → I. The function If is an extension of f, in the sense that If({x}) = {f(x)}. A continuous function has uncountably many continuous extensions. The extension If is characterized as the greatest one. If f : ℝ → ℝ is non-decreasing then the greatest extension is given pointwise, in the sense that If(x) = [f(\underline{x}), f(\overline{x})], where \underline{x} = inf x and \overline{x} = sup x are the left and right end-points of the interval x. When there is no danger of ambiguity, we write f instead of If or I_{⊥}f.

For x, y ∈ R_{⊥}, we define (x < y) ∈ T by

(x < y) = \begin{cases}tt & if \overline{x} < \underline{y}, \\ ff & if \underline{x} > \overline{y}, \\ ⊥ & otherwise. \end{cases}

This definition reflects the fact that equality of real numbers is not decidable [20]. The map (x, y) ↦ (x < y) can be regarded as the best continuous approximation of the characteristic function of the inequality predicate < on real numbers.

Recall that the parallel conditional pif : T × D × D → D is defined by

pif t then y else z = \begin{cases}y & if t = tt, \\ z & if t = ff, \\ y ⊓ z & if t = ⊥. \end{cases}

Proposition 1.1 Let R be any domain with Max(R) homeomorphic to the real line or the unit interval, let D be a domain, let p : R → T be a continuous predicate, let g, h : R → D be continuous functions, and define a function f : R → D by f(x) = if p(x) then g(x) else h(x). If there are maximal elements x and y such that p(x) = tt and p(y) = ff, then f(z) = ⊥ for some maximal element z.

Proof The non-empty disjoint sets U = p^{−1}(tt) ∩ Max(R) and V = p^{−1}(ff) ∩ Max(R) are open in Max(R), because p is continuous, and {tt} and {ff} are open in T . Hence U∪V ≠ Max(R), because Max(R) is connected. Therefore there is some maximal element z such that p(z) = ⊥. □

Thus, the sequential conditional is not appropriate for definition by cases of total functions on the real numbers domains, because it produces non-total functions for non-trivial continuous predicates.

In most definitions by cases of the form f(x) = pif p(x) then g(x) else h(x) which occur in practice, one has that g(x) = h(x) for all maximal x with p(x) = ⊥. In such a situation, if x is maximal and p(x) = ⊥, then f(x) = g(x) ⊓ h(x) = g(x) = h(x). An example is given by the following definition of the absolute value function: |x| = pif x < 0 then − x else x. For the case x = 0 one has |0| = pif ⊥ then − 0 else 0 = 0 ⊓ 0 = 0. Hence, the parallel conditional is also useful to overcome the fact that equality of real numbers is not decidable.

A domain-equation-like structure for the real numbers domains

Define continuous non-decreasing functions cons_{L}, cons_{R}, tail_{L}, tail_{R} : [0, 1] → [0, 1] by

cons_{L}(x) = x/2,  tail_{L}(x) = min(2x, 1),
cons_{R}(x) = (x + 1)/2,  tail_{R}(x) = max(0, 2x − 1),

and define head : I → T by head(x) = (x < 1/2), where the inequality map was defined in Section 1. For motivation and a detailed discussion about these functions see [8, 7, 5], where effective computation rules for them are given.

The main property of the functions cons_{L}, cons_{R}, tail_{L}, tail_{R} : I → I and head : I → T is given by the following lemma:

Lemma 1.2 The identity of I is the unique continuous function f : I → I such that f(x) = pif head(x) then cons_{L}(f(tail_{L}(x))) else cons_{R}(f(tail_{R}(x))).

Proof (Outline) That f = id satisfies the above equation is routinely checked by cases on the value of head(x) (see [8]). Let A = {m/2^{n} ∈ [0, 1]|m, n ∈ ℤ} be the set of dyadic numbers in the unit interval. In order to prove that a property holds for every x ∈ A, it suffices to prove that it holds for 0 and 1, and that it holds for x/2 and (x + 1)/2 whenever it holds for x. We call this principle dyadic induction [7]. Let B be the basis of I consisting of intervals with dyadic end-points. By dyadic induction on the end-points of x, we see that for any f satisfying the above equation, f(x) = x for every x ∈ B. It follows that if f is continuous then f is the identity. □

The above lemma gives rise to domain-equation-like structure on I. Recall that a sectionretraction pair between objects X and Y of a category X consists of morphisms X ⇆_{s}^{r} Y with r ∘ s = id_{X}. In this case s ∘ r is an idempotent on Y and X is called a retract of Y.

Definition 1.1 Let X be a category and F : X → X be a functor. A section-retraction pair X ⇆_{s}^{r} FX is F-stable if f = r ∘ Ff ∘ s implies f = id_{X}. □

Lemma 1.3 Define F : CDom → CDom by FD = T × D × D, and define cons = pif ∘ F(id, cons_{L}, cons_{R}) and destr = [head, tail_{L}, tail_{R}]. Then I ⇆_{destr}^{cons} FI is an F-stable

section-retraction pair.

Proof f = cons ∘ Ff ∘ destr holds iff the equation in Lemma 1.2 holds. □

The domain R_{⊥} is treated similarly, by showing that its identity is the unique continuous function satisfying an appropriate equation.

Let X be a category and F : X → X be a functor. Recall that an F-algebra is a morphism α : FX → X, and that an F-algebra homomorphism from an algebra α : FX → X to an algebra β : FY → Y is a morphism h : X → Y such that h ∘ α = β ∘ Fh. Dually, an F-coalgebra is a morphism α : X → FX, and an F-coalgebra homomorphism from a coalgebra α : X → FX to a coalgebra β : X → FX is a morphism h : X → Y such that Fh ∘ α = β ∘ h. Algebras (resp. coalgebras) compose in the obvious way and form a category. Let F : CDom → CDom be a functor. Recall that a canonical solution for a domain equation D ≅ FD is given by an initial algebra i : FC → C, which is necessarily an isomorphism. A functor F : CDom → CDom is locally continuous if for all D and E, the map f ↦ Ff : [D → E] → [FD → FE] is continuous. For every locally continuous functor F : CDom → CDom, the domain equation D ≅ FD has a canonical solution i : FC → C, and i^{−1} : C → FC is a final coalgebra.

Proposition 1.4 Let F : CDom → CDom be a locally continuous functor, FC →^{i} C be an initial algebra, and let D ⇆_{β}^{α} FD be an F-stable section-retraction pair. If r is the

unique algebra homomorphism from i to α, and s is the unique coalgebra homomorphism from β to i^{−1}, then D ⇆_{s}^{r} C is a section-retraction pair.

Proof By hypothesis, r ∘ i = α ∘ Fr and i^{−1} ∘ s = Fs ∘ β. Hence r ∘ s = r ∘ i ∘ i^{−1} ∘ s = α ∘ Fr ∘ Fs ∘ β = α ∘ F(r ∘ s) ∘ β. By stability, r ∘ s = id_{D}. □

Proposition 1.5 Let F : CDom → CDom be a locally continuous functor, and D ⇆_{ψ}^{ϕ} FD

be an isomorphism. Then ϕ is an initial algebra iff the isomorphism pair is F-stable.

2 Effectively given coherent domains

Algebraic domains have a relatively simple theory of effectivity [6, 15]. Unfortunately, this is not the case for continuous domains. Smyth [17] defines three notions of effectivity for continuous domains, namely effectively given domain, effectively given M-domain, and effectively given A-domain. The notions are not strictly equivalent, but they are essentially equivalent, in the sense that they can be effectively translated to each other. The notion of effectively given A-domain gives rise to a simple notion of effectively given coherent domain, as shown below. We slightly modify Smyth’s definition in order to make effective presentations explicit, as Kanda and Park [10] show that it is possible to effectively present some domains in essentially different ways:

Definition 2.1 An effective presentation of an algebraic domain D consists of an enumeration of the finite elements of D such that (1) it is decidable whether a ⊑ b for finite a, b ∈ D; (2) it is decidable whether A is consistent, for an arbitrary finite set A of finite elements of D; (3) for A ranging over consistent finite sets of finite elements, the map A ↦ ⨆ A is recursive. An effectively given algebraic domain is an algebraic domain D together with an effective presentation. Let D and E be effectively given algebraic domains. An element d ∈ D is computable if it is it the join of an r.e. directed set of finite elements. A continuous function f : D → E is computable if the relation b ⊑ f(a) is r.e. for a and b finite. An effectively given A-domain is a list (D, E, s, r) where D is a domain, E is an effectively given algebraic domain, (s : D → E, r : E → D) is a section-retraction pair, and the idempotent s ∘ r : E → E is computable. □

Notice that this definition of effectively given algebraic domain coincides with the one given in [6] and discussed in detail in [15].

An element p ∈ T^{ω} is finite iff p^{−1}(tt) and p^{−1}(ff) are finite subsets of ω. Plotkin [14] considers the following effective presentation of T^{ω}: b_{n} is the unique finite p ∈ T^{ω} such that n = ∑_{i∈p^{−1}(tt)} 2 · 3^{i} + ∑_{i∈p^{−1}(ff)} 3^{i}. Then p ∈ T^{ω} is computable iff p^{−1}(tt) and p^{−1}(ff) are r.e. subsets of ω. We call this effective presentation the standard effective presentation of T^{ω}, and from now on we implicitly assume the standard effective presentation of T^{ω}, unless otherwise stated. This induces effective presentations on the product T^{ω} × T^{ω} and the function space [T^{ω} → T^{ω}] (see [6, 17, 14, 15]).

It is natural to define effectivity for coherent domains as follows:

Definition 2.2 An effective presentation of a coherent domain D is a section-retraction pair (s : D → T^{ω}, r : T^{ω} → D) such that s ∘ r : T^{ω} → T^{ω} is computable. An effectively given coherent domain is a list (D, s, r) where D is a coherent domain and (s, r) is an effective presentation of D. Let (D, s_{D}, r_{D}) and (E, s_{E}, r_{E}) be effectively given coherent domains. An element x ∈ D is computable if s_{D}(x) ∈ T^{ω} is computable. A continuous function f : D → E is computable if (r_{D} → s_{E})(f) : T^{ω} → T^{ω} is computable. □

Since coherent domains form a cartesian closed category and T^{ω} is a universal domain, we know that T^{ω} × T^{ω} and [T^{ω} → T^{ω}] are retracts of T^{ω}. In fact, T^{ω} × T^{ω} is isomorphic to T^{ω}. An isomorphism is given by Pair : T^{ω} → T^{ω} × T^{ω} defined by Pair(p) = ⟨n ↦ p(2n), n ↦ p(2n + 1)⟩. Then (T^{ω}, Pair^{−1}, Pair) is an effectively given coherent domain. We assume the section-retraction pair (Pred : [T^{ω} → T^{ω}] → T^{ω}, Fun : T^{ω} → [T^{ω} → T^{ω}]) constructed in [14]. Since Pred and Fun are computable, so is Pred ∘ Fun : T^{ω} → T^{ω}. Therefore ([T^{ω} → T^{ω}], Pred, Fun) is an effectively given coherent domain.

Theorem 2.1 Effectively given coherent domains and computable functions form a cartesian closed category.

We denote by ECDom the category of effectively given coherent domains and computable functions. From now on, given effective presentations of D and E, we implicitly assume the effective presentations of D ×E and [D → E] constructed in the above theorem, unless otherwise stated. Let D be any effectively given coherent domain. Then fixed-point combinator fix_{D} : [D → D] → D, and the conditionals if, pif : T × D × D → D are computable. In particular, the least fixed-point of a computable function is computable.

Equivalence of effectively given coherent domains

A coherent effective presentation of T^{ω} is given by (id_{T^{ω}}, id_{T^{ω}}). Let f : ω → ω be a nonrecursive permutation of ω, and define ϕ : T^{ω} → T^{ω} by ϕ(p) = p ∘ f. Since ϕ ∘ ϕ^{−1} = id_{T^{ω}}, (ϕ, ϕ^{−1}) is an effective presentation of T^{ω}. But this effective presentation is intuitively not “really” effective, by construction. The same phenomenon takes place for the usual notion of effectively given algebraic domain. If we define b′_{n} = b_{f(n)}, where b is the standard algebraic effective presentation of T^{ω}, it is easy to check that the axioms for effectively given algebraic domains given in definition 2.1 are satisfied for b′.

Moreover, (T^{ω}, id, id) and (T^{ω}, ϕ, ϕ^{−1}) are isomorphic objects of ECDom, and this is also not intuitive. In fact, ϕ, considered as a morphism (T^{ω}, id, id) → (T^{ω}, ϕ, ϕ^{−1}) and as a morphism (T^{ω}, ϕ, ϕ^{−1}) → (T^{ω}, id, id) gives the desired isomorphism. Again, in the category of effectively given algebraic domains and computable maps, (T^{ω}, b) and (T^{ω}, b′) are isomorphic objects, with isomorphism also given by ϕ.

On the other hand, the identity of T^{ω} is not computable as a morphism (T^{ω}, id, id) → (T^{ω}, ϕ, ϕ^{−1}) or as a morphism (T^{ω}, ϕ, ϕ^{−1}) → (T^{ω}, id, id). This is reasonable, and shows us that we cannot access within T^{ω} “correctly presented” the computable elements of T^{ω} “incorrectly presented”, which are not computable in T^{ω} “correctly presented”.

We can summarize the above remarks by saying that effective domain theory does not give an absolute notion of effectivity. In this section we show that additional structure on effectively given coherent domains can be used to achieve absoluteness.

We recall the following definitions from [2], and we make explicit a notion which we call representability:

Definition 2.3 A concrete category over a category X is a category A together with a faithful functor U : A → X, called the underlying functor. Let (A, U) be a concrete category over X. If A and B are A-objects, then an X-morphism f : UA → UB is (A, B)- representable if there is a (necessarily unique) A-morphism f̄: A → B such that U(f̄) = f, called the (A, B)-representation of f. The fibre of an X-object X is the preordered class consisting of all A-objects A with U(A) = X, ordered by: A ≤ B iff id_{X} is (A, B)- representable. Two A-objects A and B are equivalent, written A ≡ B, if A ≤ B and B ≤ A. □

Clearly, ECDom is concrete over CDom, with the underlying functor given by the forgetful functor that forgets effective presentations. Using the language of the above definition, we have that (T^{ω}, id, id) and (T^{ω}, ϕ, ϕ^{−1}) are isomorphic objects of the category ECDom, but inequivalent objects of the concrete category (ECDom, U).

Definition 2.4 We say that two effective presentations (s_{1}, r_{1}) and (s_{2}, r_{2}) of a coherent domain D are equivalent if (D, s_{1}, r_{1}) and (D, s_{2}, r_{2}) are equivalent objects of the concrete category (ECDom, U). □

It is immediate that (s_{1}, r_{1}) and (s_{2}, r_{2}) are equivalent iff s_{1} ∘ r_{2} and s_{2} ∘ r_{1} are computable. Notice that these two functions are inverses of each other, and hence they are automorphisms of T^{ω}.

Clearly, a morphism f : UD → UE in CDom is (D, E)-representable iff it is computable.

Proposition 2.2 Let (A, U) be a concrete category over X, let Y be an X-object, and let B and B′ be A-objects in the fibre of Y. Then the following are equivalent: (1) B ≤ B′.

(2) For every A-object A, if a morphism f : UA → Y is (A, B)-representable then it is (A, B′)-representable. (3) For every A-object C, if a morphism f : Y → UC is (B′, C)- representable then it is (B, C)-representable.

Proof (1) ⇒ (2): Assume that f : UA → Y is (A, B)-representable, and let f̄: A → B be the (A, B)-representation of f, and īd_{Y} : B → B′ be the (B, B′)-representation of id_{Y}. Then f′ = īd_{Y} ∘ f̄ is a (B, B′)-representation of f, because U(f′) = U(īd_{Y} ∘ f̄) = U(īd_{Y}) ∘ U(f̄) = id_{Y} ∘ f = f. (1) ⇒ (3): Similar. (2) ⇒ (1): Take A = B and f = id_{Y}.

(3) ⇒ (1): Similar. □

This can be expressed by saying that two effective presentations of a coherent domain are equivalent iff they induce the same notion of computability on the domain. The following definition is also taken from [2]:

Definition 2.5 A concrete category (A, U) over X is called concretely cartesian closed provided that A and X are cartesian closed and that U preserves finite products, exponentials, and evaluation. □

Clearly, (ECDom, U) is concretely cartesian closed.

Proposition 2.3 Let (A, U) be a concretely cartesian closed category over X. If 1 and 1′ are terminal objects of A in the same fibre then 1 ≤ 1′, and if A ≤ A′ and B ≤ B′ are A-objects then A × B ≤ A′ × B′ and [A′ → B] ≤ [A → B′].

We can thus say that equivalence is a “cartesian closed congruence”.

Proposition 2.4 Let (A, U) be a concretely cartesian closed category over X, and let A and B and be equivalent A-objects. Then any two products of A and B are equivalent, and any two exponentials of B to the power A are equivalent.

Corollary 2.5 Let D and E be effectively given coherent domains. Then any two effective presentations of D×E which make the projections D×E → D and D×E → E computable are equivalent, and any two effective presentations of [D → E] which make the evaluation map [D → E] × D → E computable are equivalent.

Thus, as soon as effective presentations of D and E are specified, the effective presentations of D × E and [D → E] are implicitly specified up to equivalence. Clearly, any two effective presentations of a finite coherent domain are equivalent.

Proposition 2.6 Define continuous maps cons : T × T^{ω} → T^{ω}, head : T^{ω} → T , tail : T^{ω} → T^{ω}, by cons(t, p)(0) = t, cons(t, p)(n + 1) = p(n), head(p) = p(0), and tail(p)(n) = p(n + 1). Then any two effective presentations of T^{ω} which make cons, head, and tail computable are equivalent.

Proof Similar to the proof of Proposition 3.1 below. □

This can be expressed by saying that there is a unique notion of computability for T^{ω} such that cons, head, and tail are computable. A similar holds for N w.r.t the test-for-zero and successor functions.

3 Computability and definability

Proposition 3.1 Any two effective presentations of I which make cons_{L}, cons_{R}, head, tail_{L}, and tail_{R} computable are equivalent.

Proof By Lemma 1.2, the identity of I is the least fixed point of the map F : [I → I] → [I → I] defined by F (f)(x) = pif head(x) then cons_{L}(f(tail_{L}(x))) else cons_{R}(f(tail_{R}(x))). If D and E are effectively given coherent domains in the fibre of I such that cons_{L}, cons_{R}, head, tail_{L}, and tail_{R} are computable w.r.t. each of the corresponding effective presentations, then F is both ([D → E], [D → E])-representable and ([E → D], [E → D])- representable. Since the fixed point combinator is computable, id_{I} = fix(F) is both (D, E) and (E, D)-representable. Therefore D and E are equivalent. □

A similar fact holds for R_{⊥}.

Lemma 3.2 Define F : CDom → CDom by FD = T × D × D. Then there is a computable initial algebra ϕ : FT^{ω} → T^{ω}.

Proof T^{ω} is the canonical solution of the domain equation D ≅ T ×D. An initial algebra is given by cons : T × T^{ω} → T^{ω}. Since Pair : T^{ω} → T^{ω} × T^{ω} is an isomorphism, so is ϕ(t, p, q) = cons(t, Pair^{−1}(p, q)). This isomorphism is clearly computable. A routine verification shows that (ϕ^{−1}, ϕ) is an F-stable isomorphism pair. By Proposition 1.5, ϕ is an initial algebra. □

Proposition 3.3 There is an effective presentation of I which makes cons_{L}, cons_{R}, head, tail_{L}, and tail_{R} computable.

Proof (Sketch) Let F : CDom → CDom and I ⇆_{destr}^{cons} FI be defined as in Lemma 1.3,

ϕ : FT^{ω} → T^{ω} be a computable initial algebra, r be the unique algebra homomorphism from ϕ to cons, s be the unique coalgebra homomorphism from destr to ϕ^{−1}. Then (s, r) is an effective presentation of I. □

Propositions 3.1 and 3.3 can be interpreted by saying that there is a unique notion of computability for I such that cons_{L}, cons_{R}, head, tail_{L}, and tail_{R} are computable. A similar fact holds for R_{⊥}.

Real PCF is an extension of PCF with ground types interpreted as R_{⊥} and I, and new constants. In this extended abstract we only consider the unit interval type of Real PCF. The type for the whole real line is treated similarly. The constants for the unit interval type include constants for the primitive operations defined in Section 3 and used to recursively define the identities of I and R_{⊥}. For more details see [8]. By Propositions 3.1 and 3.3, and Theorem 2.1, we can say that there is a unique notion of computability for Real PCF such that every Real PCF definable element is computable.

Proposition 3.4 ∃ is computable but not Real PCF definable.

Proof The inductive proof given in [13] for the fact that ∃ is not definable in PCF extended with parallel-or goes through for Real PCF, by adding obvious inductive steps for the Real PCF constants. □

Theorem 3.5 Real PCF extended with ∃ is universal.

Proof T^{ω} can be identified with the domain of strict functions N →_{⊥} T . Hence U = [N → T ] is a universal domain too. Since PCF extended with ∃ is universal and U is a PCF domain, it suffices to show that every ground domain D is a definable retract of U, in the sense that there is a section-retraction pair (r : D → U, s : U → D) with s and r definable. This is immediate for T and N. For I, let s and r be defined as in Proposition 3.3, with ϕ : FT^{ω} → T^{ω} as defined in Lemma 3.2. Call ψ the inverse of ϕ, and define [ψ_{H}, ψ_{L}, ψ_{R}] = ψ. Then

r(p) = cons ∘ Fr ∘ ϕ^{−1}(p) = cons ∘ (id × r × r) ∘ (ψ_{H}(p), ψ_{L}(p), ψ_{R}(p))
= pif ψ_{H}(p) then cons_{L}(r(ψ_{L}(p)) else cons_{R}(r(ψ_{R}(p)),
s(x) = ϕ ∘ Fs ∘ destr(x) = ϕ ∘ (id × s × s) ∘ (head(x), tail_{L}(x), tail_{R}(x))
= ϕ(head(x), s(tail_{L}(x)), s(tail_{R}(x))).

Since s and r are the unique continuous maps which satisfy the above equations, we can use the fixed-point combinator to recursively define them. It is easy to see that

ϕ(t, p, q)(n) = if n = 0 then t else if odd(n) then p((n − 1)/2) else q((n − 2)/2),
ψ_{H}(p) = p(0),  ψ_{L}(p)(n) = p(2n + 1),  ψ_{R}(p)(n) = p(2n + 2).

In order to get into the Real PCF universe of discourse, define Φ : T → U → U → U, Ψ_{H} : U → T and Ψ_{L}, Ψ_{R} : U → U by (almost the same equations)

Φ(t)(p)(q)(n) = if n = 0 then t else if odd(n) then p((n − 1)/2) else q((n − 2)/2)
Ψ_{H}(p) = p(0),  Ψ_{L}(p)(n) = p(2n + 1),  Ψ_{R}(p)(n) = p(2n + 2).

Then these functions are clearly PCF definable. Now recursively define α : U → I and β : I → U by

α(p) = pif Ψ_{H}(p) then cons_{L}(α(Ψ_{L}(p)) else cons_{R}(α(Ψ_{R}(p)),
β(x) = Φ(head(x), β(tail_{L}(x)), β(tail_{R}(x)).

Then α and β are Real PCF definable too, and they clearly (co)restrict to r and s. Therefore α ∘ β = id_{I}. □

Acknowledgements

I am grateful to Thomas Streicher for letting me know his proof technique, which allowed me to fully solve the universality problem for Real PCF. I have been supervised by Mike Smyth. I have had endless discussions with him and Abbas Edalat. This work has been supported by an ARC project “A Computational Approach to Measure and Integration Theory” and the Brazilian agency CNPq.

References

[1] S. Abramsky and A. Jung. Domain theory. In S. Abramsky, D.M. Gabbay, and T.S.E Maibaum, editors, Handbook of Logic in Computer Science, volume 3, pages 1–168. Clarendon Press, Oxford, 1994.

[2] J Adamek, H Herrlich, and G.E. Strecker. Abstract and Concrete Categories. John Wiley & Sons, Inc., 1990.

[3] E. Bishop and D. Bridges. Constructive Analysis. Springer-Verlag, Berlin, 1985.

[4] A. Edalat. Dynamical systems, measures and fractals via domain theory. Information and Computation, 120(1):32–48, July 1995.

[5] A. Edalat and M.H. Escardó. Integration in Real PCF. In Proceedings of the Eleventh Annual IEEE Symposium on Logic In Computer Science, New Brunswick, New Jersey, USA, July 1996.

[6] H. Egli and Constable R.L. Computability concepts for programming languages. Theoretical Computer Science, 2:133–145, 1976.

[7] M.H. Escardó. Induction and recursion on the real line. In C. Hankin, I. Mackie, and R. Nagarajan, editors, Theory and Formal Methods 1994: Proceedings of the Second Imperial College Department of Computing Workshop on Theory and Formal Methods, pages 259–282, Møller Centre, Cambridge, UK, 11–14 September 1994. IC Press. 1995.

[8] M.H. Escardó. PCF extended with real numbers. Theoretical Computer Science, 162, To appear in 1996.

[9] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, New York, 1980.

[10] A. Kanda and D. Park. When are two effectively given domains identical? In K. Weihrauch, editor, Theoretical Computer Science 4^{th} GI Conference, LNCS, 1979.

[11] Ker-I Ko. Complexitity Theory of Real Functions. Birkhauser, Boston, 1991.

[12] P. Martin-Lof. Notes on Constructive Mathematics. Almqvist & Wiksell, Stockholm, 1970.

[13] G. Plotkin. LCF considered as a programming language. Theoretical Computer Science, 5(1):223–255, 1977.

[14] G. Plotkin. T^{ω} as a universal domain. Journal of Computer and System Sciences, 17:209–236, 1978.

[15] G. Plotkin. Domains. Post-graduate Lectures in advanced domain theory, University of Edinburgh, Department of Computer Science, 1980.

[16] M.B. Pour-el and I. Richards. Computability and non-computability in classical analysis. Trans. Am. Math. Soc., pages 539–560, 1983.

[17] M.B. Smyth. Effectively given domains. Theoretical Computer Science, 5(1):256–274, 1977.

[18] T. Streicher. A universality theorem for PCF with recursive types, parallel-or and ∃. Mathematical Structures for Computing Science, 4(1):111 – 115, 1994.

[19] K. Weihrauch. Computability. Springer-Verlag, Berlin, 1987.

[20] K. Weihrauch. A simple introduction to computable analysis. Technical Report 171 – 7/1995, FernUniversitat, 1995.