Simulation Semantics through OptionT Handlers #
Distributivity lemmas for simulateQ over OptionT-shaped operations
(Option.elim, Option.elimM, OptionT.bind, OptionT.lift).
These lemmas appeal to the central simulateQ theory in
VCVio.OracleComp.SimSemantics.SimulateQ; the file is grouped under
SimSemantics/OptionT/ to mirror the per-transformer organization used for
StateT, WriterT, and ReaderT.
simulateQ distributes through OptionT.bind, stated via OptionT.run.
simulateQ distributes through OptionT.bind, stated via Option.elimM.
simulateQ distributes through OptionT.bind: the simulated OptionT-bind is the
OptionT-bind of the simulated pieces.
simulateQ commutes with OptionT.lift.
mapM over OptionT #
When every step of a mapM resolves to pure (some _) under simulateQ,
the whole mapM resolves to pure (some _) of the pointwise mapped collection.
These are the List and Vector companions to simulateQ_optionT_bind' /
simulateQ_optionT_lift.
simulateQ over List.mapM in OptionT: when each step is pure (some (g x))
under simulateQ, the whole mapM is pure (some (l.map g)).
simulateQ over Vector.mapM in OptionT: when each step is pure (some (g x))
under simulateQ, the whole mapM is pure (some (xs.map g)).