h& *      !"#$%&'() Safe-Inferred8"probA view of a probability distribution from the point of view of a given event. The event either always happens, never happens, or happens sometimes with some probability. In the latter case, there are posterior distributions for when the event does or does not happen.probA random variable is a function mapping each element of a sample space to the corresponding value of the random variable.prob6An event is a predicate on values from a sample space.prob%A probability distribution of values.probGives the list of all possible values of a given probability distribution. The list will often contain multiple entries for the same outcome, in which case the true probability for that outcome is the sum of probabilities of all entries.>In the finite case, multiple entries can be combined by using   on the  first.probTruncates an infinite distribution to make it finite. The epsilon parameter is the amount of tail probability that you're willing to ignore and assign to an arbitrary outcome. probTruncates an infinite distribution to make it finite. This is equivalent to the original distribution, except with some arbitrary set of outcomes with probability less than epsilon replaced by Nothing. probGives a map from outcomes to their probabilities in the given distribution.This only works for finite distributions. Infinite distributions (including even distributions with finitely many outcomes, but infinitely many paths to reach those outcomes) will hang. prob!Simplifies a finite distribution.This only works for finite distributions. Infinite distributions (including even distributions with finitely many outcomes, but infinitely many paths to reach those outcomes) will hang. prob8Samples the probability distribution to produce a value. probGives a view on a probability distribution relative to some event."The following are guaranteed. 1.  .   ev = id 2. If   ev dist =  dist', then  dist = dist' and  ev dist = 1 . 3. If   ev dist =  dist', then  dist = dist' and  ev dist = 0 . 4. If   ev dist =  p a b , then  ev dist = p and: * dist =  p >>= bool a b *  ev a = 1 *  ev b = 0This only works for finite distributions. Infinite distributions (including even distributions with finitely many outcomes, but infinitely many paths to reach those outcomes) will hang.probConverts from  back to a . The resulting distribution is equivalent to the source distribution.probProduces the conditional probability distribution, assuming some event. This function works for all distributions, but always produces an infinite distribution for non-trivial events.probProduces the conditional probability distribution, assuming some event.This only works for finite distributions. Infinite distributions (including even distributions with finitely many outcomes, but infinitely many paths to reach those outcomes) will hang.probUpdates a prior distribution of parameters for a model, based on an observed event. This implements Bayes' Law for distributions.This function works for all distributions, but always produces an infinite distribution for non-trivial events.probUpdates a prior distribution of parameters for a model, based on an observed event. This implements Bayes' Law for distributions.This only works for finite distributions. Infinite distributions (including even distributions with finitely many outcomes, but infinitely many paths to reach those outcomes) will hang.probA distribution with a fixed probability for each outcome. The probabilities should add to 1, but this is not checked.prob-A uniform distribution over a list of values.prob4Geometric distribution over a list of possibilities.prob