(* The property for a tree to have distinct leaves  *)
Definition distinct_leaves (t : btree) : Prop :=
  forall t0 t1 t2 : btree,
  inb (node t1 t2) t -> inb t0 t1 -> inb t0 t2 -> False.

(* Specifications: *)
Theorem distinct_leaves_leaf : forall a : A, distinct_leaves (leaf a).
Theorem distinct_leaves_l : forall t1 t2 : btree, distinct_leaves (node t1 t2) -> distinct_leaves t1.
Theorem distinct_leaves_r : forall t1 t2 : btree, distinct_leaves (node t1 t2) -> distinct_leaves t2.
Theorem all_leaves_unique : forall t, ulist (all_leaves t) -> distinct_leaves t.
Theorem all_leaves_ulist : forall t, distinct_leaves t -> ulist (all_leaves t).