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

Lemma before_all_not_in_2 : forall l (x y : A), ~ In y l -> before_all x y l.