Proof using.
induction l; intros; simpl in *; [congruence|].
repeat break_match; find_inversion.
- do_bool.
match goal with
| H : forall _, Some ?a = Some _ -> _ |- _ =>
specialize (H a)
end. intuition; subst; auto.
find_apply_hyp_hyp. omega.
- do_bool.
match goal with
| H : forall _, Some ?a = Some _ -> _ |- _ =>
specialize (H a)
end. intuition; subst; auto.
find_apply_hyp_hyp. omega.
- intuition; subst; auto.
find_apply_lem_hyp argmin_None.
subst. solve_by_inversion.
Qed.

Lemma argmin_in :
forall A (f : A -> nat) l a,
argmin f l = Some a ->
In a l.