# mathlibdocumentation

topology.continuous_function.stone_weierstrass

# The Stone-Weierstrass theorem #

If a subalgebra A of C(X, ℝ), where X is a compact topological space, separates points, then it is dense.

We argue as follows.

• In any subalgebra A of C(X, ℝ), if f ∈ A, then abs f ∈ A.topological_closure. This follows from the Weierstrass approximation theorem on [-∥f∥, ∥f∥] by approximating abs uniformly thereon by polynomials.
• This ensures that A.topological_closure is actually a sublattice: if it contains f and g, then it contains the pointwise supremum f ⊔ g and the pointwise infimum f ⊓ g.
• Any nonempty sublattice L of C(X, ℝ) which separates points is dense, by a nice argument approximating a given f above and below using separating functions. For each x y : X, we pick a function g x y ∈ L so g x y x = f x and g x y y = f y. By continuity these functions remain close to f on small patches around x and y. We use compactness to identify a certain finitely indexed infimum of finitely indexed supremums which is then close to f everywhere, obtaining the desired approximation.
• Finally we put these pieces together. L = A.topological_closure is a nonempty sublattice which separates points since A does, and so is dense (in fact equal to ⊤).

We then prove the complex version for self-adjoint subalgebras A, by separately approximating the real and imaginary parts using the real subalgebra of real-valued functions in A (which still separates points, by taking the norm-square of a separating function).

## Future work #

Extend to cover the case of subalgebras of the continuous functions vanishing at infinity, on non-compact spaces.

noncomputable def continuous_map.attach_bound {X : Type u_1} (f : C(X, )) :

Turn a function f : C(X, ℝ) into a continuous map into set.Icc (-∥f∥) (∥f∥), thereby explicitly attaching bounds.

Equations
@[simp]
theorem continuous_map.attach_bound_apply_coe {X : Type u_1} (f : C(X, )) (x : X) :

Given a continuous function f in a subalgebra of C(X, ℝ), postcomposing by a polynomial gives another function in A.

This lemma proves something slightly more subtle than this: we take f, and think of it as a function into the restricted target set.Icc (-∥f∥) ∥f∥), and then postcompose with a polynomial function on that interval. This is in fact the same situation as above, and so also gives a function in A.

theorem continuous_map.comp_attach_bound_mem_closure {X : Type u_1} (A : ) (f : A) (p : C((set.Icc (-f) f), )) :
theorem continuous_map.abs_mem_subalgebra_closure {X : Type u_1} (A : ) (f : A) :
theorem continuous_map.inf_mem_subalgebra_closure {X : Type u_1} (A : ) (f g : A) :
theorem continuous_map.inf_mem_closed_subalgebra {X : Type u_1} (A : ) (h : is_closed A) (f g : A) :
theorem continuous_map.sup_mem_subalgebra_closure {X : Type u_1} (A : ) (f g : A) :
theorem continuous_map.sup_mem_closed_subalgebra {X : Type u_1} (A : ) (h : is_closed A) (f g : A) :
theorem continuous_map.sublattice_closure_eq_top {X : Type u_1} (L : set ) (nA : L.nonempty) (inf_mem : ∀ (f : C(X, )), f L∀ (g : C(X, )), g Lf g L) (sup_mem : ∀ (f : C(X, )), f L∀ (g : C(X, )), g Lf g L) (sep : L.separates_points_strongly) :

The Stone-Weierstrass Approximation Theorem, that a subalgebra A of C(X, ℝ), where X is a compact topological space, is dense if it separates points.

An alternative statement of the Stone-Weierstrass theorem.

If A is a subalgebra of C(X, ℝ) which separates points (and X is compact), every real-valued continuous function on X is a uniform limit of elements of A.

theorem continuous_map.exists_mem_subalgebra_near_continuous_map_of_separates_points {X : Type u_1} (A : ) (w : A.separates_points) (f : C(X, )) (ε : ) (pos : 0 < ε) :
∃ (g : A), g - f < ε

An alternative statement of the Stone-Weierstrass theorem, for those who like their epsilons.

If A is a subalgebra of C(X, ℝ) which separates points (and X is compact), every real-valued continuous function on X is within any ε > 0 of some element of A.

theorem continuous_map.exists_mem_subalgebra_near_continuous_of_separates_points {X : Type u_1} (A : ) (w : A.separates_points) (f : X → ) (c : continuous f) (ε : ) (pos : 0 < ε) :
∃ (g : A), ∀ (x : X), g x - f x < ε

An alternative statement of the Stone-Weierstrass theorem, for those who like their epsilons and don't like bundled continuous functions.

If A is a subalgebra of C(X, ℝ) which separates points (and X is compact), every real-valued continuous function on X is within any ε > 0 of some element of A.

def continuous_map.conj_invariant_subalgebra {X : Type u_1} (A : ) :
Prop

A real subalgebra of C(X, ℂ) is conj_invariant, if it contains all its conjugates.

Equations
• = (A.map continuous_map.conj_invariant_subalgebra._proof_11) A)
theorem continuous_map.mem_conj_invariant_subalgebra {X : Type u_1} {A : } {f : C(X, )} (hf : f A) :
theorem subalgebra.separates_points.complex_to_real {X : Type u_1} {A : } (hA : A.separates_points)  :

If a conjugation-invariant subalgebra of C(X, ℂ) separates points, then the real subalgebra of its purely real-valued elements also separates points.

The Stone-Weierstrass approximation theorem, complex version, that a subalgebra A of C(X, ℂ), where X is a compact topological space, is dense if it is conjugation-invariant and separates points.