Definition BDDor_memo_put (cfg : BDDconfig) (node1 node2 node' : ad) :=
match cfg with
| (bs, (share, (fl, (cnt, (negm, (orm, um)))))) =>
(bs,
(share, (fl, (cnt, (negm, (MapPut2 _ orm node1 node2 node', um))))))
end.

Lemma BDDorm_put_OK :
forall (cfg : BDDconfig) (node1 node2 node' : ad),
BDDconfig_OK cfg ->
config_node_OK cfg node1 ->
config_node_OK cfg node2 ->
config_node_OK cfg node' ->
Nleb (node_height cfg node')
(BDDvar_max (node_height cfg node1) (node_height cfg node2)) = true ->
bool_fun_eq (bool_fun_of_BDD cfg node')
(bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) ->
BDDconfig_OK (BDDor_memo_put cfg node1 node2 node').