(* 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 closed_connect (T: finType) (e: rel T) (a: pred T) : closed e a -> forall x y, connect e x y -> a x -> a y.