Query Implementations with Reader Monads #
This file gives lemmas about QueryImpl spec m when m is something like ReaderT ρ n.
TODO: should generalize things to MonadReader once laws for it exist.
Given implementations for oracles in spec₁ and spec₂ in terms of reader monads for
two different contexts ρ₁ and ρ₂, implement the combined set spec₁ + spec₂ in terms
of a combined ρ₁ × ρ₂ state. The binary analogue of QueryImpl.sigmaReaderT.
Instances For
Indexed version of QueryImpl.addReaderT. Each query for index t reads from the
t-th component of the pi-product (t : τ) → ρ t. Note that m cannot vary with t.
Instances For
Reassociate a nested reader transformer into one product context.
The outer context is the first component of the product; the inner/base context is the
second. This is the reader-transformer analogue of flattenStateT and flattenWriterT.