Proof using.
induction l1; intros; simpl in *; intuition.
- eexists; intuition eauto using findGtIndex_Prefix.
- break_if; simpl in *; intuition.
+ eapply_prop_hyp sorted sorted; eauto.
break_exists; intuition; find_rewrite; eauto.
+ do_bool. specialize (H1 e); conclude H1 ltac:(apply in_app_iff; intuition).
omega.
Qed.

(* Specifications: *)
Lemma findGtIndex_app_eq :
forall l1 l2 e,
sorted (l1 ++ l2) ->
In e l2 ->
findGtIndex (l1 ++ l2) (eIndex e) = l1 ->
eIndex e = maxIndex l2.
Lemma findGtIndex_nil :
forall l i,
(forall e', In e' l -> eIndex e' <= i) ->
findGtIndex l i = [].