induction ls; intuition; simpl in *;
intuition.
subst.
destruct (eqd a0 a0); subst.
omega.
intuition.
destruct (eqd a0 a); subst.
omega.
eapply lt_n_S.
eauto.
Qed.

Theorem nth_firstIndexOf :
forall (A : Set)(eqd : eq_dec A)(ls : list A)(a : A)(def : nat),
In a ls ->
nth_option ls (firstIndexOf eqd ls a def) = Some a.