induction ls; intuition; simpl in *.
eapply comp_spec_ret; simpl; intuition.
eapply comp_spec_eq_trans_r.
2:{
eapply comp_spec_eq_symm.
eapply eq_impl_comp_spec_eq.
intros.
eapply compMap_app.
}
comp_skip.
eapply comp_spec_seq.
apply nil.
apply nil.
eapply IHls.
intuition.
subst.
eapply comp_spec_ret.
simpl.
intuition.
Qed.

Lemma map_f_equal :
forall (A B : Set)(f1 f2 : A -> B)(ls1 ls2 : list A),
(forall a, f1 a = f2 a) ->
ls1 = ls2 ->
map f1 ls1 = map f2 ls2.