(* 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                                                     *)
(******** Copied variables upto bdd5_2.v *)
Definition BDDzero := N0.
Definition BDDone := Npos 1.
Definition BDDvar := ad.
Definition BDDcompare (x y : BDDvar) :=
match x, y with
| N0, N0 => Datatypes.Eq
| N0, Npos _ => Datatypes.Lt
| Npos _, N0 => Datatypes.Gt
| Npos p1, Npos p2 => Pcompare p1 p2 Datatypes.Eq
end.
Definition BDDvar_eq := N.eqb.
Definition ad_S (a : ad) :=
match a with
| N0 => Npos 1
| Npos p => Npos (Pos.succ p)
end.

Lemma BDD_EGAL_complete :
forall x y : BDDvar, BDDcompare x y = Datatypes.Eq -> x = y.