(* 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 BDDor_1_lemma :
forall (bound : nat) (cfg : BDDconfig) (node1 node2 : ad)
(memo : BDDor_memo),
BDDconfig_OK cfg ->
BDDor_memo_OK cfg memo ->
config_node_OK cfg node1 ->
config_node_OK cfg node2 ->
(is_internal_node cfg node1 ->
is_internal_node cfg node2 ->
max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound) ->
BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound)) /\
BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound))
(snd (snd (BDDor_1 cfg memo node1 node2 bound))) /\
config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound))
(fst (snd (BDDor_1 cfg memo node1 node2 bound))) /\
nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound)) /\
BDDvar_le
(var (fst (BDDor_1 cfg memo node1 node2 bound))
(fst (snd (BDDor_1 cfg memo node1 node2 bound))))
(BDDvar_max (var cfg node1) (var cfg node2)) = true /\
bool_fun_eq
(bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound))
(fst (snd (BDDor_1 cfg memo node1 node2 bound))))
(bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)).