Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — EML_NeuralCoding_EMLStoneWeierstrassHausdorff

Definition
EML_NeuralCoding_EMLStoneWeierstrassHausdorff

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogeml

Definition bundle for the Aether Catalog module EML.NeuralCoding.EMLStoneWeierstrassHausdorff, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from EML/NeuralCoding/EMLStoneWeierstrassHausdorff.lean by skeleton subtraction
import Mathlib
/-
# EML Stone–Weierstrass Theorem for Compact Hausdorff Spaces

This file proves the generalized EML Stone–Weierstrass theorem: for any compact
Hausdorff space X equipped with a continuous point-separating family Φ : Fin n → C(X, ℝ),
the ℝ-subalgebra of C(X, ℝ) generated by the EML exponential and logistic generators
is dense in C(X, ℝ) (i.e., its topological closure is ⊤).

This removes the assumption that the ambient space is Euclidean (Fin n → ℝ) and works
with arbitrary compact Hausdorff topological spaces.
-/

noncomputable section

open Real Finset

variable {X : Type*} [TopologicalSpace X] [CompactSpace X] [T2Space X]
variable {n : ℕ} (Φ : Fin n → C(X, ℝ))

/-- The logistic (sigmoid) activation function. -/
def logistic (x : ℝ) : ℝ := 1 / (1 + exp (-x))

lemma logistic_continuous : Continuous logistic := by
  unfold logistic
  apply Continuous.div continuous_const
  · exact continuous_const.add (continuous_neg.rexp)
  · intro x; positivity

/-- EML exponential generator: `exp(∑ᵢ wᵢ Φᵢ(x) + b)`. -/
def emlExpGen (w : Fin n → ℝ) (b : ℝ) : C(X, ℝ) :=
  ⟨fun x => exp (∑ i : Fin n, w i * Φ i x + b),
    (continuous_finset_sum _ (fun i _ => continuous_const.mul (Φ i).continuous) |>.add
      continuous_const).rexp⟩

/-- EML logistic generator: `σ(∑ᵢ wᵢ Φᵢ(x) + b)`. -/
def emlLogisticGen (w : Fin n → ℝ) (b : ℝ) : C(X, ℝ) :=
  ⟨fun x => logistic (∑ i : Fin n, w i * Φ i x + b),
    logistic_continuous.comp
      (continuous_finset_sum _ (fun i _ => continuous_const.mul (Φ i).continuous) |>.add
        continuous_const)⟩

/-- The set of all EML generators (exponential and logistic). -/
def emlGeneratorsHausdorff : Set C(X, ℝ) :=
  {f | ∃ w b, f = emlExpGen Φ w b} ∪ {f | ∃ w b, f = emlLogisticGen Φ w b}

/-- The ℝ-subalgebra of C(X, ℝ) generated by the EML generators. -/
def emlSubalgebraHausdorff : Subalgebra ℝ C(X, ℝ) :=
  Algebra.adjoin ℝ (emlGeneratorsHausdorff Φ)


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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me