distribution monad



Measure and probability theory

Functional analysis

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels




The distribution monad is a monad on Set, whose algebras are convex spaces.

It can be thought of as the finitary prototype of a probability monad.


Finite distributions

Let XX be a set. Define DXD X as the set whose elements are functions p:X[0,1]p:X\to[0,1] such that

  • p(x)0p(x)\ne 0 for only finitely many xx, and

  • xXp(x)=1\sum_{x\in X} p(x)=1.

Note that the sum above is finite if one excludes all the zero addenda.

The elements of DXD X are called finite distributions or finitely-supported probability measures over XX.


Given a function f:XYf:X\to Y, one defines the pushforward Df:DXDYD f:D X\to D Y as follows. Given pDXp\in D X, then (Df)(p)DY(D f)(p)\in D Y is the function

y xf 1(y)p(x). y \;\mapsto\; \sum_{x\in f^{-1}(y)} p(x) .

(Note that, up to zero addenda, the sum above is again finite.)

Compare with the pushforward of measures.

This makes DD into an endofunctor on Set.

Monad structure

The unit map δ:XDX\delta:X\to D X maps the element xXx\in X to the function δ x:X[0,1]\delta_x:X\to[0,1] given by

δ x(y)={1 y=x; 0 yx. \delta_x(y) \;=\; \begin{cases} 1 & y=x ;\\ 0 & y\ne x . \end{cases}

Compare with the Dirac measures and valuations.

The multiplication map E:DDXDXE:D D X\to D X maps ξDDX\xi\in D D X to the function EξDXE\xi\in D X given by

Eξ(x)= pDXp(x)ξ(p). E\xi(x) \;=\; \sum_{p\in D X} p(x) \, \xi(p).

(Note that, up to zero addenda, the sum above is once again finite.)

The maps EE and δ\delta satisfy the usual monad laws. The resulting monad (D,E,δ)(D,E,\delta) is known as distribution monad, or finitary Giry monad (in analogy with the Giry monad), or convex combination monad, since the elements of DXD X can be interpreted as formal convex combinations of elements of XX.

This can be seen as a discrete, finitary analogue of a probability monad, where one replaces integrals by sums.



See also


Last revised on May 16, 2020 at 20:32:33. See the history of this page for a list of all contributions to it.