(* Inductive index : Set := i_intro : (n:nat)(le L n) -> (lt n U) -> index. Definition order := [i:index]Cases i of (i_intro n _ _) => n end. Definition index_eq := [i,j:index](order i)=(order j).  Section Sequence. Variable A:Set. Variable A_eq:A->A->Prop. Definition seq := index -> A. Definition seq_ok := [s:seq](i,j:index)(index_eq i j) -> (A_eq (s i) (s j)). Definition seq_inj := [s:seq](i,j:index)(A_eq (s i) (s j)) -> (index_eq i j). Definition seq_surj := [s:seq](a:A)(EX i:index|(A_eq (s i) a)). End Sequence.  Lemma nat_to_index : (n:nat)(le L n) -> (lt n U) -> (EX i:index|(order i)=n).  Lemma var_lu_to_index1 : (x:ad)(var_lu x)=true->index.  Lemma var_lu_to_index2 : (x:BDDvar; pi:(var_lu x)=true)(order (var_lu_to_index1 x pi))=(nat_of_N x). Lemma var_lu_to_index : (x:ad)(var_lu x)=true->(EX i:index|(order i)=(nat_of_N x)).  Inductive be_lu : Set := be_lu_intro : (be:bool_expr)(be_ok var_lu be) -> be_lu. Definition be_of_be_lu := [bel:be_lu]Cases bel of (be_lu_intro be _) => be end. Definition var_env_lu := (seq bool).  Definition env_lu_to_var_binding := [vel:var_env_lu;x:BDDvar] (* problem in defining this function *)
Cases (var_lu x) of
true => (([pi:true=(var_lu x)](vel (var_lu_to_index1 x (sym_eq ? ? ? pi)))) (refl_equal ? (var_lu x)))
| false => false
end.

(* Specifications: *)
Lemma eval_be' : be_lu -> var_env_lu -> bool.
*)
(* to be completed *)
Lemma minusUL0_var_lu :
forall L U : nat, U - L = 0 -> forall x : ad, var_lu L U x = false.