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 := Neqb.Definition ad_S (a : ad) :=
    match a with
    | N0 => Npos 1
    | Npos p => Npos (Psucc p)
    end.

Lemma lt_pred : forall x y : nat, x < y -> x <> 0 -> pred x < pred y.