Let \bar {X} \in \mathcal {D}_0 be an object. Then there is a free stochastic module T\mathcal {D}_0(\bar {X},-) on its representable copresheaf, in the sense that if F is another stochastic module, homomorphisms T\mathcal {D}_0(\bar {X},-) \to F are in bijection with indexed natural transformations \mathcal {D}_0(\bar {X},-) \to F
The free stochastic module on a corepresentable presheaf is given as follows: an element of T\mathcal {D}_0(\bar {X},-)(\bar {Y}) consists of a diagram in \mathcal {C} of the form
(where X = p(\bar {X}), Y = p(\bar {Y}),) where fs = 1_X and f,g are deterministic, plus a map f^*\bar {X} \to \bar {Y} lying over g. This is up to the equivalence relation which, given some other such tuple, identifies them whenever there exists deterministic h: N \to M as in this diagram:
so that the two deterministic triangles commute, hs' = s, and so that the unique Cartesian map f'^*\bar {X} \to f^*\bar {X} over h forms a commutative triangle with the two maps to \bar {Y}. (Note that we do not claim the relation just described is inherently an equivalence relation, rather we form the equivalence relation generated by this). It is clear how a map \bar {Y} \to \bar {Z} acts on this to make it a copresheaf. It is indexed by taking a tuple as above to the composite X \to M \to Y. Given N \to Y with a stochastic section s': Y \to N,, and an element of T\mathcal {D}_0(\bar {X},-)(\bar {Y}), the induced element in T\mathcal {D}_0(\bar {X},-)(s'^*\bar {Y}) is given by forming the pullback M \times _Y N, taking the pullback of the map over g to one lying over the projection M \times _Y N \to N, and composing the section s with the induced lift M \to M \times _Y N
The underlying copresheaf of this respects Cartesian maps in \mathcal {D}_0 \to \mathcal {C}_\mathrm {det}, in the sense that given a Cartesian map \bar {A} \to \bar {B} and an element \phi \in T\mathcal {D}_0(\bar {X},-)(\bar {B}) lying over a deterministic map X \to B, the natural map from lifts \psi \in T\mathcal {D}_0(\bar {X},-)(\bar {A}) to lifts X \to A is a bijection.
First, we have to verify the equations of a stochastic module for T\mathcal {D}_0(\overline {X},-). For the first case, suppose we are given a square
with all but the upwards maps stochastic. Now let \bar {Z} be some object over Z and suppose we are given an element of T\mathcal {D}_0(\bar {X}, \bar {Z}_Y), represented by a span
X \leftarrow M \to Y, a section X \to M and a map \phi : \bar {X}_M \to \bar {Z}_M over M.
Consider then the below diagram:
By definition, the first of the two possible elements of T\mathcal {D}_0(\bar {Z}_W) are given by either forming the pullback M \times _Y N, taking the lift of \alpha to M \to M \times _Y N and composing to get a section X \to M \times _Y N, and pulling back \phi along the projection to get a map \bar {X}_{M \times _Y N} \to \bar {Z}_{M \times _Y N}, then taking the span X \leftarrow M \times _Y N \to W.
The second is given by first composing with the map Y \to Z, then applying the above procedure with the pullback M \times _Z W. The induced map M \times _Y N \to M \times _Z W exhibits the equality of these two under the equivalence relation defining T\mathcal {D}_0(\bar {X},-) (commutativity of the bottom-right square implies that triangle of stochastic sections commutes.)
Given some other stochastic module F over A with a map of indexed copresheaves \mathcal {D}_0(\bar {X},-) \to F, over A \to X, there is at most one extension to a map of stochastic presheaves T\mathcal {D}_0(\bar {X},-) \to F over A \to X---given an element with representative (s:X \to M, X \leftarrow M \to Y, \bar {X}_M \to \bar {Y}_M), it must go to the identity element of F(\bar {X}), acted on by the stochastic section s to produce an element of F(\bar {X}_M), followed by F applied to the map \bar {X}_M \to \bar {Y} over M \to Y.
But it is not hard to see that the equivalence relation imposed by T\mathcal {D}_0(\bar {X},-) is implied by the equations of a stochastic module, and so this map is well-defined, establishing the property.
Secondly, let \bar {A} \to \bar {B} be a Cartesian map over A \to B, and take a commutative triangle
of deterministic maps. Finally take an element of T\mathcal {D}_0(\bar {X},-)(\bar {B}) over the given map X \to B. We must show it has a unique lift to A over the given map X \to A.
Let us take a representative given by a diagram:
First, note that the two maps M \to X \to B and M \to B do not necessarily agree. However, we can remedy this by replacing M by their equalizer---note that as we argued above, this gives an equivalent element of the stochastic module. (By writing their equalizer in \mathcal {C}_\mathrm {det} as the split pullback M \times _{B \times B} B, we can see that the section factors over this, even if \mathcal {C} does not have all equalizers in general). Hence we can assume the triangle formed by adding the dashed arrow commutes.
Since M \to B now factors over X, the lift X \to A gives a lift M \to A. Now by the Cartesian property of \bar {A} \to \bar {B}, there is a unique lift of p^*\bar {X} \to \bar {B} to this map (here we just use the fact that \mathcal {D}_0 is a fibration). This gives the desired lift.
Finally, given two distinct lifts (again, we can assume their maps M \to A factor over X,) clearly any map N \to M witnessing an identity between their composites \bar {X} \to \bar {Y} would likewise exhibit an identity between their lifts (since pullbacks compose). This proves uniqueness, and finishes the proof.