<<

Topology and Stone for Domains

Uday S. Reddy

May 8, 1995

1 Topology in a nutshell

The basic ideas of topology are contained in the two definitions below.

Definition 1 A(topological) space X = hX, ΩX i is a pair consisting of a set X (of points x, y, z) and a collection ΩX of of X (open sets u, v, w) such that ΩX is closed under arbitrary and finite intersection. S If s is a family of open sets, s is an open set. In particular, ∅ is an open set. If u1, . . . , un is a family of open sets then u1 ∩ · · · ∩ un is an open set. In particular, X is an open set. We use the terminology “u is a neighborhood of x” when u is an open set containing a point x.

Definition 2 If X and Y are topological spaces, a function f : X → Y is said to be continuous at x ∈ X if, for every neighborhood v of f(x), there exists a neighborhood u of x such that f(u) ⊆ v. (By f(u), we mean the set { f(x): x ∈ u }.) A continuous function is a function that is continuous at every x ∈ X.

Topological spaces and continuous functions form a Top. For theoretical purposes however, it is often simpler to use the following criterion for continuous functions:

Theorem 3 A function f : X → Y is continuous iff, for every open set −1 v ∈ ΩY , the inverse image f (v) is an open set in ΩX . Proof: “If:” If f −1(v) is an open set, take the requisite witness u to be f −1(v). “Only if:” For every x ∈ f −1(v), f(x) ∈ v. By definition, there exists a neighborhood ux of x (an open set) such that f(ux) ⊆ v. By generalization, S −1 x∈f −1(v) ux is an open set whose direct image is included in v. So f (v) = S −1 x∈f −1(v) ux, and we have that f (v) is an open set. From here on, we take this to be our working definition of continuous functions.

1 The main motivating example for topological spaces is the real line. Let R denote the set of real numbers. The “standard” topology on R consists of open sets that are unions of open intervals (a, b). Evidently, any union of open sets is an open set. The entire set R is an open set because it S is, for instance, the union x∈R(x − , x + ) for some positive number . The intersection of open sets is an open set because the intersection of open intervals is an open interval. The definition of R as an open set suggests an equivalent criterion for open sets in the standard topology. A u is open iff, for every x ∈ u, there exists an open interval (a, b) ⊆ u such that x ∈ (a, b). This leads to the usual notion of a continuous function on the real line familiar from calculus: a function f : R → R is continuous at x, iff, for every neighborhood v = (f(x)−, f(x)+) of f(x), there exists a neighborhood u = (x−δ, x+δ) such that f(u) ⊆ v.

Definition 4 A basis for a space X is a family of subsets σ such that a subset u ⊆ X is open iff it is expressible as S s for some s ⊆ σ. The elements of σ are called “basic” open sets (relative to σ).

For the real line, the set of open intervals (a, b) forms a basis. For that matter, the set of rational open intervals (a, b) forms a basis too. The definition of continuity can now be refined. A function f : X → Y is continuous if, for every basic open set v of Y , f −1(v) is an open set in X. The example of real line gives a “geometric” intuition to the subject of topology. For our purposes, it is also useful to keep in mind a “logical” intuition. Regard the open sets as (perhaps finitary) pieces of information about their constituents. For instance, the open interval (x − δ, x + δ) says that each of its elements is within δ distance from x. Union of open sets then corresponds to infinitary disjunction of information. The denotes the “impossibility.” Intersection corresponds to finitary conjunc- tion of information. Continuity of functions says that each (finitary) piece of information about f(x) can be obtained from some (finitary) piece of information about x. These are, indeed, the basic intuitions underlying domain-theoretic semantics for programming languages.

2 Domains as topologies

Consider Scott domains (bounded-complete algebraic cpo’s). We write D0 for the set of finite elements (compact elements) of D. Every x ∈ D can be written as x = F(↓x) where ↓x is the downward- { y : y v x }. Since D is algebraic, we can in fact write x = F(↓0x) where ↓0x = (↓x) ∩ D0. We have x v y iff ↓0{x} ⊆ ↓0{y}. A Scott-continuous function f : D → E preserves directed sups. There is an equivalent criterion:

2 Theorem 5 A function f : D → E is Scott-continuous iff, whenever y0 v f(x) is a finite element, there exists a finite approximation x0 v x such that y0 v f(x0).

Proof: “Only if:” Suppose y0 v f(x) is a finite element. Consider the 0 F F d = ↓ x. Since x = d, we have f(x) = f(d). But y0 is a finite element, so it is bounded by an element in f(d), say f(x0) where x0 ∈ d. We have that y0 v f(x0), x0 a finite approximation of x. “If:” Suppose d ⊆ D0 is a directed set with Fd = x. Without loss of generality, assume that d is down-closed. Then, for every finite y0 v f(x), F we have y0 v f(x0) v f(d) (where x0 is an appropriate finite element in d). This shows f(x) v Ff(d). The reverse inclusion Ff(d) v f(x) follows by monotinicity. Hence, f(x) = Ff(d). If x is a finite element, there is no reason for f(x) to be a finite element. But, if f(x) is finite, then all its information is already contained in f(x0) for some finite approximation x0 v x. Let us restate the criterion of the theorem in terms of upper sets. “y0 v f(x)” is equivalent to f(x) ∈ ↑{y0}, and “x0 v x” is equivalent to x ∈ ↑{x0}. So, f continuous means that whenever f(x) is in a compact ↑{y0}, there exists a compact upper set ↑{x0} containing x such that f(↑{x0}) ⊆ ↑{y0}. Thus, we may regard compact compact upper sets ↑{x0} and unions thereof, as open sets.

Definition 6 If D is a , a Scott-open set in D is an upper set ↑a of a subset a ⊆ D0. The collection of Scott-open sets forms a topology on D, called the Scott topology.

To see that this is a topology, note that the union of upper sets Ss is an upper set and the minimal elements are still finite. The intersection of upper sets ↑a ∩ ↑b is ↑{ x t y : x ∈ a, y ∈ b } if x t y exists and ∅ otherwise.

Corollary 7 A function f : D → E between Scott domains is Scott- continuous iff it is (topologically) continuous with D and E regarded as Scott topologies.

We may now import geometric as well as logical intuitions to Scott domains. Geometrically speaking, we regard every Scott-open set ↑a as a neighborhood for every element x ∈ ↑a. A “smaller” neighborhood ↑b of x satisfies the “upper” order a vU b ⇐⇒ ∀y0 ∈ b. ∃x0 ∈ a. x0 v y0, i.e., every point of b is above some point of a. Continuity says that we can get arbitrarily close to f(x) by getting arbitrarily close to x. Logically speaking, the finite elements of D represent finitary pieces of information about the elements of D. The finite element ⊥D says “nothing” (↑{⊥D} = D) while x0 t y0 gives the conjunction of information given by x0 and y0 (↑{x0 t y0} = ↑{x0} ∩ ↑{y0}). If there is no upper bound for x0 and

3 y0, then their information is “inconsistent” together, i.e., ↑{x0} ∩ ↑{y0} = S ∅. Disjunction of information is given by union (↑a = x∈a ↑{x}). All this is certainly implicit in our usual understanding of Scott domains. The topological formulation makes it explicit. We will introduce a bit of notation. If u and v have a non-empty intersection, we write u ^_ v to mean that they are consistent. If the intersection is empty, we write u ^ v. (They are inconsistent.) If they are allowed to be equal as well as be inconsistent, we write u _^ v.

3 Topological notions

The basic concept of a is much too general (in the same vein as the notion of cpo being too general). A variety of “separation axioms” are often used to characterize the spaces of interest. A Hausdorff space or T2-space is defined by the axiom: whenever x and y are distinct points, there exist disjoint neighborhoods u and v for the two points respectively. One writes

x 6= y =⇒ ∃u, v ∈ ΩX . u ^ v ∧ x ∈ u ∧ y ∈ v or _ [∀u, v ∈ ΩX . x ∈ u ∧ y ∈ v =⇒ u ^ v] =⇒ x = y So, in a Hausdorff space, all points are “independent” and do not impinge on each other. For example, the real line forms a Hausdorff space under the standard topology. So do all metric spaces. But, Scott domains are not Hausdorff. If x v y, every neighborhood of x is a neighborhood of y. A T0-space is defined by the axiom: whenever x and y are distinct points, there exists an open set u that contains one but not the other. One writes

x 6= y =⇒ ∃u ∈ ΩX . (x ∈ u ∧ y 6∈ u) ∨ (x 6∈ u ∧ y ∈ u) or [∀u ∈ ΩX . x ∈ u ⇐⇒ y ∈ u] =⇒ x = y < Scott domains are T0-spaces. Define a specialization preorder ∼X on the points of a space X by < x ∼X y ⇐⇒ [∀u ∈ ΩX . x ∈ u =⇒ y ∈ u]

Then, the T0-axiom says precisely that the specialization preorder is a partial < < order: x ∼X y∧y ∼X x =⇒ x = y. For a Scott domain D, the specialization < preorder ∼D is nothing but the domain order vD, which is a partial order. Thus, Scott domains are T0. A T1-space is defined by the axiom: whenever x and y are distinct points, there exists an open set u that contains x but not y. One writes

x 6= y =⇒ ∃u ∈ ΩX . x ∈ u ∧ y 6∈ u

4 or < x ∼X y =⇒ x = y This is equivalent to requiring that every point of X is a (i.e., its complement is an open set). Note that every Hausdorff space is T1 and every T1-space is T0. We are mainly interested in non-T1-spaces.

Definition 8 A subset a ⊆ X is said to be compact if whenever a ⊆ Ss for S a family of open sets s, there exists a finite subset s0 ⊆ s such that a ⊆ s0. (Every open covering of a contains a finite subcovering of a.)

In a metric space (which is Hausdorff), compact sets are precisely closed sets that are bounded. Since we are interested in non-Hausdorff, non-T1 spaces, compact sets are an appropriate generalization of closed sets for our purpose. The set of compact open sets of a space X is denoted KΩ(X). A space X is said to be coherent if KΩ(X) is closed under finite intersections and forms a subbasis for ΩX .

4 and locales

In the above treatment, we have used the classical view of topology where points are takes to be primary and open sets are regarded as collections of points. There is an alternative view where open sets (or information tokens) are taken to be primary and points are manufactured as consistent collections of information tokens. This is called pointless topology and leads to constructive proofs of major results [Joh82, Joh83]. From the programming language point of view, it leads to the alternative formulation of Scott domains as information systems [Sco82]. Once we discard points, all that we know about open sets is that they are closed under arbitrary (abstract) unions and finite (abstract) intersections. Axiomatization of these properties gives structures called locales.

Definition 9 A locale is a poset A = hA, `Ai that is closed under arbitrary sups (W) and finite meets (V) such that the following “infinite” distributive law holds: a ∧ (Ws) = W{ a ∧ b : b ∈ s } A locale map must model continuous functions f : X → Y . Since −1 continuous functions induce inverse images f :ΩY → ΩX , locale maps A → B will likewise be inverses of functions. Note that the inverse image −1 function f preserves any existing unions and intersections in ΩX : x ∈ f −1(Ss) ⇐⇒ f(x) ∈ Ss ⇐⇒ ∃b ∈ s. f(x) ∈ b ⇐⇒ x ∈ S{ f −1(b): b ∈ s } x ∈ f −1(Ts) ⇐⇒ f(x) ∈ Ts ⇐⇒ ∀b ∈ s. f(x) ∈ b ⇐⇒ x ∈ T{ f −1(b): b ∈ s }

5 One would thus expect that the inverse locale maps preserve sups and meets.

Definition 10 If A and B are locales, a locale map f : A → B is a monotone function f ∗ : B → A such that

f ∗(Ws) = Wf(s) (arbitrary s ⊆ B) f ∗(Vs) = Vf(s) (finite s ⊆ B)

There is a functor Ω : Top → Loc which maps a space X to the of its open sets and a continuous function f : X → Y to the locale map Ωf ∗ −1 such that (Ωf) is the inverse image map f :ΩY → ΩX . Locales are best understood from the logical point of view. The partial order a ` b means that the information a entails the information b. Meets represent conjunction of information and sups represent disjunction. Locale maps f : A → B construct B-typed information from A-typed information so that f ∗(b) = a means that, to obtain the information b from the output of the “construction,” one needs the information a about the input. How does a locale model points? Since the elements of a locale model the information content of a topology, points must be suitable collections of information. To see what kind of collections, write x |= a to mean that an abstract point x has information a.

1. If x has information a, it must also have any information entailed by a. x |= a and a ` b =⇒ x |= b

2. If x has informations a1, . . . , an, it must also have the information denoted by their conjunction:

x |= a1, . . . , x |= an =⇒ x |= a1 ∧ · · · ∧ an

W 3. If x has disjunctive information i∈I ai, it must have the information of some disjunct: W x |= i∈I ai =⇒ ∃i ∈ I. x |= ai

Collections of locale elements satisfying these properties are called com- pletely prime filters. (See appendix for a detailed treatment of this notion.)

Definition 11 Given a locale A, a completely prime filter x of A is a subset x ⊆ A such that it is

1. up-closed: a ∈ x and a ` b implies b ∈ x,

2. meet-subsemilattice: a1, . . . , an ∈ x implies a1 ∧ · · · ∧ an ∈ x, and 3. completely prime: for s ⊆ A, Ws ∈ x implies ∃a ∈ s. a ∈ x.

6 (By virtue of 1, both 2 and 3 have the force of bi-implications.) A completely prime filter of A is the same thing as a locale map 2 → A where 2 is the two-element lattice (0 < 1). Suppose f : 2 → A is such a ∗ ∗ ∗ map. If f (a) = 1 and a ` b then f ∗ (b) = 1. If f (a1) = ··· = f (an) = 1 ∗ ∗ W ∗ then f (a1 ∧ · · · ∧ an) = 1. If f ( s) = 1 then f (a) = 1 for some a ∈ s. Thus, (f ∗)−1(1) is a completely prime filter. For convenience in the discussion below, we write x |= a for a ∈ x when x is a completely prime filter. We define a topological space Pt(A) whose points are completely prime filters of A. Each a ∈ A determines an open set ua given by

ua = { x : x |= a } S It is easy to verify that u1 = Pt(A), ua ∩ ub = ua∧b and a∈sua = uWs. If f : A → B is a locale map, define Pt(f): Pt(A) → Pt(B) by

Pt(f)(x) = { b : x |= f ∗(b) }

This gives a functor Pt : Loc → Top. Ω < The functors Loc > Top form an adjunction, with a natural isomor- Pt phism: Loc(ΩX,A) =∼ Top(X, Pt(A))

Information systems Scott’s information systems provide a good example of locale-like structures. An information system is a four-tuple A = hA, ConA, `A, ∆Ai where • A is a set (of (information) tokens),

• ConA ⊆ FA is a collection of finite sets over A,

• `A ⊆ ConA × A is a binary , and

• ∆A ∈ A is a distinguished token, such that

1. if u ⊆ v and v ∈ Con implies u ∈ Con,

2. for all a ∈ A, {a} ∈ Con,

3. if u ` a then u ∪ {a} ∈ Con,

4. u ` ∆,

5. if a ∈ u then u ` a, and

7 6. if u ` a1, . . . , u ` an and {a1, . . . , an} ` b then u ` b. Extend the relation ` to Con×Con by u ` v iff ∀b ∈ v. u ` b. It is easy to see that ` forms a preorder on Con with a top (weakest) element ∅. Moreover, u ⊇ u0 implies u ` u0, and u ` v and u ` v0 implies u ` v ∪ v0. The intuition is that each token a represents a finite piece of information about a computation. A finite consistent set {a1, . . . , an} should be viewed as a “conjunction” a1 ∧ · · · ∧ an. Let the equivalence u≈v be u ` v ∧ v ` u. Then the partial order hCon/≈, `/≈i forms (almost) a locale. The sups are given by intersection and the meets (when they exist) by consistent union. The top element is ∅. There is no least element however. One may add an additional least element ⊥ in order to obtain a locale. (It is then closed under all meets.) An approximable map between information systems F : A → B is a relation F ⊆ ConA × ConB such that

1. ∅ F ∅, 2. if u F v and u F v0 then u F (v ∪ v0), and

3. if u0 ` u, u F v and v ` v0 implies u0 F v0.

∗ Such a map may be regarded as a function F : ConB → ConA as follows:

F ∗(v) = S{ u : u F v }

This is monotone: if v ` v0 then u F v implies u F v0. So, F ∗(v) ⊆ F ∗(v0). ...

Appendix

A Ideals and Filters

The notion of “ideals” originates in theory and pervades other algebraic theories including lattice theory. We give a quick review of these concepts here. Consider commutative rings. If f : K → K0 is a of commutative rings, it has a kernel a = f −1(00). By properties of ring morphisms, it follows that a is an additive of K, i.e., 0 ∈ a, x, y ∈ a =⇒ x + y ∈ a and x ∈ a =⇒ −x ∈ a. Further, it is closed under the operations “multiply by z” for every element z ∈ K. These properties determine ideals:

Definition 12 An in a ring R is a subset a ⊆ R such that

1. a is a subgroup of R, and

8 2. for all z ∈ R, za ⊆ a and az ⊆ a. Even though ideals are defined for all rings, we focus on the commutative case as the notion of ideals is simpler in that case. If k1, . . . , kn ∈ K, there is an ideal that contains all “polynomials” of the form k1x1 + ··· + knxn. Note that it is closed under all the operations and multiplication by elements z ∈ K. This is called the ideal generated by {k1, . . . , kn}. In particular, for any x ∈ K, the ideal generated by x is xK consisting of all multiples of x. It is called the principal ideal generated by x. If a1 and a2 are ideals of K, their intersection a1∩a2 is an ideal. Likewise, there is a least ideal including a1 and a2, viz., the ideal generated by a1 ∪a2. These operations extend to arbitrary arity. If s is a family of ideals, Ts is an ideal. The minimal ideal is {0} and the maximal ideal is K itself. These facts make the ideals of K into a Idl(K). A prime ideal is an ideal a, other than the maximal ideal, which satisfies:

xy ∈ a =⇒ x ∈ a ∨ y ∈ a

If a is a principal ideal pK then x ∈ pK means precisely that x is a multiple of p (notation: p | x). Then pK is a prime ideal iff p | xy implies p | x or p | y, in other words, p is a prime element. Thus, the notion of prime ideals is a generalization of that of prime elements. These notions are imported to lattice theory ipso facto. If f : A → A0 is a lattice morphism, its kernel a = f −1(00) is a sub- of A, i.e., 0 ∈ a, x, y ∈ a =⇒ x ∨ y ∈ a. Further, it is closed under the operations “z ∧ −” for all elements z ∈ A. However, “closed under z ∧ −” just means down-closed. This fact allows us to extend the notion of ideals to and posets. Definition 13 An ideal in a (join-) semilattice A is a sub-semilattice a ⊆ A that is down-closed. By inverting the order, we obtain meet-semilattices whose ideals are called filters. More precisely, a filter in a (meet-) semilattice A is a sub-semilattice a ∈ A that is up-closed. For lattices proper, we now obtain two notions: ideals and filters, which play dual roles. A word of warning: there are more ideals than kernels of lattice . However, for distributive lattices, the two concepts coincide The ideals and filters of A form complete lattices Idl(A) and Filt(A) respectively. The principal ideal generated by x ∈ A is the lower set ↓{x} and the principal filter is the upper set ↑{x}. The minimal and maximal elements of Idl(A) are {0} and A respectively, and those of Filt(A) are {1} and A respectively. A prime ideal is a non-maximal ideal that satisfies:

x ∧ y ∈ a =⇒ x ∈ a or y ∈ a

9 A prime filter is a non-maximal filter that satisfies:

x ∨ y ∈ a =⇒ x ∈ a or y ∈ a

Consider a lattice homomorphism f : A → 2 where 2 is the two element lattice 0 < 1. Then, a = f −1(0) is an ideal anda ¯ = f −1(1) is a filter. Note that a anda ¯ are complements of each other. It is seen that a is a prime ideal anda ¯ is a prime filter. If x ∧ y ∈ a then f(x ∧ y) = 0 = f(x) ∧ f(y). So, either f(x) = 0 or f(y) = 0. Similarly fora ¯. Thus, we have shown:

Proposition 14 An ideal in a lattice is prime iff its complement is a filter and vice versa.

There are two notions of prime elements in a lattice corresponding to prime ideals and filters. A meet-prime is an element p whose principal ideal is prime. It satisfies p 6= 1 and

x ∧ y ≤ p =⇒ x ≤ p or y ≤ p

A join-prime is an element whose principal filter is prime. It satisfies p 6= 0 and p ≤ x ∨ y =⇒ p ≤ x or p ≤ y In a complete lattice, we have the following obvious extensions of “prime- ness:”

1. A completely prime ideal is a non-maximal ideal that satisfies Vs ∈ a =⇒ ∃x ∈ s. x ∈ a.

2. A completely prime filter is a non-maximal filter that satisfies Ws ∈ a =⇒ ∃x ∈ s. x ∈ a.

The corresponding notions of prime elements are:

1. A complete meet-prime is an element p such that Vs ≤ p =⇒ ∃x ∈ s. x ≤ p.

2. A complete join-prime is an element p such that p ≤ Ws =⇒ ∃x ∈ s. p ≤ x.

Finally, we consider the generalization of these notions to arbitrary posets.

Definition 15 An ideal in a poset X is a subset d ⊆ X that is directed and down-closed.

10 If X is a join-semilattice, this notion coincides with that of Definition 13. Since d is directed, whenever it contains two elements x and y, it contains an upper bound z of x and y. But, since d is down-closed, it also contains x ∨ y. Similarly, a filter in a poset X is an up-closed set d that is “directed downwards” (if d contains x and y, it contains some lower bound z of x and y). The collection Idl(X) of ideals of X need not be a complete lattice; ideals do not have arbitrary joins and meets. However Idl(X) is always a cpo (has directed sups). If s is a directed set of ideals, the union Ss is an ideal. Similarly, Filt(X) is a cpo. The principal ideal embedding ↓{−} : X → Idl(X) is a monotone map that embeds a poset into a cpo. If X is a join-semilattice, the same em- bedding is a semilattice homomorphism that embeds a semilattice into a complete lattice. The embedding has a left adjoint W : Idl(X) → X iff X iff X is a cpo (complete lattice) to begin with.

References

[Joh82] P. T. Johnstone. Stone Spaces, volume 3 of Cambridge Studies in Advanced Mathematics. Cambridge Univ. Press, 1982.

[Joh83] P. T. Johnstone. The point of pointless topology. Bull. Amer. Math. Soc, page ???, 1983.

[Sco82] D. S. Scott. Domains for denotational semantics. In M. Nielsen and E. M. Schmidt, editors, Intern. Colloq. Aut., Lang. and Program., volume 140 of LNCS, pages 577–613. Springer-Verlag, 1982.

11