Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.15 — Taylor's theorem

Disproved
Rudin.ch05_taylor

by LG · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysiscalculus

Let fff be a real function on [a,b][a,b][a,b], nnn a positive integer, f(n−1)f^{(n-1)}f(n−1) continuous on [a,b][a,b][a,b], and f(n)(t)f^{(n)}(t)f(n)(t) existing for every t∈(a,b)t \in (a,b)t∈(a,b). Let α≠β\alpha \ne \betaα=β be points of [a,b][a,b][a,b] and let PPP be the Taylor polynomial of fff at α\alphaα of degree n−1n-1n−1. Then there is a point xxx strictly between α\alphaα and β\betaβ with

f(β)=P(β)+f(n)(x)n!(β−α)n.f(\beta) = P(\beta) + \frac{f^{(n)}(x)}{n!}(\beta - \alpha)^n .f(β)=P(β)+n!f(n)(x)​(β−α)n.

For n=1n = 1n=1 this is the mean value theorem.

Preamble
import Mathlib

open Filter Topology
Formal statement
namespace Rudin

/-- Rudin, Theorem 5.15 (Taylor's theorem): suppose `f` is a real function on `[a, b]`, `n` is
a positive integer, `f^(n-1)` is continuous on `[a, b]` and `f^(n)(t)` exists for every
`t ∈ (a, b)`.  Let `α` and `β` be distinct points of `[a, b]` and let `P` be the Taylor
polynomial of degree `n - 1` of `f` at `α`.  Then there is a point `x` strictly between `α`
and `β` with `f β = P β + f^(n)(x) (β - α)^n / n!`. -/
theorem ch05_taylor (a b : ℝ) (hab : a < b) (f : ℝ → ℝ) (n : ℕ) (hn : 0 < n)
    (hcont : ContinuousOn (iteratedDeriv (n - 1) f) (Set.Icc a b))
    (hderiv : ∀ t ∈ Set.Ioo a b, DifferentiableAt ℝ (iteratedDeriv (n - 1) f) t)
    (α β : ℝ) (hα : α ∈ Set.Icc a b) (hβ : β ∈ Set.Icc a b) (hne : α ≠ β) :
    ∃ x : ℝ, ((α < x ∧ x < β) ∨ (β < x ∧ x < α)) ∧
      f β = (∑ k ∈ Finset.range n, iteratedDeriv k f α / (k.factorial : ℝ) * (β - α) ^ k)
        + iteratedDeriv n f x / (n.factorial : ℝ) * (β - α) ^ n := by sorry

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 5, pp. 110-111, Definition 5.14 and Theorem 5.15
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

Let a<ba < ba<b be reals, f:R→Rf : \mathbb{R} \to \mathbb{R}f:R→R, and nnn a natural number with n≥1n \ge 1n≥1. Write f(m)f^{(m)}f(m) for the mmm-th iterated derivative of fff as a total function on R\mathbb{R}R (each application of the derivative operator returns 000 at points where the previous iterate is not differentiable). Assume:

  • f(n−1)f^{(n-1)}f(n−1) is continuous on the closed interval [a,b][a,b][a,b];
  • f(n−1)f^{(n-1)}f(n−1) is differentiable at every point of the open interval (a,b)(a,b)(a,b);
  • α,β∈[a,b]\alpha, \beta \in [a,b]α,β∈[a,b] with α≠β\alpha \neq \betaα=β (their order is not specified).

Then there exists a real number xxx lying strictly between α\alphaα and β\betaβ — either α<x<β\alpha < x < \betaα<x<β or β<x<α\beta < x < \alphaβ<x<α — such that

f(β)  =  ∑k=0n−1f(k)(α)k! (β−α)k  +  f(n)(x)n! (β−α)n.f(\beta) \;=\; \sum_{k=0}^{n-1} \frac{f^{(k)}(\alpha)}{k!}\,(\beta-\alpha)^{k} \;+\; \frac{f^{(n)}(x)}{n!}\,(\beta-\alpha)^{n}.f(β)=k=0∑n−1​k!f(k)(α)​(β−α)k+n!f(n)(x)​(β−α)n.

The sum runs over k=0,1,…,n−1k = 0, 1, \dots, n-1k=0,1,…,n−1 (so the k=0k=0k=0 term is f(α)f(\alpha)f(α), using f(0)=ff^{(0)} = ff(0)=f and 0!=10! = 10!=1), and the remainder involves f(n)f^{(n)}f(n) evaluated at the single point xxx. Differentiability of the intermediate iterates f(m)f^{(m)}f(m) for m<n−1m < n-1m<n−1 is not assumed explicitly; only the two hypotheses above are imposed, together with the meaning of the iterated-derivative operator as a total function.

Human review
  • Flagged by Shuze Chen · Sep 13, 2026

    Disprovable for n ≥ 2: the hypotheses only constrain iteratedDeriv (n-1) f, and Mathlib's deriv is 0 wherever a function is not differentiable. Take n = 2 and f the indicator function of the rationals: deriv f = 0 is continuous and differentiable, iteratedDeriv 2 f = 0, and the conclusion becomes f β = f α for all α ≠ β in [a,b], which fails for α rational and β irrational. Please add that the lower derivatives are genuine, e.g. ∀ k < n - 1, ∀ t ∈ Set.Icc a b, DifferentiableAt ℝ (iteratedDeriv k f) t.

  • Endorsed by Community (Bot) · Sep 14, 2026

  • Endorsed by LG · Sep 14, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me