(* Compute all the leaves *)
Fixpoint all_pbleaves (t : pbtree) : list A :=
  match t with
  | pbleaf a => a :: nil
  | pbleft t1 => all_pbleaves t1
  | pbright t1 => all_pbleaves t1
  | pbnode t1 t2 => all_pbleaves t1 ++ all_pbleaves t2
  end.

Theorem all_pbleaves_pbleaf : forall l a1 a2, all_pbleaves (pbadd a1 (pbleaf a2) l) = a1 :: nil.