Topology, Domain Theory and Theoretical Computer Science
Total Page:16
File Type:pdf, Size:1020Kb
Draft URL httpwwwmathtulaneedumwmtopandcspsgz pages Top ology Domain Theory and Theoretical Computer Science Michael W Mislove Department of Mathematics Tulane University New Orleans LA Abstract In this pap er we survey the use of ordertheoretic top ology in theoretical computer science with an emphasis on applications of domain theory Our fo cus is on the uses of ordertheoretic top ology in programming language semantics and on problems of p otential interest to top ologists that stem from concerns that semantics generates Keywords Domain theory Scott top ology p ower domains untyp ed lamb da calculus Subject Classication BFBNQ Intro duction Top ology has proved to b e an essential to ol for certain asp ects of theoretical computer science Conversely the problems that arise in the computational setting have provided new and interesting stimuli for top ology These prob lems also have increased the interaction b etween top ology and related areas of mathematics such as order theory and top ological algebra In this pap er we outline some of these interactions b etween top ology and theoretical computer science fo cusing on those asp ects that have b een most useful to one particular area of theoretical computation denotational semantics This pap er b egan with the goal of highlighting how the interaction of order and top ology plays a fundamental role in programming semantics and related areas It also started with the viewp oint that there are many purely top o logical notions that are useful in theoretical computer science that could b e highlighted and which could attract the attention of top ologists to this area And to b e sure there are many interesting and app ealing applications of pure top ology certainly in the form of metric space arguments that have b een made to theoretical computer science But as the work evolved it b e came clear that the main applications of top ology to the area of programming 1 This work is partially supp orted by the US Oce of Naval Research Preprint submitted to Elsevier Preprint May Mislove semantics involve not just top ology alone but also involve order in an essen tial way And this approach places domain theory at center stage since it is the area that has combined order and top ology for application to theoretical computation most eectively The goal now is to show why this is so and why it is ordertheoretic top ology that has had such a large impact on theoretical computer science In particular we highlight those asp ects of domain theory and its relationship to top ology that have proved to b e of greatest utility and imp ortance At the same time we do cument the advantages domain theory enjoys in this area of application and the standard that domain theory has set in providing solutions to the problems this area of application p oses Top ology versus Order Lets b egin with a simple but illustrative example Example Let N f g denote the natural numb ers and let N N denote the set of partial functions from N to itself Consider the family of partial functions f N N dened by n n m if m n f m n undened otherwise We would like to assert that the functions ff g converge to the function n nN FAC N N by FACm m m N To nd a suitable top ology on N N to express this convergence we rst identify N N with a space of total functions Let b e an element not in N and dene N N fg We interpret as undened and we dene an injection n f x if f x is dened f f N N N N by f x otherwise Then it is clear that ff j f N N g is precisely the set of selfmaps of N that are strict ie those that take to itself If we endow N with the discrete top ology then all the functions in N N are continuous Prop osition In the compactopen topology on N N the sequence ff g converges to FAC n nN Pro of Since N is discrete the compactop en top ology on N N is the same as the top ology of p ointwise convergence so the result is clear 2 We also note that by endowing N with the discrete metric and giving N N the Frechet metric the Prop osition remains true for the metric top ology on N N But even though we have convergence of ff g to FAC after suitable n nN identication with ff g something is lost in this assertion Namely the n nN functions ff g represent increasing approximations to FAC indeed as n n nN increases so do es the amount of information we have ab out the limit function FAC In fact there is a natural order on N N that makes this idea precise Mislove Denition Dene the extensional order on the space N N by f v g i domf domg g j f domf where domf f N Clearly in this order any increasing family of partial functions has a supre mum the union Moreover the function FAC is the supremum of the family ff g Our next goal is to capture this as a convergence in order This n nN leads us to the Scott topology Denition Let P b e a partially ordered set A subset D P is directed if F D nitex D y v x y F P is a complete partial order cpo for short if P has a least element usually denoted and if every directed subset of P has a least upp er b ound in P Note that a directed set must b e nonempty since the empty set is a nite subset of every set For example the family N N is a cp o the nowheredened function is the least element and the supremum of a directed family of functions is just their union Similarly we can give N the at order whereby x v y if and only if x or x y for all x y N This corresp onds to the p ointwise order on the space N N of monotone selfmaps of N and in this order the supremum of a directed family of functions is the p ointwise supremum and the constant function with value is the least element Denition Let P b e a partially ordered set A subset U P is Scott open if U U fy P j x U u v y g is an upp er set and F D P directed D U D U Prop osition Let P be a partial ly ordered set i The family of Scott open sets is a T topology on P ii If x y P and there is some open set containing x but not containing y then x y iii The fol lowing are equivalent a The Scott topology is T b P has the discrete order c The Scott topology is T d The Scott topology is discrete Pro of Let P b e a partially ordered set Clearly the union of upp er sets from F S U with U op en P is an upp er set And if D P is directed and D i i i F for each i I then D U for some i I Since U is Scott op en it follows i i S U that D U and so the same is true of D i i i If x v y P then the denition of Scott op en implies that y fz P j z v y g is Scott closed Since x y we have x P n y which is Scott op en Hence the Scott top ology is T this proves i Mislove For ii if x y P and x U then x y and U U imply y U as well Thus y U must imply x y Finally iii follows easily from ii 2 In our example N N it is not hard to show that f is Scott op en if domf is nite a directed union of functions extends a nite function if and only if one of the functions in the directed family extends the nite function and as it happ ens this family of principal upp er sets forms a basis for the Scott top ology on N N There are a numb er of imp ortant results that are true of the Scott top ology Below we summarize some of them they all can b e found for dcp os cp os without least elements as well as cp os in eg Prop osition Let P be a cpo and endow P with the Scott topology F i If D P is directed then D is a limit point of D and it is the greatest limit point of D ii Let I and J be directed sets and let i j x I J P be monotone ij Then F F F F x x a ij ij j J iI iI j J F F F x x b If I J then ii ij iI iI j J iii If Q also is a dcpo then f P Q is continuous i f is monotone and preserves sups of directed sets 2 As we shall see the second part of this result is a very useful to ol in proving results ab out continuous functions b etween dcp os One of the most celebrated results ab out cp os is the following We at tribute it to Tarski who rst proved it for complete lattices However a numb er of others among them Scott and Knaster have contributed to this result Theorem Tarski If P is a cpo and f P P is monotone then f has a least xed point F F n f f If f is continuous then xf xf nN Ord Pro of We conne ourselves to an outline For the rst part the monotonicity n of f and the fact that v x x P implies v f and so ff g is nN a chain Since P is a cp o this chain has a least upp er b ound which we use to F n f A transnite induction then shows that f dene f nN is welldened for all ordinals and that implies f v f Since this holds for all ordinals there must b e one where the increasing chain stops growing and the rst place this happ ens is easily seen to b e a xed p oint of f The fact that v x x P implies f v f y y for all xed p oints y of f and all ordinals showing that the rst ordinal where f f f is the least xed p oint of f If f is continuous then it follows that G G G n n n f f f f f n n n 2 Mislove Example Returning to our example we recall that the natural order on N N makes the empty function the least element this corresp onds to the p ointwise order on the family N N of monotone selfmaps of N and the constant function with value is the least element Now let N N N N b e the family of Scottcontinuous selfmaps of N N Dene if n if n F N N N N by F f n n f n otherwise where we dene n n for all n N Then F is Scott continuous indeed as the domain of the function f increases then the domain of F f