215
A Foundation for Computation Keye Martin April 14, 2004

A Foundation for Computation · [a,b] v [c,d] ⇔ [c,d] ⊆ [a,b] is an ω-continuous dcpo. The supremum of a directed set S ⊆ IR is T S, while the approximation relation is characterized

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • A Foundation for Computation

    Keye Martin

    April 14, 2004

  • Contents

    1 Introduction 41.1 Domain Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1.1.1 Order . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.2 The Topological Aspect . . . . . . . . . . . . . . . . . 6

    1.2 Examples of Domains . . . . . . . . . . . . . . . . . . . . . . 71.2.1 The Interval Domain . . . . . . . . . . . . . . . . . . . 71.2.2 The Powerset of the Naturals . . . . . . . . . . . . . . 71.2.3 The Partial Functions on the Naturals . . . . . . . . . 81.2.4 The Cantor Set Model . . . . . . . . . . . . . . . . . . 81.2.5 The Domain of Lists . . . . . . . . . . . . . . . . . . . 91.2.6 The Upper Space . . . . . . . . . . . . . . . . . . . . . 101.2.7 The Formal Ball Model . . . . . . . . . . . . . . . . . 10

    1.3 Computational Intuitions Underlying Domain Theory . . . . 101.3.1 The Information Order . . . . . . . . . . . . . . . . . 111.3.2 Finite Approximation . . . . . . . . . . . . . . . . . . 111.3.3 Domains as Data Types . . . . . . . . . . . . . . . . . 121.3.4 Programs as Functions Between Domains . . . . . . . 12

    1.4 Notation and Conventions . . . . . . . . . . . . . . . . . . . . 13

    2 Measurement 142.1 Degree of Approximation . . . . . . . . . . . . . . . . . . . . 142.2 Information Content . . . . . . . . . . . . . . . . . . . . . . . 162.3 Information Content and Approximation . . . . . . . . . . . . 232.4 Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.5 Existence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.6 The Contraction Principle . . . . . . . . . . . . . . . . . . . . 392.7 Fixed Points of Nonmonotonic Maps . . . . . . . . . . . . . . 432.8 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    1

  • 3 The µ Topology on a Domain 473.1 The µ Topology . . . . . . . . . . . . . . . . . . . . . . . . . . 473.2 Mappings and Fixed Points . . . . . . . . . . . . . . . . . . . 533.3 The Measure of a Mapping on a Domain . . . . . . . . . . . . 59

    3.3.1 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . 603.3.2 Fixed Points . . . . . . . . . . . . . . . . . . . . . . . 613.3.3 Domain Theory and the Identity Map . . . . . . . . . 63

    3.4 Subdomains and Clopen Sets . . . . . . . . . . . . . . . . . . 653.5 Ideal Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843.7 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    4 Algorithms and Mappings Between Domains 864.1 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864.2 Iterative Operations . . . . . . . . . . . . . . . . . . . . . . . 894.3 Iteration on a Domain . . . . . . . . . . . . . . . . . . . . . . 974.4 Algorithm versus Function . . . . . . . . . . . . . . . . . . . . 1064.5 The Computable Functions on an Arithmetic Domain . . . . 1074.6 The Partial Recursive Functions . . . . . . . . . . . . . . . . 1094.7 The Primitive Recursive Functions . . . . . . . . . . . . . . . 1174.8 The Flat Recursive Functions . . . . . . . . . . . . . . . . . . 1234.9 Computability and the Information Order . . . . . . . . . . . 1244.10 The Influence of Measurement . . . . . . . . . . . . . . . . . . 1264.11 Closing Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 1274.12 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

    5 The Kernel as a Space 1305.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1305.2 Topological Background . . . . . . . . . . . . . . . . . . . . . 1315.3 The kernel as a Topological Space . . . . . . . . . . . . . . . 1335.4 Lebesgue Measurements . . . . . . . . . . . . . . . . . . . . . 1395.5 Complete Measurements . . . . . . . . . . . . . . . . . . . . . 1445.6 Existence of Complete Lebesgue Measurements . . . . . . . . 1505.7 Models of Spaces . . . . . . . . . . . . . . . . . . . . . . . . . 1525.8 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    6 Measurements on the Convex Powerdomain 1606.1 The Convex Powerdomain . . . . . . . . . . . . . . . . . . . . 1606.2 The Necessity of Lebesgue Measurements . . . . . . . . . . . 163

    2

  • 6.3 Contractions on the Convex Powerdomain . . . . . . . . . . . 1676.4 An Application to Fractals . . . . . . . . . . . . . . . . . . . . 1696.5 The Topological Completeness of Domains . . . . . . . . . . . 1736.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1756.7 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

    7 The Informatic Derivative 1787.1 Sets and Functions . . . . . . . . . . . . . . . . . . . . . . . . 1787.2 Limits and Continuity . . . . . . . . . . . . . . . . . . . . . . 1787.3 Derivatives of Real Valued Maps on Domains . . . . . . . . . 1807.4 Derivatives of Mappings Between Domains . . . . . . . . . . . 1827.5 The Analysis of Fixed Points . . . . . . . . . . . . . . . . . . 1917.6 Rates of Convergence . . . . . . . . . . . . . . . . . . . . . . . 1967.7 Orders of Convergence . . . . . . . . . . . . . . . . . . . . . . 2047.8 Affine Mappings on the Real Line . . . . . . . . . . . . . . . . 2107.9 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

    3

  • Chapter 1

    Introduction

    1.1 Domain Theory

    1.1.1 Order

    The reader unfamiliar with the basics of Domain theory will find [1] valuable.We touch on certain basic aspects which are not quoted very often.

    Definition 1.1.1 A partially ordered set (P,v) is a set P together with abinary relation v ⊆ P 2 which is

    (i) reflexive: ( ∀x ∈ P ) x v x,

    (ii) antisymmetric: ( ∀x, y ∈ P ) x v y & y v x ⇒ x = y, and

    (iii) transitive: ( ∀x, y, z ∈ P ) x v y & y v z ⇒ x v z.

    We refer to partially ordered sets as posets.

    Definition 1.1.2 A least element in a poset (P,v) is an element ⊥ ∈ Psuch that ⊥ v x for all x ∈ P . Such an element is unique and is called abottom element. An element x ∈ P is maximal if (∀y ∈ P ) x v y ⇒ x = y.The set of maximal elements in a poset is written maxP . Similarly, one hasthe notions of greatest element and minimal element.

    Definition 1.1.3 For a subset X of a poset (P,v), let

    ↑X = {y ∈ P : (∃x ∈ X) x v y} & ↓X = {y ∈ P : (∃x ∈ X) y v x}.

    We say that X is an upper set if X = ↑X and a lower set if X = ↓X.

    4

  • Definition 1.1.4 Let (P,v) be a poset. A nonempty subset S ⊆ P isdirected if (∀x, y ∈ S)(∃z ∈ S) x, y v z. The supremum of a subset S ⊆ P isthe least of all its upper bounds provided it exists. This is written

    ⊔S.

    A poset (P,v) is abbreviated to P , just as in topology, where one writes Xfor the topological space (X, τ).

    Definition 1.1.5 In a poset (P,v), a � x iff for all directed subsets S ⊆ Pwhich have a supremum,

    x v⊔

    S ⇒ (∃s ∈ S) a v s.

    We say that a is an approximation of x whenever a � x. The set of allapproximations of x is written ↓↓x. An element x ∈ P is compact if x � x.The set of compact elements in a poset P is written K(P ).

    Definition 1.1.6 A poset P is continuous if ↓↓x is directed with supremumx for all x ∈ P .

    It is usually easier to find a basis for a poset.

    Definition 1.1.7 A subset B of a poset P is a basis for P if B ∩↓↓x containsa directed subset with supremum x, for each x ∈ P .

    Lemma 1.1.1 A poset is continuous iff it has a basis.

    Definition 1.1.8 A poset is algebraic if its compact elements form a basis.A poset is ω-continuous if it has a countable basis.

    Continuity provides a definite notion of approximation for posets.

    Proposition 1.1.1 (Zhang [20]) Continuous posets have the interpolationproperty: x � y ⇒ (∃z) x � z � y.

    A useful form of completeness is offered by a dcpo.

    Definition 1.1.9 A poset is a dcpo if every directed subset has a supremum.

    Domains possess both approximation and completeness.

    Definition 1.1.10 A domain is a continuous poset which is also a dcpo. Adomain is also called a continuous dcpo.

    5

  • 1.1.2 The Topological Aspect

    One of the interesting things about a domain is that its order-theoreticstructure is rich enough to support the derivation of intrinsically definedtopologies. The most well-known of these is the Scott topology.

    Definition 1.1.11 A subset U of a poset P is Scott open if

    (i) U is an upper set: x ∈ U & x v y ⇒ y ∈ U , and

    (ii) U is inaccessible by directed suprema: For every directed S ⊆ P whichhas a supremum, ⊔

    S ∈ U ⇒ S ∩ U 6= ∅.

    The collection of all Scott open sets on P is called the Scott topology. It isdenoted σP .

    Unless explicitly stated otherwise, all topological statements about posetsare made with respect to the Scott topology.

    Proposition 1.1.2 A function f : P → Q between posets is continuous iff

    (i) f is monotone: x v y ⇒ f(x) v f(y).

    (ii) f preserves directed suprema: For every directed S ⊆ P which has asupremum, ⊔

    f(S) exists & f (⊔

    S ) =⊔

    f (S ).

    Proposition 1.1.3 (Zhang [20]) The collection { ↑↑x : x ∈ P } is a basisfor the Scott topology on a continuous poset P .

    One of the most important topological results concerning the Scott topologyon a domain is the following.

    Theorem 1.1.1 (Hofmann-Mislove) In a continuous dcpo, the class ofnonempty compact upper sets is closed under filtered intersections.

    This is called the Hofmann-Mislove theorem.

    Definition 1.1.12 The Lawson topology on a continuous poset P has as abasis all sets of the form ↑↑x \↑F where x ∈ P and F ⊆ P is finite.

    6

  • Proposition 1.1.4 (Jung [13]) The Lawson topology on a continuous dcpois compact iff it is Scott compact and the intersection of any two Scott com-pact upper sets is Scott compact.

    Definition 1.1.13 A Scott domain is a continuous dcpo with least element⊥ in which each pair of elements bounded from above has a supremum.

    Notice that we have not required Scott domains to be ω-algebraic.

    Proposition 1.1.5 Every Scott domain has compact Lawson topology.

    1.2 Examples of Domains

    This section discusses some domains we will refer to on a regular basis.

    1.2.1 The Interval Domain

    The collection of compact intervals of the real line

    IR = {[a, b] : a, b ∈ R & a ≤ b}

    ordered under reverse inclusion

    [a, b] v [c, d] ⇔ [c, d] ⊆ [a, b]

    is an ω-continuous dcpo. The supremum of a directed set S ⊆ IR is⋂

    S,while the approximation relation is characterized by I � J ⇔ J ⊆ int(I).A countable basis for IR is given by {[p, q] : p, q ∈ Q & p ≤ q}.

    1.2.2 The Powerset of the Naturals

    The collection of subsets

    Pω = {x : x ⊆ N}

    ordered under inclusionx v y ⇔ x ⊆ y

    is an ω-algebraic dcpo. The supremum of a directed set S ⊆ Pω is⋃

    S andthe approximation relation is x � y ⇔ x ⊆ y & x is finite.

    7

  • 1.2.3 The Partial Functions on the Naturals

    Definition 1.2.1 A partial function f : X → Y between sets X and Y isa function f : A → Y defined on a subset A ⊆ X. We write dom f = A forthe domain of a partial map f : X → Y .

    The set of partial mappings from N to N

    [N → N] = { f | f : N → N is a partial map }

    becomes an ω-algebraic dcpo when ordered by extension

    f v g ⇔ dom f ⊆ dom g & f = g on dom f.

    The supremum of a directed set S ⊆ [N → N] is⋃

    S, under the view thatfunctions are certain subsets of N× N, while the approximation relation is

    f � g ⇔ f v g & dom f is finite.

    1.2.4 The Cantor Set Model

    The collection of functions

    Σ∞ = { s | s : {1, . . . , n} → {0, 1}, 0 ≤ n ≤ ∞ }

    is also an ω-algebraic dcpo under the extension order

    s v t ⇔ |s| ≤ |t| & ( ∀ i ≤ |s| ) s(i) = t(i),

    where |s| is written for the cardinality of doms. The supremum of a directedset S ⊆ Σ∞ is

    ⋃S, while the approximation relation is

    s � t ⇔ s v t & |s| < ∞.

    The extension order in this special case is usually called the prefix order.The elements s ∈ Σ∞ are called strings over {0, 1}. The quantity |s| iscalled the length of a string s. The empty string ε is the unique string withlength zero. It is the least element ⊥ of Σ∞.

    8

  • 1.2.5 The Domain of Lists

    Let S be a set which carries an intrinsic partial order ≤.

    Definition 1.2.2 A list over S is a function x : {1, ..., n} → S, for n ≥ 0.The length of a list x is |dom x|. The set of all (finite) lists over S is [S]. Alist x is sorted if x is monotone as a map between posets.

    A list x can be written as [x(1), ..., x(n)], where the empty list (the list oflength 0) is written [ ]. We also write lists as a :: x, where a ∈ S is thefirst element of the list a :: x, and x ∈ [S] is the rest of the list a :: x. Forexample, the list [1, 2, 3] is written 1 :: [2, 3].

    Definition 1.2.3 A set K ⊆ N is convex if a, b ∈ K & a ≤ x ≤ b ⇒ x ∈ K.Given a finite set K ⊆ N, the map

    scale(K) : {1, ..., |K|} → K

    scale(K)(i) = min K + i− 1

    relabels the elements of K so that they begin with one.

    Definition 1.2.4 For x, y ∈ [S], x is a sublist of y iff there is a convexsubset K ⊆ {1, . . . , length y} such that y ◦ scale K = x.

    Example 1.2.1 If L = [1, 2, 3, 4, 5, 6], then [1, 2, 3], [4, 5, 6], [3, 4, 5], [2, 3, 4],[3, 4], [5] and [ ] are all sublists of L. However, [1, 4, 5, 6], [1, 3] and [2, 4] arenot sublists of L.

    We will see an easy way to prove the following in Section 2.2.

    Lemma 1.2.1 The finite lists [S] over a set S, ordered by

    x v y ⇔ y is a sublist of x,

    form an algebraic dcpo with [S] = K([S]). Thus, [S] is ω-continuous iff Sis countable.

    Often lists are ordered by either the prefix order or the postfix order. How-ever, this is not adequate for describing algorithms which manipulate lists.

    Consider the binary search of a sorted list L for a key k. To model thebehavior of this algorithm, we must have an order which allows for the fact

    9

  • that sometimes binary search will check the left sublist of L for k, while othertimes it will search the right sublist of L. Using the prefix order, we cannotmodel the case when it searches the right sublist; using the postfix order, wecannot model the searching of the left sublist. Other basic examples showthat the full sublist order is required.

    Given that one must then use the sublist order, there is still the questionof why we use the reverse sublist order. This will be clear in Chapter 4.

    1.2.6 The Upper Space

    If X is a locally compact Hausdorff space, its upper space

    UX = {∅ 6= K ⊆ X : K is compact}

    ordered under reverse inclusion

    A v B ⇔ B ⊆ A

    is a continuous dcpo. The supremum of a directed set S ⊆ UX is⋂

    S andthe approximation relation is A � B ⇔ B ⊆ int(A).

    1.2.7 The Formal Ball Model

    Given a metric space (X, d), the formal ball model [7]

    BX = X × [0,∞)

    is a poset when ordered via

    (x, r) v (y, s) ⇔ d(x, y) ≤ r − s.

    The approximation relation is characterized by

    (x, r) � (y, s) ⇔ d(x, y) < r − s.

    The poset BX is continuous. However, BX is a dcpo iff the metric d iscomplete. Finally, BX has a countable basis iff X is a separable metricspace.

    1.3 Computational Intuitions Underlying DomainTheory

    In this section we want to discuss some basic philosophy, ideas and phraseswe are likely to use in the course of this work that we wish to be reasonablyclear about.

    10

  • 1.3.1 The Information Order

    The phrase “information order” refers to the idea that the objects of adomain are being interpreted as information. In this way, the partial orderv then becomes an ordering of information:

    x v y ⇒ y is at least as informative as x.

    A maximal element can then be viewed as being ideal information, while anonmaximal is usually termed partial information. Ideal refers to somethingwe usually approximate to arbitrary high levels of accuracy; For example, theintegral of some function with an unknown antiderivative using Simpson’srule. Partial information, on the other hand, usually refers to things we canrepresent in perfect form on a machine, such as an integer, a truth value, ora character from the alphabet.

    On the interval domain IR, consider the problem of computing the uniquezero of

    f(x) = x3 − x + 1.

    Let us call this zero r. According to the order on IR, [r − 1, r + 1] v [r], so[r] ought to be more informative than [r − 1, r + 1]. This of course is true.In general, we can see that if x v y, then y is at least as informative as x, byexamining the lengths of the intervals. What is interesting here, however, isthat the converse need not hold.

    The interval [r− 3/2, r +1/4] is more informative than [r− 1, r +1] sinceit has smaller length. However, as members of IR, they are incomparable.Thus, this idea of an information order is not an equivalence, merely an im-plication. Essentially, this accounts for the myth that everything of intereston a domain is monotone.

    1.3.2 Finite Approximation

    Any object regarded a finite approximation must have a representationwhich is finite in nature that may be manipulated by finitary means. Forexample, a list with 51 integers qualifies. However, there are also infiniteobjects which work equally well: Though there is nothing finite about anontrivial interval with rational endpoints, it may be represented and ma-nipulated in a finite manner as a pair of rationals. Objects with such finitestructure we think of as forming the basis for a domain. As the intervalexample shows, such a domain need not be algebraic.

    11

  • We compute an ideal object x by computing a sequence (xn) of finiteapproximations whose limit is x. A few examples will help illustrate this.Any interval in IR may be computed as the limit of a sequence of intervalswith rational endpoints; Any function in [N → N] is the limit of a sequenceof partial functions whose domains are finite; Any string in Σ∞ is the limitof a sequence of finite strings.

    1.3.3 Domains as Data Types

    A data type is a set of values and a set of operations on those values.They provide a means for classifying the objects we compute with so thatcompilers can ensure programs make a minimal amount of sense. For us, adomain will either serve to approximate the members of an idealized datatype which lies along the top (that is, as a collection of maximal elements),or it will be viewed as a single data type by itself. An example of the formeris IR, while for the latter we can take [S].

    1.3.4 Programs as Functions Between Domains

    Well this makes enough sense. If a data type is a domain, why can’t aprogram be a function between domains? Things are far from being thissimple. Ultimately, it is simply dishonest to say that a program is a func-tion between domains. An algorithm is more than just a function betweendomains.

    For example, mergesort, quicksort and bubble sort all define the samefunction on the domain of lists,

    sort : [S ] → [S ],

    whose input is a list and whose output is the list sorted. However, they areall different algorithms.

    An algorithm is primarily concerned with how we get from an input toan output. Little else really matters. This is the reason for complexityanalysis: Some algorithms get from input to output in a better way thando others. We see from this that special attention must be given to howmappings between domains are constructed. This is something we will beconcerned with. However, it seems honest enough to say that a functionon a domain represents an algorithm, with representation coming in variousdegrees!

    12

  • 1.4 Notation and Conventions

    Definition 1.4.1 A splitting on a poset P is a function s : P → P withx v sx for all x ∈ P.

    Throughout, we adopt the following conventions:

    • P is either a poset or a continuous poset but the letters D and E arereserved for continuous dcpo’s only.

    • The order dual of a poset P is written P ∗. Its order is the one oppositeto P :

    x vP ∗ y ⇔ y vP x.

    In particular, [0,∞)∗ denotes the nonnegative reals in their oppositeorder. Observe then that a function µ : P → [0,∞)∗ is monotone iffx v y ⇒ µx ≥ µy where ≥ is the usual ordering on [0,∞).

    • For a function µ : P → [0,∞)∗, ker µ = {x ∈ P : µx = 0}. This iscalled the kernel of µ.

    • The elements of any set X may be given the flat order: x v y ⇔ x = y.We sometimes denote the poset which results by X[.

    • If f : X → X is a function on a set X, its set of fixed points isfix(f) = {x ∈ X : f(x) = x}.

    • N := {0, 1, 2, · · ·} is the set of nonnegative integers.

    • Q is the set of rational numbers.

    13

  • Chapter 2

    Measurement

    The first thing we have to do is develop the notion of “information content”for objects in a domain. By this we mean the assignment of an abstractvalue to each object, which allows for the distinction of comparable objects,and is based on a single defining characteristic that all members of thedomain possess. For example, the domain of a partial function, or thelength of an interval. Any mapping which assigns such a value to elementsof a domain could easily be called a measurement, as in “a measure ofinformation content.” However, this term will be reserved for the case wheninformation content is expressible as a nonnegative real number. This is anaspect that will be motivated both theoretically and practically, as strictadherence to either viewpoint is unsettling.

    We will also address the issue of existence of measurements, by showingthat they exist on any ω-continuous dcpo. Of course, such a result is onlyincluded to reassure the reader that the idea is sufficiently general. The realproof of its usefulness lies in particular cases, where it is not the fact thata measurement exists, but that the obvious and useful choice is in fact ameasurement. This is fundamental to the theory: Measurements are easyto spot, and very little effort is required to verify that a given mapping is ameasurement. Such a question gets right to the heart of the applicability ofa suggested theory, and should always be a top priority.

    2.1 Degree of Approximation

    In Domain theory, one studies domains, objects which possess a notion ofapproximation and convergence, but have no degree of approximation. What

    14

  • good is a notion of approximation if we do not have a mechanism for mea-suring how close we are to the ideal?

    Degree of approximation is an idea made necessary by the prototypi-cal test for the termination of an iterative process. Here we compute, towithin ε > 0 accuracy, an ideal element r, by calculating a sequence of finiteapproximations (xn), according to the following algorithm:

    n := 0;repeat

    n := n + 1;compute xn;

    until µxn < ε;

    where µx ≥ 0 is a number expressing the degree to which x approximates r.In particular, µr = 0.

    Such a test should be reliable, in the sense that, the smaller µxn is, themore accurately xn approximates r.

    Example 2.1.1 Consider the domain D = N[∪{∞}, where one first ordersN flatly, and then adjoins a top element ∞. Define a map µ : D → [0,∞)∗by

    µx ={

    1/2x if x ∈ N;0 if x = ∞.

    Setting xn = n for n ≥ 1, we see that the algorithm above will give nonsen-sical results in the computation of r = ∞, irrespective of the accuracy ε > 0imposed: No matter how small we require µxn, we are no closer to ∞ thanwe began. That is, µ does not provide a reliable test for the termination ofthe iterative process (xn).

    The problem in Example 2.1.1 is not with the domain D. Instead, it lieswith the manner in which we have tried to measure the information contentof its objects. We have measured the elements N[ as being increasingly moreinformative, when in reality, they are all equally informative.

    The correct way to measure N[ ∪ {∞} is with µ : N[ ∪ {∞} → [0,∞)∗,given by

    µx ={

    1 if x ∈ N;0 if x = ∞.

    Using this definition of µ, we only get close to ∞ in measure if we haveactually computed it, which is what we expect of a domain whose nature isdiscrete.

    15

  • Notice that the desire for a reliable termination test has forced us to askabout the correct way to measure the amount of information each objectcontains. Of course, Example 2.1.1 does little to elucidate the differencebetween a mapping that expresses information content, and one which ismerely Scott continuous.

    To gain real insight into the problem, consider the interval domain IRand the mapping µ : IR → [0,∞)∗ which assigns to each interval its length.In this case, there is a delicate mathematical reason that the test for ter-mination is reliable. When one chooses ε > 0, they are implicitly fixing aninterval [r − ε, r + ε] � [r], and relying on the fact that

    µxn < ε & xn v [r] ⇒ [r − ε, r + ε] � xn.

    It is this implication which guarantees that intervals containing r becomeincreasingly more accurate as their measures get smaller.

    In fact, even more is true: Given any I � [r], there is an ε > 0 such thatx v [r] and µx < ε together imply I � x.

    In the case of a poset P and a monotone map µ : P → [0,∞)∗, we cansee this implication amounts to saying that for all Scott open sets U ⊆ P ,

    r ∈ U ⇒ ( ∃ ε > 0 ) µε(r) ⊆ U,

    where µε(r) = {x ∈ P : x v r & µx < ε} and µr = 0. As is easily seen, thiscondition also explains the difference between the two maps considered onN[ ∪ {∞}.

    We will take this condition as being the formalization of when a mappingµ provides a reliable termination test for an iterative process on P whichcomputes r. Essentially, the axiom on which the present work rests is thefollowing: Any mapping which provides a reliable termination test for all ofthe iterative processes (xn) capable of computing r must as a consequencemeasure the information content of the objects (xn) relative to r.

    2.2 Information Content

    We begin with a poset P and a domain E.

    Definition 2.2.1 If µ : P → E is a monotone map between a poset and adomain, we set

    µε(x) := { y ∈ P : y v x & ε � µy },

    for all x ∈ P and ε ∈ E.

    16

  • Observe that x ∈ µε(x) ⇔ µε(x) 6= ∅, and y ∈ µε(x) ⇒ y ∈ µε(y) ⊆ µε(x),for all x, y ∈ P and ε ∈ E.

    Lemma 2.2.1 For a monotone map µ : P → E and any subset X ⊆ P ,

    { µε(x) : x ∈ ↓X, ε ∈ E }

    is a basis for a topology on ↓X which we will denote by µX.

    proof This lemma holds even if E is only a continuous poset. First letx ∈ ↓X. By the continuity of E, ∃ ε � µx. Then x ∈ µε(x) ⊆ ↓X. Thisshows that every point of the space is contained in some µε(x). Second,suppose z ∈ µε(x) ∩ µδ(y). Then ε, δ � µz. Using the directedness of ↓↓µz,∃ α � µz with ε, δ v α. This gives z ∈ µα(z) ⊆ µε(x)∩ µδ(y), which provesthe claim. 2

    Definition 2.2.2 A monotone map µ : P → E from a poset to a domaininduces the Scott topology near X ⊆ P provided that

    ( ∀ U ∈ σP )( ∃ V ∈ µX )( U ∩X ⊆ V ⊆ U ).

    We write this as µ → σX . We say µ induces the Scott topology everywhereif µ → σP .

    We think of the set X as containing objects we’d like to compute withiterative processes on P . In accordance with the first section, µ → σXmeans the mapping µ provides a reliable termination test for these iterativeprocesses.

    Lemma 2.2.2 For a monotone map µ : P → E and a subset X ⊆ P , thefollowing are equivalent:

    (i) The mapping µ induces the Scott topology near X.

    (ii) (∀ U ∈ σP )(∀x ∈ X) x ∈ U ⇒ ( ∃ ε ∈ E ) x ∈ µε(x) ⊆ U .

    proof (i) ⇒ (ii): Let U be a Scott open set around x ∈ X. Then, by (i),we know that (∃ V ∈ µX) U ∩X ⊆ V ⊆ U. Since x ∈ V, ∃ y ∈↓X and ε ∈ Esuch that x ∈ µε(y) ⊆ V . Then x ∈ µε(x) ⊆ µε(y). (ii) ⇒ (i): Again let Ube a Scott open set. Using (ii), ∀x ∈ U ∩ X, (∃ µεx(x)) x ∈ µεx(x) ⊆ U .Setting V :=

    ⋃µεx(x) finishes the proof. 2

    The case E = [0,∞)∗ is of particular interest to us.

    17

  • Corollary 2.2.1 If µ : P → [0,∞)∗ is a monotone map and X ⊆ P , thefollowing are equivalent:

    (i) The mapping µ induces the Scott topology near X.

    (ii) For all Scott open sets U ⊆ P and for all x ∈ X, if x ∈ U , then

    (∃ δ > 0 ) a v x & |µx− µa| < δ ⇒ a ∈ U.

    proof The nonnegative reals [0,∞)∗ is a domain in its dual order

    x v y ⇔ x ≥ y & x � y ⇔ x > y,

    where the symbols ≥ and > refer to the usual orders on [0,∞). Then forany x ∈ P and ε ≥ 0, we see that

    µε(x) = {y ∈ P : y v x & ε � µy} = {y ∈ P : y v x & µy < ε}.

    For (i) ⇒ (ii), set δ = ε− µx > 0. For (ii) ⇒ (i), set ε = µx + δ > 0 2

    Corollary 2.2.1 says that µ induces the Scott topology near X if, whenevera point x ∈ X lies in a Scott open set U, all points sufficiently close to x liein U, where “sufficiently close” is made precise by the map µ. Hence, theScott open sets in this case can be compared to open sets in a metric space.

    Example 2.2.1 The collection of compact intervals of the real line

    IR = { [a, b] : a, b ∈ R & a ≤ b }

    ordered under reverse inclusion is a poset and the length function

    µ : IR → [0,∞)∗

    µ[a, b] = b− ais monotone. The mapping µ induces the Scott topology everywhere on IR.Let U ⊆ IR be a Scott open set around [a, b]. It is easy to see that⊔

    n≥1[a− 1/n, b + 1/n] = [a, b]

    and since U is Scott open, [a− 1/n, b + 1/n] ∈ U, for some n. Finally,

    x̄ v [a, b] & |µx̄− µ[a, b]| < 1/n ⇒ [a− 1/n, b + 1/n] v x̄⇒ x̄ ∈ U,

    which finishes the proof. Note that ker µ = {[x] : x ∈ R} = max IR.

    18

  • However, information content is not always most naturally expressed as areal number.

    Example 2.2.2 The set of partial functions

    [N → N] = { f | f : N → N is a partial function }

    when ordered by extension

    f v g ⇔ dom f ⊆ dom g & f = g on dom f

    becomes a poset, where dom denotes the monotone function

    dom : [N → N] → Pω

    dom f = { x ∈ N : f is defined at x }.

    The mapping dom induces the Scott topology everywhere. Let U ⊆ [N → N]be a Scott open set around f ∈ [N → N]. The set dom f is countable, so wecan write

    dom f =⋃

    Xn

    where (Xn) is an increasing sequence of finite sets. Now let fn be therestriction of f to Xn. It is clear that⊔

    fn = f,

    and since U is Scott open, fn ∈ U, for some n. Let ε = dom fn. Then

    f ∈ domε(f) = {g : g v f & ε � dom g},

    since ε is a finite set (so compact in Pω), and

    g ∈ domε(f) ⇒ ε � dom g & g v f⇒ fn v g⇒ g ∈ U,

    which proves that dom → σ[N→N]. Finally, just like the previous example,we have dom f ∈ max Pω iff f ∈ max [N → N].

    Because of examples like the last one, it is useful to know that such mapscompose.

    19

  • Lemma 2.2.3 (Composition) Suppose that µ : P → E and λ : E → Fare monotone maps with µ → σX and λ → σY . If µ(X) ⊆ Y , then λµ → σX .

    proof Let U ⊆ P be a Scott open set around x ∈ X. Then there is an ε ∈ Ewith x ∈ µε(x) ⊆ U . But µx ∈ Y and µx ∈ ↑↑ε, so

    ( ∃ δ ∈ F ) µx ∈ λδ(µx) ⊆ ↑↑ε.

    We claim that x ∈ (λµ)δ(x) ⊆ U . First, δ � λ(µx), so x ∈ (λµ)δ(x). Next,

    y ∈ (λµ)δ(x) ⇒ µy v µx & δ � λ(µy) ⇒ µy ∈ λδ(µx) ⊆ ↑↑ε,

    which gives y ∈ µε(x) ⊆ U. Thus, x ∈ (λµ)δ(x) ⊆ U. 2

    The following lemma asserts the reflection of suprema.

    Lemma 2.2.4 Suppose µ : P → E is monotone and that µ → σX . If S ⊆ Phas a directed image µ(S) and there is an x ∈ X such that

    (i) x is an upper bound for S, and

    (ii) µx =⊔

    µ(S),

    then⊔

    S = x.

    proof Let u be an upper bound of S and consider a Scott open set U aroundx. Since µ → σX , ∃ ε ∈ E such that x ∈ µε(x) ⊆ U . Now

    ε � µx =⊔

    µ(S),

    so ∃ s ∈ S with ε � µs. Then s ∈ µε(x) ⊆ U . Because s v u and U is anupper set, we have u ∈ U . Thus, every open set containing x also containsu, which shows that x v u. Hence,

    ⊔S = x. 2

    The next lemma yields the strict monotonicity of µ on X.

    Lemma 2.2.5 If µ : P → E is monotone and µ → σX , then

    ( ∀ x ∈ P )( ∀ y ∈ X ) x v y & µx = µy ⇒ x = y.

    proof Suppose µx = µy and that U is a Scott open set around y. Then∃ ε ∈ E such that y ∈ µε(y) ⊆ U . Since x v y and ε � µx = µy,x ∈ µε(y) ⊆ U . Then every Scott open set containing y also contains x soy v x. 2

    20

  • Corollary 2.2.2 If µ : P → E is monotone and µ → σP , then

    ( ∀x ∈ P ) µx ∈ max E ⇒ x ∈ max P

    proof Let x v y and µx ∈ max E. By monotonicity of µ, µx v µy, and bymaximality of µx, µx = µy. But now the strict monotonicity of µ given inLemma 2.2.5 yields x = y. 2

    Proposition 2.2.1 Suppose that µ : Q → E is continuous and µ → σQ.Then for a function f : P → Q between posets, the following are equivalent:

    (i) f is Scott continuous.

    (ii) f is monotone and µf is Scott continuous.

    proof (ii) ⇒ (i): Let S ⊆ P be a directed set which has a supremum. Firstof all, x := f(

    ⊔S) is an upper bound for the directed set f(S), since f is

    monotone. Since µf is continuous,

    µx = µf(⊔

    S) =⊔

    µ(f(S)).

    Since µ reflects suprema, we know not only that⊔

    f(S) exists, but that thissupremum is equal to x = f(

    ⊔S). 2

    The ideas presented thus far lead to a methodical approach for proving thata poset is a domain.

    Theorem 2.2.1 Suppose that µ : P → [0,∞)∗ is monotone and also strictlymonotone: x v y & µx = µy ⇒ x = y. If every increasing sequence in Phas a supremum preserved by µ, then

    (i) P is a dcpo,

    (ii) µ is Scott continuous as a map between dcpo’s,

    (iii) Every directed subset S ⊆ P contains an increasing sequence whosesupremum is

    ⊔S,

    (iv) For all x, y ∈ P, x � y iff for every increasing sequence (xn) in P ,

    y v⊔

    xn ⇒ (∃n) x v xn.

    21

  • (v) For all x ∈ P , ↓↓x is directed with supremum x iff it contains an in-creasing sequence with supremum x.

    proof Let S be a directed subset of P and set u = inf{µs : s ∈ S}. Define anincreasing sequence (an) in S according to the following rule: First, choosea1 ∈ S with u ≤ µa1 < u + 1; Next, given an ∈ S with u ≤ µan < u + 1/n,there is bn+1 ∈ S with u ≤ µbn+1 < u + 1/(n + 1), so by the directednessof S, choose an+1 ∈ S with an, bn+1 v an+1. The sequence is increasing soit has a supremum x =

    ⊔an. We claim that x =

    ⊔S. Let s ∈ S. Now

    define a sequence (cn) in S by choosing c1 ∈ S with s, a1 v c1 and givencn ∈ S, choose cn+1 ∈ S with an+1, cn v cn+1. Then (cn) is increasing solet c =

    ⊔cn. Now c is an upper bound for (an), which gives x v c, while

    u ≤ µcn ≤ µan < u + 1/n implies that

    µx = µ(⊔

    an) = limn→∞

    µan = limn→∞

    µcn = µ(⊔

    cn) = µc,

    using the assumption that µ preserves sups of increasing sequences. But µis strictly monotone on P , so we have x = c. Thus, s v c1 v c = x. Thisproves that x is an upper bound for S. However, any upper bound for S isan upper bound for (an), and so must be above x. Hence,

    ⊔S = x. (iii) is

    now immediate. For (ii),

    µ(⊔

    S) = µ(⊔

    an) = limn→∞

    µan = u = inf{µs : s ∈ S}.

    The proof of (iv) follows from (iii). For (v), the direction (⇒) is easy using(iii). For the other direction of (v) one can use Proposition 2.2.4 of [1]. 2

    This result holds if [0,∞)∗ is replaced with any first countable domain E.

    Example 2.2.3 If µ : P → N∗ is strictly monotone on a poset P , then

    (i) The map µ induces the Scott topology everywhere, and

    (ii) P is an algebraic domain with K(P ) = P .

    For (i), if U ⊆ P is a Scott open set around x ∈ P , then

    a v x & µx ≤ µa < µx + 1 ⇒ a = x,

    which means x ∈ µ(µx+1)(x) = {x} ⊆ U . Thus, µ → σP . For (ii), µ mapsinto N∗, so every increasing sequence of distinct elements in P is finite. NowTheorem 2.2.1 applies.

    22

  • Domains like this arise when one orders the members of a recursivelydefined data type according to substructures. For example, on the domainof lists [S], the mapping

    len : [S] → N∗

    len L ={

    0 if L = [ ],1 + len rest L otherwise,

    where rest : [S] → [S] is given by

    rest L ={

    [ ] if L = [ ],x if L = a :: x,

    is strictly monotone so len → σ[S]. Once again, len L = 0 ⇔ L ∈ max [S].

    Theorem 2.2.1 can actually be applied to most of the domains we will con-sider. It will be of use to us in Chapter 8.

    2.3 Information Content and Approximation

    We now assume that P is a continuous poset.

    Lemma 2.3.1 Let P be a continuous poset with basis B. If µ : P → E ismonotone and X ⊆ P , then the following are equivalent:

    (i) The mapping µ induces the Scott topology near X.

    (ii) ( ∀ b ∈ B )( ∀ x ∈ X ) x ∈ ↑↑b ⇒ ( ∃ ε ∈ E ) x ∈ µε(x) ⊆ ↑↑b.

    proof (i) ⇒ (ii) holds because the sets ↑↑b are Scott open in a continuousposet. (ii) ⇒ (i): B ⊆ P is a basis iff B ∩ ↓↓x contains a directed subsetwith supremum x, for all x ∈ P. Then if U is a Scott open set aroundx ∈ X, there is b ∈ B ∩ ↓↓x such that b ∈ U . By (ii), there is ε ∈ E withx ∈ µε(x) ⊆ ↑↑b ⊆ U. 2

    The theory on continuous posets is fundamentally different from the one onposets. The next proposition reveals why.

    Proposition 2.3.1 If P is a continuous poset, then for an upper set U ,

    U ∈ σP ⇔ ( ∀ x ∈ U )( ∃ a � x ) ↑↑a ∩ ↓x ⊆ U.

    In fact, { ↑(↑↑x ∩ ↓y) : x, y ∈ P } is a basis for σP .

    23

  • proof For the first part, the (⇒) direction holds because⊔↓↓x = x in

    a continuous poset, while (⇐) holds because continuous posets have theinterpolation property. For the second part, let V be any Scott open setand W be any lower set. We will prove that the upper set ↑(V ∩W ) is infact Scott open. Let S ⊆ P be a directed subset with

    ⊔S ∈↑(V ∩W ). Then

    ∃ y ∈ V ∩W with y v⊔

    S. Since V is open, ∃ z � y & z ∈ V . Then forsome s ∈ S, z v s. Since W is a lower set, z ∈ V ∩W , which proves thatsome s ∈ S hits ↑(V ∩W ). This proves that we have a Scott open set. 2

    Corollary 2.3.1 The identity map on a domain induces the Scott topologyeverywhere.

    Theorem 2.3.1 If µ : P → E is Scott continuous and µ → σX , then

    { ↑µε(x) ∩X : x ∈ X, ε ∈ E }

    is a basis for the Scott topology on X.

    proof The continuity of µ and Proposition 2.3.1 imply that

    ↑µε(x) = ↑( µ-1(↑↑ε) ∩ ↓x )

    is Scott open in P . In the other direction, if U ⊆ P is a Scott open setaround x ∈ X, then using µ → σX , we see

    x ∈ U ⇒ ( ∃ ε ∈ E ) x ∈ µε(x) ⊆ U⇒ x ∈ ↑µε(x) ⊆ U⇒ x ∈ ↑µε(x) ∩X ⊆ U ∩X.

    Finally, only now is it clear that the sets in question must form a basis for atopology on X, which, by the remarks above, must be the Scott topology. 2

    Corollary 2.3.2 If µ : P → E is continuous and µ → σX , then

    (i) For all V ∈ µX , ↑V is Scott open in P .

    (ii) For all x ∈ X and y ∈ P, y � x ⇔ ( ∃ ε ∈ E ) x ∈ µε(x) ⊆ ↑y.

    proof (i) The upper set of a union is the union of the upper sets. V isthe union of sets whose upper sets are Scott open. (ii) (⇒): ↑↑y is a Scottopen set around x. (⇐): Then x ∈ ↑µε(x) ⊆ ↑y and ↑µε(x) is Scott open. 2

    The next corollary confirms the fact that we do not approximate compactelements; Rather, we compute them exactly.

    24

  • Corollary 2.3.3 If µ : P → E is continuous and µ → σX , then for x ∈ X,the following are equivalent:

    (i) The element x is compact in P , that is, x ∈ K(P ).

    (ii) There is an ε ∈ E with µε(x) = {x}.

    (iii) The set {x} is open in the µX topology.

    proof (i) ⇒ (ii): By the characterization of �, (∃ ε ∈ E) x ∈ µε(x) ⊆ ↑x.But then we must have µε(x) = {x}. (ii) ⇒ (iii): µε(x) = {x} is a basicopen set in the µX topology. (iii) ⇒ (i): The upper set of any µX -open setis Scott open. Then ↑x is Scott open, i.e., x is compact in P . 2

    Proposition 2.3.2 If µ : P → E is continuous and µ → σX , then x ∈ Xis the supremum of an increasing sequence of approximations in P providedthe same is true of µx.

    proof Let S ⊆ P be a directed set with x =⊔

    S ∈ X. We will find anincreasing sequence in S whose supremum is x. First write µx =

    ⊔en,

    where en � µx, and (en) is increasing. By the continuity of µ,

    en � µx = µ(⊔

    S) =⊔{ µs : s ∈ S }.

    Then (∃a1 ∈ S)e1 v µa1. Given an ∈ S with en v µan, first choose bn+1 ∈ Swith en+1 v µbn+1, and then by the directedness of S,

    ( ∃ an+1 ∈ S ) an, bn+1 v an+1.

    Then (an) in S is increasing and satisfies en v µan, for all n. But an v x forall n, so

    ⊔µan = µx. By Lemma 2.2.4,

    ⊔an = x. Finally, P is a continuous

    poset, so taking S = ↓↓x finishes the proof. 2

    Proposition 2.3.3 If µ : P → E is continuous and µ → σX , then

    ( ∀x ∈ X ) µx ∈ K(E) ⇒ x ∈ K(P ).

    proof Suppose that x =⊔

    S, for a directed set S ⊆ P . Then µx =⊔

    µ(S).The compactness of µx means (∃s ∈ S) µx v µs. However, s v x, so wemust have µx = µs. By the strictness of µ, s v x & µx = µs ⇒ x = s.Consequently, x ∈ S. Since P is a continuous poset, taking S = ↓↓x provesthat x � x, i.e, x is compact. 2

    The results on continuous posets need not hold for posets in general.

    25

  • Example 2.3.1 Let P = {an : n ≥ 1} ∪ {bn : n ≥ 1} ∪ {∞} where (an)and (bn) are distinct copies of N ordered so that the supremum of each is∞. Define µ : P → [0,∞)∗ by µ∞ = 0, µan = µbn = 1/2n, n ≥ 1. Then

    (i) µ is Scott continuous and µ → σP ,

    (ii) P is a dcpo which is not continuous,

    (ii) µ1(a1) = {a1} but a1 is not compact in P ,

    (iii) ↑µ1(a1) = {an : n ≥ 1} ∪ {∞} is not Scott open in P ,

    (iv) µa1 = 1/2 ∈ K(Im µ) but a1 /∈ K(P ).

    We prove µ → σP . If U ⊆ P is Scott open and ∞ ∈ U , then there is K ≥ 1with an, bn ∈ U for all n ≥ K. Then ∞ ∈ µ1/2K (∞) ⊆ U. The other casesare simple, because the elements an and bn can be isolated with µ: Forn ≥ 0, µ1/2n(an+1) = {an+1} and µ1/2n(bn+1) = {bn+1}.

    On a continuous poset, sometimes directedness is also reflected.

    Lemma 2.3.2 Suppose µ : P → E is monotone on a continuous poset Pand that µ → σX . For any x ∈ X and every S ⊆ ↓↓x, if µ(S) is directed withsupremum µx, then S is directed with supremum x.

    proof Lemma 2.2.4 implies that⊔

    S = x. For the directedness of S, leta, b ∈ S. Then x ∈ ↑↑a ∩ ↑↑b. The set ↑↑a ∩ ↑↑b is Scott open because P is acontinuous poset. Thus, there is ε ∈ E with x ∈ µε(x) ⊆ ↑↑a ∩ ↑↑b. Next,ε � µx =

    ⊔µ(S), so there is c ∈ S with ε � µc, using interpolation in E.

    But then c ∈ µε(x) ⊆ ↑↑a ∩ ↑↑b. Hence, a, b v c. 2

    The converse holds if µ is continuous and E = [0,∞)∗.

    Proposition 2.3.4 If µ : P → [0,∞)∗ is Scott continuous, the followingare equivalent:

    (i) The mapping µ induces the Scott topology near X.

    (ii) For all x ∈ X, if (xn) is a sequence in ↓↓x with lim µxn = µx, then(xn) is directed with supremum x.

    26

  • proof (i) ⇒ (ii) Apply Lemma 2.3.2 with E = [0,∞)∗. (ii) ⇒ (i) Let U bea Scott open set around x ∈ X. Let δn = µx + 1/n for n ≥ 1. By way ofcontradiction, assume that µδn(x) * U , for all n. Then for each n, there isxn v x with µx ≤ µxn < δn and xn /∈ U . By the continuity of µ, we canassume xn � x. By (ii), (xn) is directed with supremum x. But U is Scottopen, so this implies that xn ∈ U , for some n, a contradiction. 2

    Corollary 2.3.4 For a function µ : P → [0,∞)∗ on a continuous poset P ,the following are equivalent:

    (i) The map µ is Scott continuous and induces the Scott topology every-where.

    (ii) For all x ∈ P and every S ⊆ ↓↓x, S is directed with supremum x iffinf{µs : s ∈ S} = µx.

    This allows us to further develop the technique of Theorem 2.2.1: We nowhave a method for detecting bases in continuous posets.

    Proposition 2.3.5 If P is a continuous poset and µ : P → [0,∞)∗ is aScott continuous map with µ → σP , then for B ⊆ P , the following areequivalent:

    (i) B is a basis for P .

    (ii) For all x ∈ P , B ∩ ↓↓x contains a sequence (xn) with lim µxn = µx.

    proof (i) ⇒ (ii) First, B ∩ ↓↓x is directed with supremum x. The continuityof µ implies µx = inf{µb : b ∈ B ∩↓↓x}. Now (ii) follows. (ii) ⇒ (i) If B ∩↓↓xcontains a sequence (xn) with lim µxn = µx, then inf{µb : b ∈ B∩↓↓x} = µx.By Lemma 2.3.2 with E = [0,∞)∗, B∩↓↓x is directed with supremum x. 2

    Example 2.3.2 Given a metric space (X, d), the formal ball model [7]

    BX = X × [0,∞)

    ordered by(x, r) v (y, s) ⇔ d(x, y) ≤ r − s

    is a poset whose approximation relation is (x, r) � (y, s) ⇔ d(x, y) < r− s.BX is a continuous poset since (x, r+1/n) ∈ ↓↓(x, r) defines an increasing

    sequence with supremum (x, r). One can show that BX is a dcpo iff themetric d is complete.

    27

  • The natural projection

    π : BX → [0,∞)∗

    π(x, r) = r

    is easily seen to be Scott continuous. In fact, π induces the Scott topologyeverywhere on BX. Let U ⊆ BX be a Scott open set around (x, r) ∈ BX.As mentioned above, ⊔

    (x, r + 1/n) = (x, r)

    and since U is Scott open, (x, r + 1/n) ∈ U, for some n. First, we note that(x, r) ∈ πr+ 1

    2n(x, r). Next,

    (y, s) ∈ πr+ 12n

    (x, r) ⇒ (y, s) v (x, r) & π(y, s) = s < r + 1/2n

    ⇒ d(x, y) ≤ s− r < r − s + 1/n⇒ (x, r + 1/n) v (y, s)⇒ (y, s) ∈ ↑(x, r + 1/n) ⊆ U,

    which means (x, r) ∈ πr+ 12n

    (x, r) ⊆ U . This proves π → σBX .If A is a dense subset of X, then A × Q+ is a basis for BX, where

    Q+ = Q∩ [0,∞). Let (x, r) ∈ BX and choose a sequence of rationals qn > rwith qn → r. By the density of A,

    ( ∀n )( ∃ an ∈ A ) d(an, x) < qn − r.

    Then (an, qn) � (x, r) and lim π(an, qn) = lim qn = r. By Proposition 2.3.5,A×Q+ is a basis for BX.

    If f : X → Y is a Lipschitz map between metric spaces with Lipschitzconstant k, then

    f̄ : BX → BY

    f̄(x, r) = (fx, k · r)

    is monotone and πf̄ = k · π is Scott continuous. By Propsition 2.2.1, theextension f̄ is Scott continuous.

    Once again, we see that kerπ = {(x, 0) : x ∈ X} = max BX.

    Example 2.3.1 shows that a poset with a mapping µ → σP need not becontinuous. By the last example, a continuous poset with a map µ → σPneed not be a domain. There is one final example we should mention now.

    28

  • Example 2.3.3 On the Cantor set model Σ∞, the Scott continuous map

    | · | : Σ∞ → N ∪ {∞},

    which takes a string to its length, induces the Scott topology everywhere.To see this, suppose s � x in Σ∞. Then s is finite. Hence,

    a v x & |a| ≥ |s| ⇒ s v a.

    In this example, Corollary 2.2.2 provides a formal explanation for why

    |s| = ∞⇒ s ∈ max Σ∞ ⇒ s is infinite,

    while Proposition 2.3.3 justifies

    |s| = n ∈ N ⇒ s ∈ K(Σ∞) ⇒ s is finite.

    Finally, if we compose | · | with the isomorphism

    ({0} ∪ {1/2n : n ≥ 0})∗ ' N ∪ {∞},

    we obtain a map1

    2|·|: Σ∞ → [0,∞)∗

    s 7→ 12|s|

    that induces the Scott topology everywhere with ker 1/2|·| = max Σ∞. Wethink of 1/2|s| as measuring the probability of observing s.

    We have seen that a mapping µ : P → E with µ → σX tends to reflect thenature of E back onto X. Put another way, if we measure an element x ashaving property P , then it does have property P . For example, an upperbound measured as the supremum of a set S is its supremum (Lemma 2.2.4);comparable elements measured as equal are equal (Lemma 2.2.5).

    2.4 Measurement

    Definition 2.4.1 A measurement on a continuous poset P is a Scott con-tinuous map µ : P → [0,∞)∗ which induces the Scott topology near ker µ.

    We usually write a poset P and its natural measurement µ as a pair (P, µ).

    29

  • Example 2.4.1 From the previous two sections,

    (i) (IR, µ) the interval domain,

    (ii) (Σ∞, 1/2|·|) the Cantor set model,

    (iii) (BX, π) the formal ball model, and

    (iv) ([S], len) the domain of lists over S,

    are all examples of continuous posets P with measurements µ that inducethe Scott topology everywhere. In each case, we also have kerµ = max P .

    However, some measurements yield the Scott topology only at the top.

    Example 2.4.2 Let (X, d) be a locally compact metric space. Its upperspace

    UX = {∅ 6= K ⊆ X : K is compact}

    is a continuous dcpo and the diameter mapping

    λ : UX → [0,∞)∗

    λK = sup{d(x, y) : x, y ∈ K}

    is a measurement with kerλ = {{x} : x ∈ X} = max UX .First, λ is Scott continuous. Let {Ki : i ∈ I} be a filtered collection of

    compact subsets of X indexed by the set I. I is a poset in the natural way:i ≤ j ⇔ Kj ⊆ Ki. Now choose a fixed set Kn. By the compactness of eachKi,

    (∀i ≥ n)(∃ai, bi ∈ Ki) λKi = d(ai, bi).

    Since ai, bi ∈ Kn for all i ≥ n and Kn is compact, each net (ai) and (bi)has a convergent subnet. Without loss of generality, we can assume thereare points a, b ∈ Kn with ai → a & bi → b. The collection {Ki : i ∈ I} isfiltered so a, b ∈

    ⋂i≥n Ki. Then d(a, b) ≤ λKi = d(ai, bi), for all i ≥ n, while

    the continuity of d gives limi≥n d(ai, bi) = d(a, b). Together these imply thatinfi≥n d(ai, bi) = d(a, b). Thus,

    infi∈I

    λKi ≤ infi≥n

    λKi = infi≥n

    d(ai, bi) = d(a, b) ≤ λ(⋂

    Ki),

    while the monotonicity of λ yields λ(⋂

    Ki) ≤ inf λKi. This establishes thecontinuity of λ. To calculate its kernel, just note that

    K ∈ ker λ ⇔ (∃x ∈ X) K = {x} ⇔ K ∈ max UX .

    30

  • Finally, λ is a measurement. Suppose K � {x} ∈ ker λ. Then x ∈ int(K)so there is ε > 0 with x ∈ Bε(x) ⊆ int(K). If L v {x} with λL < ε, then

    y ∈ L ⇒ d(x, y) ≤ λL < ε ⇒ y ∈ Bε(x) ⊆ int(K),

    which means L ⊆ int(K), that is, K � L. Hence, λ is a measurement.However, it need not induce the Scott topology everywhere: It may fail tobe strictly monotone. For example, if X = R is the real line in its usualmetric, we see that [0, 1] v {0, 1} & λ[0, 1] = 1 = λ{0, 1} while [0, 1] 6= {0, 1}.

    We now consider a few characteristics that all measurements possess.

    Lemma 2.4.1 If µ : P → [0,∞)∗ is a measurement, then

    (i) kerµ ⊆ max P .

    (ii) kerµ is a Gδ in P .

    proof (i) Let x v y with x ∈ ker µ. By monotonicity, y ∈ ker µ. Thenby strictness of µ on ker µ, x = y. (ii) ker µ =

    ⋂µ−1[0, 1/n). Since µ is

    continuous, this is the intersection of countably many Scott open sets. 2

    Since the smaller the measure, the greater an object is in information con-tent, the first point in the last result is important: All objects with measurezero are maximal in the information order.

    Proposition 2.4.1 Suppose µ : P → [0,∞)∗ is monotone and µ → σX . Ifx ∈ X and S ⊆ ↓x is nonempty with inf{µa : a ∈ S} = µx, then

    ⊔S = x.

    In addition, if S ⊆ ↓↓x, S is directed.

    proof Use Lemmas 2.2.4 and 2.3.2 with E = [0,∞)∗. 2

    The properties mentioned above arise frequently in applications.

    Example 2.4.3 A function f : R → R is unimodal on an interval [a, b] if ithas a maximum value assumed at a unique point x∗ ∈ [a, b] such that

    (i) f is strictly increasing on [a, x∗], and

    (ii) f is strictly decreasing on [x∗, b].

    31

  • Unimodal functions have the important property that

    x1 < x2 ⇒{

    x1 ≤ x∗ ≤ b if f(x1) < f(x2),a ≤ x∗ ≤ x2 otherwise.

    This observation leads to an algorithm for computing x∗. For a functionf : R → R and a constant 1/2 < r < 1, define

    maxf : IR → IR

    by

    maxf [a, b] ={

    [l(a, b), b] if f(l(a, b)) < f(r(a, b)),[a, r(a, b)] otherwise.

    where l(a, b) = (b − a)(1 − r) + a and r(a, b) = (b − a)r + a. The mappingmaxf is well-defined since

    a < b ⇒ a ≤ l(a, b) < r(a, b) ≤ b.

    If f : R → R is unimodal on [a, b], then⊔n≥0

    maxnf [a, b] = [x∗].

    For the proof, we first note that

    x∗ ∈ [a, b] ⇒ a ≤ l(a, b) < r(a, b) ≤ b or a = b

    ⇒{

    l(a, b) ≤ x∗ ≤ b if f(l(a, b)) < f(r(a, b)),a ≤ x∗ ≤ r(a, b) otherwise.

    ⇒ x∗ ∈ maxf [a, b],

    and so by induction, maxnf [a, b] v [x∗], for all n ≥ 0. But µ maxfx = r · µx,for all x ∈ IR, where µ is the length measurement, so

    limn→∞

    µ maxnf [a, b] = limn→∞ rnµ[a, b] = 0 = µ[x∗].

    By Proposition 2.4.1,⊔

    maxnf [a, b] = [x∗].

    Finally, observe that maxf is not monotone. Let -1 < α < 1 andf(x) = 1− x2. The function f is unimodal on any compact interval. Sincemaxf [-1, 1] = [-1, 2r − 1], we see that

    maxf [-1, 1] v maxf [α, 1] ⇒ 1 ≤ 2r − 1 or r(α, 1) ≤ 2r − 1⇒ 1 ≤ r or α + 1 ≤ r(α + 1)⇒ r ≥ 1,

    which contradicts r < 1. Thus, for no value of r is the algorithm monotone.

    32

  • In the last example, the function maxf has the entire real line as its set offixed points, but only one of these has any computational significance: [x∗].The measurement µ provides us with a mechanism for distinguishing thisfixed point from all others, in a situation where the traditional methods ofdomain theory cannot be employed.

    This illustrates the computational nature of the measurement propertycited in Proposition 2.4.1. In fact, it plays a fundamental role in theircharacterization.

    Theorem 2.4.1 (The internal characterization) A continuous poset Padmits a measurement µ : P → [0,∞)∗ with ker µ = X if and only if

    (i) X =⋂

    Un is the intersection of countably many Scott open sets, and

    (ii) For every x ∈ X, if (xn) is a sequence with xn � x and xn ∈ Un, forall n, then (xn) is directed with supremum x.

    proof For (⇒), take Un = µ−1[0, 1/2n) for n ≥ 0. In the other direction,write X =

    ⋂n≥1 Un as the intersection of a descending family of Scott open

    sets and note that (i) and (ii) still hold. With U0 = P , define a mapping

    n : P → N ∪ {∞}

    n(x) = sup{n : x ∈ Un, n ≥ 0}.

    Observe that n(x) = ∞ iff x ∈ X. Next, define µ : P → [0,∞)∗ by

    µx =1

    2n(x).

    First, for n ≥ 0, we have (a) µ-1[0, 1/2n] = Un and (b) µ-1[0, 1/2n) = Un+1.For (a), x ∈ Un ⇔ n(x) ≥ n ⇔ µx = 1/2n(x) ≤ 1/2n, and similarly for (b),x ∈ Un+1 ⇔ n(x) ≥ n + 1 ⇔ n(x) > n ⇔ µx < 1/2n. To see that µ is Scottcontinuous, given ε > 0, choose the least n ≥ 0 with 1/2n < ε. Then

    µ-1[0, ε) = µ-1[0, 1/2n] = Un.

    For the kernel, just note that kerµ = {x ∈ P : n(x) = ∞} = X. Finally, toprove that µ → σX , let U ⊆ P be a Scott open set around x ∈ X. Supposeby way of contradiction that (∀ε > 0) µε(x) * U . Then

    (∀n ≥ 0)(∃ bn v x) µbn < 1/2n & bn /∈ U.

    33

  • Since bn ∈ µ-1[0, 1/2n) = Un+1, we can choose xn ∈ Un+1 with xn � bn.Observe that xn /∈ U since U is a upper set and bn /∈ U . Next,

    (∀n ≥ 0) xn � x & xn ∈ Un+1,

    and so (xn) is directed with supremum x by (ii). But P \ U is Scott closedand xn ∈ P \ U, for all n, so x =

    ⊔xn ∈ P \ U , which gives the desired

    contradiction. 2

    Then measurements are special kinds of Gδ subsets of the top.

    Corollary 2.4.1 A subset X ⊆ P of a continuous poset P is a Gδ iff thereexists a Scott continuous mapping µ : P → [0,∞)∗ with ker µ = X . Inaddition, if X =

    ⋂n≥1 Un is the intersection of a decreasing sequence of

    Scott open sets, µ can be chosen so that

    µx ≤ 12n

    ⇔ x ∈ Un.

    proof The function defined in the internal characterization of measurementworks here as well. 2

    The last corollary yields a useful technique for constructing measurements.

    Lemma 2.4.2 If X is a Gδ subset of a continuous poset P with a measure-ment µ : P → [0,∞)∗, then there is a measurement λ : P → [0,∞)∗ suchthat

    µ ≤ λ & ker λ = ker µ ∩X.

    proof By the last corollary, there is a Scott continuous map σ : P → [0,∞)∗with ker σ = X . Now define λ : P → [0,∞)∗ by

    λx = µx + σx.

    First, λx = 0 ⇔ µx = 0 & σx = 0 ⇔ x ∈ ker µ ∩ X . Next, µx ≤ λx, soλε(x) ⊆ µε(x) for x ∈ ker λ. Thus, λ is a measurement since µ is. 2

    Another corollary is that all measurements can be assumed to map into({0} ∪ {1/2n : n ≥ 0})∗ ' N∞ = N ∪ {∞}. However, it is important torealize that doing so normally results in a serious loss of information.

    34

  • Example 2.4.4 If µ : P → N∞ is a Scott continuous map which inducesthe Scott topology everywhere, then

    x ∈ P \max P ⇒ µx 6= ∞⇒ ( ∃ n ∈ N ) µx = n⇒ µx ∈ K(N∞)⇒ x ∈ K(P ),

    which means P is an algebraic poset where all elements are compact exceptpossibly the maximal elements. Hence, if we assume a measurement mapsinto ({0}∪{1/2n : n ≥ 0})∗, we normally lose the ability to assume µ → σP .

    2.5 Existence

    Theorem 2.5.1 Every ω-continuous dcpo D has a measurement

    µ : D → [0,∞)∗

    such that µ → σD and for which the following are equivalent:

    (i) kerµ = max D.

    (ii) The relative Scott and Lawson topologies on max D agree.

    proof The reader is advised to see [16] for a nice illustration of importanttechniques. The ω-continuous dcpo D embeds as the set of coprimes inthe continuous lattice of its Scott closed sets Γ(D). The Lawson closureof its image in Γ(D) is an order compactification denoted by F (D) — thisis called the Fell order compactification. Since D is ω-continuous, F (D) isa compact metrizable partially ordered space, and so it admits a metric d̄which is radially convex:

    x v y v z ⇒ d̄(x, z) = d̄(x, y) + d̄(y, z)

    for x, y, z ∈ F (D). The restriction of d̄ to D we denote by d. Specifically,

    d(x, y) = d̄(↓x, ↓y)

    for x, y ∈ D. This metric is also radially convex and yields the Lawsontopology on D. Now define µ : D → [0,∞)∗ by

    µx = sup{ d̄(↓x, y) : x ∈ y ∈ F (D) }

    35

  • Note that the supremum exists since the space F (D) is compact. Now, ifx v y ∈ w ∈ F (D), then by radial convexity,

    d̄(↓y, w) ≤ µx− d̄(↓x, ↓y)

    and so µy ≤ µx − d(x, y). This in particular proves monotonicity into[0,∞)∗. The Scott continuity of µ was proven in [16], where it is calledupper semicontinuity. Now let U be any Scott open set around y ∈ D.Since U is Lawson open, ∃ ε > 0 with y ∈ Bε(y) ⊆ U . Set δ := ε + µy.Clearly, y ∈ µδ(y). Now, if x ∈ µδ(y), then µy ≤ µx < δ, and since x v y,we have

    d(x, y) ≤ µx− µy < ε

    which shows that y ∈ µδ(y) ⊆ U . Then we have proven that µ → σD.Consequently, ker µ ⊆ max D . Now for the characterization of the kernel.

    If the Scott and Lawson topologies agree at the top, then ↓x ∈ max F (D)whenever x ∈ max D . Then it is clear that µx = 0 if x ∈ max D . In theother direction, suppose that all maximal elements have measure zero andlet x ∈ max D . If ↓x ⊆ C ∈ F (D), then d̄(↓x, C) = 0 since µx = 0. Con-sequently, ↓x ∈ max F (D). This is equivalent to saying that the Scott andLawson topologies agree at the top [16]. 2

    Observe that, for arbitrary ω-continuous domains, the result makes no claimsabout the kernel. However, it does tell us that we can usually assumeinformation content as expressible by a nonnegative real number.

    Corollary 2.5.1 If µ : P → E is a Scott continuous mapping which inducesthe Scott topology on X, and E is an ω-continuous dcpo, then

    ∃ Scott continuous map µ : P → [0,∞)∗

    which also induces the Scott topology on X.

    proof Given µ : P → E with µ → σX , the last result gives a Scott contin-uous map λ : E → [0,∞)∗ with λ → σE . Since µ(X) ⊆ E, the compositionλµ : P → [0,∞)∗ is a Scott continuous map with λµ → σX . 2

    Because Pω is an ω-continuous Scott domain, Theorem 2.5.1 guarantees theexistence of a measurement µ : Pω → [0,∞)∗ with ker µ = {N}.

    36

  • Example 2.5.1 Cardinality is not precise enough to distinguish compara-ble infinite sets from one another, so we consider

    | · | : Pω → [0,∞)∗

    given by

    |x| = 1−∑n∈x

    12n+1

    .

    This mapping is a measurement which induces the Scott topology every-where whose kernel is exactly {N}. First, the map is monotone

    x v y ⇒ 1−∑n∈x

    12n+1

    ≥ 1−∑n∈y

    12n+1

    ,

    and for an increasing sequence (xn) in Pω,

    |⋃

    xn| = 1−∑

    i∈⋃

    xn

    12i+1

    = 1− limn→∞

    ∑i∈xn

    12i+1

    = limn→∞

    (1−∑i∈xn

    12i+1

    )

    = limn→∞

    |xn|,

    so | · | is Scott continuous. The kernel is easy to compute since

    |N| = 1−∞∑

    n=0

    12n+1

    = 1− 1 = 0

    and|x| = 0 ⇒

    ∑n∈x

    12n+1

    = 1 ⇒ x = N.

    To show that | · | → σPω, suppose k � x in Pω. Then k is a finite set wecan assume nonempty, so it has a largest element m ∈ N. If

    s v x & |x| ≤ |s| < |x|+ 12m+1

    ,

    37

  • then ∑n∈s

    12n+1

    >∑n∈x

    (1

    2n+1

    )− 1

    2m+1.

    But this implies k v s. For if i ∈ k \ s, then s v x \ {i}, which means∑n∈s

    12n+1

    ≤∑

    n∈x\{i}

    12n+1

    =∑n∈x

    (1

    2n+1

    )− 1

    2i+1

    ≤∑n∈x

    (1

    2n+1

    )− 1

    2m+1.

    Thus,

    s v x & |s| < |x|+ 12m+1

    ⇒ k � s,

    which proves that | · | induces the Scott topology everywhere on Pω.

    Example 2.5.2 By Lemma 2.2.3, the composition

    [N → N] dom−→ Pω |·|−→ [0,∞)∗

    induces the Scott topology everywhere. This gives a measurement on thepartial mappings [N → N] with ker |dom| = max [N → N].

    The first part of Theorem 2.5.1 actually holds for any poset.

    Example 2.5.3 Let P be a partially ordered set with a countable base{Un : n ∈ N} for its Scott topology. The mapping

    e : P → Pω

    e(x) = {n ∈ N : x ∈ Un}is easily seen to be monotone and Scott continuous.

    In fact, it induces the Scott topology everywhere. For if U ⊆ P is a Scottopen set around x ∈ P , there must be an n with x ∈ Un ⊆ U. Now supposethat a v x and {n} � e(a). Then a ∈ Un ⊆ U . Hence, x ∈ e{n}(x) ⊆ U .

    Finally, by Lemma 2.2.3, the composition

    Pe−→ Pω |·|−→ [0,∞)∗

    is a measurement which induces the Scott topology everywhere.

    38

  • The last observation leads to a generalization of a well-known result [1].

    Proposition 2.5.1 For a partially ordered set whose Scott topology is sec-ond countable, the following are equivalent:

    (i) Every increasing sequence has a supremum.

    (ii) Every directed set has a supremum.

    In either case, every directed set contains an increasing sequence with thesame supremum.

    proof (i)⇒ (ii) We saw in Example 2.5.3 that the mapping |e| : P → [0,∞)∗induces the Scott topology everywhere. By Lemma 2.2.5, it is strictly mono-tone. In addition, it is Scott continuous and every increasing sequence hasa supremum. Now Theorem 2.2.1 applies. 2

    It is interesting perhaps that the last result holds even when the poset isnot continuous.

    2.6 The Contraction Principle

    We now consider a contraction principle which illustrates some of the basicaspects of measurement studied earlier in this chapter.

    Proposition 2.6.1 Let f : D → D be a monotone map on a domain Dwith a measurement µ and suppose that ( ∃ c < 1 )( ∀ x ∈ D ) µf(x) ≤ c · µx.If there is a point x v f(x), then

    x? =⊔n≥0

    fn(x) ∈ max D

    is a fixed point of f such that

    ( ∀ a � x? )⊔n≥0

    fn(a) = x?.

    Furthermore, the following are equivalent:

    (i) x? is the unique fixed point of f on D.

    (ii) ( ∀ x, y ∈ fix(f) )( ∃ z ∈ D ) z v x, y.

    39

  • proof First, for any x ∈ D and any n ≥ 0, µfn(x) ≤ cnµx, as is easy toprove by induction. Given a point x v f(x), the monotonicity of f impliesthe sequence (fn(x)) is increasing, while the continuity of µ allows us tocompute

    µ(⊔

    fn(x)) = limn→∞

    µfn(x) ≤ limn→∞

    cnµx = 0.

    Hence, x? =⊔

    fn(x) ∈ ker µ ⊆ maxD. But the monotonicity of f also givesx? v f(x?). Hence, x? = f(x?) is a fixed point of f . Next, let a v x?. Bythe monotonicity of f ,

    (∀n ≥ 0) fn(a) v f(x?) = x?,

    and since lim µfn(a) = µx? = 0, the fact that µ is a measurement yields⊔fn(a) = x?.

    (i) ⇒ (ii) is obvious. For (ii) ⇒ (i), let x? be any fixed point of f . By(ii), ( ∃ z ∈ D ) z v x?, x?. The same reasoning as above now shows that⊔

    fn(z) = x? = x?. Thus, the fixed point x? is unique. 2

    In general, such a mapping may have several fixed points, as can be seenby considering the identity map on an antichain. However, more often thannot, each pair of elements in the kernel is bounded from below, in whichcase we obtain a unique fixed point.

    Proposition 2.6.2 Let D be a domain with a measurement µ such that

    ( ∀ x, y ∈ ker µ )( ∃ z ∈ D ) z v x, y.

    If f : D → D is a monotone map for which there is a constant c < 1 suchthat µf(x) ≤ c ·µx, for all x ∈ D, and there is a point x ∈ D with x v f(x),then

    x? =⊔n≥0

    fn(x) ∈ max D

    is the unique fixed point of f on D.

    Corollary 2.6.1 Let D be a domain with a measurement µ and least ele-ment ⊥. If f : D → D is monotone and ( ∃ c < 1 )( ∀x ∈ D ) µf(x) ≤ c ·µx,then ⊔

    fn(⊥) ∈ max D

    is the unique fixed point of f on D.

    40

  • One rarely encounters domains where the boundedness property of Propo-sition 2.6.2 fails to hold. For example, it is easy to see that BX, IR, UXand [S] all have this property even though none has a least element.

    Example 2.6.1 Let f : X → X be a contraction on a complete metricspace X with Lipschitz constant c < 1. The mapping f : X → X extendsto a monotone map on the formal ball model f̄ : BX → BX given by

    f̄(x, r) = (fx, c · r),

    which satisfiesπf̄(x, r) = c · π(x, r),

    where π : BX → [0,∞)∗ is the standard measurement on BX, π(x, r) = r.Now choose r so that (x, r) v f̄(x, r). By Proposition 2.6.2, f̄ has a uniquefixed point which implies that f does also.

    A nice feature of the contraction principle is that it applies to any domainwith a measurement.

    Example 2.6.2 A contraction f : X → X on a compact metric space Xextends to a map on the upper space model f̄ : UX → UX given by

    f̄(K) = f(K).

    This mapping is monotone by set theory, and if f has contraction constantc < 1, then

    diam f̄(K) ≤ c · diam K,

    where diam : UX → [0,∞)∗ is the standard measurement on UX . Thedomain UX has a bottom element ⊥ = X, so the last corollary implies thatf̄ : UX → UX and hence f : X → X has a unique fixed point.

    However, the Banach contraction mapping theorem not only states thateach contraction has a unique fixed point x?, it also tells us that x? is anattractor: For any x ∈ X, the iterates fn(x) converge to x?. This is everybit as important as knowing x? exists uniquely. We defer the proof of thisfact until Chapter 5, where the topological structure of ker µ is studied indetail.

    41

  • Example 2.6.3 Consider the well-known functional

    φ : [N → N] → [N → N]

    defined by

    φ(f)(k) ={

    1 if k = 0,kf(k − 1) if k ≥ 1 & k − 1 ∈ dom f.

    The natural measurement

    µ : [N → N] → [0,∞)∗

    µf = |dom f |

    was studied in the last section. The mapping φ is easily seen to be monotone.Next we compute

    µφ(f) = |dom φ(f)|

    = 1−∑

    k∈dom φ(f)

    12k+1

    = 1−

    120+1

    +∑

    k−1∈dom f

    12k+1

    = 1−

    12

    +∑

    k∈dom f

    12k+2

    =

    12

    1− ∑k∈dom f

    12k+1

    =

    µf

    2

    which means φ is a contraction on the domain [N → N]. By the contractionprinciple, ⊔

    n∈Nφn(⊥) = fac

    is the unique fixed point of φ on [N → N], where ⊥ is the function definednowhere.

    42

  • We will see other applications of the contraction principle later. However,there is one potential application which can be mentioned now. Advocatesof the metric space approach to semantics site as one of its main advantagesthe existence of unique fixed points, as opposed to the least fixed points thatdomain theory provides. It would be nice to know if these two schools ofthought can be unified by making use of a result like the one in this section.

    2.7 Fixed Points of Nonmonotonic Maps

    In the last section we used measurement to prove that certain monotonemappings have unique fixed points. Another advantage to measurementbased reasoning is the ability to handle nonmonotonicity.

    Proposition 2.7.1 Let D be a domain with a measurement µ → σD. IfI ⊆ D is closed under directed suprema and s : I → I is a splitting whosemeasure

    µ ◦ s : I → [0,∞)∗

    is Scott continuous between dcpo’s, then

    (∀x ∈ I)⊔n≥0

    sn(x) is a fixed point of s.

    Moreover, the set of fixed points fix(s) = {x ∈ I : s(x) = x} is a dcpo.

    proof Let x ∈ I. By induction, (sn(x)) is an increasing sequence in I. Theset I is closed under directed suprema hence

    ⊔n≥0 s

    n(x) ∈ I. Because s isa splitting,

    ⊔n≥0 s

    n(x) v s(⊔

    n≥0 sn(x)), while the fact that µ ◦ s and µ are

    both Scott continuous allows us to compute

    µs(⊔n≥0

    sn(x)) = limn→∞

    µsn+1(x) = µ(⊔n≥0

    sn(x)).

    By Lemma 2.2.5, however, two comparable elements whose measures agreemust in fact be equal. Hence,

    s(⊔n≥0

    sn(x)) =⊔n≥0

    sn(x).

    To show that fix(s) is a dcpo one need only prove closure under suprema ofsequences in view of Theorem 2.2.1. The proof for sequences, however, usesthe very same methods employed above and is entirely trivial. 2

    43

  • Example 2.7.1 Let f : R → R be a continuous map on the real line.Denote by C(f) the subset of IR where f changes sign, that is,

    C(f) = {[a, b] : f(a) · f(b) ≤ 0}.

    The continuity of f ensures that this set is closed under directed suprema,and the mapping

    splitf : C(f) → C(f)

    given by

    splitf [a, b] ={

    left[a, b] if left[a, b] ∈ C(f);right[a, b] otherwise,

    is a splitting where left[a, b] = [a, (a + b)/2] and right[a, b] = [(a + b)/2, b].The measure of this mapping

    µ splitf [a, b] =µ[a, b]

    2

    is Scott continuous, so Proposition 2.7.1 implies that⊔n≥0

    splitnf [a, b] ∈ fix(splitf ).

    However, fix(splitf ) = {[r] : f(r) = 0}, which means that iterating splitf isa scheme for calculating a solution of the equation f(x) = 0. This numericaltechnique is called the bisection method.

    The major fixed point technique in classical domain theory, the Scott fixedpoint theorem, cannot be used to establish the correctness of the bisectionmethod: splitf is only monotone in computationally irrelevant cases.

    Proposition 2.7.2 For a continuous selfmap f : R → R which has at leastone zero, the following are equivalent:

    (i) The splitting splitf is monotone.

    (ii) The map f has a unique zero r and

    C(f) = {[a, r] : a ≤ r} ∪ {[r, b] : r ≤ b}.

    44

  • proof We prove (i) ⇒ (ii). Let α < β be two distinct roots of f . Then bymonotonicity of splitf ,

    splitnf [α, β] v splitf [β] = [β],

    for all n ≥ 0. Then [α] =⊔

    splitnf [α, β] v [β], which proves α = β. Thus, fhas a unique zero r.

    Now let [a, b] ∈ C(f) with a < r < b and set δ = max{r − a, b− r} > 0.Then r − δ ≤ a < b ≤ r + δ. By the uniqueness of r,

    f(r − δ) · f(a) > 0 and f(b) · f(r + δ) > 0,

    and since [a, b] ∈ C(f), we have ȳ := [r− δ, r + δ] ∈ C(f). For the very samereason, x̄ := [r − δ − δ/2, r + δ + δ/4] ∈ C(f). But then we have x̄ v ȳ and

    splitf x̄ = [r − δ/8, r + δ + δ/4] 6v [r − δ, r] = splitf ȳ,

    which means splitf is not monotone if f changes sign on an interval whichcontains r in its interior. 2

    That is, if splitf is monotone, then in order to calculate the solution r off(x) = 0 using the bisection method, we must first know the solution r. Asfurther evidence of its applicability, notice that Proposition 2.7.1 also impliesthe Scott fixed point theorem for domains with measurements µ → σD.

    Example 2.7.2 If f : D → D is a Scott continuous map on a domain Dwith a measurement µ → σD, then we consider its restriction to the set ofpoints where it improves

    I(f) = {x ∈ D : x v f(x)}.

    This evidently yields a splitting f : I(f) → I(f) on a dcpo with continuousmeasure. By Proposition 2.7.1,

    (∀x ∈ I(f))⊔n≥0

    fn(x) is a fixed point of f.

    There are many ideas underlying the examples of this section that we willexplore in the next chapter. For example, the attentive reader will havenoticed that we did not prove that C(f) is closed under directed supremain Example 2.7.1. The reason this is true is that C(f) is a closed set withrespect to a topology intimately connected to measurement. The same holdsfor the set of improvements I(f) of a Scott continuous map f .

    45

  • 2.8 Questions

    (i) The natural measurements on [S], Σ∞, IR, Pω and [N → N] canbe thought of as “computable” since µx can be computed exactly infinite time provided that x is a basis element. Now imagine that wehave a program which seeks to approximate some idealized object xwhose measure µx is known. At iteration n, we are told the programwill output a basis element bn � x. What we need is some way todetermine when bn is close enough to x that we can stop the program.Before running the program, we choose a basis element b � x, anddecide a good test for termination is that b � bn � x. Because b � x,we know that

    (∃ ε > 0) a v x & |µx− µa| < ε ⇒ b � a.

    This ε > 0 is easily determined in the examples above given µx andb. Now we begin running the program. At iteration n, it outputsbasis element bn � x, and because µbn is computable exactly in finitetime, we can determine during execution whether or not b � bn, bysimply calculating µbn and then measuring |µx − µbn|. What is a“computable” measurement and why do we care?

    (ii) When does a strictly monotone map µ : P → [0,∞)∗ induce the Scotttopology everywhere?

    (iii) Is there a monotone map µ : D → [0,∞)∗ on a domain, which inducesthe Scott topology everywhere, and is not Scott continuous?

    (iv) Let (X, d) be a metric space. The set X2 when ordered via

    (a, b) v (x, y) ⇔ d(a, x) + d(b, y) ≤ d(a, b)− d(x, y)

    is a poset and the metric d : X2 → [0,∞)∗ is a monotone map betweenposets. In fact,

    ker d = {(x, y) ∈ X2 : d(x, y) = 0} = {(x, x) : x ∈ X} = max X2.

    When is X2 a continuous poset? a domain? What kind of measure-ment is d?

    46

  • Chapter 3

    The µ Topology on a Domain

    The µ topology arises naturally in the consideration of mappings whichinduce the Scott topology. It is a Hausdorff topology, larger than both theScott and Lawson topologies, whose notion of limit seems ideally suited forcomputation. For example, every sequence with a µ limit has a supremum,even though such a sequence need not be directed; µ closed sets are closedunder directed suprema, though they need not be lower sets. Properties likethese often make the µ topology the natural choice when trying to formulatekey computational ideas.

    3.1 The µ Topology

    In Chapter 2 it was observed that, for any monotone map µ : D → E, thecollection

    { µε(x) : x ∈ D, ε ∈ E },

    where µε(x) = {y ∈ D : y v x & ε � µy}, forms a basis for a topologyon D. In particular, if we take µ to be the identity map on D, we obtain atopology with basis { 1ε(x) : x, ε ∈ D } = { ↑↑x ∩ ↓y : x, y ∈ D }.

    Definition 3.1.1 On a continuous dcpo D, the µ topology has as a basis{ ↑↑x∩ ↓y : x, y ∈ D }. We denote this topology by µD in the same way thatthe Scott topology is written σD.

    The identity map on D is easily seen to induce the Scott topology every-where. It turns out that this is what determines the µ topology.

    47

  • Theorem 3.1.1 (Invariance) For a Scott continuous mapping µ : D → Ebetween domains, the following are equivalent:

    (i) The mapping µ induces the Scott topology everywhere on D.

    (ii) { µε(x) : x ∈ D, ε ∈ E } is a basis for the µ topology on D.

    proof First recall that 1a(x) := ↑↑a ∩ ↓ x for all a, x ∈ D. (i) ⇒ (ii): Leta ∈ µε(x). By the continuity of µ, (∃ z � a) a ∈ ↑↑z ⊆ µ−1(↑↑ε). Thena ∈ 1z(a) ⊆ µε(x). Thus, each set µε(x) is µ open. Now let U be a µopen set with x ∈ U . Then (∃ a � x) 1a(x) ⊆ U . By (i), µ → σD, andsince x ∈ ↑↑a, we know that ( ∃ ε ∈ E ) x ∈ µε(x) ⊆ ↑↑a. But µε(x) ⊆ ↓xso x ∈ µε(x) ⊆ 1a(x) ⊆ U . Then { µε(x) : x ∈ D, ε ∈ E } is a basisfor the µ topology on D. (ii) ⇒ (i): Let U be a Scott open set aroundx ∈ D. Then ∃ a � x with a ∈ U . This gives x ∈ 1a(x) ⊆ U . By (ii),( ∃ ε ∈ E ) x ∈ µε(x) ⊆ 1a(x) ⊆ U. This proves µ → σD. 2

    That is, no matter how we measure a domain, all measurements which inducethe Scott topology everywhere place the µ topology on D.

    Lemma 3.1.1 On a continuous dcpo D,

    (i) Every Lawson open set is µ open.

    (ii) An upper set is µ open iff it is Scott open.

    (iii) The upper set of a µ open set is Scott open.

    (iv) Every µ closed set is closed under directed suprema.

    (v) (∀x ∈ D) x ∈ K(D) iff {x} is µ open.

    proof (i) Suppose y ∈ ↑↑x\↑F where F is finite. Then no element below y isin ↑F . Since ↑↑x is Scott open, there is an a � y with y ∈ ↑↑a∩ ↓y ⊆ ↑↑x\↑F .Then basic Lawson open sets are µ open. (ii) Proposition 2.3.1 (iii) ApplyCorollary 2.3.2 with µ = 1D. (iv) Let S be a directed subset of a µ closed setV and write x =

    ⊔D S. If x ∈ D\V , then there is an (a � x)↑↑a∩ ↓x ⊆ D\V .

    By interpolation we must have S ∩ (D \ V ) 6= ∅. (v) Corollary 2.3.3 2

    A µ open set may be thought of intuitively as a Scott open set which is notnecessarily an upper set.

    48

  • Example 3.1.1 Let f : R → R be a continuous map on the real line andconsider

    C(f) = { [a, b] ∈ IR : f(a) · f(b) ≤ 0 }.

    C(f) is a µ closed subset of IR: Let [a, b] ∈ IR \C(f). Then f(a) · f(b) > 0.By the continuity of f ,

    ( ∃ ε > 0 )( s ∈ [a− ε, a] & t ∈ [b, b + ε] ⇒ f(s) · f(t) > 0 ),

    which means [a, b] ∈ ↑↑[a − ε, b + ε] ∩ ↓ [a, b] ⊆ IR \ C(f). This proves thatIR\C(f) is µ open and hence that C(f) is µ closed. Finally, note that C(f)is hardly ever Scott closed because it is rarely a lower set.

    Proposition 3.1.1 The µ topology on a continuous dcpo is zero-dimensionalTychonoff.

    proof For p ∈ D, let x ∈ D \ {p}. Since x 6= p, (∃a � x) p /∈ ↑↑a ∩ ↓x. Thenx ∈ ↑↑a ∩ ↓x ⊆ D \ {p}. This proves that {p} is µ closed which means that(D,µD) is a T1 space. Now we claim that any set of the form ↑↑x∩ ↓y is alsoµ closed. Let z ∈ D \ ↑↑x ∩ ↓y. If (∀a � z) (↑↑a ∩ ↓z) ∩ (↑↑x ∩ ↓y) 6= ∅, then

    (∀a � z) a � y & x � z

    which means x � z v y. This proves that ↑↑x∩ ↓y is µclosed. Then (D,µD)also has a basis of closed and open sets. Any zero-dimensional T1 space isHausdorff, regular and in fact Tychonoff (see 6.2 of [8]). 2

    Proposition 3.1.2 For a continuous dcpo D, the following are equivalent:

    (i) The Scott topology on D is first countable.

    (ii) For all x ∈ D, there is an increasing sequence (xn) in D, such that

    ( ∀ n )( xn � x ) &⊔

    xn = x.

    (iii) The µ topology on D is first countable.

    proof (i) ⇒ (ii): Let {Un} be a countable basis of Scott open sets at x ∈ D.First, choose an ∈ Un with an � x for each n. Next, set x1 = a1, and givenany an v xn � x, choose xn+1 � x with xn, an+1 v xn+1 � x, using thedirectedness of ↓↓x. The sequence (xn) is increasing, so it has a supremum⊔

    xn. Furthermore, this supremum belongs to each Un since an v⊔

    xn.

    49

  • Now suppose u is any upperbound of the sequence (xn). Then⊔

    xn v uso u ∈ Un for all n. But {Un} is a countable basis at x, so every openset around x contains u. Hence x v u. Since x is above each xn, we have⊔

    xn = x. (ii) ⇒ (iii): Using the sequence (xn) from (ii), {↑↑xn∩ ↓x : n ∈ N}is a countable basis at x w.r.t. the µ topology. (iii) ⇒ (i): Let {Un} bea countable basis of µ open sets at x. Then {↑Un} is a countable basis ofScott open sets around x since every Scott open set is µ open and the up-per set of a µopen set is Scott open. Thus, (D,σD) is first countable at x. 2

    Recall that a subset B of a domain D is a basis for D iff B ∩ ↓↓x contains adirected set with supremum x for each x ∈ D.

    Proposition 3.1.3 For a continuous dcpo D and any subset B ⊆ D, thefollowing are equivalent:

    (i) B is a basis for D.

    (ii) B is a µ dense subset of D.

    proof (i) ⇒ (ii): Let B be a basis for D and consider a basic µ open set↑↑x∩ ↓y. By interpolation, choose a with x � a � y. Since y is the supremumof a directed set contained in ↓↓y ∩B, there is a b ∈ B with x � a v b v y.Thus (↑↑x∩ ↓y)∩B 6= ∅. This proves that B is a µ dense subset of D. (ii) ⇒(i): We will show that B ∩ ↓↓x is directed with supremum x for each x ∈ D.Let a � x. By interpolation choose c with a � c � x. The set ↑↑c∩ ↓x is µopen so (∃b ∈ B) c � b v x by the density of B. Hence,

    ( ∀a � x )( ∃b ∈ B ) a � b � x.

    Then the directedness of ↓↓x implies that B ∩ ↓↓x is directed. Clearly,⊔

    (B ∩↓↓x) v x. For the other inequality, if a � x, then (∃b ∈ B) a � b � x. Thusa v b v

    ⊔(B ∩ ↓↓x). But a was arbitrary so x v

    ⊔(B ∩ ↓↓x). 2

    Example 3.1.2 While every basis of a domain is Scott dense, a Scott denseset is not necessarily a basis: The collection of maximal elements max D isScott dense, but

    max D is a basis for D ⇔ D = max D⇔ D has the discrete order.

    Hence, the flat naturals N⊥ (N ordered discretely with a bottom attached)provide a counterexample.

    50

  • Corollary 3.1.1 For a continuous dcpo D, the following are equivalent:

    (i) The Scott topology on D is second countable.

    (ii) The continuous dcpo D is ω-continuous.

    (iii) The µ topology on D is separable.

    proof For (i) = (ii) see Chapter III.4 of [10]. 2

    With respect to the µ topology, algebraicity of a domain is an extreme formof the Baire property.

    Corollary 3.1.2 A domain is algebraic iff the intersection of µ dense setsis µ dense.

    proof A continuous dcpo D is algebraic iff K(D) is µ dense iff D has asmallest µ dense set [1]. 2

    Proposition 3.1.4 If D is an ω-continuous dcpo and |max D | ≥ |R|, thenthe µ topology on D is not normal.

    proof maxD is a relatively discrete, closed subset of (D,µD). Since (D,µD)has a countable dense subset B and |max D | ≥ |R| ≥ 2 |B |, a lemma dueto F.B. Jones shows that (D,µD) is not normal. (See for example Willard,p.100) 2

    Example 3.1.3 The µ topology on IR is zero-dimensional, Tychonoff, sep-arable and first countable. However, |max IR| = |R|, so it is not normal.Thus, it is also not compact, metrizable or second countable.

    Proposition 3.1.5 For a continuous dcpo D and any sequence (xn), thefollowing are equivalent:

    (i) xn → x in the µ topology.

    (ii) (∃n)(∀k ≥ n)(xk v x) & xn → x in the Scott topology.

    proof (i) ⇒ (ii) Since all Scott open sets are µ open, it is clear that µ con-vergence implies convergence in the Scott topology. To see that x boundsmost of the sequence, choose an approximation a � x. Since ↑↑a ∩ ↓x isµ open, it contains all but a finite number of the (xn). (ii) ⇒ (i) Let U be

    51

  • any µ open set around x. Then ∃ a � x with ↑↑a ∩ ↓x ⊆ U. Since xn → xin the Scott topology, all but a finite number of the (xn) are contained in↑↑a. The other assumption means that all but a finite number are boundedabove by x. This proves µ convergence. 2

    In the presence of a measurement, µ limits are easy to compute.

    Proposition 3.1.6 If µ : D → [0,∞)∗ is Scott continuous and µ → σX ,then for any sequence (xn) in D and any x ∈ X, the following are equivalent:

    (i) xn → x in the µ topology.

    (ii) (∃n)(∀k ≥ n)(xk v x) & lim µxn = µx.

    proof (i) ⇒ (ii): Let ε > 0 be arbitrary and set δ = µx + ε. The mapµ is Scott continuous, so µδ(x) is a µ open set around x. Then by (i),(∃n) xk ∈ µδ(x), for all k ≥ n. Thus,

    k ≥ n ⇒ xk v x & µxk < δ⇒ |µxk − µx| = µxk − µx < ε,

    which proves that lim µxn = µx. (ii) ⇒ (i): We only need to prove thatxn → x in the Scott topology. Let U be a Scott open set around x. Sinceµ → σX , (∃ ε > 0) x ∈ µε(x) ⊆ U . Now by assumption (∃ n1) xk v x fork ≥ n1. Since lim µxn = µx,

    (∃n2)(∀k ≥ n2) |µxk − µx| < ε− µx.

    If k ≥ max(n1