induction ls1; intuition.
rewrite app_nil_l.
unfold compMap.
fold compMap.
comp_simp.
rewrite <- evalDist_right_ident.
comp_skip.
simpl.
reflexivity.
rewrite <- app_comm_cons.
unfold compMap.
fold compMap.
inline_first.
comp_skip.
eapply eqRat_trans.
comp_skip.
eapply eqRat_refl.
inline_first.
comp_skip.
inline_first.
comp_simp.
comp_skip.
simpl.
intuition.
Qed.

(* Specifications: *)
Lemma compMap_flatten :
forall (A B : Set)(eqd : EqDec B)(c : A -> Comp B)(ls : list (list A)),
comp_spec
(fun ls1 ls2 => ls2 = flatten ls1)
(compMap _ (fun ls' => compMap _ c ls') ls)
(compMap _ c (flatten ls)).