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

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).