(* 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                                                     *)
Section BDDop.
Variable gc : BDDconfig -> list ad -> BDDconfig.
Hypothesis gc_is_OK : gc_OK gc.
Section BDDneg_results.
Variable cfg : BDDconfig.
Variable ul : list ad.
Variable node : ad.
Hypothesis cfg_OK : BDDconfig_OK cfg.
Hypothesis ul_OK : used_list_OK cfg ul.
Hypothesis used : used_node' cfg ul node.
Definition BDDneg :=
BDDneg_1 gc cfg ul node (S (nat_of_N (node_height cfg node))).
Let lt_1 :
nat_of_N (node_height cfg node) < S (nat_of_N (node_height cfg node)).

(* Specifications: *)
Lemma BDDneg_config_OK : BDDconfig_OK (fst BDDneg).
Lemma BDDneg_node_OK : config_node_OK (fst BDDneg) (snd BDDneg).
Lemma BDDneg_used_nodes_preserved : used_nodes_preserved cfg (fst BDDneg) ul.
Lemma BDDneg_is_neg :
bool_fun_eq (bool_fun_of_BDD (fst BDDneg) (snd BDDneg))
(bool_fun_neg (bool_fun_of_BDD cfg node)).
Lemma BDDneg_list_OK : used_list_OK (fst BDDneg) ul.
Lemma BDDneg_list_OK_cons : used_list_OK (fst BDDneg) (snd BDDneg :: ul).
Lemma BDDneg_var_eq :
Neqb (node_height (fst BDDneg) (snd BDDneg)) (node_height cfg node) = true.