(*s Adding a lis of adresses connected to [root] with weight $0$ *)

Fixpoint CG_add_root (root : ad) (cg : CGraph1) (l : list ad) {struct l} :
 CGraph1 :=
  match l with
  | nil => cg
  | x :: l' => CG_add_root root (CG_add cg root x Dz) l'
  end.

Lemma CG_add_root_out_of_range : forall (l : list ad) (cg : CGraph1) (root : ad), (forall (x0 : ad) (d0 : D) (l : list ad), CG_path cg x0 d0 (x0 :: l) -> Dle Dz d0 = true) -> MapSubset _ _ (Elems l) (MapDom _ cg) -> ad_in_list root l = false -> in_dom _ root (cg_range cg) = false -> forall (x0 : ad) (d0 : D) (l0 : list ad), CG_path (CG_add_root root cg l) x0 d0 (x0 :: l0) -> Dle Dz d0 = true.