Proof using.
intros m c a ca H H0; red in |- *; simpl in |- *.
intros a1 [H1| H1].
exists ca; rewrite <- H1; auto.
case (H0 a1); auto.
Qed.
Hint Resolve in_alphabet_cons : core.

(* Inversion theorem *)
Theorem in_alphabet_inv :
forall (c : code) (a : A) (l : list A),
in_alphabet (a :: l) c -> in_alphabet l c.