Definition closed_mem m_a := forall x y, e x y -> in_mem x m_a = in_mem y m_a.Definition closure_mem m_a : pred T :=
  fun x => ~~ disjoint (mem (connect x)) m_a.Notation n_comp e a := (n_comp_mem e (mem a)).Notation closed e a := (closed_mem e (mem a)).Notation closure e a := (closure_mem e (mem a)).Notation fconnect f := (connect (coerced_frel f)).Notation froot f := (root (coerced_frel f)).Notation froots f := (roots (coerced_frel f)).Notation fcard_mem f := (n_comp_mem (coerced_frel f)).Notation fcard f a := (fcard_mem f (mem a)).Notation fclosed f a := (closed (coerced_frel f) a).Notation fclosure f a := (closure (coerced_frel f) a).Implicit Types (e : rel T) (a : pred T).

(* Specifications: *)
Lemma connect_sub e e' : subrel e (connect e') -> subrel (connect e) (connect e').
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 eq_roots e e' : e =2 e' -> roots e =1 roots e'.