Proof using.
intros.
induction l; simpl in *; intuition.
break_match; intuition. subst. simpl. auto.
Qed.

(* Specifications: *)
Lemma sorted_gt_maxIndex :
forall e l1 l2,
sorted (e :: l1 ++ l2) ->
l2 <> nil ->
maxIndex l2 < eIndex e.