Proof using.
induction l; intros.
- apply contiguous_nil.
- eapply contiguous_index_adjacent in H; eauto.
unfold contiguous_range_exact_lo in *. break_and.
intuition. simpl maxIndex in *. specialize (H0 i0).
assert (i < i0 <= eIndex a0) by omega.
concludes. break_exists. intuition. simpl in *. intuition; subst.
+ omega.
+ exists x. intuition.
+ exists x. intuition.
Qed.

Lemma contiguous_app :
forall l1 l2 i,
sorted (l1 ++ l2) ->
contiguous_range_exact_lo (l1 ++ l2) i ->
contiguous_range_exact_lo l2 i.