Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Deep network Lipschitz bound (L^d): n-fold composition of L-Lip

Proved
AlgebraicNeural.deep_lipschitz_bound

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

aether-catalogmachinelearning

Deep network Lipschitz bound (L^d): n-fold composition of L-Lip functions is (L^n)-Lip. Proven by induction. Utility: explicit L^d bound for d-layer robustness. Impact: lipschitz_certified_robustness — quantitative adversarial bounds.

theorem AlgebraicNeural.deep_lipschitz_bound(fs : List (ℝ → ℝ)) (L : ℝ) (hL : 0 ≤ L)
    (hfs : ∀ f ∈ fs, ∀ x y, |f x - f y| ≤ L * |x - y|) :
    ∀ x y, |(fs.foldr (· ∘ ·) id) x - (fs.foldr (· ∘ ·) id) y| ≤
            L ^ fs.length * |x - y| := by sorry

Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/Neural/AlgebraicNeuralArchitecture.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.

Preamble
-- Thm stub generated from MachineLearning/Neural/AlgebraicNeuralArchitecture.lean
import Mathlib
import Definitions.Def_MachineLearning_Neural_AlgebraicNeuralArchitecture

/-! # Algebraic Neural Architecture: Module-Theoretic Framework

This file formalizes the algebraic foundations of neural network theory
over commutative rings, establishing connections between:
- **Commutative Algebra**: ideal theory, module theory, prime spectrum
- **Machine Learning**: network architecture, activation functions, approximation
- **Tropical Geometry**: max-plus algebra, piecewise-linear functions

## Main Definitions

* `AlgebraicNeural.ReLU` — ReLU activation on linearly ordered types
* `AlgebraicNeural.ActivationNonPolynomial` — non-polynomial activation condition
* `AlgebraicNeural.TranscendentalOnProperIdeals` — ring-aware transcendence condition
* `AlgebraicNeural.NeuralLayer` — single layer of a module neural network
* `AlgebraicNeural.ModuleNetwork` — multi-layer module neural network structure
* `AlgebraicNeural.TropicalNeuron` — tropical (max-plus) neuron
* `AlgebraicNeural.SpectralWidthBound` — prime-spectral width bound type

## Main Results

1. ReLU is idempotent, 1-Lipschitz, and non-polynomial (Sections 1, 2)
2. Linear layers without activation collapse to a single linear map (Section 3)
3. Parameter count formulas and width-depth tradeoff bounds (Section 4)
4. Tropical specialization: ReLU decomposes identity and absolute value (Section 5, 9)
5. Deep network Lipschitz bounds compose multiplicatively (Section 6)
6. Certified adversarial robustness radius from Lipschitz constants (Section 8)

## Bridge: Commutative Algebra ↔ Machine Learning ↔ Tropical Geometry

The key insight: universal approximation is fundamentally an *algebraic* property
of activation functions. Over a field, non-polynomiality (transcendence) suffices.
Over a general Noetherian ring, we need transcendence relative to every proper ideal,
and the approximation error stratifies across the prime spectrum via localization.
-/

noncomputable section

open Finset BigOperators

open AlgebraicNeural

/-! ## Section 1: ReLU Activation and Algebraic Properties -/












/-! ## Section 2: Non-Polynomial Activation (Transcendence Condition) -/






/-! ## Section 3: Module Neural Network Architecture -/









/-! ## Section 4: Width-Depth Tradeoff Bounds -/





/-! ## Section 5: Tropical Specialization -/







/-! ## Section 6: Compositional Lipschitz Bounds

Lipschitz constants compose multiplicatively across layers:
a d-layer network with per-layer Lipschitz constant L has total L^d.
Bridge: connects Analysis (Lipschitz maps) to MachineLearning (certified_robustness).
-/
Formal statement
theorem AlgebraicNeural.deep_lipschitz_bound(fs : List (ℝ → ℝ)) (L : ℝ) (hL : 0 ≤ L)
    (hfs : ∀ f ∈ fs, ∀ x y, |f x - f y| ≤ L * |x - y|) :
    ∀ x y, |(fs.foldr (· ∘ ·) id) x - (fs.foldr (· ∘ ·) id) y| ≤
            L ^ fs.length * |x - y| := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/MachineLearning/Neural/AlgebraicNeuralArchitecture.lean#L347

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