induction ls; intuition; simpl in *.
omega.
destruct n.
destruct ls.
simpl in *.
comp_simp.
comp_skip.
simpl.
eapply comp_spec_eq_refl.
simpl in*.
omega.
simpl.
inline_first.
comp_skip.
eapply comp_spec_eq_trans.
eapply comp_spec_seq_eq; eauto with inhabited.
intros.
eapply comp_spec_eq_refl.
inline_first.
comp_skip.
inline_first.
comp_simp.
comp_skip.
rewrite <- app_comm_cons.
eapply comp_spec_eq_refl.
Qed.

Theorem firstn_firstn :
forall (A : Type)(ls : list A)(n1 n2 : nat),
(n1 <= n2)%nat ->
firstn n1 (firstn n2 ls) = firstn n1 ls.