Definition BDDand :=
  match BDDneg cfg ul node1 with
  | (cfg1, node1') =>
      match BDDneg cfg1 (node1' :: ul) node2 with
      | (cfg2, node2') =>
          match BDDor cfg2 (node2' :: node1' :: ul) node1' node2' with
          | (cfg3, node3) => BDDneg cfg3 (node3 :: ul) node3
          end
      end
  end.

Lemma BDDand_is_and : bool_fun_eq (bool_fun_of_BDD (fst BDDand) (snd BDDand)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)).