Proof using.
intros l1 l2 a H; generalize a; elim H; clear H a l1 l2; simpl in |- *; auto.
intros a L1 L2 H H0 a0; case (eqA_dec a a0); simpl in |- *; auto;
case (eqA_dec a0 a); simpl in |- *; auto.
intros a b L a0; case (eqA_dec a0 a); simpl in |- *; auto;
case (eqA_dec a0 b); simpl in |- *; auto.
intros L1 L2 L3 H H0 H1 H2 a; apply trans_equal with (1 := H0 a); auto.
Qed.

(* Specifications: *)
(* The frequency list contains the number of occurrences *)
Theorem frequency_number_of_occurrences :
forall a m, In a m -> In (a, number_of_occurrences a m) (frequency_list m).