The argmax set of a function on a finset #
Finset.argmax s f is the finset of elements of s at which f attains its
maximum over s. Mathlib has only the tie-breaking List.argmax : List α → Option α; the set-valued form is the natural companion of Finset.max' and
Finset.exists_max_image, and the carrier for argmax correspondences
(set-valued best responses) in game-theoretic consumers.
[UPSTREAM] candidate: Mathlib.Data.Finset.Max.
Main definitions #
Finset.argmax s f— the score-maximal elements ofs.Finset.argmin s f— the score-minimal elements ofs.
Main statements #
mem_argmax— membership characterization (simp normal form).argmax_eq_singleton_iff— a sole maximizer strictly beats every other element.StrictAntiOn.argmin_eq_singleton— a strictly antitone score is minimized at the greatest element.argmax_nonempty— nonempty on nonempty input, in a total preorder.argmax_comp_strictMono— invariance under strictly monotone rescaling.
Implementation notes #
As for List.argmax, the definition asks only for a preorder with decidable ≤, not a linear
order, and the existence and uniqueness lemmas ask for totality on top. A score type whose
LinearOrder decides ≤ classically, such as Lex (Fin n → ℕ), can then be scored under a
computable DecidableLE instance and evaluated by decide. In a preorder that is not total,
argmax is the set of elements at which f is greatest, which can be empty, not the set of
MaximalFor elements. The lemmas stated for linear orders take the order's own decidability, so
they do not apply under such a separate instance.
The elements of s at which f attains its maximum over s.
Equations
- s.argmax f = {a ∈ s | ∀ b ∈ s, f b ≤ f a}
Instances For
The elements of s at which f attains its minimum over s.
Equations
- s.argmin f = {a ∈ s | ∀ b ∈ s, f a ≤ f b}
Instances For
A score that is constant on s has all of s as argmin.
The argmax is the singleton {a} iff a ∈ s beats every other element of s.
The argmin is the singleton {a} iff a ∈ s beats every other element of s.
A score strictly antitone on s is minimized exactly at the greatest element of s.
In a total preorder, a nonempty finset has a maximizer.
In a total preorder, a nonempty finset has a minimizer.
The argmax set is invariant under strictly monotone rescaling of the score — inverse-temperature changes do not move the argmax.