Proof using.
induction l; intros; simpl in *; intuition.
break_if; intuition.
- f_equal. auto.
- do_bool. specialize (H a); intuition; omega.
Qed.

Lemma findGtIndex_app_in_1 :
forall l1 l2 e,
sorted (l1 ++ l2) ->
In e l1 ->
exists l',
findGtIndex (l1 ++ l2) (eIndex e) = l' /\
forall x,
In x l' -> In x l1.