Definition var_env' := nat -> bool.
Definition var_env_to_env' (ve : var_env) : var_env' :=
fun n : nat => ve (N_of_nat n).
Definition var_env'_to_env (ve : var_env') : var_env :=
fun x : BDDvar => ve (nat_of_N x).
Definition eval_be' (be : bool_expr) (ve : var_env') :=
bool_fun_of_bool_expr be (var_env'_to_env ve).
Definition var_env'' := Map unit.
Definition var_env''_to_env (ve : var_env'') : var_env :=
fun x : ad => in_dom _ x ve.
Definition var_env''_to_env' (ve : var_env'') : var_env' :=
fun n : nat => in_dom _ (N_of_nat n) ve.
Definition be_eq (be1 be2 : bool_expr) :=
forall ve : var_env', eval_be' be1 ve = eval_be' be2 ve.
Definition be_eq_dec (be1 be2 : bool_expr) :=
is_tauto (fun x _ => x) (Iff be1 be2).
(* [x,_]x is same as gc_inf *)
Definition be_le (be1 be2 : bool_expr) :=
forall ve : var_env', eval_be' be1 ve = true -> eval_be' be2 ve = true.

(* Specifications: *)
Lemma be_eq_refl : forall be : bool_expr, be_eq be be.
Lemma be_eq_sym : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq be2 be1.
Lemma be_eq_le : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_le be1 be2.
Lemma be_eq_dec_correct :
forall be1 be2 : bool_expr,
bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) ->
be_eq_dec be1 be2 = true.
Lemma be_eq_dec_complete :
forall be1 be2 : bool_expr,
be_eq_dec be1 be2 = true ->
bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2).
Lemma be_eq_dec_eq :
forall be1 be2 : bool_expr, be_eq_dec be1 be2 = true -> be_eq be1 be2.
Lemma bool_fun_var_ext : forall x : BDDvar, bool_fun_ext (bool_fun_var x).
Lemma bool_fun_neg_ext :
forall bf1 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext (bool_fun_neg bf1).
Lemma bool_fun_and_ext :
forall bf1 bf2 : bool_fun,
bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_and bf1 bf2).
Lemma bool_fun_or_ext :
forall bf1 bf2 : bool_fun,
bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_or bf1 bf2).
Lemma bool_fun_impl_ext :
forall bf1 bf2 : bool_fun,
bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_impl bf1 bf2).
Lemma bool_fun_iff_ext :
forall bf1 bf2 : bool_fun,
bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_iff bf1 bf2).
Lemma bool_fun_of_be_ext :
forall be : bool_expr, bool_fun_ext (bool_fun_of_bool_expr be).
Lemma be_le_refl : forall be : bool_expr, be_le be be.
Lemma be_le_trans :
forall be1 be2 be3 : bool_expr,
be_le be1 be2 -> be_le be2 be3 -> be_le be1 be3.
Lemma be_le_antisym :
forall be1 be2 : bool_expr, be_le be1 be2 -> be_le be2 be1 -> be_eq be1 be2.
Lemma be_eq_trans :
forall be1 be2 be3 : bool_expr,
be_eq be1 be2 -> be_eq be2 be3 -> be_eq be1 be3.
Lemma be_eq_eq_dec :
forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq_dec be1 be2 = true.
Lemma be_le_not_1 :
forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (Neg be2) (Neg be1).
Lemma and_le :
forall be1 be2 be1' be2' : bool_expr,
be_le be1 be1' -> be_le be2 be2' -> be_le (ANd be1 be2) (ANd be1' be2').
Lemma or_le :
forall be1 be2 be1' be2' : bool_expr,
be_le be1 be1' -> be_le be2 be2' -> be_le (Or be1 be2) (Or be1' be2').
Lemma impl_le :
forall be1 be2 be1' be2' : bool_expr,
be_le be1' be1 -> be_le be2 be2' -> be_le (Impl be1 be2) (Impl be1' be2').
Lemma and_eq :
forall be1 be2 be1' be2' : bool_expr,
be_eq be1 be1' -> be_eq be2 be2' -> be_eq (ANd be1 be2) (ANd be1' be2').
Lemma or_eq :
forall be1 be2 be1' be2' : bool_expr,
be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Or be1 be2) (Or be1' be2').
Lemma impl_eq :
forall be1 be2 be1' be2' : bool_expr,
be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Impl be1 be2) (Impl be1' be2').
Lemma iff_eq :
forall be1 be2 be1' be2' : bool_expr,
be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Iff be1 be2) (Iff be1' be2').
Lemma neg_eq_eq :
forall be1 be2 : bool_expr, be_eq (Neg be1) (Neg be2) -> be_eq be1 be2.
Lemma eq_neg_eq :
forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (Neg be1) (Neg be2).