prspace - Probability Spaces with the Same Syntax in R and Python
Write probability statements such as 'Pr[X == 0] <- 0.25'
and read them back with 'Pr[X == 0]'. Events can declare their
support (real, integer, count, or a finite set), and anything
the rules of probability then pin down, such as complements and
totals, is derived. Assignments that contradict earlier ones
are flagged with the range of values that would have been
consistent. A companion Python package on PyPI offers the same
syntax.