Definition BDDneg_memo_put (cfg : BDDconfig) (node node' : ad) :=
match cfg with
| (bs, (share, (fl, (cnt, (negm, z))))) =>
(bs, (share, (fl, (cnt, (MapPut _ negm node node', z)))))
end.

Lemma BDDnegm_put_OK :
forall (cfg : BDDconfig) (node node' : ad),
BDDconfig_OK cfg ->
config_node_OK cfg node ->
config_node_OK cfg node' ->
Neqb (node_height cfg node') (node_height cfg node) = true ->
bool_fun_eq (bool_fun_of_BDD cfg node')
(bool_fun_neg (bool_fun_of_BDD cfg node)) ->
BDDconfig_OK (BDDneg_memo_put cfg node node').