intuition.
unfold rndListElem.
case_eq (length ls); intuition.
exfalso.
destruct ls; simpl in *; intuition.
eapply getSupport_In_Seq.
eapply in_getSupport_RndNat.
rewrite <- H0.
eapply firstIndexOf_in_lt; eauto.
simpl.
left.
eapply nth_firstIndexOf; trivial.
unfold rndListElem in *.
repeat simp_in_support.
discriminate.
eapply nth_option_In; eauto.
Grab Existential Variables.
apply O.
unfold eq_dec.
eapply (EqDec_dec eqd).
Qed.

(* Specifications: *)
Theorem nth_firstIndexOf_if :
forall (A : Set)(eqd : eq_dec A)(ls : list A) n a,
nth_option ls n = Some a ->
NoDup ls ->
firstIndexOf eqd ls a 0 = n.