Formulae are just boolean expressions + ForAll
They could probably be simplified A LOT, if Expressions were GADTs that can be determined to be boolean expressions at compilation time.
The Formula would be something like:
| Pure of expr
| Forall of (var * type opt) list * expr
I will close this issue as I believe this would be part of a bigger work on the theory of CSE.
My current intuition is that symbolic values should allow for forall and formulae are not really a thing.
Formulae are just boolean expressions + ForAll They could probably be simplified A LOT, if Expressions were GADTs that can be determined to be boolean expressions at compilation time. The Formula would be something like: