Proof using.
intros. destruct l; simpl in *; intuition.
repeat break_match; congruence.
Qed.

(* Specifications: *)
Lemma argmax_elim :
forall A (f : A -> nat) l a,
argmax f l = Some a ->
(In a l /\
forall x, In x l -> f a >= f x).
Lemma argmin_elim :
forall A (f : A -> nat) l a,
argmin f l = Some a ->
(In a l /\
forall x, In x l -> f a <= f x).