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_if : forall (x : A) y l x' dec, before x y l -> x <> x' -> before x y (remove dec x' l).