Mathlib theorem · Existing formal mathematics

Existing in Mathlib · Calculus and analysis

Mean Value Theorem

If a real-valued function is continuous on a closed interval and differentiable between its endpoints, then at some strictly interior point its instantaneous rate of change equals its average rate of change across the interval.

Exact theorem

Exact Mathlib statement

theorem exists_deriv_eq_slope (f : ℝ → ℝ) {a b : ℝ} (hab : a < b) (hfc : ContinuousOn f (Set.Icc a b)) (hfd : DifferentiableOn ℝ f (Set.Ioo a b)) : ∃ c ∈ Set.Ioo a b, deriv f c = (f b - f a) / (b - a)

The theorem at a glance

Mean Value Theorem at a glance

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

Continuity and differentiability force an interior derivative to equal the endpoint secant slope. Explanatory diagram.
Detailed visual description

The poster presents the closed-interval and open-interval hypotheses, the exact real-valued slope equality, the Cauchy mean-value route used by the selected source, and the theorem's nonclaims.

Statement structure

Statement and scope

Statement map for Mean Value TheoremSome interior tangent to a differentiable real curve is parallel to the secant joining the interval endpoints. Claim boundary: This page indexes the real one-variable Lagrange mean-value theorem: continuity on [a,b] and differentiability on (a,b) produce an interior point whose derivative equals the secant slope. It does not claim a vector-valued equality or a new proof. The pinned upstream declaration is exists_deriv_eq_slope. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingSome interior tangent toa differentiable realcurve is parallel to thesecant joining theinterval endpoints.Claim boundaryThis page indexes thereal one-variableLagrange mean-valuetheorem: continuity on[a,b] anddifferentiability on(a,b) produce aninterior point whosederivative equals thesecant slope. It doesnot claim avector-valued equalityor a new proof.Pinned declarationmathlib ·exists_deriv_eq_slopeStatement map for Mean Value TheoremSome interior tangent to a differentiable real curve is parallel to the secant joining the interval endpoints. Claim boundary: This page indexes the real one-variable Lagrange mean-value theorem: continuity on [a,b] and differentiability on (a,b) produce an interior point whose derivative equals the secant slope. It does not claim a vector-valued equality or a new proof. The pinned upstream declaration is exists_deriv_eq_slope. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingSome interior tangent toa differentiable realcurve is parallel to thesecant joining theinterval endpoints.Claim boundaryThis page indexes thereal one-variableLagrange mean-valuetheorem: continuity on[a,b] anddifferentiability on(a,b) produce aninterior point whosederivative equals thesecant slope. It doesnot claim avector-valued equalityor a new proof.Pinned declarationmathlib ·exists_deriv_eq_slope

Read the exact Mathlib declaration

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

An interior tangent matches the secant between the two endpoint values. Explanatory scientific diagram.
Detailed visual description

A low-text engraved curve schematic isolates the theorem's two endpoints, one strictly interior witness, and the matching directions of the endpoint secant and witness tangent.

Why it matters

A mathematical landmark

The Mean Value Theorem turns local derivative information into a statement about finite change. It underlies fundamental estimates, monotonicity arguments, and much of one-variable calculus.

Proof architecture

How an interior derivative reaches the endpoint slope

3 curated stages

Mathlib reaches the real one-variable Mean Value Theorem through Cauchy's auxiliary construction: equalize endpoint values, invoke Rolle for an interior zero derivative, specialize the second function to the identity, and divide by the nonzero interval length.

These source-anchored stages explain the retained Mathlib proof route. They are generated explanations, not proof evidence or an extracted Lean proof-term dependency graph.

  1. Cauchy's auxiliary folds the endpoint differences together

    Cauchy's auxiliary built from general functions f and g has equal values at the two endpoints, preparing a Rolle witness.

    h x = (g b - g a) * f x - (f b - f a) * g x and h a = h b

    Mathlib proves Cauchy's mean value theorem by defining h x = (g b - g a) * f x - (f b - f a) * g x. Direct algebra gives h a = h b. For Lagrange's theorem the second function will be the identity, but the equal-endpoint construction is established first.

  2. Rolle's witness gives the identity-specialized slope relation

    Rolle's horizontal auxiliary tangent yields the cross-multiplied relation; for the identity specialization, the tangent to f at the interior witness is parallel to the endpoint secant.

    (b - a) * f' c = (f b - f a) * 1 for some c in (a,b)

    The upper auxiliary h begins and ends at equal height and is smooth at the strictly interior point c, where its gold tangent is horizontal. The lower green graph for f is one smooth cubic-spline curve through its two endpoint markers and c. Its solid gold tangent at c has exactly the same direction as the dashed secant from a to b, matching the displayed specialization (b - a) f'(c) = (f(b) - f(a)) · 1. The schematic does not choose a unique witness, allow an endpoint witness, or claim differentiability at the endpoints.

  3. The interior derivative matches the endpoint secant

    Division by the nonzero interval length and the derivative bridge turn the cross-multiplied witness into the exact selected equality.

    ∃ c ∈ (a,b), deriv f c = (f b - f a) / (b - a)

    Since a<b, the interval length is nonzero, so the source rearranges the cross-multiplied equation into the secant-slope formula. exists_deriv_eq_slope then converts differentiability at the interior point to HasDerivAt with deriv f, yielding an interior c whose derivative equals the endpoint slope.

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 the real one-variable Lagrange mean-value theorem: continuity on [a,b] and differentiability on (a,b) produce an interior point whose derivative equals the secant slope. It does not claim a vector-valued equality or a new proof.

Source and local evidence

Where the theorem comes from

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