Formalize the Leshno universal approximation theorem - #246
Open
yuanyi-350 wants to merge 9 commits into
Open
yuanyi-350 wants to merge 9 commits into
yuanyi-350 wants to merge 9 commits into
Conversation
yuanyi-350
force-pushed
the
formalize-llps-universal-approximation
branch
2 times, most recently
from
September 12, 2026 03:33
e31a1c9 to
182353e
Compare
yuanyi-350
force-pushed
the
formalize-llps-universal-approximation
branch
from
September 12, 2026 03:41
182353e to
51d6faa
Compare
mathlib-bors Bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Formalizes the continuous Leshno–Lin–Pinkus–Schocken theorem: for every positive input dimension and continuous activation σ, biased single-hidden-layer networks are uniformly dense on every compact set if and only if σ is not a polynomial.
Roadmap
All files below are in
LeanMachineLearning/NeuralNetwork/UniversalApproximation/, Here, universal means uniformly dense on every compact set.Leshno.lean— main theorem: on a nontrivial real inner-product space, a continuous activation is universal if andonly if it is nonpolynomial.
Nonpolynomial.lean: every continuous nonpolynomial activation is universal.PolynomialObstruction.lean: for every polynomial activation on a nontrivial real inner-product space, there exists afinite compact set on which its networks are not dense.
Discriminatory.lean: universality is equivalent to the following dual criterion: on every compact K, any continuouslinear functional on C(K, ℝ) vanishing on all neurons is zero. In particular, a smooth activation is universal if
none of its derivatives is identically zero.
Convolution.lean: if φ ∗ σ is universal for some compactly supported continuous kernel φ, then σ is universal.The proof also establishes the equivalence for every nontrivial real inner-product space.
AI usage: I planned the blueprint in advance and used GPT-5.6 Sol to help implement the code according to that blueprint.
Closes #244.