Proof using.
intros c H H0;
apply permutation_trans with (map (fst (B:=_)) (compute_pbcode (pbbuild c))).
apply permutation_map.
apply permutation_sym; apply pbbuild_compute_perm; auto.
apply all_pbleaves_compute_pb; auto.
Qed.

(* Leaves in a built tree are elements of the codes *)
Theorem inpb_pbbuild_inv :
forall a c,
c <> nil -> inpb (pbleaf a) (pbbuild c) -> exists l : _, In (a, l) c.