Proof using.
intros.
apply maxIndex_subset; eauto using removeAfterIndex_sorted.
intros. eauto using removeAfterIndex_in.
Qed.

(* Specifications: *)
Lemma maxIndex_removeAfterIndex :
forall l i e,
sorted l ->
In e l ->
eIndex e = i ->
maxIndex (removeAfterIndex l i) = i.