Proof using.
intros a1 l1 l2 H; generalize a1; elim H; clear H a1 l1 l2; simpl in |- *;
auto.
intros b l a1; rewrite pbadd_prop1; simpl in |- *; auto.
apply
permutation_trans
with
(((a1, true :: l) :: nil) ++
map (fun v => match v with
| (a0, b1) => (a0, false :: b1)
end) (compute_pbcode b)); auto.
simpl in |- *; auto.
intros b l H H0 a1.
apply
permutation_trans
with
(map (fun v => match v with
| (a0, b1) => (a0, false :: b1)
end) ((a1, l) :: compute_pbcode b));
auto.
intros b l a1; rewrite pbadd_prop1; simpl in |- *; auto.
intros b l H H0 a1.
apply
permutation_trans
with
(map (fun v => match v with
| (a0, b1) => (a0, true :: b1)
end) ((a1, l) :: compute_pbcode b));
auto.
intros b c l H H0 a1.
apply
permutation_trans
with
(map (fun v => match v with
| (a0, b1) => (a0, false :: b1)
end) ((a1, l) :: compute_pbcode b) ++
map (fun v => match v with
| (a0, b1) => (a0, true :: b1)
end) (compute_pbcode c)); auto.
intros b c l H H0 a1.
apply
permutation_trans
with
(map (fun v => match v with
| (a0, b1) => (a0, false :: b1)
end) (compute_pbcode c) ++
map (fun v => match v with
| (a0, b1) => (a0, true :: b1)
end) ((a1, l) :: compute_pbcode b));
auto.
apply
permutation_trans
with
(map (fun v => match v with
| (a0, b1) => (a0, true :: b1)
end) ((a1, l) :: compute_pbcode b) ++
map (fun v => match v with
| (a0, b1) => (a0, false :: b1)
end) (compute_pbcode c)); auto;
simpl in |- *; auto.
Qed.

(* Specifications: *)
(* The free positions have not changed *)
Theorem pbfree_pbadd_prop1 :
forall a1 l l1,
~ is_prefix l l1 ->
~ is_prefix l1 l -> pbfree l (pbadd a1 (pbleaf empty) l1).