Section Code.
(* Arbitrary set *)
Variable A : Type.
(* Equality is decidable *)
Variable eqA_dec : forall a b : A, {a = b} + {a <> b}.
(* 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.

(* Being in an alphabet is compatible with inclusion *)
Theorem in_alphabet_incl :
forall m1 m2 c, incl m1 m2 -> in_alphabet m2 c -> in_alphabet m1 c.