Available online at www.sciencedirect.com

SciVerse ScienceDirect

Electronic Notes in Theoretical Computer Science 286 (2012) 43-56

www.elsevier.com/locate/entcs

Observationally-induced Effects in Cartesian Closed Categories

Ingo Battenfeld1

Fakultät für Informatik

TU Dortmund Dortmund, Germany

Abstract

Alex Simpson has suggested an observationally-induced approach towards obtaining monads for computational effects in denotational semantics. The underlying idea of this approach is to use a single observation algebra as computational prototype and to obtain a computational monad as a free algebra construction derived from this prototype. Recently, it has been shown that free observationally-induced algebras exist in the category of continuous maps between topological spaces for arbitrary pre-chosen computational prototypes.

In this work we transfer these results to cartesian closed categories. In particular, we show that, provided the category under consideration satisfies suitable completeness conditions, it supports a free observationally-induced algebra construction for arbitrary computational prototypes. We also show that the free algebras are obtained as certain subobjects of double exponentials involving the computational prototype as result type. Finally, we apply these results to show that in topological domain theory an observationally-induced lower powerspace construction over a QCB-space X is given by the space of nonempty closed subsets of X topologised suitably.

Keywords: denotational semantics, computational effects, powerdomains, topological domain theory

1 Introduction

Computational effects occur whenever a computer program interacts with its physical environment. The most common examples for computational effects are interactive user in- and output, reading from and writing to memory cells, nondeterministic and probabilistic features of the underlying system. Thus, when giving a denota-tional semantics to a programming language, no matter how tight this language follows an abstract calculus, one has to provide means for modelling computational effects. The first general denotational treatment of computational effects has been proposed by Moggi in the form of computational monads [9], which had significant impact on the subsequent design of functional programming languages, perhaps

1 Email: ingo.battenfeld@tu-dortmund.de

1571-0661/$ - see front matter © 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.entcs.2012.08.004

most prominently in Haskell. This work has since been refined by Plotkin and Power's proposal to obtain computational monads as free algebra constructions for suitable algebraic theories [10]. The principal idea of this approach is that computational effects are triggered by algebraic operations, which therefore have to be modelled on the corresponding datatypes.

In recent years, Alex Simpson has furthermore refined the Plotkin and Power approach by suggesting to derive a computational monad from the algebraic properties of a single observation algebra instead of using a free algebra construction for a general equational algebraic theory [12]. The observation algebra that induces this construction can be thought of as computational prototype, giving rise to computational observations. Therefore, one may call this construction an observationally-induced approach to computational effects. Simpson and Schroder have used the observationally-induced approach to recover a probabilistic powerspace construction as space of probability valuations in Top, the category of continuous maps between topological spaces [12,13]. In recent work, Schroder and the author have shown that in Top, free observationally-induced algebras exist for arbitrary pre-chosen computational prototypes, and how to derive and characterise lower and upper powerspace constructions [2].

In the work at hand we investigate free observationally-induced algebra constructions in cartesian closed categories. Cartesian closure is essential when it comes to model function types in denotational semantics. Hence this work aims at answering some naturally arising questions concerning existence and characterisation of observationally-induced effect types in such frameworks. It turns out that under suitable completeness requirements on the category under investigation, free observationally-induced algebras exist for arbitrary computational prototypes. A particularly interesting result is that the free algebras are obtained as subobjects of a double exponential, reminiscent of continuation types where the result type of the continuation is the respective computational prototype. Furthermore, we show that under this construction one obtains a lower powerspace construction in the category QCB, of continuous maps between quotients of countably-based spaces, which is one of the central categories in topological domain theory [3]. This observationally-induced lower powerspace over a QCB-space X is given by the set of nonempty closed subsets of X topologised suitably. This shows that in topological domain theory one can recover a classical intrinsic lower powerspace construction via free observationally-induced algebras, which is known not to be the case for the upper or probabilistic powerspaces.

The paper is organised as follows. In section 2, we recall the basic definitions of free observationally-induced algebras. In section 3, we show that under suitable completeness conditions free observationally-induced algebras exist in cartesian closed categories for arbitrary pre-chosen computational prototypes. Section 4 applies these results to investigate a lower powerspace construction in topological domain theory. The paper is concluded in section 5.

I. Battenfeld /Electronic Notes in Theoretical Computer Science 286 (2012) 43—56 45

2 Observationally-induced algebras

Throughout the paper, we assume E to be an algebraic signature, i.e. a set of operation symbols {a £ E} each of which has an arity \a\ £ N. Then in any category C with finite products we can apply the usual definition of E-algebras and E-homomorphisms and get a corresponding category Cs. This holds in particular for cartesian closed categories and for the purpose of this paper we assume all our categories to be such.

Remark 2.1 For simplicity we assume the arity of an operation to be a natural number, i.e. we consider finitary signatures. However, the results below can easily be adjusted to more general settings, such as arities given by cardinals up to .some fixed k, objects of the ambient category or parameterised operations as in [1] (which correspond to operations with co-arities). The important point is that a category of E-algebras in C has to be well-defined.

In section 4.6 of [1], it has been shown that:

Lemma 2.2 If (A, {aA}) is a Cs-algebra and X any object of C, then there exists a canonical E-algebra structure on the exponential AX, giving the Cs-algebra

(AX, {aax }).

Proof. The operations a ax are given by aX o t^i where i\a\ : (AI<T\)X = (AX is the canonical isomorphism. □

This allows us to define the notion of left and right homomorphisms.

Definition 2.3 Suppose (A, {aA}) and (B, {as}) are Cs-algebras and Z is any object of C. Then a right E-homomorphism is a map h : Z x A ^ B for which the exponential transpose h : (A, {aa}) (BZ, {aBz}) is a E-homomorphism. We usually write h : Z x (A, {aA}) — (B, {as}) for such a right E-homomorphism.

Notice that for every canonical exponential algebra (AX, {aax}), the evaluation map eval : X x (AX, {aAX}) — (A, {aA}) becomes a right homomorphism, since it is the exponential transpose of the identity map AX^ AX.

Following Schroder and Simpson [12], we define observationally-induced algebras in a parameterised setting.

Definition 2.4 Suppose (O, {ao}) is a fixed Cs-algebra, serving as computational prototype (or observational prototype).

• An abstract (O, {ao})-structure over an object X is a tuple (A, {aA},n) where (A, {aA}) is a Cs-algebra and n : X — A a C-morphism such that for every C-object Z, every C-morphism f : Z x X — O extends to a unique right E-

homomorphism f : Z x (A, [va}) ^ (O, [vq}) along Z x n, as in:

Zx A --J-- O

• A complete (O, [ao})-algebra is a C^-algebra (B, [as}) such that for every C-object X and every abstract (O, [ao})-structure (A, [aA},n) over X, every morphism f : Z x X ^ B extends to a unique right E-homomorphism f : Z x (A, [aA}) ^ (B, [as}) along Z x n, as in:

The category of complete (O, [ao})-algebras and E-homomorphisms between them is denoted by C(o,{o-0}).

• Provided it exists, the free complete (O, [ao})-algebra over an object X is called the free observationally-induced (O, [ao})-algebra over X. It is uniquely determined (up to isomorphism) and given by a complete (O, [ao})-algebra (A, [aA}) such that there exists a map n : X ^ A making (A, [aA},n) an abstract (O, [ao})-structure (A, [aA},n) over X.

It should be mentioned that this definition is strongly influenced by the work of Hyland [7] and Taylor [14].

To motivate the use of observationally-induced algebras for modelling effect types consider the following. According to Plotkin and Power [10] most computational effects are algebraic, i.e. triggered by algebraic operations. These operations define a signature E and, in principle, every E-algebra is a potential denotation of an effect type. However, as pointed out by Plotkin and Power, some coherence conditions are needed in order to define a well-behaved effect type. In op. cit. they formulate these coherence conditions in form of algebraic equations, e.g. expressing that a binary nondeterministic choice operation should be commutative, associative and idempotent. Thus, they propose effect types to be modelled by algebras for the corresponding equational theory. The observationally-induced approach differs in the respect that the coherence conditions are completely determined by the properties of the observational prototype. Indeed, the following results show that it suffices that complete (O, [ao})-algebras behave like the prototype (O, [ao}) with respect to abstract (O, [ao})-structures, in order to inherit many properties of the prototype, including but not limited to equational laws. Therefore, one might consider the observationally-induced approach towards modelling computational effects as a

Zx A --f-- B

refinement of the work of Plotkin and Power.

Let us start by observing the important fact that complete (O, [ao})-algebras are closed under exponentiation and taking limits in C.

Lemma 2.5 If (B, [as}) is a complete (O, [ao})-algebra, then for every C-object Y, the canonical Cz-algebra (BY, [aBv}) is a complete (O, [ao})-algebra, as well.

Proof. Suppose (A, [aA},n) is an abstract (O, [ao})-structure over X, and f : Z x X — Ay a C-morphism. The exponential transpose yields a morphism Y x Z x X — A which has a unique right E-homomorphism extension Y x Z x (A, [aA}) — (B, [as}) whose exponential transpose is the required unique right E-homomorphism extension f : Z x (A, [aa}) — (BY, [aby}). □

Lemma 2.6 The forgetful functor C(o,{aO}) — C creates limits.

Proof. It is well-known that the forgetful functor Ce — C creates limits. Essentially the argument is that whenever D is a diagram consisting of C^-algebras and E-homomorphisms for which a limit exists in C, then for any a E E, the diagram Dalso has a limit in C, namely Lim(D)1^1. Moreover, for every a E E the universal property of a limit yields a C-morphism Lim(D)1^1 = Lim(Dl<T\) — Lim(D) which gives the required operation a^im^D).

If (A, [aA},n) is an abstract (O, [ao})-structure over X, every C-morphism f : Z x X — Lim(D) induces a family of morphisms Z x X — D which have unique right homomorphism extensions Z x (A, [aA}) — D. Again by the universal property of a limit, these induce a unique right homomorphism f : Z x (A, [aA}) — Lim(D) extending f along n, as required. □

With these observations in hand, we can show that complete (O, [ao})-algebras satisfy all E-equations which hold in (O, [ao}), provided the category under consideration supports a free algebra construction for equational theories.

Let us recall that a E-equation e is given by a pair of E-terms (t, t') of the same arity, say |e|. These E-terms give rise to families of maps t_),t'_) : (—)e — (—) indexed by C^-algebras which commute with E-homomorphisms. A C^-algebra (A, [aA}) is said to satisfy the equation if tA = tA as maps in C.

Lemma 2.7 Let E be a set of E-equations and assume that (O, [ao}) satisfies all equations in E and that C supports a free (E, E)-algebra construction. Then every complete (O, [ao})-algebra (A, [aA}) satisfies the equations in E.

Proof. Let (A, [aA}) be a complete (O, [ao})-algebra, and (FA, [aFA}) be the free (E, E)-algebra over A with free algebra inclusion n. Furthermore, let e := (t, t') be an equation in E with arity |e|. Since (O, [ao}) satisfies all equations in E, we get that (FA, [aFA},n) is an abstract (O, [ao})-structure over A. Moreover, the previous lemmas prove that this also holds for the corresponding |e| -powers, and that (Ae, [aA\e\}) is a complete (O, [ao})-algebra.

Hence, we obtain the following commutative diagram:

id \e\

Thus, the equality of ífa and í'fa implies the equality of ía and t'A, and so (A, [aA}) satisfies the equation e. □

Finally we observe that complete (O, [ao})-algebras deserve the term complete by showing that their underlying C-objects belong to any full reflective subcategory to which O belongs, again provided that C supports a free algebra construction.

Lemma 2.8 Suppose C supports a free E-algebra construction. Let D be a full reflective subcategory of C; for which the reflection functor R : C ^ D preserves (finite) products. If O is an object of D; then so is the underlying space A of every complete (O, [ao})-algebra (A, [aa}).

Proof. Let F denote the free E-algebra functor. In [1, Chapter 5] it is shown that a product-preserving reflection functor lifts to the categories of algebras and that F o R = R o F. This can be used to show that for an arbitrary C-object X, we obtain an abstract (O, [ao})-structure (FRX, [aFRx},3) over X, where ( is the composition of the units of the reflection and the free E-algebra construction. In particular this yields a one-to-one correspondence between maps X ^ A and RX ^ A along the unit of the reflection. Instantiating X with A yields the required result. □

These results show our claim that the category C(o,{o-0}) of complete (O, [ao})-algebras inherits many desired properties from the computational prototype. Hence, a free observationally-induced algebra construction can indeed be considered as a refinement of Plotkin and Power's algebraic approach to computational effects.

3 Existence and characterisation in cartesian closed categories

In this section we show that under fairly mild conditions on the ambient cartesian closed category C, free observationally-induced algebras exist for arbitrary computational prototypes, and that they can be obtained as subobjects of certain double-exponentials.

Let us again assume the computational prototype (O, [ao}) to be given. The mild conditions on C we impose are the following two requirements.

Requirement 1 The category C supports a free E-algebra construction, i.e. the forgetful functor Cs — C has a left adjoint.

Observe that by Lemma 2.2, the free E-algebras are automatically parametrically free, i.e. for every Cs-algebra (A, [aA}) and every morphism f : Z x X — A there exists a unique right E-homomorphism extension f : Z x (FX, [aFx}) — (A, [aA}) along the free algebra unit X — FX.

Requirement 2 The category C has equalizers, infima of regular subobjects, i.e. every family [mi : Xi — Y} of regular monos with the same codomain has a limit in C, and regular monos are closed under composition.

These two requirements are closely related to completeness of the category C. Indeed, Requirement 2 holds in every complete category and completeness can be of great help when applying the Adjoint Functor Theorem to establish Requirement 1. However, in the next section we apply our results in QCB, the central category of topological domain theory, and QCB does satisfy Requirements 1 and 2 although it fails to be complete in general.

As mentioned in the introduction, the double-exponential of which the free observationally-induced algebra is carved out is a continuation-like type with the computational prototype as result type. For a given object X it is the object Oo , which by Lemma 2.5 carries a canonical E-algebra structure making it a complete (O, [ao})-algebra. We make the following straightforward observation.

Proposition 3.1 For every C-object X, let yx : X — OoX denote the map given by Xx.Xt.tx, i.e. the exponential transpose of the evaluation map X x Ox — O. Then every morphism f : Z x X — O has a (not necessarily unique) right E-homomorphism extension f : Z x (Oo , [aoOx }) — (O, [ao}) along yx.

Proof. Consider the exponential transpose f : Z — Ox of f, and define the required map to be the composite:

Z x Ox x o

In A-terms this map is given by Az.Ag.g(fz). It is a routine verification via manipulations of A-terms to show that this map is a right E-homomorphism and that it extends f along yx . □

Since (O°X, [aoOx}) is a complete (O, [ao})-algebra, the map yx : X — OoX from the proposition above has a unique homomorphism extension yx : (FX, [aFx}) — (OoX, [aoOX }), where the domain is the free E-algebra over X.

Definition 3.2 For a Cs-algebra (B, [as}) we define a E-subalgebra to be a Cs-algebra (A, [aA}) for which there exists a regular mono A — B in C which becomes a E-homomorphism on the corresponding algebra structures.

If (A, [aA}) is a E-subalgebra of (B, [as}) and both are complete (O, [ao})-algebras, we call (A, [aA}) a complete (O, [ao})-subalgebra of (B, [as}).

Under Requirement 2, Lemma 2.6 shows that C(o,{aO}) has infima of complete (O, [ao})-subalgebras. In particular this yields that (up to isomorphism) there exists a smallest complete (O, [ao})-subalgebra (A, [aa}) of (OO , [aoOx }) through which jx : (FX, [aFx}) — (OoX, [aoOx }) factors via homomorphisms as in:

A>-^OoX

i / FX

We show that this yields the free complete (O, [ao})-algebra over X.

Theorem 3.3 For every C-object X, the free complete (O, [ao})-algebra over X exists and is given by the smallest complete (O, [ao})-subalgebra (A, [aA}) of (OoX, [aoox }) through which Yx factors.

Proof. Clearly, (A, [aA}) is a complete (O, [ao})-algebra. Thus it suffices to show that one can obtain it as part of an abstract (O, [ao})-structure (A, [aA},n) over X.

The morphism n : X — A is given by the free algebra inclusion X — FX followed by the mediating morphism of the factorization of Yx . Now suppose f : Z x X — O is a C-morphism. We obtain the following diagram which consists of right E-homomorphisms where appropriate and commutes in all possible directions:

Thus we get a right E-homomorphism extension of f along Z x n. It remains to show that this extension is unique.

Assume that h,h' : Z x (A, [aA}) ^ (O, [ao}) are right E-homomorphism extensions of f along Z x n. Consider their exponential transposes h, h' : (A, [aA}) ^ (OZ, [aoz}) and the corresponding equalizer e : A' A which, by Lemma 2.6, carries a complete (O, [ao})-algebra structure. Thus, it is a complete (O, [ao})-subalgebra of (Oo , [aoOx }) through which Yx factors. Since (A, [aA}) was the smallest such subalgebra, it follows that e must be an isomorphism, hence h = h'.□

Obviously, this construction yields a left adjoint to the forgetful functor C(o,{o-O}) — C, hence it induces a monad on C. Using the argument of Lemma 4.5.7 in [1], one can show that this monad is strong.

Corollary 3.4 The free complete (O, [ao})-algebra construction induces a strong monad on the underlying cartesian closed category C.

Thus, given a cartesian closed category C and an observational prototype (O, [ao}), C supports a free complete (O, [ao})-algebra construction whenever it satisfies Requirements 1 and 2. More specifically, in that case the free complete (O, [ao})-algebra over X is given by a subobject (or subalgebra) of OoX. This result is not limited to ordinary finitary algebraic signatures, but applies to signatures with in-finitary operations, parameterised operations as in [1] or operations whose arity is given by an object of the ambient category. Of course, care has to be taken with respect to Requirement 1.

4 The lower powerspace construction in QCB

In this section we investigate an observationally-induced lower powerspace construction in the category QCB of continuous maps between topological quotients of countably-based topological spaces. This category lies at the core of topological domain theory [3], an extension of classical domain theory with excellent closure properties. The results in [1] show that QCB satisfies Requirements 1 and 2, provided that the signature E consists of operations with finite or countable arity which are allowed to be parameterised. For the paper at hand it suffices to consider ordinary finitary operations.

Corollary 4.1 Let E be a signature consisting of finitary operations and (O, [ao}) be a QCBs-algebra. Then the forgetful functor QCB^^^ — QCB has a left adjoint giving a free observationally-induced (O, [ao})-algebra construction. Moreover, for a given QCB-space X, the free (O, [ao})-algebra over X is given by a subalgebra of the canonical (OoX, [aoOX }).

In [4] it has been shown that QCB supports a free observationally-induced probabilistic powerspace construction by taking (I, ©) as observational prototype, where I is the unit interval equipped with the Scott-topology for the usual ordering and © the average sum operation. The proof in op.cit. differs from the method in the previous section, in that it uses an Adjoint Functor Theorem applied internally inside a realizability topos into which QCB embeds. Results from [12] could be used to show that for countably-based spaces X, the free observationally-induced probabilistic powerspace over X in QCB is given by a space whose underlying set consists precisely of the probability valuations of X, resembling the classical domain-theoretic construction. However, an example of Gruenhage and Streicher [6] was used to show that this classical intrinsic construction cannot be recovered by the observationally-induced approach on all QCB-spaces. The same example can easily be adapted to show that the classical intrinsic upper powerspace construction, which for a topological space X is given by a space whose underlying set consists precisely of the (proper) Scott-open filters of the topology of X, cannot be recovered in QCB as an observationally-induced free algebra construction. In fact, neither can the intrinsic upper powerspace construction be recovered via observationally-

induced algebras in the category of continuous maps between topological spaces, as an example in [2] shows. In contrast to these results we show that there is a free observationally-induced algebra construction which for all QCB-spaces X yields a space whose underlying set is given precisely by the nonempty closed subsets of X, hence resembles the classical intrinsic lower powerdomain construction.

As in [2], the observational prototype for the observationally-induced lower powerspace construction in QCB is given by (S, V), the Sierpinski space S with a binary operation (representing a nondeterministic choice) given by join. The results of the previous section show that we obtain the observationally-induced lower powerspace over a QCB-space X as a complete (S, V)-subalgebra of (SsX, VgSx). In the following we identify the elements of SSX with collections of open subsets of X (which are Scott-open with respect to the inclusion order). It is then an easy observation that the canonical VgSx is precisely given by set-union U on these collections.

Observe that the nonempty closed subsets of X embed into SS by the mapping:

B — B := [U e SX| U n B = %}.

We equip the nonempty closed subsets of X with the sequential (or equivalently compactly-generated) subspace topology for this embedding (—) and obtain the space C(X). Notice that (—) preserves all unions/joins although in general it fails to preserve intersections/meets. Let us identify the image of (—) in Ss .

Lemma 4.2 An element T e SsX is in the image of (—) : C(X) — SsX if and only if it satisfies the following two conditions:

(i) X eT,

(ii) if U U V eT, then U eT or V eT.

Proof. It is a straightforward observation that for all B e C(X), B satisfies (i) and (ii).

Conversely suppose T satisfies (i) and (ii). Then it is easy to see that BT := X \(J[V e SXI V e T}

is a nonempty closed subset of X such that T = Bt. □

Next, observe that for every U e SX the corresponding evaluation map evalu : Ss — S, given by evalu (T) = T if and only if U e T, is a continuous V-homomorphism. This observation is a key to the next result which shows that (C(X), U) forms a complete (S, V)-algebra.

Proposition 4.3 For every QCB-space X, (C(X), U) is a complete (S, V)-algebra. Proof. Suppose (A, ®,n) is an abstract (S, V)-structure over Y and f : Z x Y —

C(X) a continuous map. We obtain the following commuting diagram:

Z x A C (X)-——^

where h is the unique right homomorphism extension of (—) o f obtained from the fact that (SS , VgSX) is a complete (S, V)-algebra by Lemma 2.5. It suffices to show that the elements in the image of h satisfy conditions (i) and (ii) of Lemma 4.2.

For (i) observe that X £ f (z, y) for all (z, y) £ Z x Y, hence by the unique extension property we must have X £ h(z, a) for all (z, a) £ Z x A. This is the case, because the map evalx o h is a continuous right homomorphism extension of the constant map T : Z x X — S along Z x q. Thus, if there exists (zo,ao) £ Z x A with X £ h(z0,a0), then T : Z x X — S had at least two right homomorphism extensions along Z x q.

For (ii) assume U U V £ h(z0,a0). This yields that evaluuv ◦ h(z0,a0) = T. Moreover, we have that evaUuv ◦ (—) o f = (evalu o (—) o f) V (evaly o (—) o f), since every f (z,y) satisfies (ii). Thus these two maps have the same continuous right homomorphism extension along Z x q. But V composes continuous right homomorphisms, hence we get that:

(evalu o h)(z0,a0) V (evaly o h)(z0,a0) = (evaluuv o h)(z0,a0) ^T,

and thus it holds that U £ h(z0,a0) or V £ h(z0,a0), as required. □

Notice that in particular it follows from this proof, that the observationally-induced lower powerspace over a QCB-space X is a complete (S, V)-subalgebra of (C(X), U), for the following reason. Consider the diagram:

where yx is the canonical embedding, FX denotes the underlying space of the absolutely-free E-algebra over X (for a signature £ consisting of a binary operation symbol) with the free algebra inclusion map nx and YX is the unique homomorphism extension of yx along nx• Then, since (FX,*,nx) is an abstract (S, V)-structure over X, the argument of the proof above shows that it factors via homomorphisms through (—) : C(X) ^ SsX . Of course, Theorem 3.3 applies.

We want to show that there exists no proper complete (S, V)-subalgebra of (C(X), U) through which this inclusion factors.

Proposition 4.4 The only complete (S, V)-subalgebra of (C(X), U) that contains the image of YX : FX — S§X is (C(X), U) itself.

Proof. By Theorem 2.8 we know that the underlying set of any complete (S, V)-subalgebra of (C(X), U) belongs to any full reflective subcategory that S belongs to. In particular, that means it must be a monotone convergence space, i.e. under the specialization order it forms a dcpo.

Moreover, the image of YX : FX — SS in C(X) consists exactly of the closures of nonempty finite subsets of C(X). Notice that every closed set can be obtained as a directed supremum of the closures of finite subsets it contains. Suppose we find a complete (S, V)-subalgebra of (C(X), U) that contains all closures of nonempty finite subsets of X. We denote it by (A, U). Since the embedding j : (A, U) — (C(X), U) must be a continuous homomorphism, it must preserve directed (continuous) and binary (homomorphism) joins. Thus, it preserves all joins and we get:

j ( V cl(F))= V j (cl(F )) = B.

PQfinB F<ZfinB

where cl(F) denotes the closure of the finite subset F, the first join is taken in A, the second join is taken in C(X).

As mentioned, every nonempty closed subset can be obtained in this way. Hence, j is surjective and the claim follows. □

Of course the corresponding abstract (S, V)-structure (C(X), U, (—)) is obtained from the point closure map (—) : X — C(X).

Theorem 4.5 The observationally-induced lower powerspace over a QCB-space X is given by (C(X), U).

In Section 4.4.2 of [11], Schroder has shown that on C(X), the subspace topology of SSX coincides with the sequentialisation of the lower Vietoris topology, which is generated by sets of the form:

(U) := [B e C(X)| B n U = %},

for U ranging over the open subsets of X. This relates the observationally-induced lower powerspace construction in QCB to the one in the category of continuous maps between topological spaces given in [2]. There it was shown that for every topological space X, the free complete (S, V)-algebra over X is given by the set of nonempty closed subsets of X under the lower Vietoris topology with set-union as operation. We do not know whether there exists a QCB-space X for which the lower Vietoris topology on the nonempty closed subsets is not sequential. Also Schroder's work does not give any insights for this question.

On the other hand, we also do not know exactly for which QCB-spaces the topology on C(X) coincides with the Scott-topology for the inclusion order. Despite

the fact that as a complete lattice C(X) has a rich structure and the embedding into SSX, which carries the Scott-topology, preserves all suprema, we can do no better than concluding that our construction at least coincides with the classical domain-theoretic construction for continuous dcpos.

Corollary 4.6 For a countably-based continuous dcpo X the observationally-induced lower powerspace (C(X), U) in QCB carries the Scott-topology.

5 Conclusions

We have shown that free observationally-induced algebras exist in cartesian closed categories for arbitrary computational prototypes, provided the category under consideration satisfies certain closure requirements. Moreover, in this case free observationally-induced algebras can be characterised as subalgebras of a double exponential corresponding to a type of continuations with the prototype as result type. The closure requirements we have identified are that the category needs to have infima of regular subobjects and support an ordinary free algebra construction for the signature defining the algebra structure of the prototype. These requirements are fairly mild and satisfied in most complete categories, such as the categories of monotone maps between preordered sets, continuous maps between compactly generated spaces, or QCB, the central category in topological domain theory. Thus, the observationally-induced approach to modelling computational effects extends the toolbox of denotational semantics for functional programming languages nicely. Unfortunately, the requirements are not satisfied in any cartesian closed category of continuous or algebraic dcpos, since these categories do not have infima of regular subobjects in general. Hence, this work does not give any insights into the well-known problem of modelling computational effects in cartesian closed categories of domains. On the other hand, our results can be applied in the category of Scott-continuous maps between general dcpos by embedding them appropriately into one of the mentioned categories.

Furthermore, we have shown that in QCB one has an observationally-induced lower powerspace construction which for a QCB-space X is characterised as the space of nonempty closed subsets of X equipped with the subspace topology of the

double exponential SS which itself carries the Scott-topology. This confirms the well-behavedness of the lower powerspace construction in contrast to the upper powerspace construction, for which the observationally-induced approach does not have such a neat characterisation as the counterexample in [2] shows. Also Gruenhage and Streicher's counterexample [6] is easily seen to adapt to the upper powerspace construction.

The characterisation of free observationally-induced algebras as subobjects of double exponentials is a very interesting result. Although one finds hints at it in the literature [5,8], it appears that the work at hand gives the most concrete account of this connection between algebraic effects and continuation types. However, deeper investigations are necessary for determining the benefits of this characterisation of observationally-induced algebras.

The construction of observationally-induced powerspaces as subobjects of double exponentials of Sierpinski space also bears resemblance to the work of Vickers and Townsend [15] on powerlocales. They show that lower and upper powerlocale constructions are both obtained as subobjects of a double exponential of Sierpin-ski space, and moreover their composition commutes and yields the full double exponential. It should be investigated under which conditions free observationally-induced algebra constructions commute and in how far it is possible to obtain full double exponentials with the observationally-induced approach. It should be mentioned that the category of locales is not cartesian closed, hence it is not covered by the present paper. However, certain exponentials do exist in locales and there are certainly strong connections to the work on free observationally-induced algebras over topological spaces [2], which should be investigated further.

Acknowledgement

The author wishes to thank Ernst-Erich Doberkat, Matthias Schroder, Alex Simpson and Thomas Streicher for helpful discussions and encouragement.

References

[1] Ingo Battenfeld. Topological Domain Theory. PhD thesis, LFCS, University of Edinburgh, 2008.

[2] Ingo Battenfeld and Matthias Schröder. Observationally-induced effect monads: Upper and lower powerspace constructions. Proc. of MFPS 27, 2011.

[3] Ingo Battenfeld, Matthias Schroder, and Alex Simpson. A convenient category of domains. Electr. Notes Theor. Comput. Sci., 172:69-100, 2007.

[4] Ingo Battenfeld and Alex Simpson. Two probabilistic powerdomains in topological domain theory. Manuscript, available at: http://homepages.inf.ed.ac.uk/als/Research/topological-domain-theory.html, 2006.

[5] Andrzej Filinski. Controlling Effects. PhD thesis, Controlling Effects, Carnegie Mellon University, 1996.

[6] Gary Gruenhage and Thomas Streicher. Quotients of countably based spaces are not closed under sobrification. Math. Struct, in Comp. Science, 16(2):223-229-161, 2006.

[7] Martin Hyland. First steps in synthetic domain theory. Category Theory, Proc. Como 1990, pages 131-156, 1991.

[8] Martin Hyland, Paul Blain Levy, Gordon D. Plotkin, and John Power. Combining algebraic effects with continuations. Theor. Comput. Sci., 375(1-3):20-40, 2007.

[9] Eugenio Moggi. Notions of computation and monads. Inf. Comput., 93(1):55-92, 1991.

[10] Gordon D. Plotkin and John Power. Computational effects and operations: An overview. Electr. Notes Theor. Comput. Sci., 73:149-163, 2004.

[11] Matthias Schröder. Admissible Representations for Continuous Computations. PhD thesis, Fachbereich Informatik, FernUniversitöt Hagen, 2002.

[12] Matthias Schroder and Alex Simpson. Probabilistic observations and valuations: (extended abstract).

Electr. Notes Theor. Comput. Sci., 155:605-615, 2006.

[13] Alex Simpson. Spaces of valuations revisited. Talk given at: New Interactions Between Analysis, Topology and Computation, 2009. Slides: http://homepages.inf.ed.ac.uk/als/.

[14] Paul Taylor. The fixed point property in synthetic domain theory. In Proceedings, Sixth Annual IEEE Symposium on Logic in Computer Science, 15-18 July, 1991, Amsterdam, The Netherlands, pages 152-160. IEEE Computer Society, 1991.

[15] Steven J. Vickers and Christopher F. Townsend. A universal characterization of the double powerlocale. Theor. Comput. Sci., 316(1):297-321, 2004.