Infinite products and zero-one laws in categorical probability

Markov categories are a recent category-theoretic approach to the foundations of probability and statistics. Here we develop this approach further by treating infinite products and the Kolmogorov extension theorem. This is relevant for all aspects of probability theory in which infinitely many random variables appear at a time. These infinite tensor products $\bigotimes_{i \in J} X_i$ come in two versions: a weaker but more general one for families of objects $(X_i)_{i \in J}$ in semicartesian symmetric monoidal categories, and a stronger but more specific one for families of objects in Markov categories. As a first application, we state and prove versions of the zero-one laws of Kolmogorov and Hewitt-Savage for Markov categories. This gives general versions of these results which can be instantiated not only in measure-theoretic probability, where they specialize to the standard ones in the setting of standard Borel spaces, but also in other contexts.


Introduction
Markov categories are an approach to the foundations of probability and statistics based on category theory, proposed first by Golubtsov [10], rediscovered recently independently by Cho and Jacobs [3], and developed extensively by the first-named author in [6]. The basic observation is that Markov kernels can be composed sequentially and in parallel, making them into a symmetric monoidal category Stoch. One can then find axioms which make a symmetric monoidal category behave similarly to the actual category of Markov kernels, and then state and prove results from probability and statistics in this general abstract context. Thus Markov categories are abstract versions of the category of Markov kernels, and hence their name.
Eigil Fjeldgren Rischel: ayegill@gmail.com Tobias Fritz: tfritz@pitp.ca This represents a synthetic approach to probability, in contrast with the usual measure-theoretic approach (which can be called analytic). Instead of defining what the words probability, distribution, random variable, etc, mean semantically, we instead state by which operations these objects can be combined and related to each other, and which properties they are supposed to satisfy with respect to each other. We can draw an analogy to the Euclidean approach to geometry: in this synthetic approach, points and lines are described only in terms of their relationships with one another. This is to be contrasted with the analytic approach often attributed to Descartes, in which geometric objects are defined concretely in terms of more primitive notions like sets and real numbers.
In this paper, we give a treatment of further fundamental and classical results of probability theory within the setting of Markov categories. This adds further support to the hypothesis that Markov categories are an adequate setting for the foundations of probability and statistics, adding to the existing treatments of Bayesian updating, almost sure equality, conditional independence, and theorems on sufficient statistics [3,6]. Concretely, we develop a notion of infinite tensor products in Markov categories and then apply this notion to state and prove two of the standard zero-one laws of probability theory.

Summary.
We now present a more detailed overview.
Section 2 presents some background by recalling the definition of Markov category, presenting some pertinent examples, and discussing those aspects of the existing theory of Markov categories that will be of relevance for the rest of the paper. With the exception of Example 2.8, there is nothing new in this section. Section 3 then proceeds by introducing infinite tensor products in semicartesian symmetric monoidal categories, which are exactly those symmetric monoidal categories in which the monoidal unit object is terminal. We consider a number of examples of such categories and discuss whether infinite tensor products exist. This already includes examples relevant for probability theory, and in particular BorelStoch, the category of standard Borel spaces and measurable maps 1 , for which we explain how countably infinite tensor products implement the Kolmogorov extension theorem (for countably many variables); the extension theorem states that the joint distributions of infinitely many random variables are in bijection with compatible families of joint distributions for each finite subset of variables. The universal property of our infinite tensor products makes the extension theorem into a definition, generalized from distributions to Markov kernels. An important subtlety here is the additional preservation condition in Definition 3.1, where infinite tensor products are introduced: this additional condition guarantees that infinite tensor products have nice compositionality properties, so that e.g. a tensor product of two infinite tensor products is itself an infinite tensor product (Lemma 3.9). This condition does not come up traditionally in the context of the Kolmogorov extension theorem, the reason being that it automatically holds in the case of BorelStoch (Example 3.6).
In the short Section 4, we then turn to infinite tensor products in Markov categories, which we call Kolmogorov products due to the connection with the Kolmogorov extension theorem. In addition to being an infinite tensor product, a Kolmogorov product also needs to respect the additional structure which makes a semicartesian symmetric monoidal category into a Markov category, namely the comultiplications copy X : X → X ⊗ X. This is implemented by postulating that the product projections should be deterministic morphisms, or equivalently that the infinite product should be an honest categorical product in the cartesian monoidal subcategory of deterministic morphisms (Proposition 4.3). Not surprisingly, the infinite tensor products in BorelStoch, which implement the Kolmogorov extension theorem, are indeed Kolmogorov products.
In Section 5, we state and prove the zero-one laws of Kolmogorov and Hewitt-Savage in their synthetic versions. Very roughly, the Kolmogorov zero-one law states that, given an infinite collection of independent random variables and an event which is in the σ-algebra generated by the variables but independent of any finite subset of them, the event has probability zero or one. This theorem goes back to Kolmogorov's foundational monograph [14], although the statement appearing there is significantly different from its modern form. For a more recent textbook treatment of this theorem, see e.g. [13,Theorem 2.37] The Hewitt-Savage zero-one law, due to Hewitt and Savage in [11,Theorem 11.3], is similar in flavour but technically quite different. Here, the infinitely many variables are assumed to be identically distributed in addition to being independent, and the event is assumed to be invariant under finite permutations of the variables. Again, under these assumptions, the event has probability zero or one.
Finally in Section 6, we apply our results to BorelStoch. We thereby rederive the standard zero-one laws for random variables in standard Borel spaces from our abstract theorems. We also instantiate one of our theorems in the Kleisli category of the lower Vietoris monad, which gives criteria for when a continuous map out of infinite product of topological spaces into a Hausdorff space is constant (Corollary 6.5).
Notation. Throughout, C is a symmetric monoidal category. To simplify notation, we generally omit mention of the structure isomorphisms by assuming that C is strict without loss of generality. We routinely make use of string diagram notation, and in doing so we omit object labels whenever these are obvious from the context. Our string diagrams are to be read from bottom to top.
In Section 3, C denotes more concretely a semicartesian strict symmetric monoidal category. In Section 4 and after, C denotes a Markov category in the sense of Definition 2.5. J is a set used for indexing products of objects; the definitions and results of this paper are nontrivial only when J is infinite. F denotes either an arbitrary finite set, or more concretely a finite subset of J.

Background on Markov categories
We assume familiarity with symmetric monoidal categories, up to and including string diagram notation and string diagram calculus for composite morphisms in symmetric monoidal categories.
A symmetric monoidal category C is semicartesian if the monoidal unit I ∈ C is terminal. Equivalently [8,Theorem 3.5], C is semicartesian if it comes equipped with morphisms which are natural in X and Y and coincide with the monoidal structure isomorphisms whenever X = I or Y = I. In the probability context, these morphisms can be interpreted as marginalizations, or equivalently as discarding the value of the variable Y or X.
Example 2.1. Any Cartesian monoidal category is obviously semicartesian. In the probabilistic setting that we are considering, this corresponds to a situation in which there is no randomness (in such a category, all morphisms are deterministic, cf. Definition 2.6). Hence it is somewhat uninteresting from our point of view.
Here are the main examples of semicartesian symmetric monoidal categories that we will be considering.

Example 2.2.
FinStoch is the category of finite sets with stochastic matrices as morphisms. This means that for finite sets X and Y , a morphism f : X → Y is a matrix (f xy ) x∈X,y∈Y of nonnegative real numbers such that y f xy = 1 for every x. Stochastic matrices compose by matrix multiplication, which in this context is also known as the Chapman-Kolmogorov equation. We consider FinStoch as a symmetric monoidal category with respect to the cartesian product of sets on objects and the tensor product (Kronecker product) of stochastic matrices on morphisms; the monoidal structure isomorphisms are the obvious ones coming from the embedding FinSet ⊆ FinStoch.

Example 2.3. Let
CRing + be the category of commutative rings with maps which are merely additive and unit-preserving, considered as a symmetric monoidal category in the obvious way with respect to the tensor product of rings. Then since CRing + has the monoidal unit Z as its initial object, we can conclude that CRing op + is semicartesian monoidal.
Accepted in Compositionality on 2020-05-14. Click on the title to verify.

Example 2.4.
Stoch is the category of measurable spaces (X, Σ X ) as objects and Markov kernels as morphisms. We sketch the definition here and refer to [6,Section 4] and references therein for the details. Given measurable spaces (X, Σ X ) and (Y, assigning to every x ∈ X a probability measure f (−|x) : Σ Y → [0, 1] in such a way that for every S ∈ Σ Y , the function x → f (S|x) is measurable. Intuitively, one can think of f as assigning to every x ∈ X a random element of Y ; or one can think of f as a statistical model, specifying one probability measure f (−|x) for every parameter value x.
Composition of Markov kernels is again defined by a variant of the Chapman-Kolmogorov equation: for f : (X, Σ X ) → (Y, Σ Y ) and g : (Y, Σ Y ) → (Z, Σ Z ), the composite is given by, for all x ∈ X and T ∈ Σ Z , where the relevant measurability condition in order for this to define a Markov kernel follows by a standard application of the π-λ-theorem; associativity of composition uses Fubini's theorem. In this way, we obtain a category Stoch which is, more or less by definition, isomorphic to the Kleisli category of the Giry monad [9].
The symmetric monoidal structure on Stoch is defined in terms of the usual product of measurable spaces, given by the Cartesian product of underlying sets equipped with the product σ-algebra. The tensor product of morphisms f : (A, Σ A ) → (X, Σ X ) and g : (B, Σ B ) → (Y, Σ Y ) is given by the unique Markov kernel between the product measurable spaces which satisfies The monoidal unit I is given by any one-element set with its unique σ-algebra. As a special case, morphisms I → (X, Σ X ) can be identified with probability measures Σ X → [0, 1]. There is a well-known subclass of particularly well-behaved measurable spaces, the standard Borel spaces, or equivalently Polish spaces equipped with their Borel σ-algebras. We write BorelStoch ⊆ Stoch for the full subcategory of standard Borel spaces with Markov kernels. Since finite products of standard Borel spaces are again standard Borel, BorelStoch is again semicartesian symmetric monoidal. In summary, BorelStoch is the category of standard Borel spaces as objects with measurable Markov kernels as morphisms.
Returning to the general theory, in terms of string diagrams the unique morphism del X : X → I for an object X ∈ C is denoted by X The projection maps id ⊗ del Y : X ⊗ Y → X and del X ⊗ id : X ⊗ Y → Y , which are the ones from (1), are correspondingly written as Y X Y X Our goal is to use semicartesian monoidal categories in order to develop aspects of probability theory in categorical terms, in such a way that instantiating this theory in Stoch or BorelStoch recovers the standard theory. As it turns out, doing so requires a bit more structure, in a form which has been axiomatized first by Cho and Jacobs [3] as affine CD-categories, although very similar definitions occur in earlier work of Golubtsov [10]. We here follow the more intuitive terminology of our own [6, Definition 2.1].

Definition 2.5.
A Markov category C is a semicartesian symmetric monoidal category where every object X ∈ C is equipped with a distinguished morphism Accepted in Compositionality on 2020-05-14. Click on the title to verify.
which, together with del X : X → I, makes X into a commutative comonoid, and such that There is a strictification result [6,Theorem 10.17] which guarantees that C can be assumed to be strict monoidal without messing up the commutative comonoid structures. We assume from now on that C is strict throughout.
We think of the comultiplication (2) as a copying operation. The coassociativity and counitality conditions guarantee that copying with any number of output wires is well-defined, and we draw it likewise as a single black dot with any number of outgoing wires, like this: Examples 2.2 to 2.4 are all Markov categories in a canonical way. In FinStoch and Stoch, the comultiplication morphisms are given indeed by copying, i.e. by those stochastic matrices or Markov kernels which map an element x ∈ X to the Dirac delta measure at (x, x) ∈ X × X. We refer to [6, Example 2.5 and Section 4] for the technical details. In CRing op + , we define the comultiplication of an object R ∈ CRing op + to be represented by the multiplication map R ⊗R → R. The multiplicativity condition (3) then amounts to the fact that the multiplication on a tensor product of commutative rings R ⊗ S is given by the defining equation The following definition is among the central notions of the theory of Markov categories.
As per [6, Remark 10.13], the deterministic morphisms form a symmetric monoidal subcategory C det ⊆ C which contains all structure morphisms of C, including the comultiplications themselves. The fact that all morphisms are comonoid homomorphisms implies that C det is actually cartesian monoidal.
In FinStoch, the deterministic morphisms X → Y are exactly the {0, 1}-valued stochastic matrices, which are indeed those which are deterministic in the sense that they do not involve any randomness. Since these stochastic matrices are in obvious bijection with honest functions X → Y , we conclude that FinStoch det is equivalent to FinSet. In Stoch, the deterministic morphisms f : X → Y are exactly those Markov kernels for which f (S|x) ∈ {0, 1} for every S ∈ Σ Y and x ∈ X. In other words, as the term suggests, the deterministic morphisms are again those which do not involve any randomness; in BorelStoch, the deterministic morphisms can be identified with the measurable functions. In CRing op + , the deterministic morphisms R → S are precisely those morphisms which are represented by additive unital maps S → R which are in addition multiplicative, i.e. the ring homomorphisms. Thus the subcategory of deterministic morphisms is exactly the opposite of the usual category of commutative rings.
We recall some more definitions that we will be using later on.
Accepted in Compositionality on 2020-05-14. Click on the title to verify.

Definition 2.7 ([6, Definition 11.31]). A Markov category C is causal if whenever
g holds for morphisms as indicated, then also Intuitively, this condition states that if the choice between h 1 and h 2 is irrelevant for what happens "in the future of g", then that choice is likewise irrelevant for what happened "in the past of g". It is known that Stoch is causal [6, Example 11.35], and therefore so are the subcategories BorelStoch and FinStoch.
On the basis monomials t n , we have (f g)(t n ) = 1, and therefore for all n, m ∈ N, so that the hypothesis holds. If CRing op + were causal, then we would also have for all n, m, ∈ N. But this clearly fails for n = = 1 and m = 0.
The following definition goes back to Cho and Jacobs [3, Definition 5.1]. A more detailed investigation of its properties can be found in [6, Section 13]. This term comes from measure theory, and should be interpreted as meaning that for all those values of X which can occur as outputs of p, feeding these values to f and g as inputs is guaranteed to result in the same distribution; at the same time, the behavior of f and g may be different on those input values which do not occur as outputs of p.
We finally introduce a notion of conditional independence, which is a straightforward generalization of [6, Defnition 12.12] from the binary case to the n-ary case.
Conditional independence does not depend on the order of the tensor factors: if p displays the conditional independence X 1 ⊥ . . . ⊥ X n || A, then composing p with any permutation σ of the tensor factors X 1 , . . . , X n gives a morphism j∈F X j is a finite product without any particular order on the factors 2 , then for p : A → j∈F X j there is no ambiguity about whether p displays conditional independence or not, and we also write ⊥ j∈F X j || A in case that it does.

Infinite tensor products in semicartesian symmetric monoidal categories
Many theorems in probability theory involve infinitely many random variables at a time, together with a joint distribution for them. In the setting of Markov categories, this means that we need to consider morphisms whose codomain is an "infinite tensor product" in a suitable sense. In this section, we start by considering infinite tensor products in the more general context of semicartesian symmetric monoidal categories.
Recall that the Kolmogorov's extension theorem states that joint distributions of a given (infinite) family of random variables are in bijection with compatible families of distributions of finite subsets of these variables. Here, a joint distribution of all of them determines such a compatible family by considering all its marginals on finite subsets. This motivates our general definition of infinite tensor products, which we now introduce. Suppose that (X i ) i∈J is any family of objects, where the indexing set J is typically infinite. For any finite subset F ⊆ J, we also write X F := i∈F X i for simplicity of notation. If F ⊆ F ⊆ J are two finite subsets, then the fact that C is semicartesian monoidal gives us marginalization morphisms Via these maps, the finite tensor products (X F ) F ⊆J make up a cofiltered diagram in the form of a functor from the poset of finite subsets of J, ordered by reverse inclusion, to C. Definition 3.1. Let (X i ) i∈J be a family of objects in C. An infinite tensor product

indexed by the poset of finite subsets F ⊆ J ordered by reverse inclusion, if this limit exists and is preserved by the functor − ⊗ Y for every object Y ∈ C.
We will refer to the structure maps π F : X J → X F as finite marginalizations. The extra preservation means more concretely that X J ⊗ Y is likewise the cofiltered limit of the X F ⊗ Y with respect to the maps We will motivate this preservation condition in Remark 3.3.
Of course, an infinite tensor product may or may not exist in C. Example 3.7 will present a simple example in which infinite tensor products only exist for finite J.

Remark 3.2.
If J is finite, then the infinite tensor product always exists and coincides with the tensor product X J = i∈J X i specified by the monoidal structure: then the finite product itself is initial in the defining diagram of the limit, and the preservation condition holds automatically for the same reason. Thus infinite tensor products i∈J X i are of interest only for infinite J, as the terminology suggests. And for finite J, the notation is such that i∈J X i can be interpreted either as specified directly by the monoidal structure, or as an infinite tensor product in the sense of Definition 3.1. Since the result is the same (up to unique isomorphism), there is no ambiguity and the notation is consistent.

Remark 3.3.
It is natural to require different infinite tensor products to interact well with another. If X J is an infinite tensor product of a family (X i ) i∈J and we are given an additional object X * for * ∈ J, then there is a canonical comparison isomorphism induced via the universal property of X J { * } , which is the infinite tensor product of the original family with X * thrown in. In order for infinite tensor products to be coherent, one will want this comparison isomorphism to be an isomorphism. We now show that this is indeed the case thanks to the preservation condition in Definition 3.1, even if X J { * } does not exist a priori. More precisely, we exhibit X J ⊗ X * as the defining cofiltered limit of the infinite tensor product X J { * } as follows. The object X J ⊗ X * can be equipped with finite marginalization morphisms with respect to F ⊆ J { * } given by π F \{ * } ⊗ id : X J ⊗ X * −→ X F \{ * } ⊗ X * whenever * ∈ F , and just by π F ⊗ del X * : X J ⊗ X * −→ X F in case that * ∈ F . It is straightforward to check that these morphisms indeed make X J ⊗ X * carry the universal property of the infinite tensor product X J { * } if and only if the functor − ⊗ X * preserves the defining cofiltered limit of the infinite tensor product X J . It is also easy to see that this new cofiltered limit is again preserved by every functor − ⊗ Y , based on the assumption that the defining cofiltered limit of the original infinite tensor product is preserved by − ⊗ (X * ⊗ Y ) as well.
In summary, the preservation condition in this definition amounts to the requirement that the canonical comparison morphism (5) must be an isomorphism, as one would expect intuitively from a good notion of infinite tensor product.
Example 3.4. The dual definition of infinite tensor products of algebraic structures as filtered colimits of finite tensor products is well-known in the literature, e.g. in the case of C*-algebras [2, p. 315], although we do not know whether the preservation condition has been made explicit before. For example in the case where our category is CRing op + , we recover the usual folklore definition of an infinite tensor product of rings i∈J R i in terms of formal sums of elementary tensors, where an elementary tensor is a family of elements (r i ) i∈J such that all but finitely many are equal to the respective unit. The necessary preservation condition is easily seen to hold. Note that we do not yet consider the multiplication on i∈J R i , since Definition 3.1 is not yet concerned with the comonoid structures on the objects. We will get to this in the next section.
Intuitively, our definition matches up with the known algebraic ones under the categorical duality of algebra and geometry, where our Definition 3.1 is on the geometrical side of the duality.
Accepted in Compositionality on 2020-05-14. Click on the title to verify. Remark 3.5. In those semicartesian monoidal categories C that are of interest to us, morphisms I → X play the role of probability measures on X. Thus applying the defining universal property of an infinite tensor product with respect to maps out of I implements the Kolmogorov extension theorem in C: probability measures on an infinite product X J are in bijection with consistent families of probability measures on the finite products X F for F ⊆ J. The spirit of Definition 3.1 is thus such that it turns the Kolmogorov extension theorem into a definition. Example 3.6. We now consider infinite tensor products in Stoch, where we would like infinite tensor products to be given by the corresponding infinite products of measurable spaces in the usual sense. Since the Kolmogorov extension theorem does not hold for general (even merely countable) products of measurable spaces [1], this is not the case without further additional assumptions on the measurable spaces involved. Thus we do not know whether Stoch has infinite tensor products, although we suspect that it does not; but even in the unlikely case that it does, they are in general not the ones that one will care about for the purposes of probability theory.
However, the situation is much better for countable products in BorelStoch, for which the Kolmogorov extension theorem indeed holds [13,Theorem 14.35]. In other words, if ((X i , Σ i )) i∈N is a sequence of standard Borel spaces, then the cartesian product X N = i∈N X i , when equipped with the product σ-algebra Σ N , satisfies the universal property of an infinite tensor product with respect to maps out of I, since the marginalization maps implement a bijection between probability measures on X N = i∈N X i and compatible families of probability measures on the finite subproducts X F = i∈F X i , where the compatibility is with respect to marginalization to smaller subproducts specified by F ⊆ F .
We now prove that this implies the universal property in general: if A and all the X i are standard Borel spaces, then Markov kernels A → X J are in bijection with compatible families of Markov kernels A → X F . While we just saw that this is the case for A = I, we now show that it holds for arbitrary A. Thus suppose that is a family of Markov kernels satisfying the compatibility condition π F ,F • g F = g F for all finite F ⊆ F ⊆ J. Then for every a ∈ A, the probability measures g F (−|a) : Σ F → [0, 1] are a compatible family to which the Kolmogorov extension theorem in the form of [13,Theorem 14.35] applies, and we obtain a unique probability measure g J (−|a) : Σ J → [0, 1] which has the original g F (−|a) as its finite marginals. It remains to be shown that for every S ∈ Σ J , the map a → g J (S|a) is measurable. Since limits of pointwise convergent sequences of measurable real-valued functions are again measurable, the set of S for which this measurability holds is closed under countable disjoint union, and it is clearly closed under complements. We therefore have a λ-system. Since the map is measurable by assumption whenever S is a measurable cylinder set, and the cylinder sets form a π-system, the π-λ-theorem implies that a → g J (S|a) is measurable for all S in the σ-algebra generated by the measurable cylinder sets, which is exactly the product σ-algebra Σ J . Hence the existence part of the universal property indeed holds; and the uniqueness part is obvious by considering each a ∈ A separately and applying the Kolmogorov extension theorem.
Since the resulting comparison morphism (5) is an isomorphism by construction-both sides are given by the corresponding products of measurable spaces-it follows that the required preservation condition of infinite tensor products holds as well.
In conclusion, BorelStoch indeed has countable tensor products. It is plausible that there is another subcategory of Stoch strictly larger than BorelStoch which has all infinite tensor products; for example, one can try to construct such a subcategory by imposing compactness or perfectness conditions [5, §451] on the Markov kernels, since under such assumption one again has a version of the Kolmogorov extension theorem [5, Corollary 454G]. However, we have so far not been able to find a definition of "compact Markov kernel" or "perfect Markov kernel" which would guarantee closure under composition, due to problems with perfect measures not being stable under mixtures [15]. Hence the problem of finding a subcategory of Stoch with all infinite tensor products remains open. Example 3.7. Infinite tensor products never exist in FinStoch, in the following sense: if the family (X i ) i∈J is such that no X i is empty and infinitely many of them contain at least two elements, Accepted in Compositionality on 2020-05-14. Click on the title to verify.
then i X i does not exist. One way to see this is to use the fact that the hom-sets of FinStoch are convex subsets of the vector space of matrices, and that composition distributes over these convex combinations, making FinStoch into a category enriched in convex sets. 3 Since these hom-sets are finite-dimensional, for every Y and Z there is n ∈ N such that among every n morphisms Y → Z, one of them can be written as a convex combination of the others. Now suppose that the product i X i existed. Then by choosing varying elements of each X j , we could construct uncountably many morphisms 1 → i X i whose marginalizations 1 → X F are all deterministic. Per the above, one of these hypothetical morphisms can be written as a convex combination of finitely many others. By choosing F ⊆ J suitably, we can achieve that the finite marginalizations 1 → X F of the finitely many morphisms involved in this convex combination are all distinct. Since these morphisms 1 → X F are deterministic by construction, and no deterministic morphism in FinStoch can be written as a convex combination of other deterministic morphisms, we have arrived at a contradiction. Thus i X i does not exist. , personal communication). Suppose that C is a partially ordered set, considered as a category with X ≥ Y if and only if the morphism X → Y exists. 4 Then the monoidal structure makes C into a preordered commutative monoid, which we write additively. Here, the functoriality of the monoidal structure amounts to the assumption that addition is monotone,

Example 3.8 (Paolo Perrone
Furthermore, the monoidal structure is semicartesian if and only if X ≥ 0 for every X. One can then apply Lemma 3.10 to show that C has infinite tensor products if and only if C is a finitary complete monoid in the sense of Goldstern and Karner [12,Section 2.2], and these infinite tensor products then correspond to infinite sums i∈J X i in the monoid.
We return to the general theory.
Lemma 3.9. Let J = J 1 J 2 be a disjoint union and (X i ) i∈J a family of objects in C. Suppose that the infinite tensor products X J1 and X J2 exist. Then the object is an infinite tensor product X J with respect to the finite marginalizations morphisms given by, for every finite F ⊆ J, exhibit X F1 ⊗X J2 as the cofiltered limit of the X F1 ⊗X F2 by the preservation assumption. Similarly for varying F 1 , the morphisms exhibit X J1 ⊗ X J2 as the cofiltered limit of the X F1 ⊗ X J2 . The claimed universal property follows since a limit of limits is a limit, and it is easy to see that the diagram shapes match up: the poset of finite subsets of J 1 J 2 is the product of the posets of finite subsets of J 1 and J 2 . The preservation property with respect to applying a tensoring functor − ⊗ Y carries along both of the above limits individually.
More generally, we may consider infinite tensor products of infinite tensor products, k∈K j∈J k X k,j , where now (J k ) k∈K is a family of sets and (X k,j ) a doubly indexed family of objects. One may think that this doubly infinite tensor product should be isomorphic to the single-step infinite tensor product k∈K, j∈J k X k,j . And indeed, if for every finite F ⊆ k∈K J k we choose any finite G ⊆ K such that (k, j) ∈ F implies k ∈ G, then we have morphisms where the object on the right can also be written as (k,j)∈F X k,j . It is straightforward to see that this ρ F does not depend on the particular choice of G (up to monoidal structure isomorphisms). We now show that these ρ F 's are finite marginalization morphisms which make the doubly infinite tensor product k∈K j∈J k X k,j into the single infinite tensor product k∈K, j∈J k X k,j .
Lemma 3.10. Suppose that (J k ) k∈K is a family of sets and (X k,j ) j∈J k ,k∈K a doubly indexed family of objects. If all of the infinite tensor products j∈J k X j,k and k∈K j∈J k X k,j exist, then the morphisms (6) exhibit k∈K j∈J k X k,j as the infinite tensor product k∈K, j∈J k X k,j .
Proof. By repeated application of Lemma 3.9, the second half of (6) exhibits k∈G j∈J k X k,j as the infinite tensor product of the X k,j for k ∈ G and j ∈ J k . The relevant universal property as well as its preservation by − ⊗ Y then follow from another straightforward diagram chase.

Infinite tensor products in Markov categories
If a Markov category C has infinite tensor products, then one should expect a compatibility condition between these infinite tensor products and the comonoid structures on the objects. This is imposed as follows.
Definition 4.1. Let C be a Markov category and (X i ) i∈J a family of objects. We say that an infinite tensor product X J = i∈J X i is a Kolmogorov product if the finite marginalization morphisms π F : X J → X F are deterministic.
In BorelStoch, the infinite tensor products constructed in Example 3.6 are Kolmogorov products. In CRing op + , the infinite tensor products from Example 3.4 are Kolmogorov products as well, provided that one equips i R i with the tensor product ring structure, since this one is the only one which makes the canonical inclusions R j → i R i into ring homomorphisms. These examples illustrate the following important point. In some Markov categories, such as CRing op + , not all isomorphisms are deterministic, and there may even be isomorphic objects which have no deterministic isomorphism [6,Remark 10.10]. In these categories, whether a given infinite tensor product is a Kolmogorov product or not generally depends on the specific choice of that object. In particular, there may be infinite tensor products which are not Kolmogorov products. For example in CRing op + , we may take the tensor product of abelian groups i R i and equip it with a different multiplication than the tensor product of rings one (as long as it has the same unit), and one will then have an infinite tensor product in CRing op + which is not a Kolmogorov product. Remark 4.2. If the Markov category C is positive in the sense of [6, Definition 11.22], then a morphism A → B ⊗ C is deterministic if and only if both of its marginals A → B and A → C are deterministic [6,Corollary 12.15]. In this case, it follows that the finite marginalizations π F are deterministic if and only if all the single-factor marginalizations π {i} : X J → X i are. Thus for an infinite tensor product to be a Kolmogorov product, it is then enough to verify that the π {i} are deterministic.
Using the multiplicativity of the comonoid structure of (3), we see that Lemmas 3.9 and 3.10 hold also for Kolmogorov products, in the sense that tensoring together Kolmogorov products, or taking Kolmogorov products of Kolmogorov products, results again in a Kolmogorov product. Proof. For (X i ) i∈J a family of objects with Kolmogorov product X J and finite marginalizations π F : X J → X F , we first show that if we have a compatible family of deterministic morphisms g F : A → X F , then also the induced g J : A → X J is deterministic. Drawing the Kolmogorov product X J as a double wire, we need to prove the determinism equation By Lemma 3.9, the codomain object X J ⊗ X J is itself an infinite tensor product, and it is therefore enough to prove that for every finite F ⊆ J, where we have assumed without loss of generality that the two finite marginalization maps are the same, which we can by replacing the corresponding finite subsets by their union. Using the determinism assumption for π F on the right, as well as the assumption that g F = π F • g J is deterministic, implies the claim. Now since every finite tensor product X F is a categorical product in C det , we can use the fact that in every category, lim and the claim follows.
In particular, this proves that Definition 4.1 determines the comonoid structure on a Kolmogorov product uniquely: copy i Xi has to be the equal to the corresponding diagonal morphism in C det , and Proposition 4.3 determines i X i up to unique deterministic isomorphism.

Example 4.4. Let
SetMulti be the category with objects ordinary sets, morphisms f : X → Y given by multivalued functions, which are maps f : X → P(Y ) \ ∅, with composition of morphisms f : X → Y and g : Y → Z given by SetMulti could also be described as the Kleisli category of the nonempty powerset monad, which sends a set X to P(X) \ ∅. In particular, FinSetMulti is closely related to Rel, the category of sets and relations, since the latter can equivalently be regarded as the Kleisli category of the powerset monad (where the empty set is allowed). Intuitively, SetMulti is the closest relative of Rel to which our formalism can be applied. See also [6, Example 2.6] for a treatment of the full subcategory FinSetMulti on finite sets. The Cartesian product of sets equips SetMulti with a symmetric monoidal structure, if for f : A → X and g : B → Y we set The monoidal unit is any one-element set I. With the obvious structure isomorphisms inherited from Set, this turns SetMulti into a semicartesian symmetric monoidal category, and we can give it a Markov category structure by setting copy X (x) := {(x, x)} ⊂ X × X. Then the deterministic morphisms are precisely those sending each point into a singleton set, resulting in an isomorphism of categories SetMulti det ∼ = Set.
Of course, Set has all infinite products. But perhaps surprisingly, these products are not Kolmogorov products, or even infinite tensor products in SetMulti. To see this, consider for example Accepted in Compositionality on 2020-05-14. Click on the title to verify. the family (X n ) n∈N with X n = {0, 1} for all n. A map I → n∈N {0, 1} is just a nonempty subset of this infinite product. Given such a subset U , the finite marginals I → n∈F {0, 1} for finite F ⊂ N are the images of U under the projection map. But these images do not determine U . For instance, consider the subset U of those sequences containing at least one 1. Its image in every n∈F {0, 1} is the whole set, since any finite sequence of 0s and 1s can be extended to one containing a 1, but U itself is a proper subset. In particular, U has the same compatible family of finite marginalizations as e.g. the set of those sequences containing at least one 0, and hence the uniqueness part of the universal property fails.
It is clear that this counterexample is quite generic and works for any infinite family of nonempty sets, infinitely many of which contain at least two elements, as in Example 3.7. Thus SetMulti is very far from having Kolmogorov products. A good way to remedy this deficiency is to consider topological spaces instead of sets: as we will see in Section 6, the Kleisli category of the lower Vietoris monad on Top does have Kolmogorov products, and it can be thought of as the topological counterpart of SetMulti.
The concept of Kolmogorov product describes a notion of infinite collection of random variables whose joint distribution is encoded in its finite marginals. It is natural to postulate the same for when such an infinite collection is considered to be independent. Definition 4.5. Let X J = i∈J X i be a Kolmogorov product in a Markov category. We say that a morphism p :

The zero-one laws
We now make use of the theory developed in the previous sections in order to state and prove synthetic versions of the classical zero-one laws of Kolmogorov and Hewitt-Savage. Throughout this section, (X i ) i∈J is a family of objects in a Markov category C with Kolmogorov product X J and finite marginalizations π F : X J → X F . Proof. This is nontrivial because the assumption by definition only involves conditional independence of the finite marginalizations. What we need to prove is that As the codomain is exactly the Kolmogorov product X J , it is enough to prove this equation upon composing the second output with the finite marginalizations π F : X J\{i} → X F . But this is a consequence of the assumption.

Examples
We now show how our results specialize to the standard Kolmogorov and Hewitt-Savage zeroone laws in the case of standard Borel spaces. Further down we will give another application to continuous maps between topological spaces.

Corollary 6.1 (Kolmogorov zero-one law).
Suppose Ω is a standard Borel space with a probability measure P and that (f i : Ω → X i ) i∈N is a sequence of independent random variables taking values in standard Borel spaces X i . Suppose that T ⊆ Ω is in the coarsest σ-algebra which makes the f i measurable, and independent of any finite subset of the f i . Then P (T ) ∈ {0, 1}.
Proof. We want to apply Theorem 5.3 with C = BorelStoch and J = N and A = I, the one-element measurable space. Then P : I → Ω. We write f N : Ω → X N for the induced map to the product measurable space. In Ω, the coarsest σ-algebra which makes the f i measurable coincides with the σ-algebra consisting of the sets of the form f −1 N (S) for measurable S ⊆ X J . Hence the assumption implies that there is measurable S ⊆ X J such that T = f −1 N (S). Then we apply Theorem 5.3 with s : X J → {0, 1} the indicator function of S, which is a measurable map and therefore can also be regarded as a morphism in BorelStoch, and with p = f N P . We therefore obtain that sp : I → {0, 1} is deterministic. But since sp corresponds to the probability measure on {0, 1} with weight P (f −1 N (S)) = P (T ) on {1} and the complementary weight 1 − P (T ) on 0, we conclude that indeed P (T ) ∈ {0, 1}.
We note that the standard Kolmogorov zero-one law holds for any measurable spaces, not just for standard Borel spaces, and hence this is a strictly less general statement. As discussed in Example 3.6, it seems unlikely that the general statement can be proven by applying our machinery to the category Stoch of measurable spaces and Markov kernels. This leads to the following problem: Problem 6.2. Is there a Markov category C with countable Kolmogorov products such that Theorem 5.3 specializes to the standard Kolmogorov zero-one law, in its general form applicable to all measurable spaces? Corollary 6.3 (Hewitt-savage zero-one law). Suppose Ω is a standard Borel space with probability measure P , and let (f i : Ω → X) i∈N be a sequence of independent, identically distributed random variables taking values in a standard Borel space X. Suppose S ⊆ i∈N X = X N is measurable in the product σ-algebra, and suppose moreover that, for each finite permutation σ : N → N, we haveσ(S) = S (in other words, S is invariant under finite permutations of the variables). Then P (f −1 N (S)) ∈ {0, 1}, where f N again denotes the induced map Ω → X N . Proof. The proof is similar to the previous proof. This time we want to apply Theorem 5.4 with C = BorelStoch, J = N and A = I. Again, we have P : I → Ω. As before, we let s : X N → {0, 1} be the indicator function of S, and we let p = f N P . The i.i.d. assumption on the f i implies that σp = p, and the assumption on S implies sσ = s for finite permutations σ. Hence we can apply Theorem 5.4. This again shows that the map sp : I → {0, 1} is deterministic, which, just as before, means P (f −1 N (S)) ∈ {0, 1}. By interpreting these results in different Markov categories, we can obtain other results. In particular, the following example is of a similar flavour as SetMulti, but improves on its lack of infinite tensor products (Example 4.4). With where U ⊆ Y ranges over all opens.
3. Composition is defined as in SetMulti via (7), but taking the closure of the union in addition. 4. The monoidal product is the Cartesian product of topological spaces, and on morphisms exactly as in SetMulti.
5. The comultiplication is defined by copy X (x) = cl({(x, x)}) Proposition 6.4. Kl(H) has Kolmogorov products of any cardinality, given by the usual infinite product of topological spaces with the product topology.
Proof. First we observe that H( i∈J X i ) is the cofiltered limit of the spaces H( i∈F X i ) for F ⊆ J finite. To see this, note that the marginalizations induce a continuous map We prove that this is a homeomorphism, showing first that it is an injection. Thus we start with distinct closed subsets C, D ⊆ X i . We assume without loss of generality that C ⊆ D, and choose x ∈ C \ D. Then let U x be an open neighborhood of x not intersecting D. By making U smaller if necessary, we can assume without loss of generality that U is a basic open in the product topology, meaning that there is a finite F so that y = (y i ) ∈ U ⇐⇒ y i ∈ π i (U ) ∀i ∈ F.
Then π F (x) ∈ π F (U ), which is disjoint from π F (D). Hence α(C) = α(D). We show that α is also surjective. Given a family (C F ) ∈ lim F H i∈F X i , simply set This is an intersection of closed subsets, hence closed, and the finite marginalizations clearly send it to the given family (C F ). Finally, we must verify that α is an open map. It suffices to show that it carries a subbasic open set Hit(U ) = {C ⊆ X i closed | C ∩ U = ∅} to an open subset of the limit. For a given point C ∈ Hit(U ), it is enough to find an open neighborhood contained in Hit(U ). But then again by choosing smaller U if necessary, so that C ∩ U = ∅ still holds, we can assume (11) without loss of generality. Then which is indeed open in the limit.
It follows that i X i is an infinite tensor product in Kl(H); the preservation condition is easily verified since adding another factor to this product again gives the infinite product. The Kolmogorov product condition is similarly immediate to verify.
We can therefore instantiate our Theorem 5.3 in Kl(H), which gives the following result as a special case. Proof. These results follow from Theorem 5.3 applied to Kl(H), using the morphism p : I → X J corresponding to the trivial closed subset X J ⊆ X J . The conclusion is that the closure of its image, call it A, satisfies cl({(a, a) | a ∈ A}) = A × A as subsets of Y × Y . But since the diagonal is closed in Y , this clearly implies that A must be a singleton.
However, we cannot instantiate the Hewitt-Savage zero-one law in Kl(H), since this Markov category is in fact not causal, as the following example shows. Using the definition of the hyperspace topology, it is straightforward to see that these maps are continuous. To check the hypothesis of the statement of causality, we must verify that the resulting two maps A → Y × Z agree; these are just closed subsets of [0, 1] 2 . From the definition of the composition, we see that any point (y, z) with y ∈ g(x) for some x and z ∈ h 1 (y) must lie in the set corresponding to h 1 , and similarly for h 2 . Hence the set corresponding to h 1 contains all points, while the set corresponding to h 2 contains as a subset all points (y, z) with y = 1/2, as well as (1/2, 0). But the closure of {(y, z) | y = 1/2} in [0, 1] 2 is the whole space, so that both sets are indeed equal to the whole space. Hence the hypothesis is satisfied. But one can verify that the point (x, y, z) = (1/2, 1/2, 1) is in the subset of X × Y × Z corresponding to the h 1 side of (4), but not so for the h 2 side.
We end with an open problem.

Problem 6.7. Find an interesting causal Markov category which has all Kolmogorov products.
Strangely enough, the only examples that we know of so far are of two kinds: first, cartesian monoidal categories (meaning that C = C det ) with all products; and second, the finitary complete monoids of Example 3.8 which are monoidal posets. For the former, the universal property of the monoidal structure implies that the causality axiom holds. For the latter, it holds trivially since any two parallel morphisms are equal.