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 ad_S_le_then_le : forall x y : ad, Nleb (ad_S x) y = true -> Nleb x y = true.