Proof using.
intros t; elim t; simpl in |- *; auto.
intros p H p0 H0; apply f_equal2 with (f := app (A:=A)); auto.
Qed.

(* Computing the btree preserves the property of having distinct leaves *)
Theorem to_btree_distinct_leaves :
forall a : pbtree A, distinct_pbleaves a -> distinct_leaves (to_btree a).