Proof using.
intros l1; elim l1; simpl in |- *; auto.
intros a l H l2 c; rewrite H; auto.
rewrite app_ass; auto.
Qed.

(* Specifications: *)
(* Inversion theorem for encode *)
Theorem encode_cons_inv :
forall a l1 l m1, ~ In a m1 -> encode ((a, l1) :: l) m1 = encode l m1.