Presenting convex sets of probability distributions by convex semilattices and unique bases

We prove that every finitely generated convex set of finitely supported probability distributions has a unique base, and use this result to show that the monad of convex sets of probability distributions is presented by the algebraic theory of convex semilattices.


Introduction
Models of computations exhibiting both nondeterministic and probabilistic behaviour are abundantly used in computed assisted verification [1,12,19,5,35,11,27], Artificial Intelligence [4,17,26], and studied from semantics perspective [14,29,13].Indeed, probability is needed to quantitatively model uncertainty and belief, whereas nondeterminism enables modelling of incomplete information, unknown environment, implementation freedom, or concurrency.Since several decades, computer scientists have found it convenient to exploit algebraic methods to analyse computing systems.From an algebraic perspective, the interplay of nondeterminism and probability has been posing some remarkable challenges [34,18,20,16,33,24,9,31,23].Nevertheless, several fundamental algebraic structures have been identified and studied in depth.
In this paper we focus on one such structure, namely convex sets of probability distributions.These sets give rise to a monad that is well known in the literature and has found applications in several works [24,9,31,33,34,16,10,22].In recent work [3], we proved that this monad is presented by the algebraic theory of convex semilattices.In this paper, we provide an alternative proof based on a simple property: We show that every (finitely generated) convex set of distributions has a unique base.

13:2 Presenting convex sets of probability distributions by unique bases
This alternative proof technique is based on a categorical machinery together with a more syntax-based approach, which has already proven useful in extensions of the presentation results to the setting of metric spaces and quantitative equational theories [22,21].
Synopsis: In Section 2, we show the unique base theorem.Our alternative proof of the presentation of the monad is based on exhibiting a monad map which is an isomorphism.We recall the relevant categorical notions in Section 3, and introduce a general recipe for building a monad map.In Section 4 we illustrate the monad of interest as well as the theory of convex semilattices, and in Section 5 we apply the recipe from Section 3 to build a monad map relating the monad and the theory.In Section 6 we prove that this monad map is an isomorphism, by relying on the unique base theorem to derive a normal-form argument.

A unique base theorem for convex sets of probability distributions
Given a set X, a probability distribution is a function d : A probability distribution d is finitely supported if d(x) = 0 for finitely many x.We call D(X) the set of finitely suported probability distributions over . Hereafter we will just write the latter condition as The convex closure of a subset S ⊆ D(X), written conv(S), is the set of all the convex combinations of the distributions in S.
Theorem 1.For every S ∈ C(X), there exists a unique base.
We show here a direct proof (Proof I) and an alternative proof using functional analysis tools and the strong theorem of Krein-Milman [25] (Proof II).
Proof I. Existence of the base comes from the property that S is finitely generated.In the rest of this section we prove uniqueness; namely if {d 1 , . . ., d n } and {d 1 , . . ., d m } are two bases for some S ∈ D(X), then {d 1 , . . ., d n } = {d 1 , . . ., d m }.
Let {d 1 , . . ., d n } and {d 1 , . . ., d m } be two bases for S ∈ D(X).Then for all i ∈ 1 . . .n it holds d i ∈ conv({d 1 , . . ., d m }) and for all j ∈ 1 . . .m it holds d j ∈ conv({d 1 , . . ., d n }).By unfolding the definition of conv, this means that for all i there exist α i,j such that j α i,j = 1 and for all j there exist α j,i such that i α j,i = 1 and such that Hence, for all i it holds where the fist equality follows by replacing the d j in the left equation in (1) with the one in the right equation in (1).So we have
Using this fact, we conclude by the left equation in (1) that for every i there exists one j such that d i = d j .Hence, we have {d 1 , . . ., d n } ⊆ {d 1 , . . ., d m }.The opposite inclusion follows symmetrically.
Proof II.Let S ∈ C(X).Note that then S is a subset of D(X) ⊆ R X and hence a subset of a locally convex topological vector space (R X with the product topology).Consider the family B = {B ⊆ S | S = conv(B)}.It is obvious that B is minimal in B if and only if no element d ∈ B satisfies d ∈ conv(B \ {d}).We now show that B contains a smallest element.
First, note that for all B ∈ B, Ext(S) ⊆ B, with Ext(S) being the set of extreme points of S. Indeed, let d ∈ Ext(S).Then d ∈ S and can be written as and Φ : R n → R X given by Φ(x 1 , . . ., x n ) = i x i d i .Note that ∆ n is compact, by Heine-Borel, as it is a closed and bounded subset of R n , and Φ is continuous, since we are in a topological vector space and hence algebraic operations are continuous.As a consequence, S C A L C O 2 0 2 1

13:4
Presenting convex sets of probability distributions by unique bases is compact as a continuous image of a compact set.Now, Krein-Milman applies, yielding that S = conv(Ext(S)) with conv denoting the closed convex hull and hence since by the same argument as above conv(Ext(S)) is compact and hence closed.
Instead of the Krein-Milman theorem, one could use in this proof its predecessor from classical convex analysis in R n , e.g.[32,Theorem 18.5].The reason is that since we deal with finitely generated convex subsets of finitely supported distributions, such subsets are actually elements of C(X) for a finite set X.

Monads and presentations
Theorem 1 states the existence of a unique base for every finitely generated convex set of probability distributions.In the remainder of this paper, we exploit this result to illustrate an alternative proof of Theorem 4 in [3] that provides a presentation of the monad C [24,9,31,33,34,16].In Section 4, we recall the monad as well as its presentation given in [3].In this section, we recall some basic facts about monads and presentations.
A monad on Sets is a functor M : Sets → Sets together with two natural transformations: a unit η : Id ⇒ M and multiplication µ : A monad map from a monad M to a monad M is a natural transformation σ : M ⇒ M that makes the following diagrams commute, with η, µ and η, μ denoting the unit and multiplication of M and M, respectively, and If σ : MX → MX is an iso, the two monads are isomorphic.
An important example of monad is provided by the free monad of terms.Given a signature Σ, namely a set of operation symbols equipped with an arity, the free monad T Σ : Sets → Sets of terms over Σ maps a set X to the set of all Σ-terms with variables in X, and f : X → Y to the function that maps a term over X to a term over Y obtained by substitution according to f .The unit maps a variable in X to itself, and the multiplication is term composition.
Given a set of axioms E over Σ-terms, one can define the smallest congruence generated by the axioms, denoted by = E .Hereafter we write [t] E for the = E -equivalence class of the Σ-term t and T Σ,E (X) for the set of E-equivalence classes of Σ-terms with variables in X.The assignment X → T Σ,E (X) gives rise to a functor T Σ,E : Sets → Sets where the behaviour on functions is defined as for T Σ .Such functor carries the structure of a monad: the unit η E : Id ⇒ T Σ,E and the multiplication µ An algebraic theory is a pair (Σ, E) of signature Σ and a set of equations E. We say that (Σ, E) provides a presentation for a monad M if T Σ,E is isomorphic to M.
We next introduce several monads on Sets together with their presentations.
Nondeterminism.The non-empty finite powerset monad P ne maps a set X to the set of non-empty finite subsets P ne X = {U | U ⊆ X, U is finite and non-empty} and a function The unit η of P ne is given by singleton, i.e., η(x) = {x}, and the multiplication µ is given by union, i.e., µ(S) = U ∈S U for S ∈ P ne P ne X.Let Σ N be the signature consisting of a binary operation ⊕.Let E N be the following set of axioms, the axioms of semilattice: It is easy to show that the algebraic theory (Σ N , E N ) provides a presentation for the monad P ne , in the sense that there exists an isomorphism of monads ι N : T Σ N ,E N ⇒ P ne .
Probability.The finitely supported probability distribution monad D is defined, for a set X and a function f : for x ∈ X and the multiplication by Let Σ P be the signature consisting of a binary operation + p for all p ∈ (0, 1).Let E P be the following set of axioms, the axioms of a barycentric algebra, also called convex algebra: The algebraic theory (Σ P , E P ) provides a presentation for the monad D [30,28,7,8,15], in the sense that there exists an isomorphism of monads ι P : T Σ P ,E P ⇒ D.

A well known recipe for constructing monad morphisms
To prove that an algebraic theory (Σ, E) presents a monad M, one has to provide ι : T Σ,E ⇒ M that (a) is a monad map and (b) is an isomorphism.While the proof of (b) often requires some specific normal form arguments, the proof of (a) can be significantly simplified by using some standard categorical machinery.
In this section, we illustrate a well known recipe which allows for constructing a monad map ι : T Σ,E ⇒ M in a principled way.We begin by recalling Eilenberg-Moore algebras.
To each monad M, one associates the Eilenberg-Moore category EM(M) of M-algebras.Objects of EM(M) are pairs A = (A, a) of a set A ∈ Sets and a map a : MA → A, making the first two diagrams below commute.
between the underlying sets making the third diagram above commute.
It is well known that, when M is the monad T Σ,E for some algebraic theory (Σ, E), EM(M) is isomorphic to the category Alg(Σ, E) of (Σ, E)-algebras and their morphisms.A Σ-algebra (X, Σ X ) consist of a set X together with a set Σ X of operations ôX : X n → X, one for each operation symbol o ∈ Σ of arity n.A (Σ, E)-algebra is a Σ-algebra where all the 1 There is another equivalent presentation for convex algebras with a signature involving arbitrary convex combinations and two axioms, projection and barycenter.In this paper we will mainly use the binary convex operations.
C A L C O 2 0 2 1

13:6
Presenting convex sets of probability distributions by unique bases equations in E hold.A homomorphism h from a (Σ, E)-algebra (X, Σ X ) to a (Σ, E)-algebra (Y, Σ Y ) is a function h : X → Y that commutes with the operations, i.e., h • ôX = ôY • h n for all n-ary o ∈ Σ.For instance, (Σ N , E N )-algebras are semilattices, namely a set X equipped with a binary operation ⊕X that is associative, commutative and idempotent.A semilattice homomorphism is a function h : X → Y such that h(x 1 ⊕X x 2 ) = h(x 1 ) ⊕Y h(x 2 ) for all x 1 , x 2 ∈ X.Now we can display an abstract recipe for constructing a monad map ι : T Σ,E ⇒ M, which consists of three steps: (A) For each set X, provide MX with the structure of a (Σ, E)-algebra, namely functions ôX : (MX) n → MX for each o ∈ Σ, that satisfy the equations in E; (B) Prove that for each function f : X → Y , Mf is a (Σ, E)-algebra homomorphism; (C) Prove that for each set X, µ M X : MMX → MX is a (Σ, E)-algebra homomorphism.By the correspondence of (Σ, E)-algebras and Eilenberg-Moore algebras for T Σ,E and (A), we obtain a T Σ,E -algebra α X : T Σ,E MX → MX for each set X.These α X give rise to a natural transformation α : T Σ,E M ⇒ M by (B) and the correspondence of (Σ, E)homomorphisms and T Σ,E -homomorphisms.The monad morphism ι : T Σ,E ⇒ M is then obtained by (C) and the following theorem2 .Theorem 2. Let (M, η M , µ M ) and ( M, η M, µ M) be two monads.Let α : M M ⇒ M be a natural transformation such that α X : M MX → MX is an Eilenberg-Moore algebra for M and that µ M X : M MX → MX is an M-algebra morphism from ( M MX, α MX ) to ( MX, α X ).Then the following is a monad map: Proof.In order to prove that ι is a monad map, we need to prove that the following two diagrams commute.
For the diagram on the left, it is enough to recall that ι = α • Mη M and observe that the following diagram commutes: the top square commutes by naturality of η M and the bottom triangle commutes since α X is an Eilenberg Moore algebra for M.

13:7
In order to prove the commutation of the diagram on the right in (6), by ι = α • Mη M it is enough to prove that the following commutes: The left square commutes by naturality of µ M .The central square commutes since α X is an Eilenberg-Moore algebra for M. It remains to prove that the right triangle commutes.
First, observe that the diagram below commutes: the left triangle commutes by definition of ι, and the right square commutes by the assumption that µ M X is an M-algebra morphism.
The function ι X : T Σ,E X → MX obtained by the above recipe can be inductively defined for all x ∈ X, t 1 , . . ., t n ∈ T Σ X and n-ary operations o in Σ as follows.
The fact that the functions ôX form a (Σ, E)-algebra ensures that ι is a well defined function, We conclude this section by shortly illustrating how to apply the above recipe to the monad for nondeterminism and the one for probability discussed above.To construct a monad map ι N : T Σ N ,E N ⇒ P ne , we define for all sets X the binary function ⊕ : P ne (X) × P ne (X) → P ne (X) as the union ∪.This is associative, commutative and idempotent, so the axioms in E N are satisfied, or in other words, this forms a semilattice.This corresponds to point (A) of the recipe.It is not difficult to check (B) and (C).The resulting monad map is defined for all sets X as To construct the monad map ι P : T Σ P ,E P ⇒ D, we define for all p ∈ (0, 1) and all sets X the binary function +p : One can check that the three axioms in E P are satisfied (distributions form a convex algebra), and that points (B) and (C) of the recipe hold.The resulting monad map is defined for all sets X as

4
The monad for nondeterminism and probability In this section, we recall the monad for nondeterminism and probability, its presentation, and we illustrate some interesting properties.

Presenting convex sets of probability distributions by unique bases
The monad C : Sets → Sets maps a set X into CX, namely the set of non-empty, finitely-generated convex subsets of distributions on X (as defined in Section 2).For a function f : X → Y , Cf : CX → CY is given by Cf (S) = {Df (d) | d ∈ S}.The unit of C is η : X → CX given by η(x) = {δ x }.The multiplication µ : CCX → CX of C can be expressed in concrete terms as follows [16].Given S ∈ CCX, Let Σ be the signature Σ N ∪ Σ P .Let E be the sets of axioms consisting of E N , E p and the following distributivity axiom: This theory (Σ, E) is the algebraic theory of convex semilattices, introduced in [3].

Theorem 3. (Σ, E) is a presentation of the monad C.
The above theorem has been proved in [3].In the remainder of this paper, we will provide an alternative proof of this fact by exploiting the unique base theorem (Theorem 1).
We begin by observing that the assignment S → conv(S) gives rise to a natural transformation conv : P ne D ⇒ C [20,2].Theorem 1 provides a way of going backward, from C to P ne D: we call UB X : CX → P ne DX the function assigning to each convex subset S its unique base.However such UB X does not give rise to a natural transformation, in the sense that the diagram on the left in (9) only commutes laxly for arbitrary functions f : It holds that UB Y • Cf ⊆ P ne Df • UB X but not the other way around, as shown by the next example.
Example 4. Let X = {x, y, z}, Y = {a, b} and f : X → Y be the function mapping both x and y to a and z to b.Consider the set S = { 1 2 x + 1 2 y, 1 2 x + 1 2 z, δ z }: this set is a base since none of its element can be expressed as convex combination of the others.However, the set P ne Df (S) = {δ a , 1  2 a + 1 2 b, δ b } is not a base since 1 2 a + 1 2 b can be expressed as a linear combination of δ a and δ b .Now, by taking the convex set conv(S) Interestingly enough, while the diagram on the left in (9) does not commute, the diagram on the right in ( 9) does.This is closely related to Lemma 37 from [3], which provides a slightly different formulation.Below, we illustrate a proof: to simplify the notation of the natural transformations, we avoid to specify the set X whenever it is clear from the context.
Proof.We prove Cf (S) ⊆ conv( d∈UB(S) {Df (d)}).Let e ∈ Cf (S).Then e = Df (d) for some d ∈ S, which implies that d is a convex combination of elements of UB(S), that is,

13:9
For the opposite inclusion, let e ∈ conv( d∈UB(S) {Df (d)}).Hence, e = i p i • Df (d i ) with d i ∈ UB(S) for all i.We have we conclude e ∈ Cf (S).

5
The monad map ι : T Σ,E ⇒ C In this section we apply the standard recipe from Section 3.1 to construct a monad map ι : T Σ,E ⇒ C.
For this aim, we first recall two well-known operations on convex sets: the convex union ⊕ : C(X) × C(X) → C(X) defined for all S 1 , S 2 ∈ C(X) as and, for all p ∈ (0, 1), the Minkowski sum + p : C(X) × C(X) → C(X) defined as Points (A) and (B) of the recipe hold by the following result from [3,Lemma 38].Lemma 6.With the above defined operations (CX, ⊕, + p ) is a convex semilattice.Moreover, for a map f : X → Y , the map Cf : CX → CY is a convex semilattice homomorphism from (CX, ⊕, + p ) to (CY, ⊕, + p ).
The following lemma proves point (C) explicitly, namely that µ is a (Σ, E)-homomorphism. 3  Lemma 7.For all S 1 , S 2 ∈ CC(X), it holds that: Proof.Through this proof, we will often use the following key observation: 1. We first prove the inclusion µ(S 1 ) ⊕ µ(S 2 ) ⊆ µ(S 1 ⊕ S 2 ).As S 1 ⊆ S 1 ⊕ S 2 we derive that Symmetrically, by S 2 ⊆ S 1 ⊕ p S 2 we have 3 In [3], we show that (CX, ⊕, +p) is the free convex semilattice generated by X and then prove that µ = id # CX , see [3,Lemma 41].An implicit consequence of this is that µ is the unique homomorphism from the free convex semilattice generated by CX to the free convex semilattice generated by X that extends the identity map on CX.
Indeed, X + p Y ⊆ conv(X) + p conv(Y ), and as the Minkowski sum of convex sets is convex we have conv(X + p Y ) ⊆ conv(conv(X) + p conv(Y )) = conv(X) + p conv(Y ).For the other direction, take p( i p i x i ) + (1 − p)( j q j y j ) ∈ conv(X) + p conv(Y ).We have: p( i p i x i )+(1−p)( j q j y j ) = p( i,j (p i q j )x i )+(1−p)( i,j (p i q j )y j ) = i,j (p i q j )(px i +(1−p)y j ) which is then an element of conv(X + p Y ).This shows (13).
For every Φ, the set { U ∈supp(Φ) Φ(U ) • d | d ∈ U } is a Minkowski sum over the elements U of supp(Φ), which are themselves convex sets satisfying U = conv(UB(U )).Then by (13) we derive: By ( 12) and ( 14) it holds: for some p i = 0 and e ∈ S, and hence by extremality of d we have d = d i = e yielding d ∈ B. Next, we show that S = conv(Ext(S)), which means that Ext(S) ∈ B and hence together with Ext(S) ⊆ B shows that Ext(S) is the smallest element of B. This smallest element Ext(S) is the unique base of S. Pick a finite B 0 = {d 1 , . . ., d n } ∈ B. Then S = Φ(∆ n ) for

C A L C O 2 0 2 1 13: 10
Presenting convex sets of probability distributions by unique basesHence,