(* Turn a partial tree into a binary tree *)
Fixpoint to_btree (a : pbtree A) : btree A :=
  match a with
  | pbleaf b => leaf b
  | pbleft l1 => to_btree l1
  | pbright l1 => to_btree l1
  | pbnode l1 l2 => node (to_btree l1) (to_btree l2)
  end.

Theorem to_btree_distinct_pbleaves : forall a : pbtree A, distinct_leaves (to_btree a) -> distinct_pbleaves a.