fact: Fixpoint context_pos (t : term) (ps : position) : option context := match t, ps with | _, nil => Some Hole | Var x, _ :: _ => None | Fun f ts, p :: ps => match lt_ge_dec p (arity f) with | left h => match context_pos (Vnth ts h) ps with | None => None | Some x => Some (Cont f (Veq_app_cons_aux3 h) (Vsub ts (Veq_app_cons_aux1 h)) x (Vsub ts (Veq_app_cons_aux2 h))) end | right _ => None end end.
imports: CoLoR(ATrs ListUtil NatUtil VecUtil LogicUtil OptUtil)