The intermediate value theorem
ProvedFamousTheorems.intermediate_value_Icccalculusmathlibreal-analysis
A continuous function attains every intermediate value.
For continuous on with , every value between and is attained:
The theorem is really about connectedness: the continuous image of a connected set is connected, and the connected subsets of are precisely the intervals. It therefore fails over — changes sign on without vanishing there — so it encodes completeness of .
Bolzano gave the first rigorous proof in 1817, as part of the programme of founding analysis on arithmetic rather than geometric intuition.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem intermediate_value_Icc : ∀ {a b : ℝ}, a ≤ b → ∀ {f : ℝ → ℝ},
ContinuousOn f (Set.Icc a b) → Set.Icc (f a) (f b) ⊆ f '' Set.Icc a b := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.