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