Proof using.
intros.
exists (dedup name_eq_dec l). intuition; eauto using NoDup_dedup, in_dedup_was_in.
unfold wonElection in *.
do_bool. omega.
Qed.

Lemma contiguous_findAtIndex :
forall l s i,
sorted l ->
contiguous_range_exact_lo l s ->
s < i <= maxIndex l ->
exists e, findAtIndex l i = Some e.