Let \mathcal {C} be a Markov category, and let \mathcal {D}_0 \to \mathcal {C}_\mathrm {det} be a fibration.
Then a stochastic module consists of
An indexed copresheaf F = (A,F,\rho ) \in \mathsf {IcoPSh}(\mathcal {D}_0 / \mathcal {C})
For each \bar {X} \in \mathcal {D}_0, Cartesian morphism \bar {a}: \bar {X}_M \to \bar {X} lying over a: M \to X, and stochastic section \alpha : X \to M, a function \alpha _*: F(\bar {X}) \to F(\bar {X}_M), which acts on the underlying morphisms in \mathcal {C} as composition with \alpha
Satisfying, whenever given a commutative square of Cartesian morphisms:
and stochastic sections \alpha ,\beta lying over a = p(\bar {a}), b = p(\bar {b}), so that we have a digram in \mathcal {C}:
Where the maps except \alpha ,\beta are deterministic, \alpha and \beta are sections of a and b, and both the square of deterministic maps and the square involving \alpha ,\beta commute, the condition that the square
commutes.
And satisfying furthermore the equation, for every two stochastic sections \alpha :X \to M,\beta : M \to N, the equation (\beta \alpha )_* = \beta _*\alpha _* (note that this makes sense because pullbacks compose).
A morphism of stochastic modules is an indexed natural transformation which preserves the operations \alpha _*. The category of stochastic modules is denoted \mathsf {SMod}(\mathcal {D}_0 / \mathcal {C}). There is an apparent forgetful functor \mathsf {SMod}(\mathcal {D}_0 / \mathcal {C}) \to \mathsf {IcoPSh}(\mathcal {D}_0 / \mathcal {C}).