Proof using.
intros a H.
apply all_leaves_unique.
rewrite to_btree_all_leaves.
apply all_pbleaves_ulist; auto.
Qed.

(* Specifications: *)
(* The transformation perserves distinct leaves *)
Theorem to_btree_distinct_pbleaves :
forall a : pbtree A, distinct_leaves (to_btree a) -> distinct_pbleaves a.