intuition.
unfold rndListElem.
case_eq (length ls1); intuition.
rewrite <- H1.
rewrite H4.
eapply comp_spec_ret; intuition.
discriminate.
discriminate.
rewrite <- H1.
rewrite H4.
eapply comp_spec_seq; try eapply None.
eapply eq_impl_comp_spec.
eapply well_formed_RndNat; omega.
eapply well_formed_RndNat; omega.
eapply (@RndNat_uniform  (firstIndexOf (EqDec_dec _) ls1 a1 O) (firstIndexOf (EqDec_dec _) ls2 a2 O)).
rewrite <- H4.
apply firstIndexOf_in_lt; trivial.
rewrite <- H4.
rewrite H1.
apply firstIndexOf_in_lt; trivial.
intuition.
eapply comp_spec_ret.
intuition.
destruct (eq_nat_dec a (firstIndexOf (EqDec_dec _) ls1 a1 O)).
subst.
assert (b = firstIndexOf (EqDec_dec _) ls2 a2 0); intuition.
subst.
repeat rewrite nth_firstIndexOf; intuition.
assert (b <> firstIndexOf (EqDec_dec _) ls2 a2 0).
intuition.
exfalso.
eapply nth_firstIndexOf_None.
eapply H.
eapply H2.
eapply n0.
eauto.
intuition.
destruct (eq_nat_dec a (firstIndexOf (EqDec_dec _) ls1 a1 O)).
subst.
assert (b = firstIndexOf (EqDec_dec _) ls2 a2 0); intuition.
subst.
repeat rewrite nth_firstIndexOf; intuition.
assert (b <> firstIndexOf (EqDec_dec _) ls2 a2 0).
intuition.
exfalso.
eapply nth_firstIndexOf_None.
eapply H0.
eapply H3.
eapply H10.
eauto.
intuition.
Qed.

Theorem rndListElem_support_exists :
forall (A : Set)(eqd : EqDec A)(ls : list A),
exists x,
In x (getSupport (rndListElem eqd ls)).