Proof using.
induction l; intros.
- simpl in *. intuition.
- simpl in *. intuition; break_if; subst; do_bool.
+ auto.
+ congruence.
+ f_equal. eauto using uniqueIndices_elim_eq with *.
+ break_if; eauto.
* do_bool. find_apply_hyp_hyp. omega.
* eapply IHl; auto. unfold uniqueIndices in *.
simpl in *. solve_by_inversion.
Qed.

Theorem sorted_uniqueIndices :
forall l,
sorted l -> uniqueIndices l.