Coercions Between Computations With Additional Oracles #
This file defines a isSubSpec relation for pairs of oracleSpec where one can be
thought of as an extension of the other with additional oracles.
The definition consists is a thin wrapper around a MonadLift instance on OracleQuery,
which extends to a lifting operation on OracleComp.
We use the notation spec ⊂ₒ spec' to represent that one set of oracles is a subset of another,
where the non-inclusive subset symbol reflects that we avoid defining this instance reflexively.
Relation defining an inclusion of one set of oracles into another, where the mapping
doesn't affect the underlying probability distribution of the computation.
Informally, spec ⊂ₒ superSpec means that for any query to an oracle of sub_spec,
it can be perfectly simulated by a computation using the oracles of superSpec.
We avoid implementing this via the built-in subset notation as we care about the actual data of the mapping rather than just its existence, which is needed when defining type coercions.
Instances
Lift a computation from spec to superSpec using a SubSpec instance on queries.
Usually liftM should be preferred but this can allow more explicit annotation.
Equations
Instances For
Extend a lifting on OracleQuery to a lifting on OracleComp.
Equations
We choose to actively rewrite liftComp as liftM to enable LawfulMonadLift lemmas.