Typeclasses for Denotational Monad Support #
This file defines typeclasses HasEvalSet m and HasEvalFinset m for asigning a
set of possible outputs to computations in a monad m.
The monad m can be evaluated to get a set of possible outputs.
Note that we don't implement this for Set with the monad type-class strangeness.
Should not be implemented manually if a HasEvalSPMF instance already exists.
Instances
The monad m can be evaluated to get a finite set of possible outputs.
We restrict to the case of decidable equality of the output type, so Finset.biUnion exists.
Note: we can't use MonadHomClass since Finset has no Monad instance.
Instances
A predicate holds on every output reachable from a monadic computation mx,
i.e. ∀ x ∈ support mx, p x. This is the "almost-sure" assertion at the qualitative
denotational level provided by HasEvalSet.
For OracleComp, see also the structural-recursion variant
OracleComp.allOutputsSatisfyWhen in VCVio/OracleComp/Traversal.lean, which is
parameterized by a set of possible oracle outputs.
Instances For
A predicate holds on some output reachable from a monadic computation mx,
i.e. ∃ x ∈ support mx, p x.
Instances For
Membership in the support of computations in.