Proof using.
intros.
find_copy_eapply_lem_hyp (sorted_app_gt l1 [e1]); simpl; eauto.
assert (In e (l1 ++ [e1])). apply in_or_app. intuition.
find_apply_hyp_hyp. find_apply_lem_hyp in_app_or. intuition.
simpl in *. intuition. subst. omega.
Qed.

Lemma contiguous_sorted_subset_prefix :
forall l1 l2 i,
contiguous_range_exact_lo l1 i ->
contiguous_range_exact_lo l2 i ->
sorted l1 ->
sorted l2 ->
(forall e, In e l1 -> In e l2) ->
Prefix (rev l1) (rev l2).