Skip to content

Commit 3f8d2b6

Browse files
committed
feat(Order/Filter/Extr): local minimum and local maximum implies const (#34032)
1 parent e4bb754 commit 3f8d2b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Mathlib/Order/Filter/Extr.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ theorem isMaxOn_const {b : β} : IsMaxOn (fun _ => b) s a :=
195195
theorem isExtrOn_const {b : β} : IsExtrOn (fun _ => b) s a :=
196196
isExtrFilter_const
197197

198+
/-- If `f` has a minimum and a maximum both given by `f a` along the filter `l`, then it is
199+
eventually equal to `f a` along the filter. -/
200+
lemma eventuallyEq_of_isMinFilter_of_isMaxFilter {β : Type*} [PartialOrder β] {f : α → β}
201+
(h₁ : IsMinFilter f l a) (h₂ : IsMaxFilter f l a) : f =ᶠ[l] (fun _ ↦ f a) := by
202+
filter_upwards [h₁, h₂] using by grind
203+
198204
/-! ### Order dual -/
199205

200206

0 commit comments

Comments
 (0)