Definition restrict (x : BDDvar) (b : bool) (be : bool_expr) :=
  subst x (bool_to_be b) be.

(* Specifications: *)
Lemma bool_fun_restrict_eq_subst : forall (x : BDDvar) (b : bool) (bf : bool_fun), bool_fun_eq (bool_fun_restrict bf x b) (bool_fun_subst x (bool_to_bf b) bf).
Lemma bool_to_be_to_bf : forall b : bool, bool_fun_of_bool_expr (bool_to_be b) = bool_to_bf b.
Lemma restrict_OK : forall (x : BDDvar) (b : bool) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (restrict x b be)) (bool_fun_restrict (bool_fun_of_bool_expr be) x b).