Lemmas About the Distribution Semantics of Seq #
This file collects various lemmas about the monadic sequence operation og <*> oa.
One especially important case is f <$> oa <*> ob where f : α → β → γ,
that runs the two computations oa and ob to get some x and y respectively,
returning only the value f x y.
If the results of the computations oa and ob are combined with some function f,
and there exists unique x and y such that f x y = z (given as explicit arguments),
then the probability of getting z as an output of f <$> oa <*> ob
is the product of probabilities of getting x and y from oa and ob respectively.
If the results of the computations oa and ob are combined with some function f,
and p is an event such that outputs of f are in p iff the individual components
lie in some other events q1 and q2, then the probability of the event p is the
product of the probabilites holding individually.
NOTE: universe levels of α, β, γ