(* 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 BDD_make.
Variable gc : BDDconfig -> list ad -> BDDconfig.
Hypothesis gc_is_OK : gc_OK gc.
(* The arguments for the make function *)
Variable cfg : BDDconfig.
Variable x : BDDvar.
Variable l r : ad.
Variable ul : list ad.
(* Conditions on the arguments for the make function *)
Hypothesis cfg_OK : BDDconfig_OK cfg.
Hypothesis ul_OK : used_list_OK cfg ul.
Hypothesis l_used' : used_node' cfg ul l.
Hypothesis r_used' : used_node' cfg ul r.
Hypothesis
xl_lt_x :
forall (xl : BDDvar) (ll rl : ad),
MapGet _ (bs_of_cfg cfg) l = Some (xl, (ll, rl)) ->
BDDcompare xl x = Datatypes.Lt.
Hypothesis
xr_lt_x :
forall (xr : BDDvar) (lr rr : ad),
MapGet _ (bs_of_cfg cfg) r = Some (xr, (lr, rr)) ->
BDDcompare xr x = Datatypes.Lt.

Lemma no_dup :
MapGet3 ad (fst (snd cfg)) l r x = None ->
forall (x' : BDDvar) (l' r' a : ad),
MapGet (BDDvar * (ad * ad)) (bs_of_cfg cfg) a =
Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r')).