induction ls; intuition; simpl in *.
unfold arrayLookupList.
simpl.
case_eq (eqb a a0); intuition.
eapply X.
rewrite eqb_leibniz in H.
subst.
intuition.
case_eq (arrayLookup eqda ls a); intuition.
specialize (IHls a).
unfold arrayLookupList in *.
rewrite H0 in IHls.
eapply IHls; eauto.
intuition.
discriminate.
rewrite H in X0.
intuition.
Qed.

Theorem arrayLookup_allNats_eq :
forall (B : Set)(ls : list (nat * B)) i,
fst (split ls) = allNatsLt (length ls) ->
arrayLookup _ ls i =
match nth_option ls i with
| Some (_, v) => Some v
| None => None
end.