Support of a Monadic Computation #
This file defines support mx — the set of possible outputs of a monadic computation mx
— as well as HasEvalFinset, a typeclass for assigning a finite version of the support.
The support is built directly on MonadLiftT m SetM: any monad with a lift into SetM
(possibly via the canonical PMF → SPMF → SetM chain) automatically has support.
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 MonadLiftT m SetM.
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.