The Stone–Weierstrass theorem for functions vanishing at infinity

Written by Claude Opus 5.5 (Anthropic), September 2026, revised October 2026. The September text was spot-checked by Claude Opus 5.5 in a separate session. The October revisions correct two points found by an AI reviewer in a separate OpenAI Codex session and add proofs of the background facts that the core courses leave as exercises; they are self-checked by the writing AI. Public domain (CC0).

Bounded prerequisite selection (October 2026). This companion selects original lines 1–172, preserving the header, conventions, one-point compactification, compact Hausdorff normality, local shrinking and Urysohn cutoff constructions with their complete proofs. The retained original introduction and bibliography also credit the unselected later Stone–Weierstrass argument. Its Theorem 10.1 is an optional second density proof linked to the full online source; the selected Haar source gives its own direct density proof. No later theorem is needed for the cutoff chain used here. The selected source prose and mathematics are unchanged apart from link destinations and line-ending normalization. Selection and link repair: GPT-6.1 Sol (OpenAI), Ultra reasoning effort, for the AN-01 course project.

This lesson proves the Stone–Weierstrass theorem for continuous functions that vanish at infinity. Let be a locally compact Hausdorff space, and let be a subalgebra of that is closed under complex conjugation, separates the points of , and has no common zero. Then every function in is a uniform limit of functions in (Theorem 10.1). The algebra need not contain the constant functions, and need not be compact, -compact or metrizable. Commutative C*-algebras and harmonic analysis on locally compact groups need the theorem in this form.

The proof follows the classical route. A recursion for polynomials without constant term approximates (Section 6). With interpolation at two points (Section 7) and Stone's lattice lemma (Section 8), it gives the real theorem on compact spaces (Section 9). The one-point compactification (Section 3) carries the result over to , and real and imaginary parts give the complex theorem (Section 10). Sections 11–13 give worked examples, show that each hypothesis is needed, and describe the closure of an arbitrary self-adjoint subalgebra. Sections 2–5 develop the function spaces and the topology that surround the proof: the one-point compactification, locally compact spaces, Urysohn's lemma and metrizability. Sections 14–18 add classical companions: the Weierstrass theorem with Bernstein's constructive proof, Korovkin's theorem, further density theorems, the Tietze extension theorem, the disc algebra, and approximation by polynomials with integer coefficients.

The lesson assumes the core courses Real Analysis I, Real Analysis II and Point-Set Topology: open and closed sets, continuity, compactness defined by open covers, metric spaces and uniform convergence. A few facts about numbers, the Riemann integral and the exponential function are taken from the core courses; they are listed near the end, under "Results used from other lessons", with the place of each proof. No other lesson is needed.

Weierstrass proved in 1885 that every continuous function on a closed bounded interval is a uniform limit of polynomials [Weierstrass 1885]. Stone proved the general theorem in 1937 [Stone 1937] and gave a simpler proof, by lattices of functions, in 1948. The one-point compactification is due to Alexandroff [Alexandroff 1924]. The core course Real Analysis II proves the Weierstrass theorem and the real and complex Stone–Weierstrass theorems for compact metric spaces (Lebl, Section 11.7). Free texts that treat the theorems are [van Neerven] and [Blackadar].

1. Conventions

Spaces. A neighbourhood of a point is a set that contains an open set containing the point. Compact means that every open cover has a finite subcover; the Hausdorff property is not part of the word. A space is locally compact Hausdorff (LCH) if it is Hausdorff and every point has a compact neighbourhood. Five elementary facts are used throughout.

Functions. Functions are complex-valued unless they are called real. For a bounded function on a set , put , and for . On a space , and are the continuous complex and real functions, and the bounded continuous ones. The support of is the closure of , and consists of the continuous functions with compact support. consists of the continuous with Equivalently, for every there is a compact set with off . Indeed, if there is such a , then the closed set lies in and is compact by (K1); conversely, will do. Real versions carry the suffix , as in .

Algebras. On a set , an algebra of functions is a complex linear space of functions that is closed under pointwise products. A real algebra is the same with real functions and real scalars. No unit is assumed. An algebra is self-adjoint if implies . It separates points if for some has . It vanishes nowhere if for every some has . Its common zero set is so vanishes nowhere exactly when . is the closure of for . For real functions, and , pointwise.

2. Spaces of bounded and continuous functions

Proposition 2.1. Let be a set and a topological space.

  1. (Completeness) The bounded functions on form a Banach space under . The bounded continuous functions on and the bounded Borel functions on form closed subspaces of it. If is compact, then .
  2. (Closures of algebras) The closure of an algebra (or real algebra) of bounded functions is again one. The closure of a self-adjoint algebra is self-adjoint.
  3. (Vanishing at infinity) . is a closed self-adjoint subalgebra of , hence a Banach space. is a self-adjoint subalgebra of , and it is dense in .

Proof. (1) Let be a Cauchy sequence. For each , is Cauchy in ; let be its limit. Given , choose with for . Letting gives for all and all . So is bounded and . Suppose the are continuous. Fix , fix , and take an open on which . On , , so is continuous. Suppose the are Borel. Then is a Borel set, and so is the analogous set for ; so is Borel. The last claim is (K5) applied to .

(2) Let and with in the algebra. Then is bounded, and . Sums, scalar multiples, complex conjugates and real values pass to uniform limits in the same way.

(3) If , then is a closed subset of the compact support, hence compact by (K1). If , then off the compact set , and is bounded on that set by (K5); so is bounded. For , and a scalar , The sets on the left are closed. The sets on the right are compact, since a finite union of compact sets is compact (K2). So the sets on the left are compact by (K1), and . Clearly . If and , then . So is closed in , and complete by (1). The supports of , , and are closed subsets of , so is a self-adjoint subalgebra. For density, let and . Define by for and for . It is continuous, and . So is continuous and within of . It is nonzero only on , whose closure lies in the compact set . So .

3. The one-point compactification

Definition 3.1 (One-point compactification). Let be a topological space and a point not in . Put . Let consist of the open subsets of together with the sets , where is closed and compact.

If is Hausdorff, its compact subsets are closed by (K3), so the word "closed" can then be omitted. For a general space , it makes parts (1) and (2) below true.

Proposition 3.2.

  1. is a topology on . is open in , and the subspace topology on is its original topology.
  2. is compact.
  3. If is locally compact Hausdorff, then is Hausdorff.
  4. is an isolated point of exactly when is compact. So is dense in exactly when is not compact.
  5. (Uniqueness) Let be compact Hausdorff, , and a homeomorphism of onto . Extending by gives a homeomorphism of onto .

Proof. (1) is open in , and . For open and closed compact , the set is open in , and with closed and compact. Consider a union of sets open in and sets , with at least one . It equals , where . is closed and lies in one , so it is compact by (K1). A union of open subsets of is open in . The traces on of the members of are the sets and , all open in ; so the subspace topology is the original one. Finally .

(2) Let be an open cover of . Some contains , so with compact. The traces , , are open in and cover , so finitely many of them do. Those members and cover .

(3) Two points of are separated by open subsets of , which are open in . Let , with a compact neighbourhood and an open such that . is closed by (K3), so is an open neighbourhood of disjoint from .

(4) If is compact, then is open. If is open, it is with , so is compact. is dense exactly when every open neighbourhood of meets , that is, when is not open.

(5) Call the extension ; it is a bijection. Let be open. If , then is open in . If , then is compact by (K1) and lies in . So is compact by (K2), and closed in , since its complement is . Then is open. So is continuous, and by (K4) its inverse is continuous too.

Examples 3.3. (a) Let . The Cayley map is a homeomorphism of onto . Indeed for real , , and the inverse is , which is real on because there. is compact by Lemma 4.1(b) below, so (5) gives with . In the same way, is a homeomorphism of onto the unit sphere with the point removed; its inverse is . So .

(b) If is compact Hausdorff and , then (5), applied to the identity map of , identifies with .

(c) is homeomorphic to , with . is compact, because an open set containing contains all but finitely many of the points .

(d) If is compact, is together with an isolated point, by (4). Then is not dense in , so is not a compactification of in the usual sense, which asks for to be dense.

The functions in are the continuous functions on that vanish at , as the next proposition shows. For a function on , let be the function on that equals on and at . Put

Proposition 3.4. Let be any topological space.

  1. if and only if is continuous on .
  2. The map is a bijection of onto that preserves sums, scalar multiples, products, complex conjugation and the norm . Its inverse is restriction to . It maps onto the real functions in .
  3. Every has the unique form with . So is with a unit adjoined.

Proof. (1) Let . is continuous at points of , because is open in and carries its own topology there (Proposition 3.2(1)). At : given , the set is compact, and closed because is continuous. So is an open neighbourhood of on which . Conversely, let be continuous. Then is continuous, and for the set is closed in the compact space . It is compact by (K1), and it lies in . Since carries the subspace topology, it is compact in .

(2) The operations are pointwise, and at is preserved by all of them. . Restriction inverts the map by (1).

(3) Put . If also with , evaluating at gives , so the form is unique.

Part (3) says that adjoining a unit to yields .

4. Compact and locally compact spaces

Lemma 4.1 (Compactness tools).

Proof. (a) Let be an open cover, and let be the set of such that finitely many members cover . Then . Let , and let contain , so that for some . Some exceeds . Adding to a finite cover of covers . If , this contradicts . So , and .

(b) For each choose open sets and with . Finitely many cover ; put . Now let and be compact and an open cover of . Let be the family of open such that finitely many members of cover . Each lies in a member of : the compact set is covered by finitely many members, and the tube lemma applies to their union. Finitely many members of cover . Induction handles finite products. A closed bounded subset of lies in a box , which is compact by (a) and the product statement, so it is compact by (K1).

(c) Let with closed. is compact by (K1), and (K3) separates from . Let be disjoint and closed. For each , (K3) gives disjoint open sets and . Finitely many cover the compact set ; take their union and the intersection of the corresponding . For the last form, separate and by disjoint open sets and ; then .

(d) Let be a sequence in a compact metric space with no convergent subsequence. Then each has a ball containing for only finitely many ; otherwise indices with could be chosen. Finitely many such balls cover , which is absurd. A Cauchy sequence with a convergent subsequence converges, so is complete. For each , finitely many balls of radius cover . Their centres, over all , form a countable dense set , and the balls , , , form a countable base: if , some has , and then . Conversely, let every sequence in a metric space have a convergent subsequence, and let be an open cover. Some has the property that every ball lies in a member of . Otherwise there are balls lying in no member; a subsequence of the centres converges to some in a member with , and then for large in the subsequence. Also finitely many balls cover . Otherwise points with mutual distances at least can be chosen one after another, and they form a sequence with no convergent subsequence. So finitely many members of cover . Finally, let be a continuous map from a compact metric space to a metric space, and . By the first part, every sequence in has a convergent subsequence. So the argument above gives, for the open cover by the sets , , a such that every ball lies in one of them. If , then and lie in one such set, so .

Proposition 4.2 (Locally compact spaces).

  1. (Examples.) The following are locally compact Hausdorff: compact Hausdorff spaces, , discrete spaces, closed subspaces of LCH spaces, open subspaces of compact Hausdorff spaces, and open subspaces of LCH spaces. The spaces , (a countable product of discrete copies of ) and (product topology) are Hausdorff, but no point in them has a compact neighbourhood.
  2. (Compact closures.) Let be LCH, compact and a neighbourhood of . Then some open has compact closure contained in .
  3. (Exhaustion.) If is LCH and -compact, that is, a countable union of compact sets, then there are open sets with compact, and . Every compact subset of lies in some .
  4. (Countability at infinity.) For LCH , the following are equivalent: (i) has a countable neighbourhood base in ; (ii) is a countable intersection of open subsets of ; (iii) is -compact; (iv) is Lindelöf, that is, every open cover has a countable subcover.
  5. (Variants of local compactness.) For a topological space consider: (i) every point has a compact neighbourhood; (ii) every neighbourhood of a point contains a compact neighbourhood of that point; (iii) every point has an open neighbourhood with compact closure; (iii every open neighbourhood of a point contains an open with compact closure; (iv) every open neighbourhood of contains an open with compact and . Then (iv) implies (ii) and (iii); (ii) implies (i); and (iii) and (iii are equivalent and imply (i). In a Hausdorff space all five are equivalent.

Proof. (1) A compact Hausdorff space is a compact neighbourhood of each of its points. In closed balls are compact by Lemma 4.1(b). In a discrete space, is a compact neighbourhood of . If is closed and is a compact neighbourhood of in , then is a compact neighbourhood of in , by (K1). If is open in a compact Hausdorff space and , Lemma 4.1(c) gives an open with , and is compact by (K1). An open subspace of an LCH space is open in , which is compact Hausdorff by Proposition 3.2(2)–(3); so the previous case applies. Subspaces and products of Hausdorff spaces are Hausdorff.

For : suppose is a compact neighbourhood of . It contains for some , so it contains , which is closed and hence compact by (K1). Pick an irrational . The open sets , , cover with no finite subcover. For and : a neighbourhood of a point contains a basic open set that leaves the coordinates beyond some index free. The projection onto coordinate is continuous, so it maps a compact neighbourhood onto a compact set (K2). Compact subsets of are finite and compact subsets of are bounded, but the image of the basic open set is all of or .

(2) First let . The interior of in is open in , so is closed, and . is compact Hausdorff (Proposition 3.2(2)–(3)), so by Lemma 4.1(c) there is an open whose closure in misses , that is, lies in . Put . Its closure in is compact by (K1) and lies in . So it is also the closure of in , and it is compact in and contained in . For general compact , take such a for each , a finite subcover of , and . Then is compact and lies in .

(3) Let with each compact. By (2), choose an open with compact closure, and inductively an open with compact closure that contains the compact set . Then and . A compact set is covered by the increasing open sets , so it lies in one of them.

(4) (i) (ii): let form a neighbourhood base at . Their interiors are open, contain , and again form a neighbourhood base. The intersection of the interiors is , because is Hausdorff (Proposition 3.2(3)). (ii) (iii): each open has the form with compact, and . (iii) (i): with from (3), the sets form a neighbourhood base at , because a neighbourhood of contains as soon as . (iii) (iv): each is covered by finitely many members of an open cover. (iv) (iii): by (2) the open sets with compact closure cover ; a countable subcover gives .

(5) (iv) (iii), (iii (iii) and (ii) (i): take . (iii) (iii: if is open with compact closure and is open, then has closure inside , which is compact by (K1). (iii) (i): is a compact neighbourhood. (iv) (ii): is a compact neighbourhood of inside , and every neighbourhood of contains an open one. In a Hausdorff space, (i) says that the space is LCH, and then (2) gives (iv).

Without the Hausdorff property the conditions in (5) need not agree. For example, is compact by Proposition 3.2(2), so (i) holds at each of its points. But (ii) fails at every rational point . Indeed, is an open neighbourhood of in that carries its own topology there (Proposition 3.2(1)), so a compact neighbourhood of inside would be a compact neighbourhood of in , and by (1) there is none. The open database [π-Base] collects many more examples of this kind, with the properties of each space (spaces without compact neighbourhoods).

5. Urysohn's lemma and metrizability

Theorem 5.1 (Urysohn's lemma). Let be a space in which any two disjoint closed sets have disjoint open neighbourhoods, and let be disjoint closed sets. Then there is a continuous with on and on . By Lemma 4.1(c), this applies to every compact Hausdorff space.

Reference: [Urysohn 1925].

Proof. By the argument at the end of the proof of Lemma 4.1(c), which uses only the separation of disjoint closed sets, every closed set inside an open set has an open with . Let be the set of dyadic rationals in . We build open sets , , with Put , and choose open with . Suppose has been built for all , , with (5.1). For , its neighbours and satisfy ; choose an open with . For at level , (5.1) follows by passing through the neighbours of and at level . Now define , with . Then , on , and on , since misses for every . For and , with . For the first: if , some has , and conversely gives . For the second: if , pick with ; then . Conversely, if , then for every , so . For other values of and the sets and are or . So all these sets are open, and is continuous.

Corollary 5.2 (Urysohn's lemma, locally compact form). Let be LCH, compact and closed with . Then some with equals on and on . In particular, is completely regular (take ), and , hence , separates points and vanishes nowhere. Theorem 10.1 then gives a second proof that is dense in .

Proof. By Proposition 4.2(2) with , choose an open whose closure is compact and lies in . is compact Hausdorff, so Urysohn's lemma gives a continuous with on and on . Put on and on ; so on . For closed , is if , and if . Both are closed in , since is closed in . So is continuous, its support lies in , and on .

Original source bibliography, retained

References

Source and rights

The selected original programme exposition is dedicated under CC0 1.0. Historical authorship and checking statements remain exactly as supplied in the source header. External references retain their own rights; their text is not reproduced here. The CC0 legal text and component provenance accompany this selection. The full transparent source remains available at its original source location.