proposition: Lemma Some_cputget T (s' s : coq_type T) (r : loc T) A (k : coq_type T -> M A) (e : Env) : nth_error (ofEnv e) (loc_id r) = Some (mkbind s') -> (cput r s >> (cget r >>= k)) e = (cput r s >> k s) e.
proof: Proof. move=> H. rewrite 2!MS_bindE (Some_cputE _ H). by rewrite bindE/= (Some_cget s)// nth_error_set_nth. Qed.
imports: JMeq mathcomp(all_ssreflect finmap) monae_lib HB(structures) hierarchy monad_lib fail_lib state_lib trace_lib monad_transformer monad_model