Definition bool_fun_iff (bf1 bf2 : bool_fun) : bool_fun :=
  fun vb : var_binding => eqb (bf1 vb) (bf2 vb).

(* Specifications: *)
Lemma bool_fun_iff_is_and_impl_impl : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_and (bool_fun_impl bf1 bf2) (bool_fun_impl bf2 bf1)).
Lemma bool_fun_and_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_and bf1' bf2').
Lemma bool_fun_impl_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_impl bf1' bf2').
Lemma bool_fun_iff_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_iff bf1' bf2').
Lemma BDDiff_is_iff : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2)) (fst (snd (BDDiff cfg negm orm node1 node2)))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)).
Lemma BDDiff_keeps_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDiff cfg negm orm node1 node2)) node.
Lemma BDDiff_preserves_bool_fun : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2)) node) (bool_fun_of_BDD cfg node).