Proof using.
induction l; intros; simpl in *; intuition; subst_max; intuition.
- find_apply_hyp_hyp. intuition.
- find_apply_hyp_hyp. intuition.
Qed.

(* Specifications: *)
Lemma term_ne_in_l2 :
forall l e e' l1 l2,
sorted l ->
In e l ->
(forall e', In e' l -> eTerm e' <= eTerm e) ->
removeAfterIndex l (eIndex e) = l1 ++ l2 ->
(forall e', In e' l1 -> eTerm e' = eTerm e) ->
In e' l ->
eTerm e' <> eTerm e ->
In e' l2.