LeanMachineLearning exposition

neg_max_eq_min_neg🔗

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.

Minimal Lean file

neg_max_eq_min_neg🔗

Lemmaneg_max_eq_min_neg

No docstring.

🔗theorem
neg_max_eq_min_neg.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι α) [AddGroup α] [AddLeftMono α] [AddRightMono α] : -Function.max f = Function.min (-f)
neg_max_eq_min_neg.{u_1, u_2} {ι : Type u_1} {α : Type u_2} [LinearOrder α] [Fintype ι] [Nonempty ι] (f : ι α) [AddGroup α] [AddLeftMono α] [AddRightMono α] : -Function.max f = Function.min (-f)

Code

lemma neg_max_eq_min_neg [AddGroup α] [AddLeftMono α] [AddRightMono α] : -f.max = (-f).min
Type uses (2)
Body uses (2)

Actions: Source · Open Issue

Proof
by
  refine le_antisymm ?_ ?_
  · simp; grind
  · simp only [inf'_le_iff, mem_univ, Pi.neg_apply, neg_le_neg_iff, sup'_le_iff, forall_const,
      true_and]
    exact ⟨argmax f, isMaxOn_argmax f⟩

Dependency graph

Type dependencies (2)

max🔗

DefinitionFunction.max

The maximum value of a tuple.

🔗def
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

min🔗

DefinitionFunction.min

The minimum value of a tuple.

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

Code

def min : {ι : Type u_1} → {α : Type u_2} → [LinearOrder α] → [Fintype ι] → [Nonempty ι] → (ι → α) → α
Used by (8)

Actions: Source · Open Issue