Fixpoint before {A: Type} (x : A) y l : Prop :=
  match l with
    | [] => False
    | a :: l' =>
      a = x \/
      (a <> y /\ before x y l')
  end.

Lemma before_remove : forall x y l y' dec, before (A := A) x y (remove dec y' l) -> y <> y' -> before x y l.