Proof using.
intros l; elim l.
intros a H; elim H; simpl in |- *; auto.
simpl in |- *; intros (a1, l1) l0; case l0.
case l1; simpl in |- *; auto.
intros p l2 H a H0.
rewrite H; auto.
red in |- *; intros H1; discriminate.
Qed.

(* Adding always on the right on a left tree  creates a node tree *)
Theorem fold_pbadd_prop_node :
forall l a,
l <> nil ->
fold_right (fun a (c : pbtree) => pbadd (fst a) c (snd a))
(pbright a)
(map (fun v => match v with
| (a1, b1) => (a1, false :: b1)
end) l) =
pbnode
(fold_right (fun a (c : pbtree) => pbadd (fst a) c (snd a))
(pbleaf empty) l) a.