argmax_spec
This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.
argmax_spec🔗
argmax_specNo docstring.
argmax_spec.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : f (argmax f) = Function.max fargmax_spec.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : f (argmax f) = Function.max f
Code
lemma argmax_spec : f (argmax f) = f.max
Body uses (1)
Used by (1)
Actions: Source · Open Issue
Proof
(exists_argmax f).choose_spec
Dependency graph
Type dependencies (2)
argmax🔗
argmaxThe index of the maximum value of a tuple.
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
noncomputable def argmax := (exists_argmax f).choose
Body uses (2)
Used by (17)
Actions: Source · Open Issue
max🔗
Function.maxThe maximum value of a tuple.
Function.max.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : αFunction.max.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : α
Code
abbrev max : α := univ.sup' univ_nonempty f
Used by (8)
Actions: Source · Open Issue
All dependencies, transitively (1)
exists_argmax🔗
exists_argmaxNo docstring.
exists_argmax.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : ∃ i, f i = Function.max fexists_argmax.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι → α) : ∃ i, f i = Function.max f
Code
lemma exists_argmax : ∃ i, f i = f.max
Type uses (1)
Used by (3)
Actions: Source · Open Issue
Proof
by obtain ⟨i, -, hi⟩ := Finset.exists_mem_eq_sup' (by simp : Finset.univ.Nonempty) f exact ⟨i, hi.symm⟩