(** * Properties of node enumeration *)
(** An enumeration of CFG nodes is correct if the following conditions hold: - All nodes for reachable basic blocks must be in the list. - The list is without repetition (so that no code duplication occurs).  We prove that the result of the [enumerate] function satisfies both conditions. *)

Lemma nodeset_of_list_correct:
forall l s s',
nodeset_of_list l s = OK s' ->
list_norepet l
/\ (forall pc, Nodeset.In pc s' <-> Nodeset.In pc s \/ In pc l)
/\ (forall pc, In pc l -> ~Nodeset.In pc s).