induction n1; intuition.
simpl.
comp_simp.
simpl.
intuition.
Local Opaque evalDist.
simpl.
inline_first.
comp_skip.
inline_first.
comp_simp.
comp_at comp_ret leftc 1%nat.
eapply IHn1.
Qed.

(* Specifications: *)
Theorem Repeat_unroll_n :
forall n (A : Set)(eqda : EqDec A)(c : Comp A)(P : A -> bool) a,
well_formed_comp c ->
(exists x, In x (filter P (getSupport c))) ->
evalDist (Repeat c P) a ==
evalDist (x <-$ compMap _ (fun _ => c) (forNats n);
match (hd_error (filter P x)) with
| None => Repeat c P
| Some z => ret z
end) a.