Proof using.
intros B l1 l2 c f H; generalize c f; elim H; clear H l1 l2 c f;
simpl in |- *; auto.
intros a b L c f; repeat rewrite <- plus_assoc; rewrite (plus_comm (f a));
auto.
intros L1 L2 L3 H H0 H1 H2 c f; apply trans_equal with (1 := H0 c f); auto.
Qed.

(* Specifications: *)
Theorem length_encode_nId :
forall a l1 l n,
length (encode eqA_dec ((a, l1) :: l) (id_list a n)) = n * length l1.