Proof using.
intros.
destruct es; simpl in *.
- omega.
- congruence.
Qed.

Lemma removeIncorrect_new_contiguous :
forall new current prev e,
sorted current ->
uniqueIndices current ->
(forall e e',
eIndex e = eIndex e' ->
eTerm e = eTerm e' ->
In e new ->
In e' current ->
e = e') ->
contiguous_range_exact_lo current 0 ->
contiguous_range_exact_lo new prev ->
In e current ->
eIndex e = prev ->
contiguous_range_exact_lo (new ++ removeAfterIndex current prev)
0.