Section CGAdd.
Variable cg1 : CGraph1.
Variable x y : ad.
Variable d : D.
Definition cg2 := CG_add cg1 x y d.
(*s If there is no cycle of negative weight in the old graph [cg1], and the distance from [y] to [x] is $\geq -d$, then there is no simple cycle of negative weight in the new graph  [cg2] either: *)
End CGAdd.
(*s Properties of the range of the graph *)
Definition cg_range := DMerge D.
(*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.
(*s If there is no circuit [(cons x l)] with negative weight [d], then [cg] is consistent: *)
(*s [(CGconsistent_anchored cg a d)] if there exists a valuation $\rho$ which satisfies [cg] and such that $\rho(a)=d$ *)
Definition CGconsistent_anchored (cg : CGraph1) (a : ad)
(d0 : D) := {rho : ad -> D | CGsat cg rho /\ rho a = d0}.

Lemma CGanchored_then_consistent :
forall (cg : CGraph1) (a : ad) (d0 : D),
CGconsistent_anchored cg a d0 -> CGconsistent cg.