fact: Fixpoint nth_member (ls : list T) (n : nat) {struct n} : option { x : T & member x ls } := match ls as ls return option { x : T & member x ls } with | nil => None | l :: ls => match n with | 0 => Some (@existT _ (fun x => member x (l :: ls)) l (MZ _ _)) | S n => match nth_member ls n with | Some (existT v m) => Some (@existT _ _ v (MN _ m)) | None => None end end end.
imports: Coq.Lists.List Relations RelationClasses ExtLib.Core.RelDec ExtLib.Data.SigT ExtLib.Data.ListNth ExtLib.Data.Option ExtLib.Tactics.Injection ExtLib.Tactics.EqDep