Definition BDDalloc : BDDconfig * ad :=
  match new_cfg with
  | (bs, (share, (fl, (cnt, (negm, orm))))) =>
      match fl with
      | a :: fl' =>
          (MapPut _ bs a (x, (l, r)),
          (MapPut3 _ share l r x a, (fl', (cnt, (negm, orm)))), a)
      | nil =>
          (MapPut _ bs cnt (x, (l, r)),
          (MapPut3 _ share l r x cnt, (fl, (ad_S cnt, (negm, orm)))), cnt)
      end
  end.

Lemma BDDsharing_OK_1 : forall a : ad, MapGet _ (bs_of_cfg new_cfg) a = None -> BDDsharing_OK (MapPut _ (bs_of_cfg new_cfg) a (x, (l, r))) (MapPut3 _ (share_of_cfg new_cfg) l r x a).