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.
Section before_all.
Variable A : Type.

(* Specifications: *)
Lemma before_all_head_not_in :
forall l (x y : A),
x <> y ->
before_all x y (y :: l) ->
~ In x l.