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