Proof using.
destruct xs; intros.
- simpl. omega.
- destruct ys; simpl in *.
+ match goal with
| [ H : forall _, _ = _ \/ _ -> _, a : entry |- _ ] =>
solve [ specialize (H a); intuition ]
end.
+ match goal with
| [ H : forall _, _ = _ \/ _ -> _ |- eIndex ?a <= _ ] =>
specialize (H a); intuition
end; subst; auto.
find_apply_hyp_hyp. omega.
Qed.

(* Specifications: *)
Lemma maxIndex_exists_in :
forall xs,
maxIndex xs >= 1 ->
exists x,
eIndex x = maxIndex xs /\
In x xs.