induction ls; intuition; simpl in *.
eapply comp_spec_eq_refl.
comp_skip.
comp_skip.
Qed.

Lemma compMap_Repeat_close :
forall n (A B : Set)(eqda : EqDec A)(eqdb : EqDec B)(c : Comp A)(P : A -> bool)(f : A -> B) x,
well_formed_comp c ->
(exists a, In a (filter P (getSupport c))) ->
| (evalDist
(a <-$ compMap eqda (fun _ : nat => c) (forNats n);
ret hd_error (map f (filter P a))) x) -
(evalDist
(a <-$ Repeat c P; ret Some (f a)) x) | <=
expRat (Pr[a <-$ c; ret (negb (P a))]) n.