fact: Fixpoint Run_aux {A : choiceType} (c : raw_code A) (seed : nat) (st : Location → option NatState) : option A := match c with | ret x => Some x | sampler o k => match sample (projT1 o) seed with | Some (seed', x) => Run_aux (k x) seed' st | _ => None end | opr o x k => None | putr l v k => Run_aux k seed (new_state st l v) | getr l k => match nat_ch (st l) l with | Some v => Run_aux (k v) seed st | None => None end end.
imports: Relational(OrderEnrichedCategory GenericRulesSimple) mathcomp(all_ssreflect all_algebra reals distr realsum ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice seq) Crypt(Axioms ChoiceAsOrd SubDistr Couplings UniformDistrLemmas FreeProbProg Theta_dens RulesStateProb UniformStateProb pkg_core_definition choice_type pkg_composition pkg_rhl Package Prelude RandomOracle) Coq(Utf8) extructures(ord fset fmap) Equations(Equations)