Proof using.
intros. induction l; simpl in *; auto.
repeat break_if; do_bool; simpl in *; auto.
- f_equal; eauto.
- intuition. congruence.
- intuition; try congruence.
assert (f a = true) by eauto.
congruence.
Qed.

Lemma removeAfterIndex_app :
forall l i i',
sorted l ->
i' < i ->
removeAfterIndex l i =
filter (fun x => eIndex x <=? i) (findGtIndex l i') ++ removeAfterIndex l i'.