Proof using.
intros c; elim c; simpl in |- *; auto.
intros H; case H; auto.
intros a l; case a; case l.
intros a0 l0 H H0; simpl in |- *; auto.
intros p l0 a0 l1 H H0; rewrite H; auto.
intros; discriminate.
Qed.

(* Building can be decomposed in the codes starting with true and the one starting by false *)
Theorem pbbuild_pbnode :
forall c1 c2,
c1 <> nil ->
c2 <> nil ->
pbbuild
(map (fun x => (fst x, false :: snd x)) c1 ++
map (fun x => (fst x, true :: snd x)) c2) =
pbnode (pbbuild c1) (pbbuild c2).