Effectuses from Monads

Abstract Effectuses have recently been introduced as categorical models for quantum computation, with probabilistic and Boolean (classical) computation as special cases. These 'probabilistic' models are called commutative effectuses. All known examples of such commutative effectuses are Kleisli categories of a monad. This paper answers the open question what properties a monad should satisfy so that its Kleisli category is a (commutative) effectus. The relevant properties are: strong affineness and partial additivity, together with some non-triviality conditions.


Introduction
An effectus is a relatively simple category, with finite coproducts and a final object, satisfying some elementary properties: certain squares have to be pullbacks and certain parallel maps have to be jointly monic, see (9) and (8) below. These effectuses have been introduced in [8], and give rise to a rich theory that includes quantum computation, see the overview paper [4]. Subclasses of 'commutative' effectuses and 'Boolean' effectuses have been identified. These Boolean effectuses capture classical (deterministic) computation, and can be characterised as extensive categories, see [4,Sec. 13] for details. This is a non-trivial result. A similar result for commutative effectuses is still missing. It should lead to a characterisation of (categorical) models of probabilistic computation.
This paper builds on [9] and makes a significant step towards a conjectured characterisation of these commutative effectuses as Kleisli categories of certain monads. The main result of this paper says that if the monad is strongly affine and partially additive, then its Kleisli category is an effectus. Affineness of a monad T means that it preserves the final object: T (1) ∼ = 1. The property 'strong affineness' comes from [9], where it is used to prove a bijective correspondence between predicates and side-effect-free instruments (as in a non-quantum settings). Partial additivity of a monad has been introduced in [7] where it is used to obtain partially additive structure on homsets of a Kleisli category. This result is re-used here, as a step towards constructing effectuses, following [3].
We describe five monads to which our main result applies: distribution, Giry, probabilistic powerdomain, Radon, and expectation. These monads are all 'probabilistic' in an intuitive sense, and their Kleisli categories are (commutative) effectuses. In future work we hope to find a construction in the other direction, turning a commutative effectus, possibly satisfying some additional properties, into a 'probabilistic' monad.
This paper is organised as follows. After some preliminary remarks about categories and monads in Section 2 -4 we describe the properties of strong affineness and partial additivity of monads in Section 5. Our main result, Theorem 6.3, stating conditions on a monad that make its Kleili category an effectus, is in Section 6. Subsequently, Section 7 shows in some details that the requirements hold for two of the monad examples, namely the probabilistic power monad and the Radon monad.

Categorical preliminaries
This section briefly describes our assumptions about the underlying category that we will be using. It is a distributive category, which is non-trivial in a suitable sense that will be explained below. We recall from [5] that coprojections κ i : X i → X 1 +X 2 in a distributive category are monic, and that the initial object 0 is strict -that is, each map X → 0 is an isomorphism. Definition 2.1 A category is called distributive if it has finite products (×, 1) and coproducts (+, 0), where products distribute over coproducts, in the sense that the following maps are isomorphisms.
We call such a distributive category non-trivial if it satisfies the following two additional requirements.
(i) For each object X we have: X ∼ = 0 iff there is a map x : 1 → X. This implies 1 ∼ = 0.
Swapping the distributivity map dis 1 in (1) yields an associated distributivity map: where γ = π 2 , π 1 is the (product) swap isomorphism. The condition (2) is in fact equivalent to disjointness of all pairs of coprojections κ i : X i → X 1 + X 2 , as can be seen via the following diagram.

Monad preliminaries
In this paper we will be working with a monad T = (T, η, μ) on a non-trivial distributive category C. This section describes the notation and terminology that we use for monads. We shall write K (T ) for the Kleisli category of the monad T , and • for Kleisli composition, that is, for composition in K (T ), in order to distinguish it from composition • in the underlying category C. Explicitly for 'Kleisli' maps f : The identity map on an object X ∈ K (T ) is given by the unit map η : X → T (X). Each map f : X → Y in C yields a map ‹f › = η • f : X → Y in K (T ). This gives a functor ‹−› : C → K (T ).
The Kleisli category K (T ) inherits coproducts (+, 0) from C, with coprojections of the form ‹κ i › : X i → X 1 + X 2 . We call the monad T non-trivial if, in analogy with diagram (2), the following rectangle is a pullback in C.
In the terminology that will be used later, this says that the scalars 1 and 0 are not the same.
The lift monad (−) + 1 exists not only on the category C, but also on K (T ), with unit and multiplication of the latter described in C as: These maps are obtained via the functor ‹−› from the unit and multiplication of the lift monad (−) + 1 on C. It is not hard to see that the Kleisli category of the lift monad (−) + 1 on K (T ) is the Kleisli category of the monad T = T ((−) + 1) on C. Hence we consider the category K (T ) as the category of partial maps in K (T ). The unit η and multiplication μ of T are given by: Abstractly, this T is a monad since there is always a distributive law of monads T (−)+1 ⇒ T (−+1). In general, given such a law ST ⇒ T S, the composite T S is a monad again. Moreover, the monad S can be lifted to a monad S on K (T ), and its Kleisli category K (S) is the same as the Kleisli category K (T S) of the composite monad.
Kleisli composition in K (T ), written as • , is related to composition • in K (T ) via: To summarise, we will be working with three different categories with identity and composition notation as described below.

Monad examples
There are (at least) five monad that are of interest in the current setting: the distribution monad D on sets, the Giry monad G on measurable spaces, the expectation monad E on sets, the probabilistic powerdomain monad V on (continuous) dcpos, and the Radon monad R on compact Hausdorff spaces. Due to space restrictions we will only elaborate the last two examples and refer to [9] for the first three.

The probabilistic powerdomain monad V on Dcpo
We write Dcpo for the category of directed complete partial orders (dcpo's), with (Scott) continuous functions between them. For a dcpo X we write O(X) for the complete lattice of Scott open subsets: upward closed subsets U ⊆ X with: The requirement φ(X) = 1 means that valuations as used here are normalised. Without this requirement we speak of 'sub-valuations'; they are standardly used in the theory of probabilistic powerdomains. We prefer to use proper, normalised valuations to obtain affineness, see below.
We write V(X) for the set of valuations on a dcpo X, ordered pointwise, with pointwise directed joins. This yields a dcpo again, and an endofunctor and V ∈ O(Y ). This functor restricts to the category Cdcpo of continuous dcpo's, see [11,Thm. 8.2], where each element is a directed join of elements way below it.
It is not hard to see that V(1) ∼ = 1 and V(2) ∼ = [0, 1]. A predicate on X is a map X → 2 in the Kleisli category K (V), and thus corresponds to a continuous function p : X → [0, 1]. Given a valuation φ : O(X) → [0, 1] on X one can define an integral p dφ ∈ [0, 1] as join of integrals of simple functions, see [10,11] for details. This V forms a monad [10,11] on (continuous) dcpo's, that is, on both the categories Dcpo and Cdcpo. The unit η :

The Radon monad R on CH
We can only describe the essentials of the Radon monad R on the category CH of compact Hausdorff spaces (with continuous maps) and refer to [6] for more information. This monad sends a compact Hausdorff space X to the states on the associated commutative C * -algebra C(X) of continuous functions X → C. Hence we write R(X) = Stat(C(X)), where states are positive unital maps ω : C(X) → C. This R is a 'double dual' monad, with familiar unit and Kleisli extension definitions: One of the main results of [6] -presented as a probabilistic version of Gelfand duality -states that the Kleisli category K (R) is the opposite (CCstar PU ) op of the the category of commutative C * -algebras, with positive unital maps between them. This is a prime example of a (commutative) effectus, see [8,4].

Monad requirements
In this section we assume that T is a monad on a distributive category C. As before, we write T = T ((−) + 1) for the induced monad on C.

Definition 5.1
The monad T is called affine if T (1) ∼ = 1, and strongly affine if T is strong and all rectangles below are pullbacks.
It is not hard to see that a strongly affine monad is affine, see [9] for details.
The following result forms the technical core of this paper.

Lemma 5.2
Let T be strongly affine monad on a non-trivial distributive category C. The following diagrams are then pullbacks in the Kleisli category K (T ).
For this last (third) pullback we need to assume that the monad T is non-trivial. We can then prove that maps T (κ i ) are monic in C -making coprojections ‹κ i › monic in K (T ).

Proof
The proof that the diagram on the left in (5) is a pullback is obtained by taking Y = 2 = 1 + 1 in Diagram (4) and using the distributivity isomorphism We leave it to the meticulous reader to check that the following two diagrams commute.
We now show that the left diagram in (5) , and consider the pullback (4). We get: Hence there is a unique map g : Y → T (X) in (4) with st 1 • g, κ 1 • ! = f . This g is the mediating map that we want, since: Uniqueness is left to the reader. We continue with the diagram in the middle in (5). The case X ∼ = 0 trivially holds. If X ∼ = 0, then we may assume a map x : 1 → X, since the underlying category is non-trivial, see Definition 2.1 (i). Now let f : Using the pullback on the left in (5) we get a g : Y → T (X) with T (κ 2 ) • g = f . But then: The equation ( * * ) = holds because T (1) is final. This finality also yields uniqueness of the mediating map !.
For the third rectangle in (5) the case X ∼ = 0 is covered by the requirement that (3). This implies Y ∼ = 0, since the initial object in a distributive category is strict [5]. But then we are done.
When X ∼ = 0 we can use a map x : 1 → X and proceed like for the middle rectangle. Finally, we show that the maps T (κ 1 ) : • g, then f = g by uniqueness of the mediating map in the pullback on the right in (5). Obviously, ! • f = ! • g, but also: If T is an affine monad on C, the initial object 0 ∈ C is both initial and final in K (T ). It is always initial, and final since: T (0) = T (0 + 1) ∼ = T (1) ∼ = 1. Hence 0 is a zero object in K (T ). In particular, for each pair of objects X, Y ∈ C there is a zero map 0 = 0 X,Y : X → T (Y ) given by: We have 0 • f = 0 = g • 0 for all maps f, g in K (T ). We can now define 'partial projections' £ 1 : X + Y → X and £ 2 : X + Y → Y in K (T ) via cotuples: These maps are natural in X, Y , in the category K (T ). Notice that £ 1 : 1 + 1 → T (1 + 1) is the unit/identity and £ 2 : We can then form 'bicartesian' maps bc = bc X,Y : T (X + Y ) → T (X) × T (Y ), as a tuple of the Kleisli liftings of £ 1 , £ 2 . That is, Definition 5.3 [After [7]] An affine monad T on C is partially additive if these maps bc from (6) are monic in C, and the naturality squares below are pullbacks in C, for all f : X → A, g : Y → B in C.

T (X + Y )
bc The requirement that bc is monic means that the two partial projections £ 1 : X + Y → X, £ 2 : X + Y → Y are jointly monic in K (T ). In particular, the following two maps in K (T ) are jointly monic (see [8, Assump. 1]).
(1 + 1) + 1 Our next aim is to prove that the Kleisli category K (T ) of a strongly affine partially additive monad T on a non-trivial distributive category C is an effectus.

The Kleisli category is an effectus
We proceed towards our main theorem in a number of steps, combining the approaches of [7] and [3] (see also [4,Sect. 8]). We first show how to get a FinPAC (after [2]).

Proposition 6.1 Let T be a strongly affine partially additive monad on a nontrivial distributive category C. The Kleisli category of the monad T = T ((−) + 1)
is then a finitely partially additive category (a FinPAC, for short, see [2,4]).
Explicitly, for maps f, g : X → T (Y ) one says that f, g are orthogonal, written as f ⊥ g, if there is a (necessarily unique) bound b : The above proposition says that this partial sum with the zero map 0 forms a partial commutative monoid (PCM), which is preserved by pre-and postcomposition in K (T ) and satisfies the 'untying axiom' of [2,12,3] Proof All this is rather straightforward and can be copied from [7,4]. We only point out that we need the pullback property (7) in the proof of associativity: . It proves f ⊥ (g h) and associativity, in: The untying axiom follows directly from the way that orthogonality ⊥ is defined: if f ⊥ g, for f, g : X → T (Y ), say via bound b : X → T (Y + Y ), then one can take The maps X → 2 = 1 + 1 in K (T ) are called predicates on X. Equivalently, these predicates may be described as maps X → T (2) in C, or as maps X → 1 in K (T ). There are truth and falsity predicates 1 and 0 defined in C as: Predicates on 1, of the form 1 → 2, are called scalars.
In order to prove that the Kleisli category K (T ) is an effectus the properties below are crucial. They all apply to the associated category K (T ) of partial maps. This emphasis on the partial maps in an effectus is due to [3].
Then we use the following pullback instance of (7).
The map c is by construction a bound for f, g, showing f ⊥ g.
(iii) Since we already know from Proposition 6.1 that each homset of the Kleisli category K (T ) is a partial commuative monoid (PCM), we only have to prove the following three points.
(a) For each predicate p we have p p ⊥ = 1.
In (b) let p q = 1, say via bound b : X → T (1 + 1). Then: The third rectangle in (5) is a pullback in K (T ), which we use on the left below.
We thus have b = T (κ 1 ) • c. But then we are done: Finally, for (c) let 1 ⊥ p, say via b : −→ 2 + 1, so that the outer diagram on the right commutes: Hence T (σ) • b = ‹κ 2 › • ! by the middle pullback in (5). But then: (iv) If T is a non-trivial monad, then the diagram on the right in (5) is a pullback.
Hence the assumption Our main result below gives conditions that ensure that a Kleisli category is an effectus, see [8,4]. Briefly, an effectus is a category with finite coproducts and a final object in which the two maps ··· ·· , ··· ·· : (1 + 1) + 1 ⇒ 1 + 1 in (8) are jointly monic, and in which the following diagrams are pullbacks.
Equivalent conditions can be formulated for the associated category of partial maps, see the original [3,Def. 4.4], copied into [4,Def. 51]. The proof below heavily builds on this partial perspective.

Theorem 6.3 A Kleisli category K (T ) is an effectus when T is a non-trivial strongly affine partially additive monad on a non-trivial distributive category. If the monad T is additionally commutative, then its Kleisli category K (T ) is a commutative effectus.
Proof Since partial additivity of the monad T implies that we have jointly monic maps (1 + 1) + 1 ⇒ 1 + 1 in (8), one only has to show that the diagrams in (9) are pullbacks in K (T ). This is an application of [3,Thm. 4.10], which re-appears as [4, Thm. 53 (2)], using Proposition 6.1 and Lemma 6.2. The category of total maps in K (T ) is then K (T ), by Lemma 6.2 (iv).
The statement that the Kleisli category K (T ) is a commutative effectus if T is a commutative monad is based on results (and definitions) from [9].

The monad examples revisited
Our five monad examples D, G, V, R and E from Section 3 satisfy the assumptions of Theorem 6.3. We concentrate on the probabilistic powerdomain V and the Radon monad R since the others have been studied elsewhere [9].

The probabilistic powerdomain V
We first check that the probabilistic powerdomain V on the category Cdcpo of continuous dcpo's is strongly affine. We use the result, due to Lawson, that a valuation on the opens O(X) of a continuous dcpo X can be extended in a unique way to a measure on the Borel sets B(X), see [11,1]. We recall that B(X) is the least σ-algebra that contains O(X).
We show that Diagram (4) is a pullback, for T = V. The proof is similar to the one for the Giry monad in [9], but uses the unique extension to Borel sets. Let ψ ∈ V(X × Y ) satisfy V(π 2 )(ψ) = η(z), for a given element z ∈ Y . This means Since η extends to a measure on B(X), and ψ(X × −) is also a measure that extends ψ(X × −) we get: for each V ∈ B(X).
Our first aim is to show that ψ is non-entwined, that is, satisfies ψ(U × V ) = ψ(U × Y ) · ψ(X × V ) for all U, V ∈ B(X). We distinghuish two cases.
• If z ∈ V , then by monotonicity: • If z ∈ V , then z ∈ ¬V . We note that Borel sets (but not open sets) are closed under negation/complement. Hence with the extension ψ to Borel sets we can reason as follows.

The Radon monad R
The proof that the Radon monad is strongly affine that is presented below is due to Robert Furber; it is analogous to the proof for V, but uses the Cauchy-Schwartz inequality for positive maps on C * -algebras. We first note that the strength map form a dense subset. Hence the above description of st 1 suffices.

Conclusions and outlook
Our main result gives sufficient conditions for a monad so that its Kleisli category is an effectus. These conditions are, roughly: strong affineness and partial additivity. This solves a problem that has been open for a couple of years, since the inception of effectus theory. In [9] it is shown that strong affineness of a monad T gives a bijective correspondence between predicates X → 2 in K (T ) and instruments f : X → X +X in K (T ) which are side-effect-free, in the sense that ∇ • f = id. This part of the definition of a commutativity effectus. In [4, Example 58] one more property is used that is important for probabilistic computation, namely normalisation, giving conditional probability.
We expect that commutativity and normalisation play a role in a categorical characterisation of probabilistic computation that we have as long term goal, as discussed in the introduction to this paper.