fact: Definition inlist_redcons A (x : A) : forall (l : list A), M (In x l) := mfix1 f (l : list A) : M (In x l) := mmatch l as l return M (In x l) with | [? s] (x :: s) => M.ret (in_eq _ _) | [? y s] (y :: s) => r <- f s; M.ret (in_cons y _ _ r) | [? l r] l ++ r =n> mtry il <- f l; M.ret (in_or_app l r x (or_introl il)) with NotFound => ir <- f r; M.ret (in_or_app l r x (or_intror ir)) end | _ => M.raise NotFound end.
imports: Mtac2.Mtac2 List Init.Datatypes Lists.List