Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Powerdomains

Powerdomains can be seen as modelling non-determinstic choice. They appear in various areas of mathematics and computer science.

We review the basic relationships between lower/upper powerdomains, forward and backward simulation, and \Diamond and \Box modalities.

It may be worth to read the Summary first.

An Axiomatic Account of Choice

A somewhat minimal axiomatisation of a choice operator \odot is

(xy)z=x(yz)xy=yxxx=x\begin{gather} (x\odot y)\odot z= x\odot (y\odot z)\\ x\odot y = y\odot x\\ x\odot x = x \end{gather}

What is axiomatised here is choice as a set of alternatives. Given a set XX, we denote by PX\mathcal PX the set of subsets of XX and by PωX\mathcal P_\omega X the set of finite subsets of XX. A set with an operation \odot satisfying the three equations above is known as a semi-lattice.

Facts:

Remark: Semi-lattices exist in many categories. This often allows us to generalise non-determinism.

Coalgebras for the Powerset Functor

More often than not, the reason to investigate choice is to model dynamic scenarios where agents change state by making choices. Such dynamical systems are known as coalgebras for the powerset functor and also as transition systems in process algebra and as non-determinstic automata in the theory of automata and formal languages and as Kripke frames in the theory of modal logic.

Mathematically, a coalgebra is a function XPXX\to\mathcal PX. A coalgebra morphism

(XξPX)f(XξPX)(X\stackrel \xi \to \mathcal PX) \stackrel f\longrightarrow (X'\stackrel {\xi'} \to \mathcal PX')

is a function f:XXf:X\to X' satisfying

Pfξ=ξf.\mathcal Pf\circ \xi = \xi\circ f.

In other words, ff makes the following square commute.

Of course, a coalgebra on XX is nothing but a set with a relation RX×XR\subseteq X\times X. But coalgebra morphisms do not only preserve the relation but also reflect it in a particular way. Key to this is the following.

Exercise on (bi)simulation: We write xRyxRy for yξ(x)y\in\xi(x). The following are equivalent conditions for ff being a forward simulation.

Pfξ  ξfxRy  f(x)Rf(y)x=f(x)  yξ(x).yξ(x).y=f(x)\begin{gather} \mathcal Pf\circ \xi \ \subseteq \ \xi'\circ f\\ xRy \ \Rightarrow \ f(x) R' f(y)\\ x'=f(x) \ \Rightarrow \ \forall y\in\xi(x)\,.\,\exists y'\in\xi'(x')\,.\,y'=f(x') \end{gather}

The following are equivalent conditions for ff being a backward simulation.

Pfξ  ξff(x)Ry  y.xRy & y=f(y)x=f(x)  yξ(x).yξ(x).y=f(x)\begin{gather} \mathcal Pf\circ \xi \ \supseteq \ \xi'\circ f\\ f(x)R'y' \ \Rightarrow \ \exists y\,.\, xRy \ \& \ y'=f(y)\\ x'=f(x) \ \Rightarrow \ \forall y'\in\xi'(x')\,.\,\exists y\in\xi(x)\,.\,y'=f(x') \end{gather}

The advantage of the first conditions is that they are parametric in the functor[2], the second condition is how so-called zig-zag morphisms or p-morphisms or bounded morphisms are defined in modal logic and the third conditions establish the following important fact that will continue to play a role in this note (we will give a precise definition of bisimulation later).

Fact: A function is a coalgebra morphism iff its graph is a bisimulation.

Powerdomains on Posets

The “domain” in powerdomain comes from domain theory and the theory of programming languages. It is well-known that in order to model recursively defined programs and datatypes in general one needs to extend the types-as-sets paradigm to types-as-domains. There are different ways to define domains. Typically, they involve some kind of complete order or complete metric that supports the taking of certain limits to interpret recursively defined functions. In this section, I simplify by ignoring completeness and only look at domains as ordered sets.

Functors

The powerset functor gives rise to three different powerdomains on the category of partial orders according to whether we enforce one of one of the following two alternatives.

xxyxxy\begin{gather} x\le x\odot y\\ x\ge x\odot y \end{gather}

Convex Powerdomain

The functor

Pc:PosPos\mathcal P^{\rm{c}}:\sf Pos \to Pos

maps a poset (X,)(X,\le) to the set of convex subsets PX\mathcal PX. The order on convex subsets is defined as follows. [3] [4]

ab  if xa.yb.xy and yb.xa.xy\begin{align} a\le b\ \quad \textrm{ if } \quad & \forall x\in a\,.\,\exists y\in b. x\le y \quad \textrm{ and }\\ &\forall y\in b\,.\,\exists x\in a. x\le y\\ \end{align}

If XX is discrete then PcX\mathcal P^{\rm{c}} X is just PX\mathcal PX and \le is equality.

Lower Powerdomain

The functor

D:PosPos\mathcal D:\sf Pos \to Pos

maps a poset (X,)(X,\le) to the set of downward closed subsets (downsets) DX\mathcal DX. The order on subsets a,bXa,b\subseteq X is defined as [5] [6]

ab  if xa.yb.xy\begin{align} a\le b\ \quad \textrm{ if } \quad & \forall x\in a\,.\,\exists y\in b. x\le y \end{align}

which amounts to inclusion of downsets. If XX is discrete then DX\mathcal DX is PX\mathcal PX ordered by \subseteq.

Upper Powerdomain

The functor U:PosPos\mathcal U:\sf Pos \to Pos maps a poset (X,)(X,\le) to the set of upward closed subsets (upsets) UX\mathcal UX. The order on upsets is defined as [7]

ab  if yb.xa.xy\begin{align} a\le b\ \quad \textrm{ if } \quad & \forall y\in b\,.\,\exists x\in a. x\le y \end{align}

which amounts to reverse inclusion of upsets. If XX is discrete then UX\mathcal UX is PX\mathcal PX ordered by \supseteq.

Coalgebras

As noted above, coalgebras XPXX\to\mathcal PX are in bijective correspondence with Kripke frames (X,R)(X,R). This continues to hold in the ordered setting under appropriate conditions on the relation RR.

(X,R)(X,R) is an U\mathcal U-coalgebra iff RR is a weakening relation, that is, iff

xxRyyxRy\frac{x'\le x R y \le y'}{x'R y'}

(X,R)(X,R) is an D\mathcal D-coalgebra iff

xxRyyxRy\frac{x'\ge x R y \ge y'}{x'R y'}

Example: Let X={x,y}X=\{x,y\} be a Kripke frame where xx has no successor and yy is reflexive. We can turn XX into a U\mathcal U-coalgebra by setting xyx\le y and into a D\mathcal D-coalgebra by setting xyx\ge y.

(Bi)simulations

As for set-functors, any functor on ordered sets gives rise to a canonical notion of (bi)simulation, cospan bisimulation. In case of Pc\mathcal P^{\rm{c}}-coalgebras (bi)simulation is bisimulation, in case of U\mathcal U-coalgebras (bi)simulation is backward simulation and in case of D\mathcal D-coalgebras (bi)simulation is forward simulation.

Fact: The largest preorder on a U\mathcal U-coalgebra (D\mathcal D-coalgebra) compatible with the coalgebra structure is the largest backward-simulation (forward simulation) on that coalgebra. [8]

To understand this better it helps to know more about coalgebraic (bi)similarity. But I will try to shortcut this here, with more details available at cospan (bi)simulation.

In order to define the notion of (bi)simulation induced by U\mathcal U or D\mathcal D we proceed as follows.

Recall from the definition of D\mathcal D and U\mathcal U how these functors act on ordered sets.[9] Instantiating this procedure it is not difficult to see the following.

Proposition on D\mathcal D- and U\mathcal U-(bi)simulation: D\mathcal D-(bi)simulation is forward-simulation and U\mathcal U-(bi)simulation is backward-simulation.

Simulations for Set-Coalgebras

Each functor T:SetSetT:\sf Set\to Set induces a notion of TT-bisimulation.

What about simulations?

We first note that each functor T:OrdOrdT:\sf Ord\to Ord induces a notion of TT-(bi)simulation.[10] I write (bi)simulation here because technically this notion works much in the same way for Set\sf Set-functors and for Ord\sf Ord-functors. But for Ord\sf Ord-functors, it encompasses both simulations and bisimulations, depending on the functor.

A general way to introduce notions of simulation for Set\sf Set functors is as follows. Let T:SetSetT:\sf Set\to Set be a functor. Extend TT to a functor T:OrdOrdT':\sf Ord\to Ord.[11] Then restrict TT'-(bi)simulation to TT-coalgebras.

Example: Let T=PT=\mathcal P. We can let TT' be one of Pc\mathcal P^{\rm{c}} or U\mathcal U or D\mathcal D to capture bisimulation or forward simulation or backward simulation.

Remark: The ordered setting is the right one if we want to exploit that the structures at hand support an order-duality. In the example, U\mathcal U and D\mathcal D capture \Box and \Diamond separately and both extend P\mathcal P.

Powerdomains via Generators and Relations

The finitary versions of the three powerdomains can be generated as follows. The way we describe algebras by generators and relation is the same as over sets, with the only difference that we now require \odot to be order-preserving (monotone).

If XX is a finite poset, then the finitely generated convex subsets PωcX\mathcal P_\omega^{\rm{c}} X are ismorphic to the free semi-lattice over XX. Convexity is captured by the requirement that \odot is montone. [12]

If XX is a finite poset, then the finitely generated downsets DωX\mathcal D_\omega X are ismorphic to the free semi-lattice over XX satisfying xxyx\le x\odot y, or, equivalently, the free join semi-lattice over XX.

If XX is a finite poset, then the finitely generated upsets UωX\mathcal U_\omega X are ismorphic to the free semi-lattice over XX satisfying xyxx\odot y\le x, or, equivalently, the free meet semi-lattice over XX.

To remember how taking upsets and downsets interacts with the order, it is helpful to know the following.

Facts: Let XX be a preorder. DX\mathcal DX is the free complete join semi lattice over XX. D\mathcal D is a monad on preorders (and also on posets). The unit XDX=[Xo,2]X\to\mathcal DX=[X^{\rm{o}},2] is the order enriched Yoneda embedding.[13] The Yoneda embedding is a free completion by colimits (joins). The xxyx\le x\odot y play the role of the arrows into the colimit (coproduct, join). (The Yoneda embedding preserves all limits (meets) that may already exist in XX.) The multiplication of the monad is the free extension of the identity DXDX\mathcal DX\to\mathcal DX.

We have seen that coalgebra morphisms express a particular back-and-forth condition. It is interesting to study its logical ramifications.

The key questions are: Which logic is invariant under coalgebra morphisms (bisimulation)? Which logic is invariant under forward (or backward) simulation?

The Logic of Bisimulation

The answer is given by the “bounded quantifiers” \Box and \Diamond. Usually they are considered as syntactic operations on formulas. But I want to treat them here as operations on “semantic” propositions, that is, on subsets of XX where

ξ:XPX\xi:X\to\mathcal PX

is a coalgebra. We rewrite the usual definition of the semantics of \Box and \Diamond in terms of the coalgebra structure ξ\xi as follows.

a=ξ1({bXba})a=ξ1({bXab})\begin{gather} \Box a = \xi^{-1}(\{b\subseteq X \mid b\subseteq a\})\\ \Diamond a = \xi^{-1}(\{b\subseteq X \mid a\cap b\not=\emptyset\}) \end{gather}

Exercise: The following are a direct consequence of the definition above.

xayξ(x).yaxayξ(x).ya\begin{gather} x\in \Box a \quad \Longleftrightarrow \quad \forall y\in\xi(x)\,.\, y\in a\\ x\in \Diamond a \quad \Longleftrightarrow \quad \exists y\in\xi(x)\,.\, y\in a \end{gather}

We can now extend propositional logic by unary operators for \Box and \Diamond (and all equations they satisfy in all coalgebras). This is known as the modal logic K\bf K.

Here are some classic results of modal logic. I use “coalgebra” instead of “Kripke frame” to indicate that these results generalise.

Facts: The modal logic K\bf K is invariant under coalgebra morphisms. Every logic that contains classical propositional logic and is invariant under bisimulation is equivalent to K\bf K on finite coalgebras. K\bf K characterises elements of coalgebras up to bisimilarity on finite coalgebras. K\bf K is the bisimulation-invariant fragment of first-order logic.

The notion of bisimilarity can be defined in different ways. From a coalgebraic point of view I find the following the most elegant.

Two elements of two P\mathcal P-coalgebras are bisimilar (or behaviourally equivalent) iff they can be connected by some zig-zag of morphisms. [14]

The advantage of this definition is that it captures the informal idea that coalgebra-morphisms preserve behaviour and that it is parametric in the functor. But we also want a more combinatorial characterisation:

Given two coalgebras XξPXX\stackrel \xi \to \mathcal PX and XξPXX'\stackrel {\xi'} \to \mathcal PX' a relation RX×XR\subseteq X\times X' is called a bisimulation if

xRx   only if yξ(x).yξ(x).xRyandyξ(x).yξ(x).xRy\begin{align} x Rx' \ \ \textrm{ only if } \quad & \forall y\in \xi(x)\,.\,\exists y'\in\xi'(x')\,.\, x'Ry' \quad \textrm {and}\\ & \forall y'\in \xi'(x')\,.\,\exists y\in\xi(x)\,.\, x'Ry'\\ \end{align}

Facts: Two elements of two coalgebras are bisimilar iff there is a bisimulation relating them. If two elements of two coalgebras are bisimular then they satisfy the same modal formulas. The converse is true on finite coalgebras (or if we extend modal logic by infinitary conjunctions).

Logics of Simulation

A finer analysis, separating forward and backward simulation, is possible. It also sheds light on the ordered generalisations of the powerset functor.

Let me write K{\bf K}^\Box and K{\bf K}^\Diamond (this is not standard notation) for the negation-free fragment of K\bf K that only contains \Box (respectively \Diamond) formulas. It now turns out that preservation of K{\bf K}^\Box-formulas and preservation of K{\bf K}^\Diamond-formulas each corresponds to one direction of the definition of bisimulation.

As the Exercise on (bi)simulation above shows, K{\bf K}^\Diamond-formulas are invariant under forward-simulation and K{\bf K}^\Box-formulas are invariant under backward-simulation.

On the other hand, we know from the Proposition on D\mathcal D- and U\mathcal U-(bi)simulation that D\mathcal D-(bi)simulation is forward-simulation and U\mathcal U-(bi)simulation is backward simulation.

We now assembled all the pieces needed for the table below.

Summary

To read the table recall that, for a poset XX, the elements of DX\mathcal DX are downsets ordered according to  ab  ab\ a\le b \ \Leftrightarrow\ a\subseteq b and the elements of UX\mathcal UX are upsets ordered as  ab  ab\ a\le b \ \Leftrightarrow\ a\supseteq b.

Also remember that the semantics of formulas is given by upsets. ϕ\Box \phi will be true if the upset of successors is contained in ϕ\phi. ϕ\Diamond\phi will be true if the downset of successors intersects ϕ\phi.

TTD\mathcal DU\mathcal U
also known asHoare powerdomainSmyth powerdomain
\odot\cup\cup
abTXa\le b\in TXxa.yb.xy\forall x\in a\,.\,\exists y\in b\,.\, x\le yyb.xa.xy\forall y\in b\,.\,\exists x\in a\,.\, x\le y
semilattice + ...aaba\le a\odot babaa \odot b \le a
(bi)simulationforwardbackward
logic\Diamond\Box
XRTXX\stackrel R \longrightarrow TXxxRyyxRy\frac{x'\ge x\,R\,y'\ge y}{x'\,R\,y'}xxRyyxRy\frac{x'\le x\,R\,y'\le y}{x'\,R\,y'}
angelicdemonic

Maybe the most principled way to remember that U\mathcal U gives \Box and D\mathcal D gives \Diamond is via a direct analysis of the predicate liftings of these functors, see my note on monotone predicate liftings.

A choice satisfying aaba\le a\odot b is sometimes called angelic because, whatever aba\odot b is, it is better than what I have, aa. Dually, a demon would make sure that aba\odot b is not better than aa and not better than bb.

Generalisations

The basic ideas we have seen so far generalise in many directions.

In domain theory we are typically interested in directed complete partial orders with the Scott topology.

Domains can be seen as particular topological spaces. Many different topological spaces support some kind of powerspace, often called the Vietoris construction.

Vietoris defined a powerdomain on certain topological spaces. A good introduction to the topic is this talk by Guram Bezhanishvili. (Passcode: ?D3q#^mw).

The theory can also be developed internally in a topos.

Many results on powerdomains generalise to quantale enriched categories. And some even survive the move to categories or higher categories. The analogy here is that the powerset functor, or rather U\mathcal U and D\mathcal D, generalise to taking presheaves.

...

Further Reading

(very incomplete)

Topology

Vietoris

Johnstone: Stone Spaces. 1982. See in particular Chapter III.4. On page 112 one finds the definitions of \Box (called tt) and \Diamond (called mm). This also works for ordered compact Hausdorff spaces and many other settings, see Guram Bezhanishvili’s talk.

G. Bezhanishvili: Talk on The hit-or-miss toplogy. (Passcode: ?D3q#^mw).

van Benthem, Segerberg, Goldblatt, ...

Domain Theory

Plotkin 1976, Smyth 1978 [15], Plotkin 1980, Apt-Plotkin 1981, Winskel 1985 [16], Section 6.2 of Abramsky-Jung 1994, Martin-Curtis-Rewitzky 2007, Section 3 of Goubault-Larreque 2010, ...

Coalgebra

Aczel: Non-well founded set theory. Aczel-Mendler, ...

Barwise, Moss: Vicious Circles.

Baltag: A structural theory of sets.

Rutten: Universal coalgebra.

Jacobs, Hughes-Jacobs, ...

Pattinson

Litak etal

...

More references can also be found in the following papers. Kurz-Palmigiano Coalgebras and Modal Expansions of Logics, Kapulkin-Kurz-Velebil Expressiveness of Positive Coalgebraic Logic, Bilkova-Kurz-Petrisan-Velebil Relation lifting, with an application to the many-valued cover modality, Balan-Kurz-Velebil Positive Fragments of Coalgebraic Logics.

Footnotes
  1. To make this claim precise, one needs to extend sets with classes and extend the powerset functor continuously.

  2. All functors can be extended to functors on ordered sets, see Positive Fragments of Coalgebraic Logics.

  3. Note how the back-and-forth pattern of bisimulations appears again.

  4. We could have defined this powerdomain as the set of all subsets instead of restricting to convex subsets. Then PX\mathcal PX is a preorder but may not be a partial order. This gives the right definition of the “convex” powerdomain on preorders. In fact, for a preorder (X,)(X,\le) and a,bXa,b\subseteq X we have aba\le b iff they have the same posetal quotients of their convex closures.

  5. Note that the definition of the order \le makes sense for aribtray subsets of XX (but may only be a preorder then).

  6. The justification for choosing this half of the convex powerdomain is the following. Two subsets a,bXa,b\subseteq X are in the relation aba\le b iff the downset closure of aa is a subset of the downset closure of bb. It follows that if XX is a poset then the order \le is also a poset when restricted to downsets.

  7. As before, the definition of the order makes sense for aribtrary subsets a,bXa,b\subseteq X (and we can use this observation to extend the powerset functor to preorders). Note that aba\le b iff the upset of bb is a subset of the upset of aa. It follows that if XX is a poset then the order \le is also a poset when restricted to upsets.

  8. Compatible means that the quotient by the preorder is again a coalgebra.

  9. The order on DX\mathcal DX is given by \begin{align} a\le b\ \quad \textrm{ if } \quad & \forall x\in a,.,\exists y\in b. x\le y \end{align}

    and the order on UX\mathcal UX by

    ab  if yb.xa.xy\begin{align} a\le b\ \quad \textrm{ if } \quad & \forall y\in b\,.\,\exists x\in a. x\le y \end{align}
  10. I like to write Ord\sf Ord if I do not want to commit to using preorders or posets. If you want to be specific let Ord\sf Ord be the category of preorders.

  11. Let D:SetOrdD:\sf Set\to Ord be the “discrete” embedding. TT' is an extension of TT if there is a natural transformation DTTDDT\to T'D. For example, if T=PT=\mathcal P and T=UT'=\mathcal U, then we have the bijection (PX,=)(U,)(\mathcal PX,=)\to(\mathcal U,\subseteq).

  12. Add more detail ...

  13. This deserves more explanation ...

  14. See the note on Coalgebraic (Bi)Similarity for more.

  15. On page 26 we find

  16. On page 128 we find