End BDDsubst_results.
Section BDDreplace_results.
Variable cfg : BDDconfig.
Variable ul : list ad.
Variable node : ad.
Variable x y : ad.
Hypothesis cfg_OK : BDDconfig_OK cfg.
Hypothesis ul_OK : used_list_OK cfg ul.
Hypothesis used : used_node' cfg ul node.
Hypothesis xy_neq : Neqb x y = false.
Definition BDDreplace :=
match BDDvar_make gc cfg ul y with
| (cfg1, nodey) => BDDsubst cfg1 (nodey :: ul) node x nodey
end.

Lemma BDDreplace_is_replace :
bool_fun_eq (bool_fun_of_BDD (fst BDDreplace) (snd BDDreplace))
(bool_fun_replace x y (bool_fun_of_BDD cfg node)).