(* An interpretation of BDDvar's *)
Definition var_binding := BDDvar -> bool.
(* A boolean function. However not all boolean functions represent a logical formula. *)
Definition bool_fun := var_binding -> bool.
(* Evaluation of a boolean function given a binding of variables *)
Definition bool_fun_eval (bf : bool_fun) (vb : var_binding) := bf vb.
(* The boolean functions representing ZERO and ONE *)
Definition bool_fun_zero (vb : var_binding) := false.
Definition bool_fun_one (vb : var_binding) := true.
Fixpoint bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad)
(bound : nat) {struct bound} : bool_fun :=
match MapGet _ (fst cfg) node with
| None => if Neqb node BDDzero then bool_fun_zero else bool_fun_one
| Some (x, (l, r)) =>
match bound with
| O => (* Error *)  bool_fun_zero
| S bound' =>
let bfl := bool_fun_of_BDD_1 cfg l bound' in
let bfr := bool_fun_of_BDD_1 cfg r bound' in
fun vb : var_binding => if vb x then bfr vb else bfl vb
end
end.

Lemma bool_fun_of_BDD_1_semantics_2 :
forall (cfg : BDDconfig) (node : ad) (bound1 bound2 : nat),
MapGet _ (fst cfg) node = None ->
bool_fun_of_BDD_1 cfg node bound1 = bool_fun_of_BDD_1 cfg node bound2.