Definition nodes_preserved (cfg cfg' : BDDconfig) :=
forall (x : BDDvar) (l r node : ad),
MapGet _ (fst cfg) node = Some (x, (l, r)) ->
MapGet _ (fst cfg') node = Some (x, (l, r)).

(* Specifications: *)
Lemma BDDmake_preserves_nodes :
forall (cfg : BDDconfig) (x : BDDvar) (l r : ad),
BDDconfig_OK cfg -> nodes_preserved cfg (fst (BDDmake cfg x l r)).
Lemma nodes_preserved_2 :
forall (cfg cfg' : BDDconfig) (node : ad),
config_node_OK cfg node ->
nodes_preserved cfg cfg' -> config_node_OK cfg' node.
Lemma BDDneg_2_config_OK_lemma_2 :
forall (cfg : BDDconfig) (node : ad) (x : BDDvar) (l r : ad) (n m : nat),
BDDconfig_OK cfg ->
MapGet _ (fst cfg) node = Some (x, (l, r)) ->
nat_of_N (var cfg node) < n ->
n = S m -> BDDconfig_OK (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)).
Lemma nodes_preserved_1 :
forall (cfg : BDDconfig) (node : ad) (n m : nat) (x : BDDvar) (l r : ad),
BDDconfig_OK cfg ->
MapGet _ (fst cfg) node = Some (x, (l, r)) ->
n = S m ->
nat_of_N (var cfg node) < n ->
nodes_preserved (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m))
(fst (BDDneg_2 cfg node n)).
Lemma BDDneg_memo_OK_lemma_1_4' :
forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad),
BDDconfig_OK cfg ->
BDDneg_memo_OK_2 cfg memo ->
config_node_OK cfg node ->
BDDneg_memo_lookup memo node = Some node' -> config_node_OK cfg node'.