Rolle's theorem
ProvedFamousTheorems.rolleRolle's theorem.
If is continuous on with and , then
A function that returns to its starting value must turn around somewhere. The proof is that a continuous function on a compact interval attains its extrema, and an interior extremum forces the derivative to vanish; the endpoints are excluded from the conclusion precisely because the extremum might be attained there, which is what rules out.
Rolle's theorem and the mean value theorem are equivalent — tilting the picture by subtracting the secant line turns one into the other — but Rolle's is the one that gets proved first, and almost every qualitative fact about derivatives descends from it: monotonicity criteria, uniqueness of antiderivatives up to constants, Taylor's theorem with Lagrange remainder, and the interlacing of roots of a polynomial and its derivative.
Michel Rolle proved it for polynomials in 1691, in a treatise otherwise hostile to the infinitesimal calculus he is now remembered for underwriting.
Formalization note. No differentiability hypothesis is needed: deriv is junk-valued (zero)
where is not differentiable, so the conclusion holds vacuously in that case and the statement is
strictly stronger than the textbook version. The result is Mathlib's exists_deriv_eq_zero.
import Mathlib
namespace FamousTheorems
open MeasureTheory ProbabilityTheory Filter Set
open scoped Topology ENNReal NNReal
theorem rolle {f : ℝ → ℝ} {a b : ℝ} (hab : a < b)
(hfc : ContinuousOn f (Set.Icc a b)) (hfI : f a = f b) :
∃ c ∈ Set.Ioo a b, deriv f c = 0 := by sorry
end FamousTheorems