Definition contiguous_range_exact_lo xs lo :=
    (forall i,
       lo < i <= maxIndex xs ->
       exists e,
         eIndex e = i /\
         In e xs) /\
    (forall e,
       In e xs ->
       lo < eIndex e).

Lemma maxIndex_removeAfterIndex : forall l i e, sorted l -> In e l -> eIndex e = i -> maxIndex (removeAfterIndex l i) = i.