The first derivative test
ProvedFamousTheorems.first_derivative_testThe first derivative test. Let be continuous at . Suppose that on a punctured neighbourhood of , for and for . Then has a local maximum at .
This is the standard calculus criterion for local extrema that uses only the first derivative. It needs no differentiability at itself, only continuity, so it also covers corner points such as the maximum of at .
Formalization note. Mathlib's isLocalMax_of_sign_deriv. The sign condition is written as eventually in the punctured neighbourhood filter nhdsWithin x₀ {x₀}ᶜ. Since Mathlib's deriv is at non-differentiable points, the condition forces to be differentiable there.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem first_derivative_test {f : ℝ → ℝ} {x₀ : ℝ} (hc : ContinuousAt f x₀)
(hs : ∀ᶠ x in nhdsWithin x₀ {x₀}ᶜ, SignType.sign (deriv f x) = SignType.sign (x₀ - x)) :
IsLocalMax f x₀ := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `isLocalMax_of_sign_deriv`. Proof here reduces to that Mathlib result.