Proof using.
intros. apply sorted_Permutation_eq;
try (apply removeAfterIndex_sorted; assumption).
apply NoDup_Permutation;
try (apply NoDup_removeAfterIndex; apply sorted_NoDup; assumption).
split; intros; apply removeAfterIndex_le_In;
eauto using removeAfterIndex_In_le, removeAfterIndex_in.
Qed.

Lemma removeAfterIndex_same_sufficient' :
forall x l l',
sorted l ->
sorted l' ->
contiguous_range_exact_lo l 0 ->
(forall e, In e l' -> 0 < eIndex e) ->
x <= maxIndex l ->
(forall e, eIndex e <= x ->
In e l ->
In e l') ->
removeAfterIndex l' x = removeAfterIndex l x.