fact: Fixpoint evalDet_step(A : Set)(c : Comp A)(s : Blist) : comp_state A := match c in Comp A return comp_state A with | Ret pf a => cs_done a s | Rnd n => match (shiftOut s n) with | Some (v, s') => cs_more (Ret (@Bvector_eq_dec n) v) s' | None => (@cs_eof (Bvector n)) end | Bind c1 c2 => match (evalDet_step c1 s) with | cs_eof _ => (@cs_eof _) | cs_done b s' => cs_more (c2 b) s' | cs_more c1' s' => cs_more (Bind c1' c2) s' end | Repeat c P => cs_more (Bind c (fun a => if (P a) then (Ret (comp_eq_dec c) a) else (Repeat c P))) s end.
imports: FCF.Comp FCF.Blist FCF.Fold Permutation micromega.Lia