Definition node_OK (bs : BDDstate) (node : ad) :=
node = BDDzero \/ node = BDDone \/ in_dom _ node bs = true.

Lemma BDDalloc_adjusts_counter :
forall (cfg : BDDconfig) (x : BDDvar) (l r a : ad),
BDDconfig_OK cfg ->
(forall a : ad,
Nleb (snd (snd (fst (BDDalloc cfg x l r)))) a = true ->
MapGet _ (fst (fst (BDDalloc cfg x l r))) a = None) /\
Nleb (ad_S (ad_S N0)) (snd (snd (fst (BDDalloc cfg x l r)))) = true.