Proof using.
induction l; intros; simpl in *; intuition.
- destruct l'; simpl in *; intuition.
break_if; do_bool; auto; omega.
- break_if; do_bool; auto.
f_equal. eauto.
Qed.

(* Specifications: *)
Lemma findGtIndex_app_2 :
forall l l' i,
sorted (l ++ l') ->
i < maxIndex l' ->
findGtIndex (l ++ l') i = l ++ findGtIndex l' i.