Definition roots : pred T := fun x => root x == x.
Canonical roots_pred := ApplicativePred roots.
Definition n_comp_mem (m_a : mem_pred T) := #|predI roots m_a|.

(* Specifications: *)
Lemma connect_root x : connect x (root x).
Lemma root_root x : root (root x) = root x.
Lemma relU_sym e e' :
connect_sym e -> connect_sym e' -> connect_sym (relU e e').
Lemma eq_connect e e' : e =2 e' -> connect e =2 connect e'.
Lemma eq_n_comp e e' : connect e =2 connect e' -> n_comp_mem e =1 n_comp_mem e'.
Lemma eq_n_comp_r {e} a a' : a =i a' -> n_comp e a = n_comp e a'.
Lemma eq_root e e' : e =2 e' -> root e =1 root e'.
Lemma intro_closed a : (forall x y, e x y -> x \in a -> y \in a) -> closed e a.
Lemma closed_connect a :
closed e a -> forall x y, connect e x y -> (x \in a) = (y \in a).
Lemma connect_closed x : closed e (connect e x).
Lemma mem_closure a : {subset a <= closure e a}.
Lemma n_comp_connect x : n_comp e (connect e x) = 1.
End Closure.