(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)

Lemma BDDneg_2_lemma :
forall (bound : nat) (cfg : BDDconfig) (node : ad),
BDDconfig_OK cfg ->
config_node_OK cfg node ->
(is_internal_node cfg node -> nat_of_N (var cfg node) < bound) ->
BDDconfig_OK (fst (BDDneg_2 cfg node bound)) /\
(forall (x : BDDvar) (l r a : ad),
MapGet _ (fst cfg) a = Some (x, (l, r)) ->
MapGet _ (fst (fst (BDDneg_2 cfg node bound))) a = Some (x, (l, r))) /\
(is_internal_node cfg node ->
is_internal_node (fst (BDDneg_2 cfg node bound))
(snd (BDDneg_2 cfg node bound)) /\
var cfg node =
var (fst (BDDneg_2 cfg node bound)) (snd (BDDneg_2 cfg node bound))) /\
config_node_OK (fst (BDDneg_2 cfg node bound))
(snd (BDDneg_2 cfg node bound)) /\
bool_fun_eq
(bool_fun_of_BDD (fst (BDDneg_2 cfg node bound))
(snd (BDDneg_2 cfg node bound)))
(bool_fun_neg (bool_fun_of_BDD cfg node)).