Proof using.
induction xs; intros; simpl in *; intuition; try congruence; eauto.
induction ys; intros; simpl in *; intuition; try congruence.
Qed.

Lemma before_middle_reduce :
forall xs zs a b y,
before(A:=A) a b (xs ++ y :: zs) ->
a <> y ->
before a b (xs ++ zs).