Stone–Weierstrass Theorem
Statement
Let be a compact Hausdorff space and a subalgebra (closed under addition, multiplication, and scalar multiplication) that:
- Separates points: for all , there exists with .
- Contains constants (equivalently, the topological closure of contains constants).
Then is dense in with the sup-norm: every continuous is a uniform limit of functions in .
The classical Weierstrass approximation theorem (, polynomials) is the prototypical case.
Visualization
Approximate on using Bernstein polynomials (a subalgebra containing polynomials, which separate points):
| | | | | | |---|---|---|---|---| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
The Bernstein approximations improve as grows, converging uniformly to .
sup-norm error:
n = 4: max gap ≈ 0.375 (at x = 0)
n = 8: max gap ≈ 0.273
n = 16: max gap ≈ 0.196
n → ∞: max gap → 0 (Stone–Weierstrass)
Proof Sketch
- Closure under . Using the Weierstrass approximation of by polynomials on , show for any .
- Lattice structure. From , deduce and .
- Urysohn-type construction. For any , , and : using separation, construct with and .
- Finite cover. Compactness gives a finite cover; take finite inf and sup to build with .
Connections
- Heine–Borel TheoremHeine–Borel TheoremIn ℝⁿ, a subset is compact if and only if it is closed and boundedRead more → — compactness of is essential; without it the theorem fails (e.g., , polynomials do not uniformly approximate ).
- Intermediate Value TheoremIntermediate Value TheoremA continuous function on a closed interval hits every value between its endpointsRead more → — the proof that uses IVT-style polynomial approximation (Weierstrass) on a compact interval.
- Taylor's TheoremTaylor's TheoremApproximate smooth functions by polynomials with explicit error boundsRead more → — Taylor polynomials form a subalgebra that separates points; Stone–Weierstrass explains why Taylor-based approximation is density in (when convergent).
- Cauchy–Schwarz InequalityCauchy–Schwarz InequalityThe inner product of two vectors is bounded by the product of their normsRead more → — in , the -density of polynomials follows from Stone–Weierstrass plus Cauchy–Schwarz domination.
Lean4 Proof
import Mathlib.Topology.ContinuousMap.StoneWeierstrass
/-- **Stone–Weierstrass Theorem**: a separating subalgebra is dense in C(X, ℝ).
Direct alias of `ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints`. -/
theorem stone_weierstrass {X : Type*} [TopologicalSpace X] [CompactSpace X]
(A : Subalgebra ℝ C(X, ℝ)) (hA : A.SeparatesPoints) :
A.topologicalClosure = ⊤ :=
ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints A hA