Proof using.
intros; induction l; simpl in *; intuition.
break_if; do_bool; intuition.
specialize (H a); intuition. omega.
Qed.

Lemma findGtIndex_removeAfterIndex_commute :
forall l i i',
sorted l ->
removeAfterIndex (findGtIndex l i) i' =
findGtIndex (removeAfterIndex l i') i.