Operational domain theory and topology of a sequential programming language

Martín Escardó Ho Weng Kin

School of Computer Science, University of Birmingham, UK, revised 17th October 2005

Abstract

A number of authors have exported domain-theoretic techniques from denotational semantics to the operational study of contextual equivalence and preorder. We further develop this, and, moreover, we additionally export topological techniques. In particular, we work with an operational notion of compact set and show that total programs with values on certain types are uniformly continuous on compact sets of total elements. We apply this and other conclusions to prove the correctness of non-trivial programs that manipulate infinite data. What is interesting is that the development applies to sequential programming languages.

1. Introduction

Domain theory and topology in programming language semantics have been applied to manufacture and study denotational models, e.g. the Scott model of PCF [23]. As is well known, for a sequential language like this, the match of the model with the operational semantics is imprecise: computational adequacy holds but full abstraction fails [21].

The main achievement of the present work is a reconciliation of a good deal of domain theory and topology with sequential computation. This is accomplished by sidestepping denotational semantics and reformulating domaintheoretic and topological notions directly in terms of programming concepts, interpreted in an operational way.

Regarding domain theory, we replace directed sets by rational chains, which we observe to be equivalent to programs defined on a “vertical natural numbers” type. Many of the classical definitions and theorems go through with this modification. In particular, (1) rational chains have suprema in the contextual order, (2) programs of functional type preserve suprema of rational chains, (3) every element (closed term) of any type is the supremum of a rational chain of finite elements, (4) two programs of functional type are contextually equivalent iff they produce a contextually equivalent result for every finite input. Moreover, we have an SFP-style characterization of finiteness using rational chains of deflations, a Kleene-Kreisel density theorem for total elements, and a number of continuity principles based on finite elements.

Regarding topology, we define open sets of elements via programs with values on a “Sierpinski” type, and compact sets of elements via Sierpinski-valued universalquantification programs. Then (1) the open sets of any type are closed under the formation of finite intersections and rational unions, (2) open sets are “rationally Scott open”,

(3) compact sets satisfy the “rational Heine–Borel property”, (4) total programs with values on certain types are uniformly continuous on compact sets of total elements.

In order to be able to formulate certain specifications of higher-type programs without invoking a denotational semantics, we work with a “data language” for our programming language, which consists of the latter extended with first-order “oracles”. The idea is to have a more powerful environment in order to get stronger program specifications. We observe that program equivalence defined by ground data contexts coincides with program equivalence defined by ground program contexts, but the notion of totality changes. (It is worth mentioning that the resulting data language for PCF defines precisely the elements of games models [1, 12], with the programming language capturing the effective parts of the models; similarly, the resulting data language for PCF extended with parallel-or and Plotkin’s existential quantifier defines precisely the elements of the Scott model, again with the programming language capturing the effective part [21, 8].)

We illustrate the scope and flexibility of the theory by applying our conclusions to prove the correctness of nontrivial programs that manipulate infinite data. We take one such example from [24]. In order to avoid having exact realnumber computation as a prerequisite, as in that reference, we consider modified versions of the program and its specification that retain their essential aspects. We show that the given specification and proof in the Scott model can be directly understood in our operational setting.

Although our development is operational, we never invoke evaluation mechanisms directly. We instead rely on known extensionality, monotonicity, and rational-chain principles for contextual equivalence and order. Moreover, with the exception of the proof of the density theorem, we don’t perform syntactic manipulations with terms.

Related work. The idea that order-theoretic techniques from domain theory can be directly understood in terms of operational semantics goes back to Mason, Smith, Talcot [15] and Sands (see Pitts [19] for references). Already in [15], one can find, in addition to rational-chain principles, two equivalent formulations of an operational notion of finiteness. One is analogous to our Definition 4.1 but uses directed sets of closed terms rather than rational chains, and the other is analogous to our Theorem 4.8. In addition to redeveloping their formulations in terms of rational chains, here we add a topological characterization (Theorem 4.15).

The idea that topological techniques can be directly understood in terms of operational semantics, and, moreover, are applicable to sequential languages, is due to Escardó [8]. In particular, we have taken our operational notion of compactness and some material about it from that reference. The main novelty here is a uniform-continuity principle, which plays a crucial role in the sample applications given in Section 7. This is inspired by unpublished work by Andrej Bauer and Escardó on synthetic analysis in (sheaf and realizability) toposes.

The idea of invoking a data language to formulate higher-type program specifications in a sequential operational setting is already developed in [8] and is related to relative realizability [4] and TTE [27].

2. Preliminaries

The programming language. We work with a simplytyped λ-calculus with function and finite-product types, fixed-point recursion, and base types Nat for natural numbers and Bool for booleans. We regard this as a programming language under the call-by-name evaluation strategy. In summary, we work with PCF extended with finiteproduct types (see e.g. one of the references [10, 19]). Other possibilities are briefly discussed in Section 8.

For clarity of exposition, we also include a Sierpinski base type Σ and a vertical-natural-numbers base type \overline{ω}, although such types can be easily encoded in other existing types if one so desires (e.g. via retractions). We have the following term-formation rules for them:

(1) ⊤: Σ is a term.

(2) If M: Σ and N: σ are terms then (if M then N): σ is a term.

(3) If M: \overline{ω} is a term then (M + 1): \overline{ω}, (M − 1): \overline{ω}, and (M > 0): Σ are terms.

The only value (or canonical form) of type Σ is ⊤, and the values of type \overline{ω} are the terms of the form M + 1. The role of zero is played by divergent computations, and a term (M > 0) can be thought of as a convergence test. The bigstep operational semantics for these constructs is given by the following evaluation rules:

(i) If M ⇓ ⊤ and N ⇓ V then (if M then N) ⇓ V.

(ii) If M ⇓ N + 1 and N ⇓ V then M − 1 ⇓ V. (iii) If M ⇓ M′ + 1 then M > 0 ⇓ ⊤.

For any type σ, we define ⊥_{σ} = fix x.x, where fix denotes the fixed-point recursion construct. In what follows, if f: σ → σ is a closed term, we shall write fix f as an abbreviation for fix x.f(x).

Oracles. We also consider the extension of the programming language with the following term-formation rule:

(4) If Ω: ℕ → ℕ is any function, computable or not, and N: Nat is a term, then ΩN: Nat is a term.

Then the operational semantics is extended by the rule: (iv) If N ⇓ n and Ω(n) = m then ΩN ⇓ m. We think of Ω as an external input or oracle, and of the equation Ω(n) = m as a query with question n and answer m. Of course, the extension of the language with oracles is no longer a programming language. We shall regard it as a data language in Section 6.

Underlying language for Sections 3–5. We take it to be either (1) the programming language introduced above,

(2) its extension with oracles, (3) its extension with parallel features, such as parallel-or and Plotkin’s existential quantifier, or else (4) its extension with both oracles and parallel features. The conclusions of those sections hold for the four possibilities, at no additional cost. To emphasize that a closed term doesn’t include oracles, we refer to it as a program.

Notation for contextual equivalence and (pre)order. We write M = N and M ⊑ N to denote (ground) contextual equivalence and order of terms of the same type.

Elements of a type. By an element of a type we mean a closed term of that type. We adopt usual set-theoretic notation for the elements of a type in the sense just defined. For example, we write x ∈ σ and f ∈ (σ → τ) to mean that x is an element of type σ and f is an element of type σ → τ.

The elements of Σ. The elements ⊥ and ⊤ of Σ are contextually inequivalent and any element of Σ is equivalent to one of them. We think of Σ as a type of results of observations or semidecisions, with ⊤ as “observable true” and ⊥ as “unobservable false”.

The elements of \overline{ω}. We denote by ∞ the element fix x.x + 1 of \overline{ω}, and, by an abuse of notation, for n ∈ ℕ we write n to denote the element succ^{n}(⊥) of \overline{ω}, where succ(x) = x + 1. The elements 0, 1, 2, …, n, …, ∞ of \overline{ω} are all contextually inequivalent, and any element of \overline{ω} is contextually equivalent to one of them. Notice that the equivalences 0 − 1 = 0, (x + 1) − 1 = x, (0 > 0) = ⊥ and (x + 1 > 0) = ⊤ hold for x ∈ \overline{ω}. In particular, ∞ − 1 = ∞ and (∞ > 0) = ⊤.

Extensionality and monotonicity. Contextual equivalence is a congruence: If f = g and x = y then f(x) = g(y) for any f, g ∈ (σ → τ) and x, y ∈ σ. Moreover, application is extensional: f = g if f(x) = g(x) for all x ∈ σ.

Regarding the contextual order, we have that application is monotone: If f ⊑ g and x ⊑ y then f(x) ⊑ g(y) for any f, g ∈ (σ → τ) and x, y ∈ σ. Moreover, it is orderextensional: f ⊑ g if f(x) ⊑ g(x) for all x ∈ σ. Standard congruence, extensionality and monotonicity principles also hold for product types. Additionally, ⊥_{σ} is the least element of σ.

Rational chains. For any g ∈ (τ → τ) and any h ∈ (τ → σ), the sequence h(g^{n}(⊥)) is increasing and has h(fix g) as a least upper bound in the contextual order:

h(fix g) = ⨆_{n} h(g^{n}(⊥)).

A sequence x_{n} of elements of a type σ is called a rational chain if there exist g ∈ (τ → τ) and h ∈ (τ → σ) with x_{n} = h(g^{n}(⊥)).

Proofs. The facts stated in this section are all well known. The extensionality, monotonicity and rational-chain principles follow directly from Milner’s construction [16]. Even though full abstraction of the Scott model fails for sequential languages, proofs exploiting computational adequacy are possible [13] (see [18]). Proofs using game semantics can be found in [1, 12], and operational proofs can be found in [19, 20] (where an earlier operational proof of the rational-chains principle is attributed to Sands). For a call-by-value untyped language, an operational proof of the rational-chains principle was previously developed in [15]. Regarding the above description of the elements of the vertical-natural-numbers type, a denotational proof using adequacy is easy, and operational proofs are obtained applying [9] or [19].

3. Rational chains and open sets

Lemma 3.1. The sequence 0, 1, 2, …, n, … in \overline{ω} is a rational chain with least upper bound ∞, and

l(∞) = ⨆_{n} l(n) for every l ∈ (\overline{ω} → σ).

Proof. n = succ^{n}(⊥) and ∞ = fix succ.

Moreover, this is the “generic rational chain” with “generic lub ∞” in the following sense:

Lemma 3.2. A sequence x_{n} ∈ σ is a rational chain if and only if there exists l ∈ (\overline{ω} → σ) such that for all n ∈ ℕ,

x_{n} = l(n), and hence such that ⨆_{n} x_{n} = l(∞).

Proof. (⇒): Given g ∈ (τ → τ) and h ∈ (τ → σ) with x_{n} = h(g^{n}(⊥)), recursively define

f(y) = if y > 0 then g(f(y − 1)). Then f(n) = g^{n}(⊥) and hence we can take l = h ∘ f.

(⇐): Take h = l and g(y) = y + 1.

Elements of functional type are “rationally continuous” in the following sense:

Proposition 3.3. If f ∈ (σ → τ) and x_{n} is a rational chain in σ, then

1. f(x_{n}) is a rational chain in τ, and

2. f(⨆_{n} x_{n}) = ⨆_{n} f(x_{n}).

Proof. By Lemma 3.2, there is l ∈ (\overline{ω} → σ) such that x_{n} = l(n). Then the definition l′(y) = f(l(y)) and the same lemma show that f(x_{n}) is a rational chain. By two applications of Lemma 3.1, f(⨆_{n} x_{n}) = f(l(∞)) = l′(∞) = ⨆_{n} l′(n) = ⨆_{n} f(l(n)) = ⨆_{n} f(x_{n}).

Corollary 3.4. For any rational chain f_{n} in (σ → τ) and any x ∈ σ,

1. f_{n}(x) is a rational chain in τ, and

2. (⨆_{n} f_{n})(x) = ⨆_{n} f_{n}(x).

Proof. Apply the proposition to F ∈ ((σ → τ) → τ) defined by F (f) = f(x).

Definition 3.5. We say that a set U of elements of a type σ is open if there is χ_{U} ∈ (σ → Σ) such that for all x ∈ σ,

χ_{U}(x) = ⊤ ⟺ x ∈ U.

If such an element χ_{U} exists then it is unique up to contextual equivalence, and we refer to it as the characteristic function of U.

We say that a sequence of open sets in σ is a rational chain if the corresponding sequence of characteristic functions is rational in the function type (σ → Σ). The following says that the open sets of any type form a “rational topology”:

Proposition 3.6. For any type, the open sets are closed under the formation of finite intersections and rational unions.

Proof. Finite intersections: χ_{⋂ ∅}(x) = ⊤ and χ_{U∩V} (x) = χ_{U}(x) ∧ χ_{V} (x), where p ∧ q = if p then q.

Rational unions: Because U ⊆ V iff χ_{U} ⊑ χ_{V}, we have that if l ∈ (\overline{ω} → (σ → Σ)) and l(n) is the characteristic function of U_{n} then l(∞) = ⨆_{n} χ_{U_{n}} = χ_{⋃_{n} U_{n}}.

However, unless the language has parallel features, the open sets don’t form topologies in the usual sense:

Proposition 3.7. The following are equivalent.

1. For every type, the open sets are closed under the formation of finite unions.

2. There is (∨) ∈ (Σ × Σ → Σ) such that p ∨ q = ⊤ ⟺ p = ⊤ or q = ⊤.

Proof. (⇑): χ_{⋃ ∅}(x) = ⊥ and χ_{U∪V} (x) = χ_{U}(x)∨χ_{V} (x). (⇓): U = {(p, q) | p = ⊤} and V = {(p, q) | q = ⊤} are open in the type Σ × Σ because they have the first and second projections as their characteristic functions. Hence the set U ∪ V is also open, and so there is χ_{U∪V} such that χ_{U∪V} (p, q) = ⊤ iff (p, q) ∈ U ∪ V iff (p, q) ∈ U or (p, q) ∈ V iff p = ⊤ or q = ⊤. Therefore (∨) = χ_{U∪V} gives the desired conclusion.

Moreover, even if parallel features are included, closure under arbitrary unions fails in general (but see [8, Chapter 4]). The following easy observation says that elements of functional type are continuous in the topological sense:

Proposition 3.8. For any f ∈ (σ → τ) and any open subset V of τ, the set f^{−1}(V) = {x ∈ σ | f(x) ∈ V } is open in σ.

Proof. If χ_{V} ∈ (τ → Σ) is the characteristic function of the set V then χ_{V} ∘ f ∈ (σ → Σ) is that of f^{−1}(V).

The following says that the contextual order is the “specialization order” of the topology:

Proposition 3.9. For x, y ∈ σ, the relation x ⊑ y holds iff x ∈ U implies y ∈ U for every open subset U of σ.

Proof. Ground contexts of type Σ suffice to test the operational preorder — see e.g. [19, Remark 2.10]. Because x and y are closed terms, applicative contexts, i.e. characteristic functions of open sets, suffice.

Open sets are “rationally Scott open”:

Proposition 3.10. For any open set U in a type σ,

1. if x ∈ U and x ⊑ y then y ∈ U, and

2. if x_{n} is a rational chain with ⨆ x_{n} ∈ U, then there is n ∈ ℕ such that already x_{n} ∈ U.

Proof. By monotonicity and rational continuity of χ_{U}.

4. Finite elements

We develop a number of equivalent formulations of a notion of finiteness. Corollary 4.3 says that an element b is finite iff any attempt to build b as the lub of a rational chain already has b as a building block. The official definition is a bit subtler:

Definition 4.1. An element b is called (rationally) finite if for every rational chain x_{n} with b ⊑ ⨆_{n} x_{n}, there is n such that already b ⊑ x_{n}.

The types of our language are “rationally algebraic” in the following sense:

Theorem 4.2. Every element of any type is the least upper bound of a rational chain of finite elements.

A proof of this will be given later in this section. For the moment, we develop some consequences.

Corollary 4.3. An element b is finite if and only if for every rational chain x_{n} with b = ⨆_{n} x_{n}, there is n such that already b = x_{n}.

Proof. (⇒): If b = ⨆_{n} x_{n} then b ⊑ ⨆_{n} x_{n} and hence b ⊑ x_{n} for some n. But, by definition of upper bound, we also have b ⊒ x_{n}. Hence b = x_{n}, as required.

(⇐): By Theorem 4.2, there is a rational chain x_{n} of finite elements with b = ⨆_{n} x_{n}. By the hypothesis, b = x_{n} for some n, which shows that b is finite.

The following provides a proof method for contextual equivalence based on finite elements:

Proposition 4.4. f = g holds in (σ → τ) iff f(b) = g(b) for every finite b ∈ σ.

Proof. (⇒): Contextual equivalence is an applicative congruence. (⇐): By extensionality it suffices to show that f(x) = g(x) for any x ∈ σ. By Theorem 4.2, there is a rational chain b_{n} of finite elements with x = ⨆_{n} b_{n}. Hence, by two applications of rational continuity and one of the hypothesis, f(x) = f(⨆_{n} b_{n}) = ⨆_{n} f(b_{n}) = ⨆_{n} g(b_{n}) = g(⨆_{n} b_{n}) = g(x), as required.

Of course, the above holds with contextual equivalence replaced by contextual order. Another consequence of Theorem 4.2 is a third continuity principle:

Proposition 4.5. For any f ∈ (σ → τ), any x ∈ σ and any finite c ⊑ f(x), there is a finite b ⊑ x with c ⊑ f(b).

Proof. By Theorem 4.2, x is the lub of a rational chain b_{n} of finite elements. By rational continuity, c ⊑ ⨆_{n} f(b_{n}). By finiteness of c, there is n with c ⊑ f(b_{n}).

Corollary 4.6. If U is open and x ∈ U, then there is a finite b ⊑ x such that already b ∈ U.

Proof. The hypothesis gives ⊤ ⊑ χ_{U}(x), and so there is some finite b ⊑ x with ⊤ ⊑ χ_{U}(b) because ⊤ is finite. To conclude, use maximality of ⊤.

In order to prove Theorem 4.2, we invoke the following concepts (see e.g. [2]):

Definition 4.7.

1. A deflation on a type σ is an element of type (σ → σ) that (i) is below the identity of σ, and (ii) has finite image modulo contextual equivalence.

2. A (rational) SFP structure on a type σ is a rational chain id_{n} of idempotent deflations with ⨆_{n} id_{n} = id, the identity of σ.

3. A type is (rationally) SFP if it has an SFP structure.

Theorem 4.8.

1. Each type of the language is SFP.

2. For any SFP structure id_{n} on a type σ, an element b ∈ σ is finite if and only if b = id_{n}(b) for some n ∈ ℕ.

In particular, because id_{n} is idempotent, id_{n}(x) is finite and hence any x ∈ σ is the lub of the rational chain id_{n}(x) and therefore Theorem 4.2 follows.

Proof. (1): Lemma 4.13 below.

(2)(⇒): The inequality b ⊒ id_{n}(b) holds because id_{n} is a deflation. For the other inequality, we first calculate b = (⨆_{n} id_{n})(b) = ⨆_{n} id_{n}(b) using Corollary 3.4. Then by finiteness of b, there is n with b ⊑ id_{n}(b).

(2)(⇐): To show that b is finite, let x_{i} be a rational chain with b ⊑ ⨆_{i} x_{i}. Then b = id_{n}(b) ⊑ id_{n}(⨆_{i} x_{i}) = ⨆_{i} id_{n}(x_{i}) by rational continuity of id_{n}. Because id_{n} has finite image, the set {id_{n}(x_{i}) | i ∈ ℕ} is finite and hence has a maximal element, which is its lub. That is, there is i ∈ ℕ with b ⊑ id_{n}(x_{i}). But id_{n}(x_{i}) ⊑ x_{i} and hence b ⊑ x_{i}, as required.

We additionally have the following proposition.

Definition 4.9. By a finitary type we mean a type that is obtained from Σ and Bool by finitely many applications of the product- and function-type constructions.

Proposition 4.10. SFP structures id_{n}^{σ} ∈ (σ → σ) can be chosen for each type σ in such a way that

1. id_{n}^{σ} is the identity for every finitary type σ,

2. id_{n}^{σ→τ} (f)(x) = id_{n}^{τ}(f(id_{n}^{σ}(x))),

3. id_{n}^{σ×τ} (x, y) = (id_{n}^{σ}(x), id_{n}^{τ}(y)).

Item 1 gives:

Corollary 4.11. Every element of any finitary type is finite.

The other two give the following consequence, whose proof uses the fact that for any SFP structure id_{n} on a type σ, if id_{n}(x) = x then id_{k}(x) = x for any k ≥ n.

Corollary 4.12. 1. If f ∈ (σ → τ) and x ∈ σ are finite

then so is f(x) ∈ τ.

2. If x ∈ σ and y ∈ τ are finite then so is (x, y) ∈ (σ×τ).

Proof. (1): If f and x are finite, then there are m and n with f = id_{m}(f) and x = id_{n}(x). Let k = max(m, n). By Proposition 4.10, f(x) = id_{k}(f)(id_{k}(x)) = id_{k}(f(x)), which shows that f(x) is finite. (2): Similar.

To prove Theorem 4.8(1) and Proposition 4.10, we construct, by induction on σ, programs

d^{σ}: \overline{ω} → (σ → σ). For the base case, we define

d^{Bool}(x)(p) = p, d^{Σ}(x)(p) = p, d^{Nat}(x)(k) = if x > 0 then if k == 0 then 0 else 1 + d^{Nat}(x − 1)(k − 1),

d\overline{ω}(x)(y) = if x > 0∧y > 0 then 1+d\overline{ω}(x−1)(y−1). Notice that “x > 0” and “x > 0 ∧ y > 0” are terms of Sierpinski type and hence the “if” symbols that precede them don’t have corresponding “else” clauses. For the induction step, we define

d^{σ→τ} (x)(f)(y) = d^{τ} (x)(f(d^{σ}(x)(y))),
d^{σ×τ} (x)(y, z) = (d^{σ}(x)(y), d^{τ} (x)(z)).

Lemma 4.13. The rational chain id_{n}^{σ} =^{def} d^{σ}(n) is an SFP structure on σ for every type σ.

Proof. By induction on σ. For the base case, only σ = \overline{ω} is non-trivial. First show by induction on n that, for every n ∈ ℕ, d\overline{ω}(n)(y) = min(n, y). Hence d\overline{ω}(n) is idempotent and below the identity, and has image {0, 1, …, n}. Now calculate, for k ∈ ℕ, d\overline{ω}(∞)(k) = ⨆_{n} d\overline{ω}(n)(k) = ⨆_{n} min(n, k) = k. Hence d\overline{ω}(∞)(∞) = ⨆_{k} d\overline{ω}(∞)(k) = ⨆_{k} k = ∞. By extensionality, d\overline{ω}(∞) is the identity. The induction step is straightforward.

This proves Theorem 4.8(1). Proposition 4.10(1) is easily established by induction on finitary types, and conditions (2) and (3) are immediate.

We now develop a topological characterization of the notion of finiteness. We say that an open set in σ has finite characteristic if its characteristic function is a finite element of the function type (σ → Σ).

Lemma 4.14. For any open set U in σ and any n ∈ ℕ, let

U^{(n)} =^{def} id_{n}^{−1}(U) = {x ∈ σ | id_{n}(x) ∈ U}.

1. The open set U^{(n)} ⊆ U has finite characteristic.

2. The set {U^{(n)} | U is open in σ} has finite cardinality.

3. U has finite characteristic iff U = U^{(n)} for some n.

4. The chain U^{(n)} is rational and U = ⋃_{n} U^{(n)}.

Proof. (1) and (3): id_{n}(χ_{U})(x) = id_{n}(χ_{U}(id_{n}(x))) = χ_{U}(id_{n}(x)), and hence id_{n}(χ_{U}) is the characteristic function of U^{(n)}.

(2): Any two equivalent characteristic functions classify the same open set and id_{n}^{σ→Σ} has finite image modulo contextual equivalence.

(4): id_{n}(χ_{U}) is a rational chain with lub χ_{U}, i.e. χ_{U}(x) = ⊤ iff id_{n}(χ_{U})(x) = ⊤ for some n.

Theorem 4.15. An element b ∈ σ is finite if and only if the set ↑ b =^{def} {x ∈ σ | b ⊑ x} is open.

Proof. (⇒): By Proposition 3.9, for any x ∈ σ we have that ↑ x = ⋂{U | U is open and x ∈ U}. Because b is finite, there is n such that id_{n}(b) = b. Hence if b belongs to an open set U then b ∈ U^{(n)} ⊆ U by Lemma 4.14(1). This shows that ↑ b = ⋂{U^{(n)} | U is open and b ∈ U}. But this is the intersection of a set of finite cardinality by Lemma 4.14(2) and hence open by Proposition 3.6.

(⇐): If b ⊑ ⨆_{n} x_{n} holds for a rational chain x_{n}, then ⨆_{n} x_{n} ∈ ↑ b and hence x_{n} ∈ ↑ b for some x_{n} by Proposition 3.10(2), i.e. b ⊑ x_{n}.

Corollary 4.16. Every open set is a union of open sets of the form ↑ b with b finite.

Proof. If x belongs to an open set U then x ∈ ↑ b ⊆ U for some finite b by Corollary 4.6 and Proposition 3.10(1).

Remark 4.17. (1) Notice that the proof of Theorem 4.15(⇒) is not constructive. The reason is that we implicitly use the fact that a subset of a finite set is finite. In general, however, it is not possible to finitely enumerate the members of a subset of a finite set unless the defining property of the subset is decidable, and here it is only semidecidable. (2) Moreover, this non-constructivity in the theorem is unavoidable. In fact, if we had a constructive procedure for finding χ_{↑ b} for every finite b, then we would be able to semidecide contextual equivalence for finite elements, because b = c iff χ_{↑ b}(c) = ⊤ = χ_{↑ c}(b). As all elements of finitary PCF are finite, and contextual equivalence is co-semidecidable for finitary PCF, this would give a decision procedure for equivalence, contradicting [14].

We now develop an operational version of the Kleene– Kreisel density theorem for total elements [7].

Definition 4.18. An element of ground type is total iff it is maximal. An element f ∈ (σ → τ) is total iff f(x) ∈ τ is total whenever x ∈ σ is total. An element of type (σ × τ) is total iff its projections into σ and τ are total.

It is easy to see that any type has a total element. In order to cope with the fact that the only total element of \overline{ω}, namely ∞, is defined by fixed-point recursion, we need:

Lemma 4.19. If x is an element of any type defined from total elements y_{1}, …, y_{n} in such a way that the only occurrences of the fixed-point combinator in x are those of y_{1}, …, y_{n}, if any, then x is total.

Proof. Define a term with free variables to be total if every instantiation of its free variables by total elements produces a total element, and then proceed by induction on the formation of x from y_{1}, …, y_{n}.

Theorem 4.20. Every finite element is below some total element. Hence any inhabited open set has a total element.

Proof. For each type τ and each n ∈ ℕ, define programs F^{τ}: \overline{ω} → ((τ → τ) → τ) and G_{n}^{τ}: (τ → τ) → τ by

F (x)(f) = if x > 0 then f(F (x − 1)(f)),

G_{n}(f) = f^{n}(t) for some chosen t ∈ τ total.

Then F (∞) = fix, F (n) ⊑ G_{n} and G_{n} is total.

Now, given a finite element b of any type, choose a fresh syntactic variable x of type \overline{ω}, and define a term b̃ from b by replacing all occurrences of fix^{τ} by the term F^{τ} (x). Then b = (λx.b̃)(∞). Because b is finite, there is some n ∈ ℕ such that already b = (λx.b̃)(n).

To conclude, construct a term b̂ from b by replacing all occurrences of fix^{τ} by G_{n}^{τ}. Then b̂ is total by Lemma 4.19, and (λx.b̃)(n) ⊑ b̂ and hence b ⊑ b̂ by transitivity.

We finish this section by considering a continuity principle for two special kinds of functions. For elements x and y of the same type, define

x =_{n} y ⟺ id_{n}(x) = id_{n}(y). We refer to the function type (Nat → Nat) as the Baire type and denote it by Baire. (Then the set of total elements of Baire is an operational manifestation of the Baire space of classical topology.) The following is easily proved:

Lemma 4.21. Define \overline{id}_{n}: Baire → Baire by \overline{id}_{n}(s) = λi. if i < n then s(i) else ⊥. Then \overline{id}_{n}(s) is finite and above id_{n}(s), and if s, t ∈ Baire are total then

\overline{id}_{n}(s) ⊑ t ⟹ s =_{n} t.

Proposition 4.22. For total f ∈ (σ → Baire) and x ∈ σ, ∀ϵ ∈ ℕ ∃δ ∈ ℕ ∀ total y ∈ σ, x =_{δ} y ⇒ f(x) =_{ϵ} f(y).

Proof. Because \overline{id}_{ϵ}(f(x)) is finite and below f(x), there is δ such that already \overline{id}_{ϵ}(f(x)) ⊑ f(id_{δ}(x)) by Proposition 4.5. If x =_{δ} y then f(id_{δ}(x)) = f(id_{δ}(y)) and hence \overline{id}_{ϵ}(f(x)) ⊑ f(id_{δ}(y)) ⊑ f(y). By Lemma 4.21, f(x) =_{ϵ} f(y), as required.

Similarly, we have:

Proposition 4.23. For any total f ∈ (σ → γ) and any total x ∈ σ, where γ ∈ {Nat, Bool},

∃δ ∈ ℕ ∀ total y ∈ σ, x =_{δ} y ⟹ f(x) = f(y).

5. Compact sets

The intuition behind the topological notion of compactness is that a compact set behaves, in many important respects, as if it were a set of finite cardinality — see e.g. [11]. The official topological definition, which is more obscure, says that a subset Q of a topological space is compact iff it satisfies the Heine–Borel property: any collection of open sets that covers Q has a finite subcollection that already covers Q. In order to arrive at an operational notion of compactness, we reformulate this in two stages.

(1) Any collection of open sets of a topological space can be made directed by adding the unions of finite subcollections. Hence a set Q is compact iff every directed cover of Q by open sets includes an open set that already covers Q.

(2) Considering the Scott topology on the lattice of open sets of the topological space, this amounts to saying that the collection of open sets U with Q ⊆ U is Scott open in this lattice.

Thus, this last reformulation considers open sets of open sets. We take this as our definition, with “Scott open” replaced by “open” in the sense of Definition 3.5: we say that a collection U of open sets of a type σ is open if the collection {χ_{U} | U ∈ U} is open in the function type (σ → Σ).

Lemma 5.1. For any set Q of elements of a type σ, the following two conditions are equivalent:

1. The collection {U open | Q ⊆ U} is open.

2. There is (∀_{Q}) ∈ ((σ → Σ) → Σ) such that ∀_{Q}(p) = ⊤ ⟺ p(x) = ⊤ for all x ∈ Q.

Proof. ∀_{Q} = χ_{U} for U = {χ_{U} | Q ⊆ U}, because if p = χ_{U} then Q ⊆ U ⟺ p(x) = ⊤ for all x ∈ Q.

Definition 5.2. We say that a set Q of elements of a type σ is compact if it satisfies the above equivalent conditions. In this case, for the sake of clarity, we write “∀x ∈ Q. … ” instead of “∀_{Q}(λx. …)”.

Lemma 5.1(2) gives a sense in which a compact set behaves as a set of finite cardinality: it is possible to universally quantify over it in a mechanical fashion. Hence every finite set is compact. Examples of infinite compact sets will be given shortly. By Lemma 5.1(1), compact sets satisfy the “rational Heine–Borel property”, because open sets are rationally Scott open:

Proposition 5.3. If Q is compact and U_{n} is a rational chain of open sets with Q ⊆ ⋃_{n} U_{n}, then there is n ∈ ℕ such that already Q ⊆ U_{n}.

Further properties of compact sets that are familiar from classical topology hold for our operational notion [8]:

Proposition 5.4.

1. For any f ∈ (σ → τ) and any compact set Q in σ, the set f(Q) = {f(x) | x ∈ Q} is compact in τ.

2. If Q is compact in σ and R is compact in τ, then Q×R is compact in σ × τ.

3. If Q is compact in σ and V is open in τ, then

N(Q, V) =^{def} {f ∈ (σ → τ) | f(Q) ⊆ V }

is open in (σ → τ).

Proof. (1): ∀y ∈ f(Q).p(y) = ∀x ∈ Q.p(f(x)).

(2): ∀z ∈ Q × R.p(z) = ∀x ∈ Q.∀y ∈ R.p(x, y). (3): χ_{N(Q,V)}(f) = ∀x ∈ Q.χ_{V} (f(x)) .

The set of all elements of any type σ is compact, but for trivial reasons: p(x) = ⊤ holds for all x ∈ σ iff it holds for x = ⊥, by monotonicity, and hence the definition ∀_{σ}(p) = p(⊥) gives a universal quantification program.

Proposition 5.5. The total elements of Nat and Baire don’t form compact sets.

Proof. It is easy to construct g ∈ (\overline{ω} × Nat → Σ) such that g(x, n) = ⊤ iff x > n for all x ∈ \overline{ω} and n ∈ ℕ. If the total elements ℕ of Nat did form a compact set, then we would have u ∈ (\overline{ω} → Σ) defined by u(x) = ∀n ∈ ℕ.g(x, n) that would satisfy u(k) = ⊥ for all k ∈ ℕ and u(∞) = ⊤ and hence would violate rational continuity. Therefore ℕ is not compact in Nat. If the total elements of Baire formed a compact set, then, considering f ∈ (Baire → Nat) defined by f(s) = s(0), Proposition 5.4(1) would entail that ℕ is compact in Nat, again producing a contradiction.

The above proof relies on a continuity principle rather than on recursion theory. Thus, compactness of ℕ in Nat fails even if the language includes an oracle for the Halting Problem. Taking Lemma 5.1(1) as the formulation of compactness, by Theorem 4.15 and Lemma 4.14, we have:

Proposition 5.6. An open set is compact iff it has finite characteristic. Hence every open set is a rational union of compact open sets.

Armed with the results that we have so far, it is easy to see that if an open set has finite characteristic then it is the upper set of a finite set of finite elements. The simplest nontrivial example of a compact set, which is a manifestation of the “one-point compactification of the discrete space of natural numbers”, is given in the following proposition.

We regard function types of the form (Nat → σ) as sequence types and define “head”, “tail” and “cons” constructs for sequences as follows:

hd(s) = s(0), tl(s) = λi.s(i + 1),

n :: s = λi. if i == 0 then n else s(i − 1).

We also use familiar notations such as 0^{n}1^{ω} as shorthands for evident terms such as λi. if i < n then 0 else 1.

Proposition 5.7. The set ℕ_{∞} of sequences of the forms 0^{n}1^{ω} and 0^{ω} is compact in Baire.

Proof. Define, omitting the subscript ℕ_{∞} for ∀,

∀(p) = p(if p(1^{ω}) ∧ ∀s.p(0 :: s) then t), where t is some element of ℕ_{∞}. More formally, ∀ = fix(F) where

F (A)(p) = p(if p(1^{ω}) ∧ A(λs.p(0 :: s)) then t).

We must show that, for any given p, ∀(p) = ⊤ iff p(s) = ⊤ for all s ∈ ℕ_{∞}.

(⇐): The hypothesis gives p(0^{ω}) = ⊤. By Proposition 4.5, there is n such that already p(id_{n}(0^{ω})) = ⊤. But id_{n}(0^{ω})(i) = 0 if i < n and id_{n}(0^{ω})(i) = ⊥ otherwise. Using this and monotonicity, a routine proof by induction on k shows that if p(id_{k}(0^{ω})) = ⊤ then F^{k}(⊥)(p) = ⊤. The result hence follows from the fact that F^{k}(⊥) ⊑ ∀.

(⇒): By rational continuity, the hypothesis implies that F^{n}(⊥)(p) = ⊤ for some n. A routine, but slightly laborious, proof by induction on k shows that, for all q, if F^{k}(⊥)(q) = ⊤ then q(s) = ⊤ for all s ∈ ℕ_{∞}.

In order to construct more sophisticated examples of compact sets, we need the techniques of Section 6 below. Before that, we consider some uniform-continuity principles (cf. Propositions 4.22 and 4.23). Define s ≡_{n} t ⟺ \overline{id}_{n}(s) = \overline{id}_{n}(t) for \overline{id}_{n}: Baire → Baire as in Lemma 4.21.

Lemma 5.8. For f ∈ (σ → Baire) total and Q a compact set of total elements of σ,

∀ϵ ∈ ℕ ∃δ ∈ ℕ ∀x ∈ Q, f(x) ≡_{ϵ} f(id_{δ}(x)).

Proof. For any given ϵ ∈ ℕ, it is easy to construct a program e ∈ (Baire × Baire → Σ) such that

(i) if s, t ∈ Baire are total then s ≡_{ϵ} t ⇒ e(s, t) = ⊤, (ii) for all s, t ∈ Baire, e(s, t) = ⊤ ⇒ s ≡_{ϵ} t. If we define p(x) = e(f(x), f(x)), then, by the hypothesis and (i), ∀_{Q}(p) = ⊤. By Proposition 4.5, ∀_{Q}(id_{δ}(p)) = ⊤ for some δ ∈ ℕ, and, by Proposition 4.10, id_{δ}(p)(x) = p(id_{δ}(x)). It follows that e(f(id_{δ}(x)), f(id_{δ}(x))) = ⊤ for all x ∈ Q. By monotonicity, e(f(x), f(id_{δ}(x))) = ⊤, and, by (ii), f(x) ≡_{ϵ} f(id_{δ}(x)), as required.

Theorem 5.9. For f ∈ (σ → Baire) total and Q a compact set of total elements of σ,

∀ϵ ∈ ℕ ∃δ ∈ ℕ ∀x, y ∈ Q, x =_{δ} y ⇒ f(x) =_{ϵ} f(y).

Proof. Given ϵ ∈ ℕ, first construct δ ∈ ℕ as in Lemma 5.8. For x, y ∈ Q, if x =_{δ} y then \overline{id}_{ϵ}(f(x)) = \overline{id}_{ϵ}(f(id_{δ}(x))) = \overline{id}_{ϵ}(f(id_{δ}(y))) ⊑ f(y). By Lemma 4.21, f(x) =_{ϵ} f(y), as required.

Similarly, we have:

Proposition 5.10. For γ ∈ {Nat, Bool}, f ∈ (σ → γ) total and Q a compact set of total elements of σ,

1. ∃δ ∈ ℕ ∀x ∈ Q, f(x) = f(id_{δ}(x)),

2. ∃δ ∈ ℕ ∀x, y ∈ Q, x =_{δ} y ⟹ f(x) = f(y).

The following is used in Section 7 below:

Definition 5.11. For f and Q as in Proposition 5.10, we refer to the least δ ∈ ℕ such that (1) (respectively (2)) holds as the big (respectively small) modulus of uniform continuity of f at Q.

6. A data language

In an operational setting, one usually adopts the same language to construct programs of a type and to express data of the same type. But consider programs that can accept externally produced streams as inputs. Because such streams are not necessarily definable in the language, it makes sense to consider program equivalence defined by quantification over more liberal “data contexts” and ask whether the same notion of program equivalence is obtained.

Definition 6.1. Let P be the programming language introduced in Section 2, perhaps extended with parallel features, but not with oracles, and let D be P extended with oracles. We think of D as a data language for the programming language P. The idea is that the closed terms of P are programs and those of D are (higher-type) data. Accordingly, in this context, the notation x ∈ σ means that x is a closed term of type σ in the data language. Of course, this includes the possibility that x is a program.

The following is folklore and goes back to Milner [16]:

Theorem 6.2. For terms in P, equivalence with respect to ground P-contexts and equivalence with respect to ground D-contexts coincide.

Proof. For any oracle Ω, id_{n}(Ω) is extensionally equivalent to some program, for both notions of equivalence. Hence for any element x of any type, id_{n}(x) is equivalent to some program. To conclude, apply Proposition 4.4.

On the other hand, the notion of totality changes:

Theorem 6.3. There are programs that are total with respect to P but not with respect to D.

This kind of phenomenon is again folklore. There are programs of type e.g. Cantor → Bool, where Cantor =^{def} (Nat → Bool), that, when seen from the point of view of the data language, map programmable total elements to total elements, but diverge at some non-programmable total inputs. The construction uses Kleene trees [5], and can be found in [8, Chapter 3.11]. This is analogous to the fact that totality with respect to P also disagrees with totality with respect to denotational models. A proof for the Scott model can be found in [22]. For the intriguing relationship between totality in the Scott model with sequential computation, see [17].

7. Sample applications

We use the data language D to formulate specifications of programs in the programming language P. As in Section 6, the notation x ∈ σ means that x is a closed term of type σ in D. This is compatible with the notation of Sections 3–5 by taking D as the underlying language for them. Again maintaining compatibility, we take the notions of totality, open set and compact set with respect to D. To indicate that openness or compactness of a set is witnessed by a program rather than just an element of the data language, we say programmably open or compact.

As for the Baire type, we think of the elements of the Cantor type as sequences, and, following topological tradition, in this context we identify the booleans true and false with the numbers 0 and 1 (it doesn’t matter in which order). The following is our main tool in this section:

Theorem 7.1. The total elements of the Cantor type form a programmably compact set.

Proof. This is proved and discussed in detail in [8, Chapter 3.11], and hence we only provide the construction of the universal quantification program, with one minor improvement. We recursively define ∀: (Cantor → Σ) → Σ by

∀(p) = p(0 :: if ∀s.p(0 :: s) ∧ ∀s.p(1 :: s) then t), where t is some programmable total element of Cantor. The correctness proof for this program is similar to that of Proposition 5.7, but involves an invocation of König’s Lemma.

Remark 7.2. If the data language is taken to be P itself, Theorem 7.1 fails for the same reason that leads to Theorem 6.3 [8, Chapter 3.11]. Of course, the above program ∀: (Cantor → Σ) → Σ can still be written down. But it no longer satisfies the required specification given in Lemma 5.1(2). In summary, it is easier to universally quantify over all total elements of the Cantor type than just over the programmable ones, to the extent that the former can be achieved by a program but the latter cannot.

Interestingly, the programmability conclusion of Theorem 7.1 is not invoked for the purposes of this section, because we only apply compactness to get uniform continuity.

The following theorem is due to Berger [6], with domain-theoretic denotational specification and proof. As discussed in the introduction, the purpose of this section is to illustrate that such specifications and proofs can be directly understood in our operational setting, and, moreover, apply to sequential programming languages.

Theorem 7.3. There is a total program

    ε: (Cantor → Bool) → Cantor

s.t. for any total p ∈ (Cantor → Bool), if p(s) = true for some total s ∈ Cantor, then ε(p) is such an s.

Proof. Define

ε(p) = if p(0 :: ε(λs.p(0 :: s))) then 0 :: ε(λs.p(0 :: s))
else 1 :: ε(λs.p(1 :: s)).

The required property is established by induction on the big modulus of uniform continuity of a total element p ∈ (Cantor → Bool) at the set of total elements, using the fact that if p has modulus δ+1 then λs.p(0 :: s) and λs.p(1 :: s) have modulus δ, and that when p has modulus zero, p(⊥) is total and hence p is constant.

This gives rise to universal quantification for booleanvalued rather than Sierpinski-valued predicates:

Corollary 7.4. There is a total program

    ∀: (Cantor → Bool) → Bool

such that for every total p ∈ (Cantor → Bool), ∀(p) = true ⇔ p(s) = true for all total s ∈ Cantor.

Proof. First define ∃: (Cantor → Bool) → Bool by ∃(p) = p(ε(p)) and then define ∀(p) = ¬∃s.¬p(s).

Corollary 7.5. The function type (Cantor → Nat) has decidable equality for total elements.

Proof. Define a program

  (==): (Cantor → Nat) × (Cantor → Nat) → Bool

by (f == g) = ∀ total s ∈ Cantor.f(s) == g(s).

Simpson [24] applied Corollary 7.4 to develop surprising sequential programs for computing integration and supremum functionals ([0, 1] → ℝ) → ℝ, with real numbers represented as infinite sequences of digits. The theory developed here copes with that, again allowing a direct operational translation of the original denotational development. For lack of space to introduce the necessary background on real number-computation, we illustrate the main idea by reformulating the development of the supremum functional, with the closed unit interval and the real line replaced by the Cantor and Baire types, and with the natural order of the reals replaced by the lexicographic order on sequences. The lexicographic order on the total elements of the Baire type is defined by s ≤ t iff whenever s ≠ t, there is n ∈ ℕ with s(n) < t(n) and s(i) = t(i) for all i < n.

Lemma 7.6. There is a total program

                                                      max: Baire × Baire → Baire

such that

1. max(s, t) is the maximum of s and t in the lexicographic order for all total s, t ∈ Baire, and

2. (s, t) =_{ϵ} (s′, t′) ⇒ max(s, t) =_{ϵ} max(s′, t′) for all s, t, s′, t′ ∈ Baire (total or not) and all ϵ ∈ ℕ.

Proof. Define

max(s, t) = if hd(s) == hd(t)

then hd(s) :: max(tl(s), tl(t)) else if hd(s) > hd(t) then s else t.

The easy details of the correctness proof are omitted.

Theorem 7.7. There is a total program

                                                     sup: (Cantor → Baire) → Baire

such that for every total f ∈ (Cantor → Baire), sup(f) = sup{f(s) | s ∈ Cantor is total}, where the supremum is taken in the lexicographic order.

Proof. Let t ∈ Cantor be a programmable total element and define

sup(f) = let h = hd(f(t)) in if ∀ total s ∈ Cantor. hd(f(s)) == h then h :: sup(λs. tl(f(s))) else max(sup(λs.f(0 :: s)), sup(λs.f(1 :: s))),

where “let x = … in M” stands for “(λx.M)(…)”.

One shows by induction on n ∈ ℕ that, for every total

                                                 f ∈ (Cantor → Baire),

sup(f) =_{n} sup{f(s) | s ∈ Cantor is total}. The base case is trivial. For the induction step, one proceeds by a further induction on the small modulus of uniform continuity of hd ∘f: Cantor → Nat at the total elements of Cantor, crucially appealing to the non-expansiveness condition given by Lemma 7.6(2). One uses the facts that if hd ∘f has modulus δ + 1 then hd ∘λs.f(0 :: s) and hd ∘λs.f(1 :: s) have modulus δ, and that if hd ∘f has modulus 0 then hd(f(s)) = hd(f(t)) for all total s and t.

Theorems 7.3 and 7.7 rely on the compactness of the total elements of the Cantor type. Arguments similar to that of Proposition 5.5 show that these two theorems fail if the Cantor type is replaced by the Baire space.

8. Open problems and further developments

The Tychonoff theorem in classical topology states that a product of arbitrarily many compact spaces is compact. A proof that this holds in a computational setting for countably many compact spaces is developed in [8, Chapter 13]. Moreover, the given implementation is sequential. However, the proposed proof is for the specification of the program interpreted in the Scott model. At the time of writing, we are not able to apply our techniques to derive a correctness proof of the program for an interpretation of the specification in the sequential data language considered here.

Our use of sequence types (Nat → σ) can be easily replaced by lazy lists by applying the bisimulation techniques of [9] to prove the correctness of evident programs that implement the SFP property for lazy lists. There is no difficulty in developing the results of this paper in a call-by-value setting, and we believe we can also handle recursive types. But computational features such as state and control, and non-determinism and probability seem to pose genuine challenges.

In the presence of probability or of abstract data types for real numbers, types won’t be algebraic in general and hence a binary notion of finiteness, analogous to the way-below relation in classical domain theory, needs to be developed.

The avoidance of syntactic manipulations suggests that the theory worked out in this paper could be developed in a general axiomatic framework rather than just term models. In particular, this would make our results available to models that are not constructed from domain-theoretic or topological data, e.g. games models.

Acknowledgements. The impossibility of a constructive proof of Theorem 4.15 (Remark 4.17(2)) was found together with Vincent Danos during a visit to our institution. We also benefited from valuable feedback by Achim Jung, Paul B. Levy, Andy Pitts, Uday Reddy, Alex Simpson, Thomas Streicher and Steve Vickers.

References

[1] S. Abramsky, R. Jagadeesan, and P. Malacaria. Full abstraction for PCF. Inform. and Comput., 163(2):409–470, 2000.

[2] 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 of Oxford science publications, pages 1– 168. Clarendon Press, 1994.

[3] R.M. Amadio and P.-L. Curien. Domains and Lambda-Calculi. CUP, 1998.

[4] S. Awodey, L. Birkedal, and D.S. Scott. Local realizability toposes and a modal logic for computability. Math. Structures Comput. Sci., 12(3):319–334, 2002.

[5] M.J. Beeson. Foundations of Constructive Mathematics. Springer, 1985.

[6] U. Berger. Totale Objekte und Mengen in der Bereichstheorie. PhD thesis, Mathematisches Institut der Universität München, 1990.

[7] U. Berger. Computability and totality in domains. Math. Structures Comput. Sci., 12(3):281–294, 2002.

[8] M.H. Escardó. Synthetic topology of data types and classical spaces. Electron. Notes Theor. Comput. Sci., 87:21–156, 2004.

[9] A.D. Gordon. Bisimilarity as a theory of functional programming. Theoret. Comput. Sci., 228(1-2):5–47, 1999.

[10] C.A. Gunter. Semantics of Programming Languages—Structures and Techniques. The MIT Press, 1992.

[11] E. Hewitt. The rôle of compactness in analysis. Amer. Math. Monthly, 67:499–516, 1960.

[12] J. M. E. Hyland and C.-H. L. Ong. On full abstraction for PCF: I, II and III. Inform. and Comput., 163(2):285–408, 2000.

[13] A. Jung. Talk at the Workshop on Full abstraction of PCF and related Languages, BRICS institute, Aarhus, 1995.

[14] R. Loader. Finitary PCF is not decidable. Theoret. Comput. Sci., 266(1-2):341–364, 2001.

[15] I.A. Mason, S.F. Smith, and C.L. Talcott. From operational semantics to domain theory. Inform. and Comput., 128(1):26–47, 1996.

[16] R. Milner. Fully abstract models of typed λ-calculi. Theoret. Comput. Sci., 4(1):1–22, 1977.

[17] D. Normann. Computability over the partial continuous functionals. J. Symbolic Logic, 65(3):1133–1142, 2000.

[18] A.M. Pitts. A note on logical relations between semantics and syntax. Logic Journal of the Interest Group in Pure and Applied Logics, 5(4):589–601, July 1997.

[19] A.M. Pitts. Operationally-based theories of program equivalence. In Semantics and logics of computation (Cambridge, 1995), volume 14 of Publ. Newton Inst., pages 241–298. CUP, 1997.

[20] A.M. Pitts. Operational semantics and program equivalence. In G. Barthe, P. Dybjer, and J. Saraiva, editors, Applied Semantics, Advanced Lectures, volume 2395 of Lec. Not. Comput. Sci., Tutorial, pages 378–412. Springer, 2002.

[21] G.D. Plotkin. LCF considered as a programming language. Theoret. Comput. Sci., 5(1):223–255, 1977.

[22] G.D. Plotkin. Full abstraction, totality and PCF. Math. Structures Comput. Sci., 9(1):1–20, 1999.

[23] D.S. Scott. A type-theoretical alternative to CUCH, ISWIM and OWHY. Theoret. Comput. Sci., 121:411–440, 1993. Reprint of a 1969 manuscript.

[24] A. Simpson. Lazy functional algorithms for exact real functionals. Lec. Not. Comput. Sci., 1450:323–342, 1998.

[25] M.B. Smyth. Power domains and predicate transformers: a topological view. volume 154 of Lec. Not. Comput. Sci., pages 662–675, 1983.

[26] M.B. Smyth. Topology. In S. Abramsky, D.M. Gabbay, and T.S.E. Maibaum, editors, Handbook of Logic in Computer Science, volume 1 of Oxford science publications, pages 641–761. Clarendon Press, 1992.

[27] K. Weihrauch. Computable analysis. Springer, 2000.