Conversation
Mathlib's Rolle theorems all assume finite endpoints, in both the `Icc` form and the `Ioo`-with-equal-one-sided-limits form. This adds the unbounded analogues: if a function tends to the same limit at the two ends of `Ioi a`, `Iio b`, or the whole line, it has a local extremum there, and hence a vanishing derivative. The topological lemmas are proved at the existing generality of `Mathlib/Topology/Order/Rolle.lean`. Compactness of `Icc` comes from `ConditionallyCompleteLinearOrder.toCompactIccSpace`, and the max/min case split is handled by instantiating the max-only helper at `Yᵒᵈ`, the idiom already used in `Topology/Order/Compact.lean`. The extra `[NoMaxOrder X]`, `[NoMinOrder X]` and `[Nonempty X]` assumptions are needed only so that the intervals and `atTop`/`atBot` are non-degenerate; `ℝ` satisfies all three by instance, so the six calculus corollaries in `Mathlib/Analysis/Calculus/LocalExtr/Rolle.lean` are one-liners, exactly like the existing `exists_hasDerivAt_eq_zero'`.
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to Zulip and join the Lean community. |
PR summary 96d42c99eeImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
|
Withdrawing this PR at the request of the code owner; it was submitted without their authorization. Apologies for the noise. |
Mathlib's Rolle theorems all assume finite endpoints, in both the
Iccform (exists_hasDerivAt_eq_zero) and theIoo-with-equal-one-sided-limits form (exists_hasDerivAt_eq_zero'). This adds the unbounded analogues: if a function tends to the same limit at the two ends ofIoi a, ofIio b, or of the whole line, then it has a local extremum there, and hence a vanishing derivative.Added to
Mathlib/Topology/Order/Rolle.lean:exists_isExtrOn_Ioi_of_tendsto,exists_isLocalExtr_Ioi_of_tendstoexists_isExtrOn_Iio_of_tendsto,exists_isLocalExtr_Iio_of_tendstoexists_isExtrOn_univ_of_tendsto,exists_isLocalExtr_of_tendstoand to
Mathlib/Analysis/Calculus/LocalExtr/Rolle.lean:exists_hasDerivAt_eq_zero_Ioi,exists_deriv_eq_zero_Ioiexists_hasDerivAt_eq_zero_Iio,exists_deriv_eq_zero_Iioexists_hasDerivAt_eq_zero_of_tendsto,exists_deriv_eq_zero_of_tendstoDesign notes
The topological lemmas are stated at the existing generality of
Topology/Order/Rolle.leanrather than only forℝ, which turned out to cost nothing: compactness ofIccis available fromConditionallyCompleteLinearOrder.toCompactIccSpace, the max/min case split is handled by instantiating a max-only private helper at(Y := Yᵒᵈ)— the idiomTopology/Order/Compact.leanalready uses forContinuous.exists_forall_ge'— and the endpoint cutoffs come frommem_nhdsGT_iff_exists_mem_Ioc_Ioo_subsetandeventually_atTop.The price is three extra typeclass assumptions, needed only so that the intervals and
atTop/atBotare non-degenerate and for the branch wherefis identicallyl:[NoMaxOrder X]forIoi,[NoMinOrder X]forIio,[Nonempty X]for the whole space.ℝsatisfies all three by instance, so the six calculus corollaries are one-liners in the style of the existingexists_hasDerivAt_eq_zero'.Three helpers are
private; a reviewer may prefer theIsMaxOn/IsMinOnforms exposed, which is a mechanical change.This is a prerequisite for a follow-up PR proving that the Hermite polynomials have
nsimple real roots, where the two outermost roots at each induction step are exactly the ones ordinary Rolle cannot produce.