[theories/modules] law of total probability#968
Conversation
|
I don't understand why the EC library checking failed. |
Add module-based law of total probability for lossless distributions with finite support.
8f71d81 to
71c3b87
Compare
|
I made the distribution a parameter to the procedure of the |
I see, it's because I checked it with Alt-Ergo. Will fix this. |
It checked for me with Z3 (4.15.4) and CVC5 (1.3.2). Fixed to check with just Z3. |
|
Using I'll do a proper review + local edits when it's not a bank holiday, but wanted to guide your workflow to avoid you having to figure out why CI is failing in the future! |
| hoare; call (_ : true); auto; smt(). | ||
| qed. | ||
|
|
||
| lemma total_prob' (dt' : t distr) (supp : t list) (i' : input) &m : |
There was a problem hiding this comment.
This might be easier to use if supp was computed as to_seq (support dt'), requiring is_finite (support dt'), instead of taking it as an argument.
I suppose the existing variant is simpler if you already have a supp that might be distinct from to_seq (support dt'). Maybe it makes sense to have both variants? For the existing variant it might be better to move supp to the front of the argument list since this cannot be inferred from the LHS in rewrites. If the intention is to rewrite in the other direction where supp can be inferred it might make sense to swap the sides of the equality.
There was a problem hiding this comment.
Thanks for the suggestion. I'd missed that there was this operator.
There was a problem hiding this comment.
That worked out nicely, at least as easy to use.
Add module-based law of total probability for distributions with finite support.
Put it in theories/modules as it uses event partitioning.