Proof using.
intros.
assert (eIndex e' <= eIndex e) by
(eapply sorted_term_index_le; eauto;
find_apply_hyp_hyp;
destruct (lt_eq_lt_dec (eTerm e') (eTerm e)); intuition).
find_eapply_lem_hyp removeAfterIndex_le_In; eauto.
repeat find_rewrite.
do_in_app. intuition.
find_apply_hyp_hyp. intuition.
Qed.

(* Specifications: *)
Lemma Prefix_maxIndex_eq :
forall l l',
Prefix l l' ->
l <> nil ->
maxIndex l = maxIndex l'.