I wanted to simulate something like a Bloom Filter. For those unaware, a Bloom Filter is kind of like a set, but when looking up a value in a set, there's a risk of a false positive, but never a risk of a false negative.
I'm not terribly concerned with the actual implementation of this, so I just wanted to make an operator like "IsInFilter(value, filter)", where filter is actually just a set, and if value is in the set it might return TRUE or FALSE, but if it's not in the set it always returns FALSE.
I'm having a little trouble expressing the non-determinism with this. My initial implementation was something like this:
IsInSet(value, mySet) ==
\E result \in {TRUE, FALSE} :
(value \in mySet => result) /\ (value \notin mySet => FALSE)
But I think the existential quantifier in this case is tautological. Does anyone have any ideas on the best way of handling this?