Proof using.
intros a l; generalize a; elim l; clear a l; simpl in |- *; auto.
intros (a1, l1) l0 H a H0.
case (eqA_dec a a1); auto.
intros H1; case (H0 l1); left;
apply f_equal2 with (f := pair (A:=A) (B:=nat)); auto.
intros n; apply in_cons; auto; apply H; auto.
intros ca; red in |- *; intros H1; case (H0 ca); auto.
Qed.

(* Specifications: *)
(* Adding an element increments the frequency *)
Theorem add_frequency_list_in :
forall m a n,
unique_key m -> In (a, n) m -> In (a, S n) (add_frequency_list a m).