Implementing Oracle Queries in Other Monads #
This file defines a type QueryImpl spec m to represent implementations
of queries to spec in terms of the monad m.
Specifies a way to implement queries to oracles in spec using the monad m.
This is defined in terms of a mapping of input elements to oracle outputs,
which extends to a mapping on OracleQuery spec by copying over the continuation,
and then further to OracleComp spec by preserving the pure and bind operations.
See QueryImpl.map_query and HasSimulateQ for these two operations.
Equations
Instances For
Equations
Two query implementations are the same if they are the same on all query inputs.
Embed an oracle query into a new functor by applying the implementation to the input value before applying the continuation of the element.
Equations
Instances For
Gadget for auto-adding a lift to the end of a query implementation.
Equations
Instances For
Lifting an implementation to the original monad has no effect.
Identity implementation for queries, sending q : OracleQuery spec α to itself.
Equations
Instances For
Version of QueryImpl.id that automatically lifts into OracleComp spec rather than
just implementing queries in the lower level OracleQuery spec monad
Equations
Instances For
Given that queries in spec lift to the monad m we get an implementation via lifting.
Equations
Instances For
View a function from oracle inputs to outputs as an implementation in the Id monad.
Can be used to run a computation to get a specific value.
Equations
Instances For
Version of ofFn that allows queries to fail to return a value.
Equations
Instances For
Implement a single oracle as evaluation of a Polynomial.
Equations
Instances For
Implement a single oracle as the evaluation of an `MvPolynomial.
Equations
Instances For
Implement a single oracle as indexing into a Vector.
Equations
Instances For
Oracle context for ability to query elements of a vector v.