Proof using.
intros c; unfold restrict_code in |- *; elim (frequency_list eqA_dec m);
simpl in |- *; auto.
intros a0 l H; apply f_equal2 with (f := cons (A:=A)); auto.
Qed.

(* Specifications: *)
(* If the message is not null, so is the restriction *)
Theorem restrict_not_null : forall c, m <> nil -> restrict_code m c <> nil.
Proof using.