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 BDDlt_compare : forall x y : BDDvar, nat_of_N x < nat_of_N y -> BDDcompare x y = Datatypes.Lt.