hakaru-dev / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
311 stars 30 forks source link

Partition unit tests #91

Open yuriy0 opened 7 years ago

yuriy0 commented 7 years ago

It is a relatively new and complicated part of the Hakaru simplification process, and almost all test cases contain piecewise and all piecewise will spend some (most) time as Partitions. It stands to reason that Partition could use some unit tests. In #85, we decided this would be a good way of ensuring certain nice properties which we would like on the Haskell side, as implementing Partition on the Haskell side is likely more trouble than it's worth.

It's unclear if we want these properties to hold up to list semantics (i.e. propositional equality) or up to SamePartition (which gives set semantics to Partitions).