Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — MachineLearning_ReLUWidthDepthTradeoff

Definition
MachineLearning_ReLUWidthDepthTradeoff

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

aether-catalogmachinelearning

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

Definition code
-- Def bundle generated from MachineLearning/ReLUWidthDepthTradeoff.lean by skeleton subtraction
import Mathlib
import Definitions.Def_MachineLearning_Neural_AlgebraicNeuralArchitecture

/-! # ReLU width--depth capacity trade-offs

This file gives a kernel-checked quantitative core for width--depth comparisons.
It uses the catalog's `AlgebraicNeural.ReLU` rather than introducing another
activation.  The capacity model counts the number of cells available to a
piecewise-affine realization: a width `w`, depth `L` architecture has capacity
`(w+1)^L`.  This is the standard combinatorial quantity behind region-count
arguments.

The statements below deliberately distinguish *capacity bounds* from a full
analytic universal-approximation theorem.  In particular, continuity alone has
no function-independent approximation rate.  The proved results quantify the
architectural resources needed once an approximation requires a specified
number of cells.
-/

open Finset BigOperators

namespace ReLUWidthDepth

noncomputable section

open AlgebraicNeural

/-- A scalar one-hidden-layer ReLU realization with `w` hidden neurons. -/
def shallowEval {w : ℕ} (outputBias : ℝ) (outputWeight inputWeight bias : Fin w → ℝ)
    (x : ℝ) : ℝ :=
  outputBias + ∑ i, outputWeight i * ReLU (inputWeight i * x + bias i)



/-- The three-neuron tent map, a basic depth-separation building block. -/
def tent (x : ℝ) : ℝ := ReLU x - 2 * ReLU (x - 1) + ReLU (x - 2)


/-- Iterated composition of the tent map, corresponding to increasing depth. -/
def iteratedTent : ℕ → ℝ → ℝ
  | 0 => id
  | L + 1 => tent ∘ iteratedTent L


/-- Region-capacity model for width `w` and depth `L`. -/
def regionCapacity (w L : ℕ) : ℕ := (w + 1) ^ L






/-- Error-scale demand: `m^n` cells corresponds to the common scaling
`ε = 1 / m^n`; the shallow width `m-1` therefore has the encoded
`ε^(-1/n)` behavior. -/
def approximationCellDemand (n m : ℕ) : ℕ := m ^ n








end

end ReLUWidthDepth

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