Proof using.
intros. unfold contiguous_range_exact_lo in *. intuition.
- invc H4.
+ eexists; intuition.
+ find_rewrite. find_apply_lem_hyp Nat.succ_inj. subst.
assert (i < i0 <= maxIndex (y :: l)). simpl. omega.
find_apply_hyp_hyp. break_exists. simpl in *.
intuition; subst; eexists; intuition.
- simpl in *. intuition; subst; auto. specialize (H2 y). concludes. omega.
Qed.

(* Specifications: *)
Lemma contiguous_partition :
forall l1 x l2 i,
sorted (l1 ++ x :: l2) ->
contiguous_range_exact_lo (l1 ++ x :: l2) i ->
contiguous_range_exact_lo l1 (eIndex x).