Proof using.
induction entries; intros; simpl in *; intuition.
- break_if; simpl in *; intuition; right; eapply IHentries; eauto.
- break_if;
simpl in *; intuition.
+ do_bool. subst. omega.
+ simpl in *; intuition; eapply IHentries; eauto.
Qed.

(* Specifications: *)
Lemma findGtIndex_contiguous :
forall entries x,
sorted entries ->
(forall i, 0 < i <= maxIndex entries -> (exists e, In e entries /\ eIndex e = i)) ->
forall i, x < i <= maxIndex entries ->
exists e, In e (findGtIndex entries x) /\ eIndex e = i.