LeanMachineLearning

argmax🔗

Definition

The index of the maximum value of a tuple.

🔗def
argmax.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι α) : ι
argmax.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι α) : ι

Code

@[to_dual /-- The index of the minimum value of a tuple. -/] noncomputable def argmax := (exists_argmax f).choose

Actions: Source · Open Issue

Meaning unchanged since v4.33.0-rc1-29-gce231eb, the oldest revision on record (2026-07-30). Its file was edited 2026-08-12 (9fc3d89, “bump”) without changing what it means.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file · open it in the Lean web editor.

Dependency graph

Audit surface: 2 project declarations, 12 external constants

✓ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.