Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 7.26 — Weierstrass approximation theorem

Proved
Rudin.ch07_weierstrass_approximation

by Lucas · Sep 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysisapproximation

If fff is a continuous complex function on [a,b][a,b][a,b], there is a sequence of polynomials PnP_nPn​ with Pn→fP_n \to fPn​→f uniformly on [a,b][a,b][a,b].

Preamble
import Mathlib
import Definitions.Def_Rudin_ch07_families

open Filter Topology
Formal statement
namespace Rudin

/-- Rudin, Theorem 7.26 (Weierstrass approximation theorem): every continuous complex function
on `[a, b]` is the uniform limit on `[a, b]` of a sequence of polynomials. -/
theorem ch07_weierstrass_approximation (a b : ℝ) (hab : a ≤ b) (f : ℝ → ℂ)
    (hf : ContinuousOn f (Set.Icc a b)) :
    ∃ P : ℕ → Polynomial ℂ,
      TendstoUniformlyOn (fun n (x : ℝ) => (P n).eval (x : ℂ)) f atTop (Set.Icc a b) := by sorry

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 7, p. 159, Theorem 7.26
Read-back

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

Let a≤ba \le ba≤b be reals and let f:R→Cf : \mathbb{R} \to \mathbb{C}f:R→C be continuous on the closed interval [a,b][a,b][a,b] (relative continuity at each of its points; no assumption elsewhere). Then there exists a sequence P0,P1,…P_0, P_1, \dotsP0​,P1​,… of polynomials with complex coefficients such that the functions

x⟼Pn(x),x∈R viewed in C,x \longmapsto P_n(x), \qquad x \in \mathbb{R} \text{ viewed in } \mathbb{C},x⟼Pn​(x),x∈R viewed in C,

converge to fff uniformly on [a,b][a,b][a,b] as n→∞n \to \inftyn→∞.

No bound on the degrees is asserted, and nothing is claimed about approximation outside [a,b][a,b][a,b]. The degenerate case a=ba = ba=b is allowed.

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

  • Endorsed by Lucas · Sep 13, 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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me