(* predicate a is closed under "edge" relation e *)
Definition closed {T: finType} (e: rel T) (a: pred T) :=
  forall x y : T, e x y -> a x -> a y.

Lemma path_take {T: finType} (e: rel T) (x y: T) (p: seq T) (n: nat) : path e x p -> path e x (take n p).