proposition: Lemma dispatch_Ret_isNondet x p yszsxs : plus_isNondet (dispatch_Ret x p yszsxs).
proof: Proof. rewrite /dispatch/=; move: yszsxs => [[ys zs] xs]/=; case: ifPn => xp. have [syn syn_qperm] := @qperm_isNondet M _ zs. exists (ndBind syn (fun s => ndRet (rcons ys x, s, xs))). by rewrite /= syn_qperm. have [syn syn_qperm] := @qperm_isNondet M _ (rcons zs x). by exists (ndBind syn (fun s => ndRet (ys, s, xs))); rewrite /= syn_qperm. Qed.
imports: mathcomp(all_ssreflect) monae_lib hierarchy monad_lib fail_lib state_lib array_lib example_quicksort infotheo(ssr_ext)