We consider a bag (multiset) monad on the category of standard Borel spaces, and show that it gives a free measurable commutative monoid. Firstly, we show that a recent measurability result for probabilistic database queries (Grohe and Lindner, ICDT 2020) follows quickly from the fact that queries can be expressed in monad-based terms. We also extend this measurability result to a fuller query language. Secondly, we discuss a distributive law between probability and bag monads, and we illustrate that this is useful for generating probabilistic databases.
翻译:我们考虑的是标准波罗尔空间类别的一个包(多重)月球,并表明它提供了一种可以自由测量的可测量的通量单体。 首先,我们表明最近数据库概率查询(Grohe和Lindner, ICDT 2020)的可测量性结果快速来自于查询可以以月球值表示的事实。 我们还将这一可测量性结果扩展为更充分的查询语言。 其次,我们讨论概率和袋式月球之间的分配法,我们说明这对创建概率数据库有用。