{
  "artifactId": "artifact.library.mathlib.stone-weierstrass-theorem.v001",
  "candidateOnly": false,
  "category": "Analysis and topology",
  "claimBoundary": "This target indexes Mathlib's real compact-space subalgebra theorem: a subalgebra of continuous real-valued functions that separates points has topological closure equal to the whole function algebra. It does not state the complex version or approximation rates.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints {X : Type*} [TopologicalSpace X] [CompactSpace X] (A : Subalgebra ℝ C(X, ℝ)) (w : A.SeparatesPoints) : A.topologicalClosure = ⊤",
  "family": "Uniform approximation",
  "id": "library.mathlib.stone-weierstrass-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/stone-weierstrass-theorem/",
    "entryData": "/data/library-theorems/stone-weierstrass-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.stone-weierstrass-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.stone-weierstrass-theorem.v001.evidence.json",
    "source": "/sources/upstream/stone-weierstrass-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints {X : Type*} [TopologicalSpace X] [CompactSpace X] (A : Subalgebra ℝ C(X, ℝ)) (w : A.SeparatesPoints) : A.topologicalClosure = ⊤",
    "concepts": [
      "continuous functions",
      "compact space",
      "point separation",
      "topological closure",
      "uniform approximation"
    ],
    "plainLanguage": "On a compact space, a real algebra of continuous functions that can distinguish every pair of points can approximate every continuous real-valued target as closely as desired in uniform distance.",
    "poster": {
      "alt": "An ivory analysis poster shows a compact point-set domain, separating curves, absolute-value and lattice operations, finite local patches, a uniform error band, and the topological-closure statement.",
      "byteSize": 2682763,
      "caption": "A point-separating real subalgebra is uniformly dense in the continuous real-valued functions on a compact space.",
      "description": "The poster presents the exact compact real-valued theorem and the four checked movements from absolute-value closure through finite lattice patching to uniform approximation, without claiming a rate or complex version.",
      "derivatives": [
        {
          "byteSize": 110342,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-poster-v1-640.webp",
          "sha256": "sha256:28beee32fc79e0d50ddf6bc7439b5ba6af61792cebe23dde621ba05d3a37caaa",
          "width": 640
        },
        {
          "byteSize": 251076,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-poster-v1-1024.webp",
          "sha256": "sha256:eca2d20cf46d1e813c68c7a79be27cf05ac8a500b8a47eaf9bc93942db9435d5",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-21T23:52:55Z",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-poster-v1.png",
      "sha256": "sha256:c919659aff2241873ce2abd7c4a729d5bccd820f76096cc099fed99016d8f521",
      "title": "Stone–Weierstrass Theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "ANALYSIS · UNIFORM APPROXIMATION\nSTONE–WEIERSTRASS THEOREM\nA real subalgebra on compact X separates points\ntopologicalClosure(A) = C(X, ℝ)\nLOCAL SEPARATION BUILDS GLOBAL APPROXIMATION\nHOW THE CHECKED ROUTE MOVES\n1 · Approximate absolute value inside the closure\n2 · Obtain pointwise suprema and infima\n3 · Use compactness to select finite local patches\n4 · Assemble a uniform approximation to any target\nEXACT SCOPE\nReal-valued functions on compact X. No rate and no complex theorem here."
    },
    "visual": {
      "alt": "Green separating curves fold into a lattice and finite cobalt local patches combine into one emerald curve inside a narrow gold band around a charcoal target on a compact domain.",
      "byteSize": 3287479,
      "caption": "Point separation, lattice closure, and compact finite patching produce uniform approximation of every real continuous target.",
      "description": "A fixed compact domain carries a target curve and a point-separating algebra. Absolute-value and finite lattice operations convert local approximants selected by compactness into a final curve that remains uniformly close to the target.",
      "derivatives": [
        {
          "byteSize": 42156,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-schematic-v1-640.webp",
          "sha256": "sha256:7f3c92d7e5dbf5538fbc8effe9b9bbca0bbd831f71a0a6e3f49f59135716538b",
          "width": 640
        },
        {
          "byteSize": 192476,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:5013322027fdf4072877c36536b4ad07b715205ea61d9fa7250883f9969a80e9",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-22T01:26:27Z",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/theorem-schematic-v1.png",
      "sha256": "sha256:df83bb8c592307a010265b2368f71fef4a92c2ee178b6badf436f1a046a57cd2",
      "title": "Stone–Weierstrass Theorem schematic",
      "width": 1536
    },
    "walkthrough": {
      "introduction": "Mathlib's real Stone–Weierstrass route first places absolute values in the closure, uses them to obtain a function lattice, turns point separation into finitely many local approximants by compactness, and combines those patches into a uniform approximation of every continuous target.",
      "pages": [
        {
          "alt": "A fixed ivory compact domain and charcoal target curve sit behind a forest-green function folded through an antique-gold absolute-value construction into the closure.",
          "byteSize": 2982899,
          "caption": "Uniform polynomial approximation on the bounded range of a continuous function brings its pointwise absolute value into the closure.",
          "description": "For f in the subalgebra, compactness bounds its range. Weierstrass approximation on the resulting real interval approximates the absolute-value function by polynomials; evaluating those polynomials at f shows |f| belongs to A.topologicalClosure.",
          "derivatives": [
            {
              "byteSize": 42300,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-01-v1-640.webp",
              "sha256": "sha256:6fed8090e521f5409bbcfc6e4342c51e63a4f2743b72bae61b161cc3b71aed9c",
              "width": 640
            },
            {
              "byteSize": 165316,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-01-v1-1200.webp",
              "sha256": "sha256:71e61e01cb0a59d90fa078a27725ad812c4b52fd06d311846aec1de7dbdfce16",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-21T23:28:42Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-01-v1.png",
          "sha256": "sha256:de9210c9f5c1bac57f3debb96e34fe8abeaabccabd044009cbd35e9d94e6069e",
          "title": "Absolute value enters the topological closure",
          "width": 1536,
          "equation": "f ∈ A → |f| ∈ A.topologicalClosure",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 1
        },
        {
          "alt": "On the same compact domain, paired green and cobalt curves combine through gold folds into clean finite upper and lower envelopes around the fixed target.",
          "byteSize": 2216564,
          "caption": "Combining addition, subtraction, and absolute value turns the closed subalgebra into a sublattice of continuous functions.",
          "description": "The checked route uses the familiar identities expressing pointwise supremum and infimum through sums, differences, and absolute values. Because the topological closure is a subalgebra containing these absolute values, it contains both lattice operations.",
          "derivatives": [
            {
              "byteSize": 27560,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-02-v1-640.webp",
              "sha256": "sha256:ad48069027e885825c7fca359bc05ca024fb9bd3aba80ea6b481009c7407ed64",
              "width": 640
            },
            {
              "byteSize": 87500,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-02-v1-1200.webp",
              "sha256": "sha256:2cbe891d7f8d4c36fef3ecd419dc0bc882c4dc97a69b06a10c4ac0763fda380d",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-22T01:26:27Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-02-v1.png",
          "sha256": "sha256:c6024fadf0da9c00a6f9a22ca26745c9924fef7287e46c1c16e68a32f10df705",
          "title": "The closure is stable under pointwise maxima and minima",
          "width": 1536,
          "equation": "f,g ∈ closure(A) → f ⊔ g, f ⊓ g ∈ closure(A)",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 2
        },
        {
          "alt": "Several cobalt local curves anchored at the same engraved point stones cover the compact domain beneath a narrow gold error band around the target.",
          "byteSize": 2723802,
          "caption": "Point separation creates functions matching a target at chosen points; compactness reduces their neighborhoods to finite covers.",
          "description": "For points x and y, strong point separation supplies a function agreeing with the target at both points. Continuity keeps it close on neighborhoods. Compactness selects finitely many such patches. Finite suprema produce functions above the target minus the error while still anchored at a chosen point; a second finite cover prepares the final infimum.",
          "derivatives": [
            {
              "byteSize": 50428,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-03-v1-640.webp",
              "sha256": "sha256:3fbbcb0c57feea750a8ff7ba1827cc1ac39d0be220ed245d8a436605a4e63dab",
              "width": 640
            },
            {
              "byteSize": 166026,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-03-v1-1200.webp",
              "sha256": "sha256:808907771d93cdd28e9826f08385ae3ccb410c9c283d3570820281284a78334f",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-21T23:36:12Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-03-v1.png",
          "sha256": "sha256:a4e40ffdeb34d2b7d9f70b3a16cb308201ce32529686d2ec6a02b02596359952",
          "title": "Pairwise interpolants become finite global envelopes",
          "width": 1536,
          "equation": "finite suprema and infima from compact subcovers",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 3
        },
        {
          "alt": "The recurring finite local patches combine into one emerald curve lying uniformly inside the narrow gold band around the fixed charcoal target.",
          "byteSize": 2245710,
          "caption": "The final finite infimum stays between the target minus and plus the chosen error everywhere, so every continuous function lies in the closure.",
          "description": "The source verifies the two pointwise inequalities for the finite infimum k, obtaining uniform distance below the prescribed positive error. Applying this density result to L = A.topologicalClosure, which is nonempty, lattice-closed, and point-separating, proves that the closure is the entire real continuous-function algebra.",
          "derivatives": [
            {
              "byteSize": 29674,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-04-v1-640.webp",
              "sha256": "sha256:e410770786705bd86c70296b319725549dd976ab87648aea19bc9385fa64debe",
              "width": 640
            },
            {
              "byteSize": 95016,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-04-v1-1200.webp",
              "sha256": "sha256:728f870ea292e0dbce05b89c6f9620b8f1962200815e3bcf285997cacbeefaa7",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-22T01:26:27Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/stone-weierstrass-theorem/proof-walkthrough-04-v1.png",
          "sha256": "sha256:f72ca3dd40e174a8f41d011e65f0ff847950d670892cf17cc64df6b34087deca",
          "title": "A finite infimum closes the uniform error band",
          "width": 1536,
          "equation": "A.topologicalClosure = ⊤",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 4
        }
      ],
      "title": "From point separation to uniform approximation"
    },
    "whyLandmark": "Stone–Weierstrass turns a local ability to separate points into a global density theorem. It is a central bridge among algebra, topology, compactness, and approximation theory."
  },
  "nonClaims": [
    "Proof Atlas did not originate the Stone–Weierstrass Theorem or Mathlib's declaration.",
    "The selected declaration is real-valued on a compact space and provides no quantitative approximation rate.",
    "The generated explanation and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.stone-weierstrass-theorem.v001",
  "statusAxes": {
    "acceptedAtlasResult": "Not recorded for the preferred artifact",
    "locallyReproduced": "Exact upstream declaration replayed",
    "reviewedPage": "2 of 3 presentation reviews recorded",
    "upstreamIndexed": "Pinned source bytes verified locally"
  },
  "summary": "A point-separating real subalgebra of continuous functions on a compact space is dense in the entire continuous-function algebra.",
  "targetId": "target.library.mathlib.stone-weierstrass-theorem.v001",
  "title": "Stone–Weierstrass Theorem",
  "upstreamOrigin": {
    "declarationName": "ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Topology/ContinuousMap/StoneWeierstrass.lean#L265",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:a38987686de10fd538e8b029e2341b4177bd836e236f43bcf4c0c7ff0f2e6088",
    "sourceByteLength": 35730,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Topology/ContinuousMap/StoneWeierstrass.lean",
    "sourceLine": 265,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
