(* A code is an association list *)
Definition code := list (A * list bool).(* 
  Predicate that tells that a message (a list of message) is in the
  alphabet of the code
*)
Definition in_alphabet (m : list A) (c : code) :=
  forall a : A, In a m -> exists l : list bool, In (a, l) c.

Theorem in_alphabet_cons : forall (m : list A) c a ca, In (a, ca) c -> in_alphabet m c -> in_alphabet (a :: m) c.