Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

DeepONets, their error decomposition and covariance-operator projections

Definition
DeepONetError_Basic

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

covariance-operatordeeponeterror-decompositionoperator-learningprincipal-component-analysis

Objects of Sections 2 and 3 of Lanthaler, Mishra and Karniadakis (arXiv:2102.09618v3).

  1. ReLU networks (Section 2.1, eqs. (2.1)-(2.3)). A ReLU network Rdin→Rdout\mathbb{R}^{d_{in}}\to\mathbb{R}^{d_{out}}Rdin​→Rdout​ is CK∘σ∘CK−1∘⋯∘σ∘C1C_K\circ\sigma\circ C_{K-1}\circ\cdots\circ\sigma\circ C_1CK​∘σ∘CK−1​∘⋯∘σ∘C1​ with K≥2K\ge2K≥2 affine maps Ckz=Wkz+bkC_kz=W_kz+b_kCk​z=Wk​z+bk​, Wk∈Rdk+1×dkW_k\in\mathbb{R}^{d_{k+1}\times d_k}Wk​∈Rdk+1​×dk​, d1=dind_1=d_{in}d1​=din​, dK+1=doutd_{K+1}=d_{out}dK+1​=dout​, and σ(z)=max⁡(z,0)\sigma(z)=\max(z,0)σ(z)=max(z,0) applied componentwise.
  2. DeepONets (Section 2.2, eqs. (2.7)-(2.10), Definition 2.4). For sensors x1,…,xm∈Dx_1,\dots,x_m\in Dx1​,…,xm​∈D the encoder is E(u)=(u(x1),…,u(xm))\mathcal{E}(u)=(u(x_1),\dots,u(x_m))E(u)=(u(x1​),…,u(xm​)). The approximator is a ReLU network A:Rm→Rp\mathcal{A}:\mathbb{R}^m\to\mathbb{R}^pA:Rm→Rp. Trunk functions τ0,…,τp\tau_0,\dots,\tau_pτ0​,…,τp​ induce the reconstructor R(α)=τ0+∑k=1pαkτk\mathcal{R}(\alpha)=\tau_0+\sum_{k=1}^p\alpha_k\tau_kR(α)=τ0​+∑k=1p​αk​τk​. The DeepONet is N=R∘A∘E\mathcal{N}=\mathcal{R}\circ\mathcal{A}\circ\mathcal{E}N=R∘A∘E. When the trunk functions come from a ReLU network τ:Rn→Rp+1\boldsymbol\tau:\mathbb{R}^n\to\mathbb{R}^{p+1}τ:Rn→Rp+1, they are viewed as elements of L2(U)L^2(U)L2(U).
  3. Data (Definition 2.1). D⊂RdD\subset\mathbb{R}^dD⊂Rd and U⊂RnU\subset\mathbb{R}^nU⊂Rn are bounded measurable sets carrying Lebesgue measure. XXX is a normed space (the theorems add completeness and separability as separate assumptions) with a continuous linear injection ι:X→L2(D)\iota:X\to L^2(D)ι:X→L2(D), and μ\muμ is a Borel probability measure on XXX with ∫∥u∥X2 dμ<∞\int\|u\|_X^2\,d\mu<\infty∫∥u∥X2​dμ<∞. A Borel set A⊂XA\subset XA⊂X with μ(A)=1\mu(A)=1μ(A)=1 consists of elements whose image in L2(D)L^2(D)L2(D) has a representative that is continuous on DDD. Finally G:X→L2(U)\mathcal{G}:X\to L^2(U)G:X→L2(U) is Borel measurable with ∫∥G(u)∥L2(U)2 dμ<∞\int\|\mathcal{G}(u)\|^2_{L^2(U)}\,d\mu<\infty∫∥G(u)∥L2(U)2​dμ<∞.
  4. Errors (eqs. (2.11), (3.1)-(3.3)). The quantities below take values in [0,∞][0,\infty][0,∞]:
  • total error: E^=(∫∥G(u)−N(u)∥L2(U)2dμ)1/2\widehat{\mathcal{E}}=(\int\|\mathcal{G}(u)-\mathcal{N}(u)\|^2_{L^2(U)}d\mu)^{1/2}E=(∫∥G(u)−N(u)∥L2(U)2​dμ)1/2;
  • encoding error: E^E=(∫∥D∘E(u)−u∥X2dμ)1/2\widehat{\mathcal{E}}_{\mathcal{E}}=(\int\|\mathcal{D}\circ\mathcal{E}(u)-u\|_X^2d\mu)^{1/2}EE​=(∫∥D∘E(u)−u∥X2​dμ)1/2;
  • approximation error: E^A=(∫∥A(y)−P∘G∘D(y)∥ℓ22d(E#μ)(y))1/2\widehat{\mathcal{E}}_{\mathcal{A}}=(\int\|\mathcal{A}(y)-\mathcal{P}\circ\mathcal{G}\circ\mathcal{D}(y)\|^2_{\ell^2}d(\mathcal{E}_\#\mu)(y))^{1/2}EA​=(∫∥A(y)−P∘G∘D(y)∥ℓ22​d(E#​μ)(y))1/2;
  • reconstruction error: E^R=(∫∥R∘P(v)−v∥2dν(v))1/2\widehat{\mathcal{E}}_{\mathcal{R}}=(\int\|\mathcal{R}\circ\mathcal{P}(v)-v\|^2d\nu(v))^{1/2}ER​=(∫∥R∘P(v)−v∥2dν(v))1/2, with ν=G#μ\nu=\mathcal{G}_\#\muν=G#​μ in the paper.
  1. Lipschitz and Hölder constants (Section 3.2.1). Lip(F)=sup⁡u,u′∥F(u)−F(u′)∥/∥u−u′∥\mathrm{Lip}(F)=\sup_{u,u'}\|F(u)-F(u')\|/\|u-u'\|Lip(F)=supu,u′​∥F(u)−F(u′)∥/∥u−u′∥ and Lipα(G)=sup⁡u,u′∈A∥G(u)−G(u′)∥/∥u−u′∥α\mathrm{Lip}_\alpha(\mathcal{G})=\sup_{u,u'\in A}\|\mathcal{G}(u)-\mathcal{G}(u')\|/\|u-u'\|^\alphaLipα​(G)=supu,u′∈A​∥G(u)−G(u′)∥/∥u−u′∥α, both with values in [0,∞][0,\infty][0,∞].
  2. Measures on a Hilbert space HHH (Section 3.3). ν∈P2(H)\nu\in\mathcal{P}_2(H)ν∈P2​(H) means a probability measure with ∫∥v∥2dν<∞\int\|v\|^2d\nu<\infty∫∥v∥2dν<∞. Its mean is E[v]=∫v dν\mathbb{E}[v]=\int v\,d\nuE[v]=∫vdν. The uncentered covariance operator is Γ‾w=∫⟨v,w⟩v dν\overline\Gamma w=\int\langle v,w\rangle v\,d\nuΓw=∫⟨v,w⟩vdν and the covariance operator is Γw=∫⟨v−E[v],w⟩(v−E[v]) dν\Gamma w=\int\langle v-\mathbb{E}[v],w\rangle(v-\mathbb{E}[v])\,d\nuΓw=∫⟨v−E[v],w⟩(v−E[v])dν. A spectral decomposition Γ=∑kλk ϕk⊗ϕk\Gamma=\sum_k\lambda_k\,\phi_k\otimes\phi_kΓ=∑k​λk​ϕk​⊗ϕk​ consists of an orthonormal sequence (ϕk)(\phi_k)(ϕk​) and a non-increasing sequence (λk)(\lambda_k)(λk​) with Γw=∑kλk⟨ϕk,w⟩ϕk\Gamma w=\sum_k\lambda_k\langle\phi_k,w\rangle\phi_kΓw=∑k​λk​⟨ϕk​,w⟩ϕk​ for all www. The span of the eigenvectors with eigenvalue in a set SSS is also defined.
  3. Projection errors (eqs. (3.13), (3.16)). E^Proj(S)=∫inf⁡w∈S∥v−w∥2dν(v)∈[0,∞]\widehat{\mathcal{E}}_{\mathrm{Proj}}(S)=\int\inf_{w\in S}\|v-w\|^2d\nu(v)\in[0,\infty]EProj​(S)=∫infw∈S​∥v−w∥2dν(v)∈[0,∞]. A linear subspace VVV with dim⁡V=p\dim V=pdimV=p is optimal if it minimizes this error among ppp-dimensional linear subspaces. An affine subspace is optimal if it minimizes the error among affine subspaces whose direction is ppp-dimensional.
  4. Optimal projector and reconstruction (eqs. (3.19), (3.21)). For linearly independent τ1,…,τp\tau_1,\dots,\tau_pτ1​,…,τp​, the dual basis is τk∗=∑j(Gram−1)kjτj\tau_k^*=\sum_j(\mathrm{Gram}^{-1})_{kj}\tau_jτk∗​=∑j​(Gram−1)kj​τj​, and the projector is P(u)=(⟨u−τ0,τk∗⟩)k=1p\mathcal{P}(u)=(\langle u-\tau_0,\tau_k^*\rangle)_{k=1}^pP(u)=(⟨u−τ0​,τk∗​⟩)k=1p​. The optimal trunk functions are τ^0=Eν[v]\hat\tau_0=\mathbb{E}_\nu[v]τ^0​=Eν​[v] and τ^k=ϕk\hat\tau_k=\phi_kτ^k​=ϕk​.

Formalization Note The output space YYY is identified with its image in L2(U)L^2(U)L2(U), as in Section 2.2 of the paper; every result uses only the L2(U)L^2(U)L2(U) norm on the output side. Eigenvalues are indexed from 000, so the paper's λk\lambda_kλk​ is lam (k-1) and the tail ∑k>pλk\sum_{k>p}\lambda_k∑k>p​λk​ is ∑' k, lam (k + p). Square roots and integrals of nonnegative quantities are taken in [0,∞][0,\infty][0,∞]. The function toL2 returns 000 for a function that is not square integrable on UUU; it is used only for ReLU networks on a compact UUU, which are always square integrable there.

Definition code
import Mathlib

/-!
Lanthaler, Mishra and Karniadakis, *Error estimates for DeepOnets: A deep learning framework in
infinite dimensions*, arXiv:2102.09618v3 (2022): ReLU networks (Section 2.1), DeepONets and the
data of the approximation problem (Section 2.2, Definitions 2.1 and 2.4, eqs. (2.7)-(2.11)), the
encoding, approximation and reconstruction errors (Section 3.2.1, eqs. (3.1)-(3.3)), Lipschitz and
Hoelder constants (Section 3.2.1), covariance operators and projection errors (Sections 3.2.2 and
3.3, eqs. (3.8), (3.13)-(3.18)) and the optimal projector and reconstruction (Section 3.4,
eqs. (3.19)-(3.23)).
-/

open MeasureTheory

noncomputable section

namespace DeepONetError

/-- Eq. (2.2): the ReLU activation `sigma(z) = max(z, 0)`. -/
def relu (z : ℝ) : ℝ := max z 0

/-- Section 2.1, eqs. (2.1)-(2.3): a ReLU network `C_K ∘ sigma ∘ C_{K-1} ∘ ... ∘ sigma ∘ C_1`
from `ℝ^din` to `ℝ^dout` with `K = L + 1` affine maps `C_k z = W_k z + b_k` and `L = K - 1 ≥ 1`
hidden layers. The layer widths are `width 0 = din, width 1, ..., width (L+1) = dout`; the affine
map number `k` (counting from `0`) goes from `ℝ^(width k)` to `ℝ^(width (k+1))`. -/
structure ReLUNet (din dout : ℕ) where
  /-- The number `L = K - 1` of hidden layers. -/
  L : ℕ
  /-- The paper requires `1 < K`. -/
  one_le_L : 1 ≤ L
  /-- The layer widths `d_1, ..., d_{K+1}` (here indexed from `0`). -/
  width : ℕ → ℕ
  width_zero : width 0 = din
  width_last : width (L + 1) = dout
  /-- The weight matrices `W_k`. -/
  W : (k : ℕ) → Matrix (Fin (width (k + 1))) (Fin (width k)) ℝ
  /-- The bias vectors `b_k`. -/
  b : (k : ℕ) → Fin (width (k + 1)) → ℝ

/-- Eq. (2.1): the output `sigma ∘ C_k ∘ ... ∘ sigma ∘ C_1 (x)` of the first `k` layers of a ReLU
network (the input itself for `k = 0`). -/
def ReLUNet.hidden {din dout : ℕ} (N : ReLUNet din dout) (x : Fin din → ℝ) :
    (k : ℕ) → Fin (N.width k) → ℝ
  | 0 => fun i => x (Fin.cast N.width_zero i)
  | k + 1 => fun i => relu ((N.W k).mulVec (N.hidden x k) i + N.b k i)

/-- Eq. (2.1): the function `ℝ^din → ℝ^dout` realized by a ReLU network; the last affine map
`C_K` is not followed by an activation. -/
def ReLUNet.eval {din dout : ℕ} (N : ReLUNet din dout) (x : Fin din → ℝ) : Fin dout → ℝ :=
  fun i => (N.W N.L).mulVec (N.hidden x N.L) (Fin.cast N.width_last.symm i) +
    N.b N.L (Fin.cast N.width_last.symm i)

/-- The Hilbert space `L^2(U)` for a set `U ⊆ ℝ^n` with Lebesgue measure (Section 2.2). -/
abbrev L2 {n : ℕ} (U : Set (Fin n → ℝ)) : Type := Lp ℝ 2 (volume.restrict U)

open Classical in
/-- A function on `ℝ^n` viewed as an element of `L^2(U)` (Section 2.2: a trunk net restricted to
the bounded set `U` is square integrable there; the value `0` is only a default for functions
that are not square integrable on `U`). -/
def toL2 {n : ℕ} (U : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → ℝ) : L2 U :=
  if h : MemLp f 2 (volume.restrict U) then h.toLp f else 0

/-- Eq. (2.9): the reconstructor induced by the functions `tau_0, ..., tau_p`,
`R(alpha) = tau_0 + sum_{k=1}^p alpha_k tau_k`. Here `tau k.succ` is the paper's `tau_{k+1}`. -/
def trunkRec {F : Type*} [AddCommGroup F] [Module ℝ F] {p : ℕ} (tau : Fin (p + 1) → F)
    (a : EuclideanSpace ℝ (Fin p)) : F :=
  tau 0 + ∑ k : Fin p, a k • tau k.succ

/-- Eq. (2.10) and Definition 2.4: the DeepONet `N = R ∘ A ∘ E` on continuous input functions
`u ∈ C(D)`, with sensors `x_1, ..., x_m ∈ D` (encoder (2.7), `E(u) = (u(x_1), ..., u(x_m))`),
an approximator ReLU network `A : ℝ^m → ℝ^p` (eq. (2.8)) and a trunk ReLU network
`tau : ℝ^n → ℝ^(p+1)` (Section 2.2), with values in `L^2(U)`. -/
def deepONet {d n m p : ℕ} {Dset : Set (Fin d → ℝ)} (U : Set (Fin n → ℝ)) (x : Fin m → Dset)
    (Apx : ReLUNet m p) (trunk : ReLUNet n (p + 1)) (u : C(Dset, ℝ)) : L2 U :=
  trunkRec (fun k => toL2 U (fun y => trunk.eval y k))
    (WithLp.toLp 2 (Apx.eval (fun j => u (x j))))

/-- Definition 2.1 (data for the DeepONet approximation problem), with the output space `Y`
identified with its image in `L^2(U)` as in Section 2.2: `D ⊆ ℝ^d` and `U ⊆ ℝ^n` are bounded
(measurable) sets, `iota : X → L^2(D)` is a continuous linear embedding, `mu` is a Borel probability
measure on `X` with finite second moment, there is a Borel set `A` with `mu(A) = 1` consisting of
(elements whose image in `L^2(D)` has a representative that is) continuous functions on `D`, and
`G` is Borel measurable with `∫ ‖G(u)‖²_{L^2(U)} dmu < ∞`. -/
def IsDeepONetData {d n : ℕ} (Dset : Set (Fin d → ℝ)) (U : Set (Fin n → ℝ)) {X : Type*}
    [NormedAddCommGroup X] [NormedSpace ℝ X] [MeasurableSpace X] [MeasurableSpace (L2 U)]
    (iota : X →L[ℝ] L2 Dset) (mu : Measure X) (A : Set X) (G : X → L2 U) : Prop :=
  Bornology.IsBounded Dset ∧ MeasurableSet Dset ∧ Bornology.IsBounded U ∧ MeasurableSet U ∧
    Function.Injective iota ∧ IsProbabilityMeasure mu ∧ (∫⁻ u, ‖u‖ₑ ^ 2 ∂mu) < ⊤ ∧
    MeasurableSet A ∧ mu A = 1 ∧
    (∀ u ∈ A, ∃ f : (Fin d → ℝ) → ℝ, ContinuousOn f Dset ∧
      ((iota u : L2 Dset) : (Fin d → ℝ) → ℝ) =ᵐ[volume.restrict Dset] f) ∧
    Measurable G ∧ (∫⁻ u, ‖G u‖ₑ ^ 2 ∂mu) < ⊤

/-- Eq. (2.11): the DeepONet error `(∫_X ‖G(u) - N(u)‖²_{L^2(U)} dmu(u))^{1/2}`, valued in
`[0, ∞]`. -/
def totalErr {X F : Type*} [MeasurableSpace X] [NormedAddCommGroup F] (mu : Measure X)
    (G N : X → F) : ENNReal :=
  (∫⁻ u, ‖G u - N u‖ₑ ^ 2 ∂mu) ^ ((1 : ℝ) / 2)

/-- Eq. (3.1): the encoding error `(∫_X ‖D(E(u)) - u‖²_X dmu(u))^{1/2}` of an encoder `E` and a
decoder `D`. -/
def encErr {X : Type*} [MeasurableSpace X] [NormedAddCommGroup X] {m : ℕ} (mu : Measure X)
    (E : X → EuclideanSpace ℝ (Fin m)) (Dec : EuclideanSpace ℝ (Fin m) → X) : ENNReal :=
  (∫⁻ u, ‖Dec (E u) - u‖ₑ ^ 2 ∂mu) ^ ((1 : ℝ) / 2)

/-- Eq. (3.2): the approximation error
`(∫_{ℝ^m} ‖A(y) - P(G(D(y)))‖²_{ℓ^2} d(E_# mu)(y))^{1/2}`. -/
def approxErr {X F : Type*} [MeasurableSpace X] {m p : ℕ} (mu : Measure X) (G : X → F)
    (E : X → EuclideanSpace ℝ (Fin m)) (Apx : EuclideanSpace ℝ (Fin m) → EuclideanSpace ℝ (Fin p))
    (Dec : EuclideanSpace ℝ (Fin m) → X) (Proj : F → EuclideanSpace ℝ (Fin p)) : ENNReal :=
  (∫⁻ y, ‖Apx y - Proj (G (Dec y))‖ₑ ^ 2 ∂(mu.map E)) ^ ((1 : ℝ) / 2)

/-- Eq. (3.3): the reconstruction error `(∫ ‖R(P(v)) - v‖² dnu(v))^{1/2}` of a reconstructor `R`
and a projector `P` with respect to a measure `nu` on the output space (in the paper
`nu = G_# mu`). -/
def recErr {F : Type*} [NormedAddCommGroup F] [MeasurableSpace F] {p : ℕ} (nu : Measure F)
    (R : EuclideanSpace ℝ (Fin p) → F) (Proj : F → EuclideanSpace ℝ (Fin p)) : ENNReal :=
  (∫⁻ v, ‖R (Proj v) - v‖ₑ ^ 2 ∂nu) ^ ((1 : ℝ) / 2)

/-- Section 3.2.1: the Lipschitz constant `Lip(F) = sup_{u,u'} ‖F(u) - F(u')‖ / ‖u - u'‖`, valued
in `[0, ∞]` (pairs with `u = u'` contribute `0`). -/
def lipConst {α β : Type*} [EMetricSpace α] [EMetricSpace β] (f : α → β) : ENNReal :=
  ⨆ x, ⨆ y, edist (f x) (f y) / edist x y

/-- Section 3.2.1 and the proof of Theorem 3.3 (Appendix C.2): the Hoelder constant
`Lip_alpha(G : A → L^2(U)) = sup_{u,u' ∈ A} ‖G(u) - G(u')‖ / ‖u - u'‖^alpha` of `G` on `A`,
valued in `[0, ∞]`. -/
def holderConst {α β : Type*} [EMetricSpace α] [EMetricSpace β] (alpha : ℝ) (f : α → β)
    (A : Set α) : ENNReal :=
  ⨆ x ∈ A, ⨆ y ∈ A, edist (f x) (f y) / edist x y ^ alpha

section Hilbert

variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [MeasurableSpace H]

/-- Definition 2.1 and Section 3.3: `nu ∈ P_2(H)`, a probability measure with finite second
moment `∫ ‖v‖² dnu(v) < ∞`. -/
def IsP2 (nu : Measure H) : Prop :=
  IsProbabilityMeasure nu ∧ (∫⁻ v, ‖v‖ₑ ^ 2 ∂nu) < ⊤

/-- Section 3.2.2: the mean `E[v] = ∫ v dnu(v)`. -/
def mean (nu : Measure H) : H := ∫ v, v ∂nu

/-- Eq. (3.14): the uncentered covariance operator `w ↦ ∫ ⟨v, w⟩ v dnu(v)`, i.e.
`∫ v ⊗ v dnu(v)`. -/
def uncovOp (nu : Measure H) (w : H) : H := ∫ v, inner ℝ v w • v ∂nu

/-- Eqs. (3.8) and (3.18): the covariance operator
`w ↦ ∫ ⟨v - E[v], w⟩ (v - E[v]) dnu(v)`, i.e. `∫ (v - E[v]) ⊗ (v - E[v]) dnu(v)`. -/
def covOp (nu : Measure H) (w : H) : H :=
  ∫ v, inner ℝ (v - mean nu) w • (v - mean nu) ∂nu

/-- Proposition 3.15 (and the eigenvalue convention of Theorems 3.6, 3.8, 3.10, 3.12, 3.14):
`Gamma = sum_k lam_k (phi_k ⊗ phi_k)` with an orthonormal family `phi` and decreasing `lam`, i.e.
`Gamma w = sum_k lam_k ⟨phi_k, w⟩ phi_k` for every `w`. Then `lam_0 ≥ lam_1 ≥ ...` are the
eigenvalues of `Gamma` repeated according to multiplicity (the paper's `lam_1 ≥ lam_2 ≥ ...`,
indexed here from `0`). -/
def IsSpectralDecomp (Gamma : H → H) (lam : ℕ → ℝ) (phi : ℕ → H) : Prop :=
  Orthonormal ℝ phi ∧ Antitone lam ∧
    ∀ w, HasSum (fun k => (lam k * inner ℝ (phi k) w) • phi k) (Gamma w)

/-- Theorems 3.10 and 3.12: the span of the eigenvectors of `Gamma` whose eigenvalue lies in
`S`; for `S = (c, ∞)` or `[c, ∞)` this is the direct sum of the corresponding eigenspaces
`E_j`. -/
def eigSpan (Gamma : H → H) (S : Set ℝ) : Submodule ℝ H :=
  Submodule.span ℝ {v | ∃ c ∈ S, Gamma v = c • v}

/-- Eqs. (3.13) and (3.16): the projection error `∫ inf_{w ∈ S} ‖v - w‖² dnu(v)` of a set `S`
(a linear or affine subspace), valued in `[0, ∞]`. -/
def projErr (nu : Measure H) (S : Set H) : ENNReal :=
  ∫⁻ v, Metric.infEDist v S ^ 2 ∂nu

/-- Theorem 3.10: `V` is an optimal `p`-dimensional subspace, i.e. `dim V = p` and `V` minimizes
the projection error among all `p`-dimensional linear subspaces. -/
def IsOptimalSubspace (nu : Measure H) (p : ℕ) (V : Submodule ℝ H) : Prop :=
  Module.finrank ℝ V = p ∧
    ∀ W : Submodule ℝ H, Module.finrank ℝ W = p → projErr nu (V : Set H) ≤ projErr nu (W : Set H)

/-- Theorem 3.12: `V0` is an optimal `p`-dimensional affine subspace, i.e. its direction has
dimension `p` and `V0` minimizes the projection error among all affine subspaces whose direction
has dimension `p`. -/
def IsOptimalAffine (nu : Measure H) (p : ℕ) (V0 : AffineSubspace ℝ H) : Prop :=
  Module.finrank ℝ V0.direction = p ∧
    ∀ W : AffineSubspace ℝ H, Module.finrank ℝ W.direction = p → projErr nu (V0 : Set H) ≤ projErr nu (W : Set H)

/-- The Gram matrix `(⟨v_i, v_j⟩)_{i,j}` of a finite family. -/
def gram {p : ℕ} (v : Fin p → H) : Matrix (Fin p) (Fin p) ℝ := fun i j => inner ℝ (v i) (v j)

/-- Lemma 3.13: the dual basis `v*_k = sum_j (Gram^{-1})_{kj} v_j` of linearly independent
`v_1, ..., v_p`, the unique elements of their span with `⟨v_l, v*_k⟩ = delta_{lk}`. -/
def dualBasis {p : ℕ} (v : Fin p → H) (k : Fin p) : H :=
  ∑ j, (gram v)⁻¹ k j • v j

/-- Eq. (3.19): the projector associated with the reconstructor of `tau_0, ..., tau_p`,
`P(u) = (⟨u - tau_0, tau*_1⟩, ..., ⟨u - tau_0, tau*_p⟩)`. -/
def optProj {p : ℕ} (tau : Fin (p + 1) → H) (u : H) : EuclideanSpace ℝ (Fin p) :=
  WithLp.toLp 2 (fun k => inner ℝ (u - tau 0) (dualBasis (fun j => tau j.succ) k))

/-- Eq. (3.21) and Proposition 3.15: the functions of the optimal reconstruction,
`hat tau_0 = E[v]` and `hat tau_k = phi_k` (the paper's `phi_k`, `k = 1, ..., p`, is `phi (k-1)`
here). -/
def optTrunk {p : ℕ} (nu : Measure H) (phi : ℕ → H) (k : Fin (p + 1)) : H :=
  Fin.cases (motive := fun _ => H) (mean nu) (fun j : Fin p => phi j) k

end Hilbert

end DeepONetError
Source
Lanthaler, Mishra and Karniadakis, Error estimates for DeepOnets: A deep learning framework in infinite dimensions, arXiv:2102.09618v3 (2022), Section 2.1 eqs. (2.1)-(2.3); Section 2.2, Definitions 2.1 and 2.4, eqs. (2.7)-(2.11); Section 3.2, eqs. (3.1)-(3.3), (3.8); Section 3.3, eqs. (3.13)-(3.18); Section 3.4, eqs. (3.19)-(3.23), Proposition 3.15
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

relu. This is the function σ:R→R\sigma:\mathbb{R}\to\mathbb{R}σ:R→R given by

σ(z)=max⁡(z,0).\sigma(z)=\max(z,0).σ(z)=max(z,0).

ReLUNet. For natural numbers dind_{\mathrm{in}}din​ and doutd_{\mathrm{out}}dout​, an object NNN of this type consists of the following data:

  • a natural number LLL with L≥1L\ge 1L≥1;
  • a width function w:N→Nw:\mathbb{N}\to\mathbb{N}w:N→N with w(0)=dinw(0)=d_{\mathrm{in}}w(0)=din​ and w(L+1)=doutw(L+1)=d_{\mathrm{out}}w(L+1)=dout​;
  • for every k∈Nk\in\mathbb{N}k∈N, a real matrix Wk∈Rw(k+1)×w(k)W_k\in\mathbb{R}^{w(k+1)\times w(k)}Wk​∈Rw(k+1)×w(k) and a bias vector bk∈Rw(k+1)b_k\in\mathbb{R}^{w(k+1)}bk​∈Rw(k+1).

No widths are required to be positive, so any width, including dind_{\mathrm{in}}din​ or doutd_{\mathrm{out}}dout​, may be 000. The widths w(k)w(k)w(k) for k>L+1k>L+1k>L+1, and the matrices and biases with index k>Lk>Lk>L, are arbitrary. They are part of the data but play no role in the evaluation defined below.

ReLUNet.hidden. For a network NNN as above and an input x∈Rdinx\in\mathbb{R}^{d_{\mathrm{in}}}x∈Rdin​, the vectors hk(x)∈Rw(k)h_k(x)\in\mathbb{R}^{w(k)}hk​(x)∈Rw(k) are defined recursively for all k∈Nk\in\mathbb{N}k∈N:

h0(x)=x,hk+1(x)=σ(Wk hk(x)+bk),h_0(x)=x,\qquad h_{k+1}(x)=\sigma\big(W_k\,h_k(x)+b_k\big),h0​(x)=x,hk+1​(x)=σ(Wk​hk​(x)+bk​),

where σ\sigmaσ is applied componentwise. Here h0(x)=xh_0(x)=xh0​(x)=x uses the identification w(0)=dinw(0)=d_{\mathrm{in}}w(0)=din​.

ReLUNet.eval. The function Rdin→Rdout\mathbb{R}^{d_{\mathrm{in}}}\to\mathbb{R}^{d_{\mathrm{out}}}Rdin​→Rdout​ realized by NNN is

N(x)=WL hL(x)+bL,N(x)=W_L\,h_L(x)+b_L,N(x)=WL​hL​(x)+bL​,

using the identification w(L+1)=doutw(L+1)=d_{\mathrm{out}}w(L+1)=dout​. This is a composition of L+1L+1L+1 affine maps, Ck(z)=Wkz+bkC_k(z)=W_kz+b_kCk​(z)=Wk​z+bk​ for k=0,…,Lk=0,\dots,Lk=0,…,L. The activation σ\sigmaσ is applied after each of the first LLL affine maps but not after the last one.

L2. For U⊆RnU\subseteq\mathbb{R}^nU⊆Rn, L2(U)L^2(U)L2(U) denotes the real Hilbert space of (almost-everywhere equivalence classes of) square-integrable real functions on Rn\mathbb{R}^nRn, with respect to Lebesgue measure restricted to UUU. UUU is not assumed measurable here. For a non-measurable UUU, the restricted measure is the restriction to a measurable hull of UUU.

toL2. For U⊆RnU\subseteq\mathbb{R}^nU⊆Rn and any function f:Rn→Rf:\mathbb{R}^n\to\mathbb{R}f:Rn→R, the element [f]U∈L2(U)[f]_U\in L^2(U)[f]U​∈L2(U) is defined by cases:

  • if fff is almost-everywhere strongly measurable and ∫U∣f∣2 dy<∞\int_U |f|^2\,dy<\infty∫U​∣f∣2dy<∞ (with respect to the restricted Lebesgue measure), then [f]U[f]_U[f]U​ is the equivalence class of fff;
  • otherwise [f]U=0[f]_U=0[f]U​=0.

trunkRec. Let FFF be any real vector space, p∈Np\in\mathbb{N}p∈N, and τ0,τ1,…,τp∈F\tau_0,\tau_1,\dots,\tau_p\in Fτ0​,τ1​,…,τp​∈F. For a=(a1,…,ap)∈Rpa=(a_1,\dots,a_p)\in\mathbb{R}^pa=(a1​,…,ap​)∈Rp (Euclidean space), define

Rτ(a)=τ0+∑k=1pak τk.R_\tau(a)=\tau_0+\sum_{k=1}^{p}a_k\,\tau_k .Rτ​(a)=τ0​+k=1∑p​ak​τk​.

deepONet. The ingredients are:

  • natural numbers d,n,m,pd,n,m,pd,n,m,p;
  • a set D⊆RdD\subseteq\mathbb{R}^dD⊆Rd and a set U⊆RnU\subseteq\mathbb{R}^nU⊆Rn, with no boundedness, measurability or non-emptiness assumed;
  • sensor points x1,…,xm∈Dx_1,\dots,x_m\in Dx1​,…,xm​∈D;
  • a ReLU network A:Rm→Rp\mathcal{A}:\mathbb{R}^m\to\mathbb{R}^pA:Rm→Rp (as in ReLUNet);
  • a ReLU network T:Rn→Rp+1T:\mathbb{R}^n\to\mathbb{R}^{p+1}T:Rn→Rp+1 with components T0,…,TpT_0,\dots,T_pT0​,…,Tp​;
  • a function uuu that is continuous on DDD (with the subspace topology).

The output is the element of L2(U)L^2(U)L2(U)

N(u)=[T0]U+∑k=1pA(u(x1),…,u(xm))k [Tk]U.\mathcal{N}(u)=[T_0]_U+\sum_{k=1}^{p}\mathcal{A}\big(u(x_1),\dots,u(x_m)\big)_k\,[T_k]_U .N(u)=[T0​]U​+k=1∑p​A(u(x1​),…,u(xm​))k​[Tk​]U​.

Here [ ⋅ ]U[\,\cdot\,]_U[⋅]U​ is the map from toL2, so any component TkT_kTk​ that is not square-integrable on UUU contributes the zero element. The input uuu ranges over continuous functions on DDD, not over an abstract space XXX.

IsDeepONetData. The setting is:

  • sets D⊆RdD\subseteq\mathbb{R}^dD⊆Rd and U⊆RnU\subseteq\mathbb{R}^nU⊆Rn;
  • a real normed space XXX (not assumed complete) carrying an arbitrary σ\sigmaσ-algebra;
  • an arbitrary σ\sigmaσ-algebra on L2(U)L^2(U)L2(U); neither σ\sigmaσ-algebra is required to be the Borel one;
  • a continuous linear map ι:X→L2(D)\iota:X\to L^2(D)ι:X→L2(D), a measure μ\muμ on XXX, a set A⊆XA\subseteq XA⊆X and a map G:X→L2(U)G:X\to L^2(U)G:X→L2(U).

The predicate holds exactly when all of the following hold:

  1. DDD is bounded and Lebesgue measurable.
  2. UUU is bounded and Lebesgue measurable.
  3. ι\iotaι is injective.
  4. μ\muμ is a probability measure.
  5. ∫X∥u∥X2 dμ(u)<∞\int_X\|u\|_X^2\,d\mu(u)<\infty∫X​∥u∥X2​dμ(u)<∞, as an extended-valued lower integral.
  6. AAA is measurable and μ(A)=1\mu(A)=1μ(A)=1.
  7. For every u∈Au\in Au∈A, there is a function f:Rd→Rf:\mathbb{R}^d\to\mathbb{R}f:Rd→R, continuous on DDD, such that the chosen representative of ι(u)\iota(u)ι(u) equals fff almost everywhere on DDD.
  8. GGG is measurable with respect to the given σ\sigmaσ-algebras.
  9. ∫X∥G(u)∥L2(U)2 dμ(u)<∞\int_X\|G(u)\|_{L^2(U)}^2\,d\mu(u)<\infty∫X​∥G(u)∥L2(U)2​dμ(u)<∞.

totalErr. Let XXX be a measurable space, FFF a normed abelian group, μ\muμ a measure on XXX, and G,N:X→FG,\mathcal{N}:X\to FG,N:X→F arbitrary maps. Define

E(G,N)=(∫X∥G(u)−N(u)∥F2 dμ(u))1/2∈[0,∞],\mathcal{E}(G,\mathcal{N})=\Big(\int_X\|G(u)-\mathcal{N}(u)\|_F^2\,d\mu(u)\Big)^{1/2}\in[0,\infty],E(G,N)=(∫X​∥G(u)−N(u)∥F2​dμ(u))1/2∈[0,∞],

where the integral is the extended-valued lower integral, so no measurability is required.

encErr. Let XXX be a measurable space that is also a normed abelian group, μ\muμ a measure on XXX, and E:X→Rm\mathcal{E}:X\to\mathbb{R}^mE:X→Rm and D:Rm→X\mathcal{D}:\mathbb{R}^m\to XD:Rm→X arbitrary maps. Define

E^E=(∫X∥D(E(u))−u∥X2 dμ(u))1/2∈[0,∞].\widehat{\mathcal{E}}_{\mathcal{E}}=\Big(\int_X\|\mathcal{D}(\mathcal{E}(u))-u\|_X^2\,d\mu(u)\Big)^{1/2}\in[0,\infty].EE​=(∫X​∥D(E(u))−u∥X2​dμ(u))1/2∈[0,∞].

approxErr. The data are a measurable space XXX, a set FFF, a measure μ\muμ on XXX, and arbitrary maps

  • G:X→FG:X\to FG:X→F,
  • E:X→Rm\mathcal{E}:X\to\mathbb{R}^mE:X→Rm,
  • A:Rm→Rp\mathcal{A}:\mathbb{R}^m\to\mathbb{R}^pA:Rm→Rp,
  • D:Rm→X\mathcal{D}:\mathbb{R}^m\to XD:Rm→X,
  • P:F→Rp\mathcal{P}:F\to\mathbb{R}^pP:F→Rp.

Define

E^A=(∫Rm∥A(y)−P(G(D(y)))∥ℓ22 d(E#μ)(y))1/2∈[0,∞].\widehat{\mathcal{E}}_{\mathcal{A}}=\Big(\int_{\mathbb{R}^m}\|\mathcal{A}(y)-\mathcal{P}(G(\mathcal{D}(y)))\|_{\ell^2}^2\,d(\mathcal{E}_\#\mu)(y)\Big)^{1/2}\in[0,\infty].EA​=(∫Rm​∥A(y)−P(G(D(y)))∥ℓ22​d(E#​μ)(y))1/2∈[0,∞].

Here E#μ\mathcal{E}_\#\muE#​μ is the push-forward of μ\muμ to Rm\mathbb{R}^mRm with its Borel σ\sigmaσ-algebra. If E\mathcal{E}E is not almost-everywhere measurable, the push-forward is by convention the zero measure, and then this quantity equals 000.

recErr. Let FFF be a normed abelian group with a measure ν\nuν on an arbitrary σ\sigmaσ-algebra, and let R:Rp→F\mathcal{R}:\mathbb{R}^p\to FR:Rp→F and P:F→Rp\mathcal{P}:F\to\mathbb{R}^pP:F→Rp be arbitrary maps. Define

E^R=(∫F∥R(P(v))−v∥F2 dν(v))1/2∈[0,∞].\widehat{\mathcal{E}}_{\mathcal{R}}=\Big(\int_F\|\mathcal{R}(\mathcal{P}(v))-v\|_F^2\,d\nu(v)\Big)^{1/2}\in[0,\infty].ER​=(∫F​∥R(P(v))−v∥F2​dν(v))1/2∈[0,∞].

lipConst. For a map f:α→βf:\alpha\to\betaf:α→β between extended metric spaces, define

Lip⁡(f)=sup⁡x,y∈αd(f(x),f(y))d(x,y)∈[0,∞],\operatorname{Lip}(f)=\sup_{x,y\in\alpha}\frac{d(f(x),f(y))}{d(x,y)}\in[0,\infty],Lip(f)=x,y∈αsup​d(x,y)d(f(x),f(y))​∈[0,∞],

computed in [0,∞][0,\infty][0,∞] with the following conventions:

  • 0/0=00/0=00/0=0, so pairs with x=yx=yx=y contribute 000;
  • a/∞=0a/\infty=0a/∞=0, so pairs at infinite distance contribute 000;
  • the supremum over an empty space is 000.

holderConst. For an arbitrary real number α\alphaα (no restriction to (0,1](0,1](0,1]), a map f:α→βf:\alpha\to\betaf:α→β between extended metric spaces, and a subset AAA of the domain, define

Lip⁡α(f;A)=sup⁡x,y∈Ad(f(x),f(y))d(x,y)α∈[0,∞].\operatorname{Lip}_\alpha(f;A)=\sup_{x,y\in A}\frac{d(f(x),f(y))}{d(x,y)^{\alpha}}\in[0,\infty].Lipα​(f;A)=x,y∈Asup​d(x,y)αd(f(x),f(y))​∈[0,∞].

This is computed in [0,∞][0,\infty][0,∞], where 0α0^\alpha0α equals 000, 111 or ∞\infty∞ according as α>0\alpha>0α>0, α=0\alpha=0α=0 or α<0\alpha<0α<0. As a result, pairs with x=yx=yx=y always contribute 000. The supremum is 000 if A=∅A=\varnothingA=∅.

In the remaining declarations, HHH is a real inner product space, not assumed complete, carrying an arbitrary σ\sigmaσ-algebra (not necessarily Borel).

IsP2. For a measure ν\nuν on HHH, ν∈P2(H)\nu\in\mathcal{P}_2(H)ν∈P2​(H) means:

  • ν\nuν is a probability measure, and
  • ∫H∥v∥2 dν(v)<∞\int_H\|v\|^2\,d\nu(v)<\infty∫H​∥v∥2dν(v)<∞, as a lower integral.

mean. For a measure ν\nuν on HHH, Eν[v]=∫Hv dν(v)\mathbb{E}_\nu[v]=\int_H v\,d\nu(v)Eν​[v]=∫H​vdν(v) is the Bochner integral. By convention it equals 000 in either of these cases:

  • the identity map is not Bochner-integrable with respect to ν\nuν;
  • HHH is not complete.

uncovOp. For a measure ν\nuν on HHH and w∈Hw\in Hw∈H, define

Γνunc(w)=∫H⟨v,w⟩ v dν(v),\Gamma^{\mathrm{unc}}_\nu(w)=\int_H\langle v,w\rangle\,v\,d\nu(v),Γνunc​(w)=∫H​⟨v,w⟩vdν(v),

as a Bochner integral. It equals 000 when the integrand is not integrable or HHH is not complete.

covOp. For a measure ν\nuν on HHH, let m=Eν[v]m=\mathbb{E}_\nu[v]m=Eν​[v] (as in mean, including its zero conventions). For w∈Hw\in Hw∈H, define

Γν(w)=∫H⟨v−m, w⟩ (v−m) dν(v),\Gamma_\nu(w)=\int_H\langle v-m,\,w\rangle\,(v-m)\,d\nu(v),Γν​(w)=∫H​⟨v−m,w⟩(v−m)dν(v),

as a Bochner integral, with the same zero conventions.

IsSpectralDecomp. For an arbitrary (not necessarily linear) map Γ:H→H\Gamma:H\to HΓ:H→H, a real sequence (λk)k∈N(\lambda_k)_{k\in\mathbb{N}}(λk​)k∈N​, and a sequence (ϕk)k∈N(\phi_k)_{k\in\mathbb{N}}(ϕk​)k∈N​ in HHH, the predicate states all of the following:

  1. (ϕk)k∈N(\phi_k)_{k\in\mathbb{N}}(ϕk​)k∈N​ is an orthonormal family indexed by all of N\mathbb{N}N. This is impossible when HHH is finite-dimensional, so the predicate is never satisfied there.
  2. λ0≥λ1≥λ2≥⋯\lambda_0\ge\lambda_1\ge\lambda_2\ge\cdotsλ0​≥λ1​≥λ2​≥⋯.
  3. For every w∈Hw\in Hw∈H, the series ∑kλk⟨ϕk,w⟩ ϕk\sum_{k}\lambda_k\langle\phi_k,w\rangle\,\phi_k∑k​λk​⟨ϕk​,w⟩ϕk​ is unconditionally summable with sum Γ(w)\Gamma(w)Γ(w).

Nothing requires the following:

  • the λk\lambda_kλk​ to be nonnegative or to tend to 000;
  • the family (ϕk)(\phi_k)(ϕk​) to be complete.

eigSpan. For Γ:H→H\Gamma:H\to HΓ:H→H and a set S⊆RS\subseteq\mathbb{R}S⊆R, this is the linear span (algebraic, not closed) of

{v∈H: Γ(v)=c v for some c∈S}.\{v\in H:\ \Gamma(v)=c\,v\ \text{for some } c\in S\}.{v∈H: Γ(v)=cv for some c∈S}.

Zero vectors are allowed in this set. If S=∅S=\varnothingS=∅ the span is {0}\{0\}{0}.

projErr. For a measure ν\nuν on HHH and any set S⊆HS\subseteq HS⊆H, define

PE⁡ν(S)=∫H(inf⁡w∈S∥v−w∥)2 dν(v)∈[0,∞].\operatorname{PE}_\nu(S)=\int_H\Big(\inf_{w\in S}\|v-w\|\Big)^2\,d\nu(v)\in[0,\infty].PEν​(S)=∫H​(w∈Sinf​∥v−w∥)2dν(v)∈[0,∞].

This is a lower integral. The infimum over S=∅S=\varnothingS=∅ is ∞\infty∞.

IsOptimalSubspace. For a measure ν\nuν on HHH, p∈Np\in\mathbb{N}p∈N, and a linear subspace V⊆HV\subseteq HV⊆H, the predicate states:

  • finrank⁡V=p\operatorname{finrank}V=pfinrankV=p, and
  • PE⁡ν(V)≤PE⁡ν(W)\operatorname{PE}_\nu(V)\le\operatorname{PE}_\nu(W)PEν​(V)≤PEν​(W) for every linear subspace WWW with finrank⁡W=p\operatorname{finrank}W=pfinrankW=p.

Here finrank⁡\operatorname{finrank}finrank is defined to be 000 for infinite-dimensional subspaces. Consequently, for p=0p=0p=0 both VVV and the competitors WWW may be either {0}\{0\}{0} or infinite-dimensional.

IsOptimalAffine. For a measure ν\nuν on HHH, p∈Np\in\mathbb{N}p∈N, and an affine subspace V0⊆HV_0\subseteq HV0​⊆H, the predicate states:

  • the direction space of V0V_0V0​ has finrank⁡\operatorname{finrank}finrank equal to ppp, and
  • PE⁡ν(V0)≤PE⁡ν(W)\operatorname{PE}_\nu(V_0)\le\operatorname{PE}_\nu(W)PEν​(V0​)≤PEν​(W) for every affine subspace WWW whose direction has finrank⁡\operatorname{finrank}finrank equal to ppp.

The empty affine subspace has direction {0}\{0\}{0}, hence finrank⁡0\operatorname{finrank}0finrank0. Infinite-dimensional directions also have finrank⁡0\operatorname{finrank}0finrank0. So for p=0p=0p=0 the candidates and competitors include the empty set, single points, and affine subspaces with infinite-dimensional direction.

gram. For v1,…,vp∈Hv_1,\dots,v_p\in Hv1​,…,vp​∈H, this is the p×pp\times pp×p real matrix

G(v)ij=⟨vi,vj⟩.G(v)_{ij}=\langle v_i,v_j\rangle .G(v)ij​=⟨vi​,vj​⟩.

dualBasis. For v1,…,vp∈Hv_1,\dots,v_p\in Hv1​,…,vp​∈H (not assumed linearly independent), define

vk∗=∑j=1p(G(v)−1)kj vj,k=1,…,p.v_k^{*}=\sum_{j=1}^{p}\big(G(v)^{-1}\big)_{kj}\,v_j,\qquad k=1,\dots,p.vk∗​=j=1∑p​(G(v)−1)kj​vj​,k=1,…,p.

Here G(v)−1G(v)^{-1}G(v)−1 is the matrix inverse when det⁡G(v)≠0\det G(v)\neq0detG(v)=0, and the zero matrix otherwise. In particular, vk∗=0v_k^*=0vk∗​=0 for all kkk whenever the vjv_jvj​ are linearly dependent.

optProj. For τ0,…,τp∈H\tau_0,\dots,\tau_p\in Hτ0​,…,τp​∈H and u∈Hu\in Hu∈H, define

Pτ(u)=(⟨u−τ0,τ1∗⟩, …, ⟨u−τ0,τp∗⟩)∈Rp,\mathcal{P}_\tau(u)=\big(\langle u-\tau_0,\tau_1^{*}\rangle,\ \dots,\ \langle u-\tau_0,\tau_p^{*}\rangle\big)\in\mathbb{R}^p,Pτ​(u)=(⟨u−τ0​,τ1∗​⟩, …, ⟨u−τ0​,τp∗​⟩)∈Rp,

where τ1∗,…,τp∗\tau_1^*,\dots,\tau_p^*τ1∗​,…,τp∗​ is the dualBasis of τ1,…,τp\tau_1,\dots,\tau_pτ1​,…,τp​. Thus Pτ≡0\mathcal{P}_\tau\equiv0Pτ​≡0 if τ1,…,τp\tau_1,\dots,\tau_pτ1​,…,τp​ are linearly dependent.

optTrunk. For a measure ν\nuν on HHH and a sequence (ϕj)j∈N(\phi_j)_{j\in\mathbb{N}}(ϕj​)j∈N​ in HHH, this is the family τ^0,…,τ^p\hat\tau_0,\dots,\hat\tau_pτ^0​,…,τ^p​ given by

τ^0=Eν[v],τ^k=ϕk−1(k=1,…,p).\hat\tau_0=\mathbb{E}_\nu[v],\qquad \hat\tau_k=\phi_{k-1}\quad(k=1,\dots,p).τ^0​=Eν​[v],τ^k​=ϕk−1​(k=1,…,p).

The mean Eν[v]\mathbb{E}_\nu[v]Eν​[v] is taken as in mean, including its zero conventions.

Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 2026

    Confirmed by the mission captain (proposal self-audit).

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