Definition replace (x y : BDDvar) (be : bool_expr) := subst x (Var y) be.

(* Specifications: *)
Lemma replace_OK :
forall (x y : BDDvar) (be : bool_expr),
bool_fun_eq (bool_fun_of_bool_expr (replace x y be))
(bool_fun_replace x y (bool_fun_of_bool_expr be)).