Mathlib theorem · Existing formal mathematics

Existing in Mathlib · Analysis

Taylor's Theorem with Lagrange Remainder

For x₀ < x, if f has the selected finite-order continuity and differentiability properties on the closed interval and its interior, then the error of its degree-n Taylor polynomial at x equals the standard Lagrange remainder evaluated at some interior point x'.

Exact theorem

Exact Mathlib statement

theorem taylor_mean_remainder_lagrange {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x) (hf : ContDiffOn ℝ n f (Icc x₀ x)) (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) : ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x = iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x₀) ^ (n + 1) / (n + 1)!

The theorem at a glance

Taylor's theorem with Lagrange remainder at a glance

A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.

Under the selected closed-interval continuity and open-interval differentiability hypotheses, some interior point realizes the exact Lagrange remainder of the finite Taylor polynomial. Explanatory diagram.
Detailed visual description

The poster states f : ℝ → ℝ, n : ℕ, x₀ < x, ContDiffOn ℝ n f on Icc x₀ x, and differentiability of iteratedDerivWithin n f on Ioo x₀ x. It then gives an interior x' and the exact equality between f x minus taylorWithinEval and iteratedDerivWithin (n + 1) at x', scaled by (x - x₀)^(n + 1)/(n + 1)!. Its route summary introduces g(t) = (x - t)^(n + 1), notes the nonzero interior derivative, applies the general mean-remainder theorem, and simplifies the factorial expression.

Statement structure

Statement and scope

Statement map for Taylor's Theorem with Lagrange RemainderThe error of a finite Taylor polynomial at x is an (n + 1)-st within-derivative at some interior point, multiplied by the standard power-and-factorial factor. Claim boundary: This page indexes Mathlib's selected Lagrange-remainder declaration for a real-valued function on ordered endpoints x₀ < x. Its exact assumptions are ContDiffOn ℝ n f (Icc x₀ x) together with DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x). It concludes that some x' strictly inside Ioo x₀ x realizes the exact finite Taylor remainder through iteratedDerivWithin (n + 1) on the same closed interval. It does not use the nearby corollary's single ContDiffOn ℝ (n + 1) hypothesis, assert uniqueness of x', handle reversed or equal endpoints, or state an analytic-series or convergence theorem. The pinned upstream declaration is taylor_mean_remainder_lagrange. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingThe error of a finiteTaylor polynomial at xis an (n + 1)-stwithin-derivative atsome interior point,multiplied by thestandardpower-and-factorialfactor.Claim boundaryThis page indexesMathlib's selectedLagrange-remainderdeclaration for areal-valued function onordered endpoints x₀ <x. Its exact assumptionsare ContDiffOn ℝ n f(Icc x₀ x) together withDifferentiableOn ℝ(iteratedDerivWithin n f(Icc x₀ x)) (Ioo x₀ x).It concludes that somex' strictly inside Ioox₀ x realizes the exactfinite Taylor remainderthroughiteratedDerivWithin (n +1) on the same closedinterval. It does notuse the nearbycorollary's singleContDiffOn ℝ (n + 1)hypothesis, assertuniqueness of x', handlereversed or equalendpoints, or state ananalytic-series orconvergence theorem.Pinned declarationmathlib ·taylor_mean_remainder_lagrangeStatement map for Taylor's Theorem with Lagrange RemainderThe error of a finite Taylor polynomial at x is an (n + 1)-st within-derivative at some interior point, multiplied by the standard power-and-factorial factor. Claim boundary: This page indexes Mathlib's selected Lagrange-remainder declaration for a real-valued function on ordered endpoints x₀ < x. Its exact assumptions are ContDiffOn ℝ n f (Icc x₀ x) together with DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x). It concludes that some x' strictly inside Ioo x₀ x realizes the exact finite Taylor remainder through iteratedDerivWithin (n + 1) on the same closed interval. It does not use the nearby corollary's single ContDiffOn ℝ (n + 1) hypothesis, assert uniqueness of x', handle reversed or equal endpoints, or state an analytic-series or convergence theorem. The pinned upstream declaration is taylor_mean_remainder_lagrange. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingThe error of a finiteTaylor polynomial at xis an (n + 1)-stwithin-derivative atsome interior point,multiplied by thestandardpower-and-factorialfactor.Claim boundaryThis page indexesMathlib's selectedLagrange-remainderdeclaration for areal-valued function onordered endpoints x₀ <x. Its exact assumptionsare ContDiffOn ℝ n f(Icc x₀ x) together withDifferentiableOn ℝ(iteratedDerivWithin n f(Icc x₀ x)) (Ioo x₀ x).It concludes that somex' strictly inside Ioox₀ x realizes the exactfinite Taylor remainderthroughiteratedDerivWithin (n +1) on the same closedinterval. It does notuse the nearbycorollary's singleContDiffOn ℝ (n + 1)hypothesis, assertuniqueness of x', handlereversed or equalendpoints, or state ananalytic-series orconvergence theorem.Pinned declarationmathlib ·taylor_mean_remainder_lagrange

Read the exact Mathlib declaration

This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.

A finite Taylor jet leaves a remainder at the right endpoint that the theorem realizes through a derivative at some strictly interior witness. Explanatory scientific diagram.
Detailed visual description

A charcoal function curve and dashed cobalt finite-jet curve meet at the left and separate at the right, where a vertical dashed gap marks the remainder. A lower interval has solid endpoints, several hollow interior candidates, and one selected emerald witness. A bounded gold derivative fan and a gold guide meet exactly at that interior point.

Why it matters

A mathematical landmark

Taylor's theorem is a central bridge between local derivative data and finite polynomial approximation. Mathlib's selected declaration is especially instructive because its exact interval hypotheses and within-derivative formulation expose the finite mean-value mechanism while keeping the interior witness and the boundary of the result explicit.

ProofAtlas record

What has been checked

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed pageCurrent public presentation reviewed
Accepted Atlas resultNot recorded for the preferred artifact

Mathlib is the source of the theorem; the local Lean replay and page review are separate.

Claim boundary

No new theorem is claimed

This page indexes Mathlib's selected Lagrange-remainder declaration for a real-valued function on ordered endpoints x₀ < x. Its exact assumptions are ContDiffOn ℝ n f (Icc x₀ x) together with DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x). It concludes that some x' strictly inside Ioo x₀ x realizes the exact finite Taylor remainder through iteratedDerivWithin (n + 1) on the same closed interval. It does not use the nearby corollary's single ContDiffOn ℝ (n + 1) hypothesis, assert uniqueness of x', handle reversed or equal endpoints, or state an analytic-series or convergence theorem.

Source and local evidence

Where the theorem comes from

Existing declaration
taylor_mean_remainder_lagrange in mathlib
Relationship
The checked artifact is the upstream declaration itself
Local Lean evidence
artifact.library.mathlib.taylor-theorem.v001
Source
Open the pinned upstream reference