Proof using.
intros n; elim n; simpl in |- *; auto.
intros n0 H l; case l; simpl in |- *; auto.
intros a l0; apply f_equal2 with (f := cons (A:=A)); auto.
Qed.
End First.
Arguments first_n [A].
Arguments skip_n [A].
(* Existence of a first max *)
Section FirstMax.

(* Specifications: *)
Theorem exist_first_max :
forall l : list nat,
l <> nil ->
exists a : nat,
(exists l1 : list nat,
(exists l2 : list nat,
l = l1 ++ a :: l2 /\
(forall n1, In n1 l1 -> n1 < a) /\ (forall n1, In n1 l2 -> n1 <= a))).