Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Hölder spaces, neural networks, PINN losses and the elliptic Dirichlet problem (Shin–Darbon–Karniadakis)

Definition
PINNConvergence_Basic

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

consistencyelliptic-pdesholder-regularizationmaximum-principlephysics-informed-neural-networks

Objects of Sections 2 and 3 and Appendices B and D of Shin, Darbon and Karniadakis (2020).

  1. Hölder quantities (Section 2.1, eq. 2.6, Definition 2.1). For S⊆RdS\subseteq\mathbb{R}^dS⊆Rd (Euclidean norm), [u]α;S=sup⁡x≠y∈S∥u(x)−u(y)∥/∥x−y∥α∈[0,∞][u]_{\alpha;S}=\sup_{x\ne y\in S}\|u(x)-u(y)\|/\|x-y\|^\alpha\in[0,\infty][u]α;S​=supx=y∈S​∥u(x)−u(y)∥/∥x−y∥α∈[0,∞], also for vector-valued uuu such as DkuD^kuDku. u∈Ck,α(S)u\in C^{k,\alpha}(S)u∈Ck,α(S) means: u∈Ck(S)u\in C^k(S)u∈Ck(S), every derivative of order ≤k\le k≤k is bounded on SSS, and [Dku]α;S<∞[D^ku]_{\alpha;S}<\infty[Dku]α;S​<∞. u∈Ck(U‾)u\in C^k(\overline U)u∈Ck(U) means u∈Ck(U)u\in C^k(U)u∈Ck(U) with derivatives of order ≤k\le k≤k extending continuously to U‾\overline UU. hn→uh_n\to uhn​→u in CkC^kCk means that every derivative of order ≤k\le k≤k converges uniformly on UUU. ∥u∥C0(S)=sup⁡S∣u∣∈[0,∞]\|u\|_{C^0(S)}=\sup_S|u|\in[0,\infty]∥u∥C0(S)​=supS​∣u∣∈[0,∞].
  2. Domains (Definition 2.2). A bounded domain is a bounded, open, connected set. It is of class C0,1C^{0,1}C0,1 if at each x0∈∂Ux_0\in\partial Ux0​∈∂U there are a ball BBB about x0x_0x0​ and a bi-Lipschitz map ψ\psiψ on BBB with ψ(B∩U)⊆{yi>0}\psi(B\cap U)\subseteq\{y_i>0\}ψ(B∩U)⊆{yi​>0} and ψ(B∩∂U)⊆{yi=0}\psi(B\cap\partial U)\subseteq\{y_i=0\}ψ(B∩∂U)⊆{yi​=0}.
  3. Data distributions (Assumption 3.1, d≥2d\ge2d≥2). UUU is a bounded C0,1C^{0,1}C0,1 domain and Γ⊆∂U\Gamma\subseteq\partial UΓ⊆∂U is closed. μr\mu_rμr​ is a probability measure with a density ρr\rho_rρr​ with respect to Lebesgue measure on UUU, inf⁡Uρr>0\inf_U\rho_r>0infU​ρr​>0. μb\mu_bμb​ is a probability measure with a density ρb\rho_bρb​ with respect to (d−1)(d-1)(d−1)-dimensional Hausdorff measure on Γ\GammaΓ, inf⁡Γρb>0\inf_\Gamma\rho_b>0infΓ​ρb​>0. For every ε>0\varepsilon>0ε>0 with crεd≤1c_r\varepsilon^d\le1cr​εd≤1 there is a finite measurable partition {Uj}\{U_j\}{Uj​} of UUU with points zj∈Ujz_j\in U_jzj​∈Uj​ such that UjU_jUj​ lies in the closed axis-parallel cube Hε(zj)H_\varepsilon(z_j)Hε​(zj​) of side ε\varepsilonε and μr(Uj)≥crεd\mu_r(U_j)\ge c_r\varepsilon^dμr​(Uj​)≥cr​εd. The same holds for Γ\GammaΓ, μb\mu_bμb​ and cbεd−1c_b\varepsilon^{d-1}cb​εd−1. Moreover μr(Bε(x)∩U)≤Crεd\mu_r(B_\varepsilon(x)\cap U)\le C_r\varepsilon^dμr​(Bε​(x)∩U)≤Cr​εd for x∈Ux\in Ux∈U and μb(Bε(x)∩Γ)≤Cbεd−1\mu_b(B_\varepsilon(x)\cap\Gamma)\le C_b\varepsilon^{d-1}μb​(Bε​(x)∩Γ)≤Cb​εd−1 for x∈Γx\in\Gammax∈Γ, for all ε>0\varepsilon>0ε>0 (closed balls). The constants satisfy cr,Cr,cb,Cb>0c_r,C_r,c_b,C_b>0cr​,Cr​,cb​,Cb​>0.
  4. Networks (Section 2.2, eq. 2.8). For an activation σ\sigmaσ, an architecture (n0=d,n1,…,nL=1)(n_0=d,n_1,\dots,n_L=1)(n0​=d,n1​,…,nL​=1) with L≥1L\ge1L≥1 and positive widths, and parameters θ={Wℓ,bℓ}\theta=\{W^\ell,b^\ell\}θ={Wℓ,bℓ}: h1(x)=W1x+b1h^1(x)=W^1x+b^1h1(x)=W1x+b1 and hℓ(x)=Wℓσ(hℓ−1(x))+bℓh^\ell(x)=W^\ell\sigma(h^{\ell-1}(x))+b^\ellhℓ(x)=Wℓσ(hℓ−1(x))+bℓ. The network is hLh^LhL. Hn⃗NN\mathcal H^{NN}_{\vec n}HnNN​ is the class of all such networks of a fixed architecture.
  5. Losses (eqs. 2.2-2.5, 3.1-3.3). For operators L,B\mathcal L,\mathcal BL,B, data f,gf,gf,g, weights λr,λb\lambda_r,\lambda_bλr​,λb​ and samples xr1,…,xrmrx_r^1,\dots,x_r^{m_r}xr1​,…,xrmr​​, xb1,…,xbmbx_b^1,\dots,x_b^{m_b}xb1​,…,xbmb​​: LossmPINN(h)=λrmr∑i(L[h](xri)−f(xri))2+λbmb∑i(B[h](xbi)−g(xbi))2\mathrm{Loss}^{PINN}_m(h)=\frac{\lambda_r}{m_r}\sum_i(\mathcal L[h](x_r^i)-f(x_r^i))^2+\frac{\lambda_b}{m_b}\sum_i(\mathcal B[h](x_b^i)-g(x_b^i))^2LossmPINN​(h)=mr​λr​​∑i​(L[h](xri​)−f(xri​))2+mb​λb​​∑i​(B[h](xbi​)−g(xbi​))2 and LossPINN(h)=λr∥L[h]−f∥L2(μr)2+λb∥B[h]−g∥L2(μb)2∈[0,∞]\mathrm{Loss}^{PINN}(h)=\lambda_r\|\mathcal L[h]-f\|^2_{L^2(\mu_r)}+\lambda_b\|\mathcal B[h]-g\|^2_{L^2(\mu_b)}\in[0,\infty]LossPINN(h)=λr​∥L[h]−f∥L2(μr​)2​+λb​∥B[h]−g∥L2(μb​)2​∈[0,∞]. The regularized loss is Lossm(h;λ,λR)=LossmPINN(h)+λrRRr(h)+λbRRb(h)\mathrm{Loss}_m(h;\lambda,\lambda^R)=\mathrm{Loss}^{PINN}_m(h)+\lambda_r^RR_r(h)+\lambda_b^RR_b(h)Lossm​(h;λ,λR)=LossmPINN​(h)+λrR​Rr​(h)+λbR​Rb​(h). The Hölder regularized loss (3.3) is the case Rr(h)=[L[h]]α;U2R_r(h)=[\mathcal L[h]]^2_{\alpha;U}Rr​(h)=[L[h]]α;U2​, Rb(h)=[B[h]]α;Γ2R_b(h)=[\mathcal B[h]]^2_{\alpha;\Gamma}Rb​(h)=[B[h]]α;Γ2​, valued in [0,∞][0,\infty][0,∞]. The constants of (3.1) are Cm=3max⁡{κrd dmr1/2,κbd d−1mb1/2}C_m=3\max\{\kappa_r\sqrt d^{\,d}m_r^{1/2},\kappa_b\sqrt d^{\,d-1}m_b^{1/2}\}Cm​=3max{κr​d​dmr1/2​,κb​d​d−1mb1/2​} with κ=C/c\kappa=C/cκ=C/c, λ^r,mR=3λrd 2αcr−2α/dmr−α/d/Cm\hat\lambda^R_{r,m}=3\lambda_r\sqrt d^{\,2\alpha}c_r^{-2\alpha/d}m_r^{-\alpha/d}/C_mλ^r,mR​=3λr​d​2αcr−2α/d​mr−α/d​/Cm​ and λ^b,mR=3λbd 2αcb−2α/(d−1)mb−α/(d−1)/Cm\hat\lambda^R_{b,m}=3\lambda_b\sqrt d^{\,2\alpha}c_b^{-2\alpha/(d-1)}m_b^{-\alpha/(d-1)}/C_mλ^b,mR​=3λb​d​2αcb−2α/(d−1)​mb−α/(d−1)​/Cm​. Condition (3.2) along mr=mm_r=mmr​=m, mb=mb(m)m_b=m_b(m)mb​=mb​(m) is: λmR≥λ^mR\lambda^R_m\ge\hat\lambda^R_mλmR​≥λ^mR​ entrywise and ∥λmR∥∞≤K∥λ^mR∥∞\|\lambda^R_m\|_\infty\le K\|\hat\lambda^R_m\|_\infty∥λmR​∥∞​≤K∥λ^mR​∥∞​ for some KKK.
  6. Sampling and network classes (Assumption 3.2). For each m≥1m\ge1m≥1 the mmm residual and mb(m)m_b(m)mb​(m) boundary samples are iid from μr\mu_rμr​ and μb\mu_bμb​, the two sets independent. The class Hm\mathcal H_mHm​, which may depend on the samples, consists of networks in Ck,α(U)∩C0,α(U‾)C^{k,\alpha}(U)\cap C^{0,\alpha}(\overline U)Ck,α(U)∩C0,α(U) with L[h]∈C0,α(U)\mathcal L[h]\in C^{0,\alpha}(U)L[h]∈C0,α(U) and B[h]∈C0,α(Γ)\mathcal B[h]\in C^{0,\alpha}(\Gamma)B[h]∈C0,α(Γ). It contains some um∗u^*_mum∗​ with zero empirical PINN loss, and sup⁡m[L[um∗]]α;U\sup_m[\mathcal L[u^*_m]]_{\alpha;U}supm​[L[um∗​]]α;U​ and sup⁡m[B[um∗]]α;Γ\sup_m[\mathcal B[u^*_m]]_{\alpha;\Gamma}supm​[B[um∗​]]α;Γ​ are finite. Also 0<α≤10<\alpha\le10<α≤1, f∈C0,α(U)f\in C^{0,\alpha}(U)f∈C0,α(U) and g∈C0,α(Γ)g\in C^{0,\alpha}(\Gamma)g∈C0,α(Γ).
  7. Elliptic problem (eq. 3.6, Assumption 3.3). L[u]=∑iDi(∑jaijDju+biu)+∑iciDiu+e u\mathcal L[u]=\sum_iD_i\big(\sum_ja^{ij}D_ju+b^iu\big)+\sum_ic^iD_iu+e\,uL[u]=∑i​Di​(∑j​aijDj​u+biu)+∑i​ciDi​u+eu, where eee is the paper's coefficient d(x)d(x)d(x). The auxiliary coefficients are b~i=∑jDjaij+bi+ci\tilde b^i=\sum_jD_ja^{ij}+b^i+c^ib~i=∑j​Dj​aij+bi+ci and c~=∑iDibi+e\tilde c=\sum_iD_ib^i+ec~=∑i​Di​bi+e. A classical solution is u∈C2(U)∩C0(U‾)u\in C^2(U)\cap C^0(\overline U)u∈C2(U)∩C0(U) with L[u]=f\mathcal L[u]=fL[u]=f in UUU and u=gu=gu=g on ∂U\partial U∂U. Assumption 3.3 consists of:
    • α∈(0,1)\alpha\in(0,1)α∈(0,1);
    • aij=ajia^{ij}=a^{ji}aij=aji and ∑ijaijξiξj≥λ0∣ξ∣2\sum_{ij}a^{ij}\xi_i\xi_j\ge\lambda_0|\xi|^2∑ij​aijξi​ξj​≥λ0​∣ξ∣2 with λ0>0\lambda_0>0λ0​>0;
    • ci,e∈Cα(U)c^i,e\in C^\alpha(U)ci,e∈Cα(U), aij,bi∈C1,α(U)a^{ij},b^i\in C^{1,\alpha}(U)aij,bi∈C1,α(U), f∈C0,α(U)f\in C^{0,\alpha}(U)f∈C0,α(U) and g∈C0,α(∂U)g\in C^{0,\alpha}(\partial U)g∈C0,α(∂U);
    • an exterior sphere at every boundary point;
    • ∑∣aij∣2≤Λ\sum|a^{ij}|^2\le\Lambda∑∣aij∣2≤Λ and λ0−2(∣b∣2+∣c∣2)+λ0−1∣e∣≤v2\lambda_0^{-2}(|b|^2+|c|^2)+\lambda_0^{-1}|e|\le v^2λ0−2​(∣b∣2+∣c∣2)+λ0−1​∣e∣≤v2.
  8. H1H^1H1 distance. ∥u−w∥H1(U)2=∫U(∣∇(u−w)∣2+∣u−w∣2) dx∈[0,∞]\|u-w\|^2_{H^1(U)}=\int_U\big(|\nabla(u-w)|^2+|u-w|^2\big)\,dx\in[0,\infty]∥u−w∥H1(U)2​=∫U​(∣∇(u−w)∣2+∣u−w∣2)dx∈[0,∞] for functions that are C1C^1C1 on UUU.

Formalization Note The paper requires the cube partitions for every ε>0\varepsilon>0ε>0. No probability measure satisfies this once cεs>1c\varepsilon^s>1cεs>1, so it is required for cεs≤1c\varepsilon^s\le1cεs≤1, the only range the proofs use. Partition pieces are assumed measurable. Networks have scalar output. The output of the last layer, which has width 111, is written as a sum over its single coordinate. Real quantities that may be infinite (Hölder constants, sup norms, the expected loss, the Hölder regularized loss) take values in [0,∞][0,\infty][0,∞].

Definition code
import Mathlib

/-!
Shin, Darbon and Karniadakis, *On the convergence of physics informed neural networks for linear
second-order elliptic and parabolic type PDEs*, arXiv:2004.01806v2 (2020): the Hölder constants
and spaces of Section 2.1, the feed-forward networks of Section 2.2 (eq. (2.8)), the PINN losses
(2.2)–(2.5), Assumptions 3.1–3.3, the weights (3.1)–(3.2), the Hölder regularized loss (3.3), and
the linear elliptic Dirichlet problem (3.6) of Section 3.
-/

open MeasureTheory

noncomputable section

namespace PINNConvergence

/-- Section 2: the space `ℝ^d` of the paper, with the Euclidean norm. -/
abbrev Rd (d : ℕ) : Type := EuclideanSpace ℝ (Fin d)

/-- Eq. (2.6), Section 2.1: the Hölder constant `[u]_{α;S} = sup_{x,y ∈ S, x ≠ y} ‖u x - u y‖ / ‖x - y‖^α`,
valued in `[0, ∞]`. For a vector-valued `u` (such as `D^k u`) it is the quantity used in `[u]_{k,α;S}`. -/
def holderConst {E F : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F] (α : ℝ) (S : Set E)
    (u : E → F) : ENNReal :=
  ⨆ x ∈ S, ⨆ y ∈ S, ⨆ (_ : x ≠ y), ENNReal.ofReal (‖u x - u y‖ / ‖x - y‖ ^ α)

/-- Section 2.1: the sup norm `sup_{x ∈ S} ‖u x‖` (the `C^0(S)` norm, and `[u]_{j,0;S}` for `u = D^j v`),
valued in `[0, ∞]`. -/
def supNorm {E F : Type*} [NormedAddCommGroup F] (S : Set E) (u : E → F) : ENNReal :=
  ⨆ x ∈ S, ‖u x‖ₑ

/-- Definition 2.1: `u ∈ C^{k,α}(S)`: `u` is `k` times continuously differentiable on `S`, its
derivatives of order `≤ k` are bounded on `S`, and `[D^k u]_{α;S} < ∞`. For `k = 0` this is
`C^{0,α}(S)`: `u` is continuous and bounded on `S` with finite Hölder constant. -/
def IsHolderCk {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (k : ℕ) (α : ℝ) (S : Set E)
    (u : E → ℝ) : Prop :=
  ContDiffOn ℝ k u S ∧ (∀ j ≤ k, supNorm S (iteratedFDerivWithin ℝ j u S) < ⊤) ∧
    holderConst α S (iteratedFDerivWithin ℝ k u S) < ⊤

/-- Section 2.1: `u ∈ C^k(closure U)`: `u ∈ C^k(U)` and each derivative of order `≤ k` has a
continuous extension to the closure of `U`. -/
def IsCkClosure {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (k : ℕ) (U : Set E)
    (u : E → ℝ) : Prop :=
  ContDiffOn ℝ k u U ∧ ∀ j ≤ k, ∃ F : E → ContinuousMultilinearMap ℝ (fun _ : Fin j => E) ℝ,
    ContinuousOn F (closure U) ∧ ∀ x ∈ U, F x = iteratedFDerivWithin ℝ j u U x

/-- Section 2.1: convergence `h_n → u` in the norm `‖·‖_{C^k} = ∑_{j ≤ k} [·]_{j,0;U}`, i.e. every
derivative of order `j ≤ k` converges uniformly on `U`. -/
def TendstoCk {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (k : ℕ) (U : Set E)
    (h : ℕ → E → ℝ) (u : E → ℝ) : Prop :=
  ∀ j ≤ k, TendstoUniformlyOn (fun n => iteratedFDerivWithin ℝ j (h n) U)
    (iteratedFDerivWithin ℝ j u U) Filter.atTop U

/-- Section 2: a bounded domain, i.e. a bounded, open and connected subset of `ℝ^d`. -/
def IsBoundedDomain {d : ℕ} (U : Set (Rd d)) : Prop :=
  Bornology.IsBounded U ∧ IsOpen U ∧ IsConnected U

/-- Definition 2.2 with `(k, α) = (0, 1)`: a bounded domain of class `C^{0,1}`. At each `x₀ ∈ ∂U`
there are a ball `B = B(x₀, r)` and a map `ψ` that is bi-Lipschitz on `B` (so `ψ ∈ C^{0,1}(B)` is
one-to-one and `ψ⁻¹ ∈ C^{0,1}(ψ(B))`) with `ψ(B ∩ U)` in the half-space `{y_i > 0}` and
`ψ(B ∩ ∂U)` in its boundary `{y_i = 0}`. -/
def IsDomainC01 {d : ℕ} (U : Set (Rd d)) : Prop :=
  IsBoundedDomain U ∧
    ∀ x₀ ∈ frontier U, ∃ r > 0, ∃ ψ : Rd d → Rd d, ∃ K > 0, ∃ i : Fin d,
      (∀ x ∈ Metric.ball x₀ r, ∀ y ∈ Metric.ball x₀ r,
        dist (ψ x) (ψ y) ≤ K * dist x y ∧ dist x y ≤ K * dist (ψ x) (ψ y)) ∧
      (∀ x ∈ Metric.ball x₀ r ∩ U, 0 < ψ x i) ∧
      (∀ x ∈ Metric.ball x₀ r ∩ frontier U, ψ x i = 0)

/-- Assumption 3.1 (2): the closed axis-parallel cube `H_ε(z)` of side length `ε` centred at `z`. -/
def cube {d : ℕ} (z : Rd d) (ε : ℝ) : Set (Rd d) :=
  {y | ∀ i, |y i - z i| ≤ ε / 2}

/-- Assumption 3.1 (2)–(3) and Lemma B.2: for every `ε > 0` with `c ε^s ≤ 1` there is a finite
partition of `S` into measurable pieces `S_j`, each containing a point `z_j` with `S_j ⊆ H_ε(z_j)`
and `μ(S_j) ≥ c ε^s`. (The paper asks this for every `ε > 0`, which no probability measure
satisfies once `c ε^s > 1`; see the Formalization Note.) -/
def HasCubePartitions {d : ℕ} (S : Set (Rd d)) (μ : Measure (Rd d)) (c : ℝ) (s : ℕ) : Prop :=
  ∀ ε : ℝ, 0 < ε → c * ε ^ s ≤ 1 →
    ∃ (K : ℕ) (P : Fin K → Set (Rd d)) (z : Fin K → Rd d),
      (∀ j, MeasurableSet (P j)) ∧ Pairwise (fun i j => Disjoint (P i) (P j)) ∧
      (⋃ j, P j) = S ∧ ∀ j, z j ∈ P j ∧ P j ⊆ cube (z j) ε ∧ ENNReal.ofReal (c * ε ^ s) ≤ μ (P j)

/-- Assumption 3.1 (items 1–3, the case `d ≥ 2`): `U` is a bounded domain of class `C^{0,1}`,
`Γ ⊆ ∂U` is closed, `μ_r` is a probability measure with density `ρ_r` with respect to Lebesgue
measure on `U`, `inf_U ρ_r > 0`, `μ_b` is a probability measure with density `ρ_b` with respect to
the `(d-1)`-dimensional Hausdorff measure on `Γ`, `inf_Γ ρ_b > 0`, the cube partitions exist with
constants `c_r, c_b > 0`, and `μ_r(B_ε(x) ∩ U) ≤ C_r ε^d`, `μ_b(B_ε(x) ∩ Γ) ≤ C_b ε^{d-1}` for
closed balls. -/
def DataDistAssumption {d : ℕ} (U Gam : Set (Rd d)) (μr μb : Measure (Rd d))
    (cr Cr cb Cb : ℝ) : Prop :=
  IsDomainC01 U ∧ IsClosed Gam ∧ Gam ⊆ frontier U ∧
    IsProbabilityMeasure μr ∧ IsProbabilityMeasure μb ∧
    (∃ ρ : Rd d → ENNReal, Measurable ρ ∧ μr = (volume.restrict U).withDensity ρ ∧
      ∃ ρ₀ : ENNReal, 0 < ρ₀ ∧ ∀ x ∈ U, ρ₀ ≤ ρ x) ∧
    (∃ ρ : Rd d → ENNReal, Measurable ρ ∧
      μb = ((Measure.hausdorffMeasure ((d : ℝ) - 1)).restrict Gam).withDensity ρ ∧
      ∃ ρ₀ : ENNReal, 0 < ρ₀ ∧ ∀ x ∈ Gam, ρ₀ ≤ ρ x) ∧
    0 < cr ∧ 0 < Cr ∧ 0 < cb ∧ 0 < Cb ∧
    HasCubePartitions U μr cr d ∧ HasCubePartitions Gam μb cb (d - 1) ∧
    (∀ ε : ℝ, 0 < ε → ∀ x ∈ U, μr (Metric.closedBall x ε ∩ U) ≤ ENNReal.ofReal (Cr * ε ^ d)) ∧
    (∀ ε : ℝ, 0 < ε → ∀ x ∈ Gam,
      μb (Metric.closedBall x ε ∩ Gam) ≤ ENNReal.ofReal (Cb * ε ^ (d - 1)))

/-- Section 2.2: the number of inputs of layer `l` (0-indexed): `d` for the first layer and the
width `n l` of the previous layer otherwise. -/
def inWidth (d : ℕ) (n : ℕ → ℕ) : ℕ → ℕ
  | 0 => d
  | l + 1 => n l

/-- Section 2.2: the output of layer `l + 1` of a feed-forward network (layers are 0-indexed here):
`h¹(x) = W¹ x + b¹` and `h^{ℓ}(x) = W^{ℓ} σ(h^{ℓ-1}(x)) + b^{ℓ}`, `σ` applied entrywise. -/
def layerOut (σ : ℝ → ℝ) (d : ℕ) (n : ℕ → ℕ)
    (W : ∀ l, Matrix (Fin (n l)) (Fin (inWidth d n l)) ℝ) (b : ∀ l, Fin (n l) → ℝ)
    (x : Fin d → ℝ) : ∀ l : ℕ, Fin (n l) → ℝ
  | 0 => (W 0).mulVec x + b 0
  | l + 1 => (W (l + 1)).mulVec (fun i => σ (layerOut σ d n W b x l i)) + b (l + 1)

/-- Section 2.2: the architecture `(n₀ = d, n₁, …, n_L)` of a scalar network with `L ≥ 1` layers,
all widths positive and output width `n_L = 1` (`n l` here is the paper's `n_{l+1}`). -/
def IsArch (L : ℕ) (n : ℕ → ℕ) : Prop :=
  1 ≤ L ∧ (∀ l < L, 1 ≤ n l) ∧ n (L - 1) = 1

/-- Section 2.2: the scalar network `h^L(x; θ_L)` with parameters `θ_L = {W^j, b^j}`. For an
architecture with `n_L = 1` the sum has the single term `h^L(x)`. -/
def nnEval (σ : ℝ → ℝ) (d L : ℕ) (n : ℕ → ℕ)
    (W : ∀ l, Matrix (Fin (n l)) (Fin (inWidth d n l)) ℝ) (b : ∀ l, Fin (n l) → ℝ)
    (x : Rd d) : ℝ :=
  ∑ i, layerOut σ d n W b (WithLp.ofLp x) (L - 1) i

/-- Eq. (2.8): the class `H^{NN}_{n}` of networks with activation `σ` and fixed architecture. -/
def nnClass (σ : ℝ → ℝ) (d L : ℕ) (n : ℕ → ℕ) : Set (Rd d → ℝ) :=
  {h | ∃ W b, h = nnEval σ d L n W b}

/-- Section 2.2: `h` is a feed-forward network with activation `σ` (of some architecture). -/
def IsNeuralNet (σ : ℝ → ℝ) (d : ℕ) (h : Rd d → ℝ) : Prop :=
  ∃ (L : ℕ) (n : ℕ → ℕ), IsArch L n ∧ h ∈ nnClass σ d L n

/-- Lemma 2.1: all weights and biases of the `L` layers are bounded in absolute value by `M`. -/
def ParamsBounded {d : ℕ} {n : ℕ → ℕ} (L : ℕ)
    (W : ∀ l, Matrix (Fin (n l)) (Fin (inWidth d n l)) ℝ) (b : ∀ l, Fin (n l) → ℝ) (M : ℝ) :
    Prop :=
  ∀ l < L, (∀ i j, |W l i j| ≤ M) ∧ ∀ i, |b l i| ≤ M

/-- Eq. (2.5): the empirical PINN loss
`(λ_r/m_r) ∑_i (L[h](x_r^i) - f(x_r^i))² + (λ_b/m_b) ∑_i (B[h](x_b^i) - g(x_b^i))²`. -/
def pinnLossEmp {E : Type*} (Lop Bop : (E → ℝ) → E → ℝ) (f g : E → ℝ) (lr lb : ℝ)
    {mr mb : ℕ} (xr : Fin mr → E) (xb : Fin mb → E) (h : E → ℝ) : ℝ :=
  lr / mr * ∑ i, (Lop h (xr i) - f (xr i)) ^ 2 + lb / mb * ∑ j, (Bop h (xb j) - g (xb j)) ^ 2

/-- Eq. (2.5): the expected PINN loss `λ_r ‖L[h] - f‖²_{L²(μ_r)} + λ_b ‖B[h] - g‖²_{L²(μ_b)}`,
valued in `[0, ∞]`. -/
def pinnLossExp {E : Type*} [MeasurableSpace E] (Lop Bop : (E → ℝ) → E → ℝ) (f g : E → ℝ)
    (lr lb : ℝ) (μr μb : Measure E) (h : E → ℝ) : ENNReal :=
  ENNReal.ofReal lr * ∫⁻ x, ENNReal.ofReal ((Lop h x - f x) ^ 2) ∂μr +
    ENNReal.ofReal lb * ∫⁻ x, ENNReal.ofReal ((Bop h x - g x) ^ 2) ∂μb

/-- Eqs. (2.2)–(2.3): the regularized empirical loss
`Loss_m(h; λ, λ^R) = Loss^{PINN}_m(h; λ) + λ_r^R R_r(h) + λ_b^R R_b(h)`, with the values
`R_r(h)`, `R_b(h)` of the regularization functionals given. -/
def lossEmp {E : Type*} (Lop Bop : (E → ℝ) → E → ℝ) (f g : E → ℝ) (lr lb lrR lbR Rr Rb : ℝ)
    {mr mb : ℕ} (xr : Fin mr → E) (xb : Fin mb → E) (h : E → ℝ) : ℝ :=
  pinnLossEmp Lop Bop f g lr lb xr xb h + lrR * Rr + lbR * Rb

/-- Eq. (3.3), case `d ≥ 2`: the Hölder regularized empirical loss
`Loss^{PINN}_m(h; λ) + λ_r^R [L[h]]²_{α;U} + λ_b^R [B[h]]²_{α;Γ}`, valued in `[0, ∞]`. -/
def holderRegLoss {E : Type*} [NormedAddCommGroup E] (α : ℝ) (U Gam : Set E)
    (Lop Bop : (E → ℝ) → E → ℝ) (f g : E → ℝ) (lr lb lrR lbR : ℝ) {mr mb : ℕ}
    (xr : Fin mr → E) (xb : Fin mb → E) (h : E → ℝ) : ENNReal :=
  ENNReal.ofReal (pinnLossEmp Lop Bop f g lr lb xr xb h) +
    ENNReal.ofReal lrR * holderConst α U (Lop h) ^ 2 + ENNReal.ofReal lbR * holderConst α Gam (Bop h) ^ 2

/-- Theorem 3.1 (`d ≥ 2`): `C_m = 3 max{κ_r √d^d m_r^{1/2}, κ_b √d^{d-1} m_b^{1/2}}` with
`κ_r = C_r / c_r`, `κ_b = C_b / c_b`. -/
def constCm (d : ℕ) (cr Cr cb Cb : ℝ) (mr mb : ℕ) : ℝ :=
  3 * max (Cr / cr * Real.sqrt d ^ d * Real.sqrt mr) (Cb / cb * Real.sqrt d ^ (d - 1) * Real.sqrt mb)

/-- Eq. (3.1): `λ̂^R_{r,m} = 3 λ_r √d^{2α} c_r^{-2α/d} m_r^{-α/d} / C_m`. -/
def lamHatR (d : ℕ) (α lr cr Cr cb Cb : ℝ) (mr mb : ℕ) : ℝ :=
  3 * lr * Real.sqrt d ^ (2 * α) * cr ^ (-(2 * α) / d) / constCm d cr Cr cb Cb mr mb *
    (mr : ℝ) ^ (-α / d)

/-- Eq. (3.1): `λ̂^R_{b,m} = 3 λ_b √d^{2α} c_b^{-2α/(d-1)} m_b^{-α/(d-1)} / C_m`. -/
def lamHatB (d : ℕ) (α lb cr Cr cb Cb : ℝ) (mr mb : ℕ) : ℝ :=
  3 * lb * Real.sqrt d ^ (2 * α) * cb ^ (-(2 * α) / ((d : ℝ) - 1)) / constCm d cr Cr cb Cb mr mb *
    (mb : ℝ) ^ (-α / ((d : ℝ) - 1))

/-- Eq. (3.2), along the sample sizes `m_r = m`, `m_b = mb m` (`m ≥ 1`): `λ^R_m ≥ λ̂^R_m`
entrywise and `‖λ^R_m‖_∞ = O(‖λ̂^R_m‖_∞)`. -/
def RegWeightCondition (d : ℕ) (α lr lb cr Cr cb Cb : ℝ) (mb : ℕ → ℕ) (lrR lbR : ℕ → ℝ) : Prop :=
  (∀ m : ℕ, 1 ≤ m → lamHatR d α lr cr Cr cb Cb m (mb m) ≤ lrR m ∧
      lamHatB d α lb cr Cr cb Cb m (mb m) ≤ lbR m) ∧
    ∃ K : ℝ, ∀ m : ℕ, 1 ≤ m → max (lrR m) (lbR m) ≤
      K * max (lamHatR d α lr cr Cr cb Cb m (mb m)) (lamHatB d α lb cr Cr cb Cb m (mb m))

/-- Section 2: for each `m ≥ 1`, `(XR m, XB m)` are `m` iid samples from `μ_r` and `mb m` iid
samples from `μ_b`, the two sets independent: their joint law is `μ_r^{⊗m} ⊗ μ_b^{⊗ mb m}`. -/
def IsIIDSampling {d : ℕ} {Smp : Type*} [MeasurableSpace Smp] (P : Measure Smp) (μr μb : Measure (Rd d))
    (mb : ℕ → ℕ) (XR : ∀ m : ℕ, Smp → Fin m → Rd d) (XB : ∀ m : ℕ, Smp → Fin (mb m) → Rd d) : Prop :=
  ∀ m : ℕ, 1 ≤ m → AEMeasurable (fun ω => (XR m ω, XB m ω)) P ∧
    P.map (fun ω => (XR m ω, XB m ω)) =
      (Measure.pi fun _ : Fin m => μr).prod (Measure.pi fun _ : Fin (mb m) => μb)

/-- Assumption 3.2, for classes `H m ω` that may depend on the samples `ω`: `0 < α ≤ 1`,
`f ∈ C^{0,α}(U)`, `g ∈ C^{0,α}(Γ)`; (1) every `h ∈ H_m` is a network (activation `σ`) in
`C^{k,α}(U) ∩ C^{0,α}(closure U)` with `L[h] ∈ C^{0,α}(U)`, `B[h] ∈ C^{0,α}(Γ)`; (2) `H_m` contains
`u*_m` with zero empirical PINN loss on the `m`-th samples; (3) `sup_m [L[u*_m]]_{α;U} < ∞` and
`sup_m [B[u*_m]]_{α;Γ} < ∞`. -/
def NetClassAssumption {d : ℕ} {Smp : Type*} (σ : ℝ → ℝ) (k : ℕ) (α : ℝ) (U Gam : Set (Rd d))
    (Lop Bop : (Rd d → ℝ) → Rd d → ℝ) (f g : Rd d → ℝ) (lr lb : ℝ) (mb : ℕ → ℕ)
    (XR : ∀ m : ℕ, Smp → Fin m → Rd d) (XB : ∀ m : ℕ, Smp → Fin (mb m) → Rd d)
    (H : ℕ → Smp → Set (Rd d → ℝ)) : Prop :=
  0 < α ∧ α ≤ 1 ∧ IsHolderCk 0 α U f ∧ IsHolderCk 0 α Gam g ∧
    (∀ m ω, ∀ h ∈ H m ω, IsNeuralNet σ d h ∧ IsHolderCk k α U h ∧
      IsHolderCk 0 α (closure U) h ∧ IsHolderCk 0 α U (Lop h) ∧ IsHolderCk 0 α Gam (Bop h)) ∧
    ∀ ω, ∃ us : ℕ → Rd d → ℝ,
      (∀ m : ℕ, 1 ≤ m → us m ∈ H m ω ∧ pinnLossEmp Lop Bop f g lr lb (XR m ω) (XB m ω) (us m) = 0) ∧
      (⨆ m : ℕ, ⨆ (_ : 1 ≤ m), holderConst α U (Lop (us m))) < ⊤ ∧
      (⨆ m : ℕ, ⨆ (_ : 1 ≤ m), holderConst α Gam (Bop (us m))) < ⊤

/-- Section 3.3: the partial derivative `D_i F(x)`. -/
def pd {d : ℕ} (i : Fin d) (F : Rd d → ℝ) (x : Rd d) : ℝ :=
  fderiv ℝ F x (EuclideanSpace.single i 1)

/-- Eq. (3.6): the divergence-form operator
`L[u] = ∑_i D_i(∑_j a^{ij} D_j u + b^i u) + ∑_i c^i D_i u + e u`
(the paper's zeroth-order coefficient `d(x)` is called `e` here). -/
def ellipticOp {d : ℕ} (a : Fin d → Fin d → Rd d → ℝ) (b c : Fin d → Rd d → ℝ) (e : Rd d → ℝ)
    (u : Rd d → ℝ) : Rd d → ℝ :=
  fun x => ∑ i, pd i (fun y => ∑ j, a i j y * pd j u y + b i y * u y) x +
    ∑ i, c i x * pd i u x + e x * u x

/-- Lemma D.1 and Assumption 3.4: `b̃^i = ∑_j D_j a^{ij} + b^i + c^i`. -/
def btilde {d : ℕ} (a : Fin d → Fin d → Rd d → ℝ) (b c : Fin d → Rd d → ℝ) (i : Fin d)
    (x : Rd d) : ℝ :=
  ∑ j, pd j (a i j) x + b i x + c i x

/-- Theorem 3.3: `c̃ = ∑_i D_i b^i + e`. -/
def ctilde {d : ℕ} (b : Fin d → Rd d → ℝ) (e : Rd d → ℝ) (x : Rd d) : ℝ :=
  ∑ i, pd i (b i) x + e x

/-- Section 2 and eq. (3.6): a classical solution of `L[u] = f` in `U`, `u = g` on `∂U`:
`u ∈ C²(U) ∩ C⁰(closure U)`. -/
def IsClassicalSol {d : ℕ} (U : Set (Rd d)) (a : Fin d → Fin d → Rd d → ℝ) (b c : Fin d → Rd d → ℝ)
    (e f g : Rd d → ℝ) (u : Rd d → ℝ) : Prop :=
  ContDiffOn ℝ 2 u U ∧ ContinuousOn u (closure U) ∧ (∀ x ∈ U, ellipticOp a b c e u x = f x) ∧
    ∀ x ∈ frontier U, u x = g x

/-- Assumption 3.3: `α ∈ (0,1)`; (1) `[a^{ij}]` is symmetric with smallest eigenvalue `≥ λ₀ > 0`
on `U`; (2) `c^i, e ∈ C^α(U)`; (3) `a^{ij}, b^i ∈ C^{1,α}(U)`, `f ∈ C^{0,α}(U)`,
`g ∈ C^{0,α}(∂U)`; (4) exterior sphere condition at every boundary point; (5) `Λ, v ≥ 0` with
`∑ |a^{ij}|² ≤ Λ` and `λ₀^{-2}(‖b‖² + ‖c‖²) + λ₀^{-1}|e| ≤ v²` on `U`. -/
def EllipticAssumption {d : ℕ} (α : ℝ) (U : Set (Rd d)) (a : Fin d → Fin d → Rd d → ℝ)
    (b c : Fin d → Rd d → ℝ) (e f g : Rd d → ℝ) (lam0 Lam v : ℝ) : Prop :=
  0 < α ∧ α < 1 ∧ 0 < lam0 ∧
    (∀ x ∈ U, ∀ ξ : Fin d → ℝ, lam0 * ∑ i, ξ i ^ 2 ≤ ∑ i, ∑ j, a i j x * ξ i * ξ j) ∧
    (∀ x ∈ U, ∀ i j, a i j x = a j i x) ∧
    (∀ i, IsHolderCk 0 α U (c i)) ∧ IsHolderCk 0 α U e ∧
    (∀ i j, IsHolderCk 1 α U (a i j)) ∧ (∀ i, IsHolderCk 1 α U (b i)) ∧
    IsHolderCk 0 α U f ∧ IsHolderCk 0 α (frontier U) g ∧
    (∀ x₀ ∈ frontier U, ∃ y : Rd d, ∃ R > 0, Metric.closedBall y R ∩ closure U = {x₀}) ∧
    0 ≤ Lam ∧ 0 ≤ v ∧
    ∀ x ∈ U, ∑ i, ∑ j, a i j x ^ 2 ≤ Lam ∧
      lam0⁻¹ ^ 2 * (∑ i, b i x ^ 2 + ∑ i, c i x ^ 2) + lam0⁻¹ * |e x| ≤ v ^ 2

/-- Theorem 3.4: the squared `H¹(U)` distance `∫_U (|∇(u - w)|² + |u - w|²) dx` of two functions
that are `C¹` on `U` (for which the weak gradient is the classical one), valued in `[0, ∞]`. -/
def h1DistSq {d : ℕ} (U : Set (Rd d)) (u w : Rd d → ℝ) : ENNReal :=
  ∫⁻ x in U, ‖fderiv ℝ (u - w) x‖ₑ ^ 2 + ‖u x - w x‖ₑ ^ 2

end PINNConvergence
Source
Shin, Darbon and Karniadakis, On the convergence of physics informed neural networks for linear second-order elliptic and parabolic type PDEs, arXiv:2004.01806v2 (2020), Section 2 (eqs. (2.2)-(2.6), (2.8), Definitions 2.1-2.2), Section 3 (Assumptions 3.1-3.3, eqs. (3.1)-(3.3), (3.6)), Appendices B and D
Read-back

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

Throughout, ddd ranges over all natural numbers, including d=0d = 0d=0. Rd\mathbb{R}^dRd carries the Euclidean norm. [0,∞][0,\infty][0,∞] denotes the extended non-negative reals, with the conventions 0⋅∞=00\cdot\infty = 00⋅∞=0 and sup⁡∅=0\sup\emptyset = 0sup∅=0. The symbol x+=max⁡(x,0)x^+ = \max(x,0)x+=max(x,0) denotes the operation that turns a real number into an element of [0,∞][0,\infty][0,∞], which clamps negatives to 000.


Euclidean space (Rd\mathrm{Rd}Rd). For each natural number ddd, Rd\mathbb{R}^dRd is the space of real ddd-tuples (x1,…,xd)(x_1,\dots,x_d)(x1​,…,xd​) with the Euclidean norm. For d=0d=0d=0 it is the one-point space.

Hölder constant (holderConst\mathrm{holderConst}holderConst). Let E,FE, FE,F be normed abelian groups (no vector-space structure is required), α\alphaα any real number (no sign or range restriction), S⊆ES \subseteq ES⊆E any set, and u:E→Fu : E \to Fu:E→F any function. The value is

[u]α;S=sup⁡x,y∈S, x≠y∥u(x)−u(y)∥∥x−y∥α∈[0,∞],[u]_{\alpha;S} = \sup_{x,y\in S,\ x\neq y} \frac{\|u(x)-u(y)\|}{\|x-y\|^{\alpha}} \in [0,\infty],[u]α;S​=x,y∈S, x=ysup​∥x−y∥α∥u(x)−u(y)∥​∈[0,∞],

where ∥x−y∥α\|x-y\|^\alpha∥x−y∥α is a real power of a positive number. If SSS has fewer than two points, the value is 000.

Sup norm (supNorm\mathrm{supNorm}supNorm). For any set S⊆ES \subseteq ES⊆E and any u:E→Fu : E \to Fu:E→F with FFF a normed abelian group, the value is

sup⁡x∈S∥u(x)∥∈[0,∞].\sup_{x\in S}\|u(x)\| \in [0,\infty].x∈Ssup​∥u(x)∥∈[0,∞].

It is 000 if S=∅S=\emptysetS=∅.

Hölder space membership (IsHolderCk\mathrm{IsHolderCk}IsHolderCk). Let EEE be a real normed space, k∈Nk\in\mathbb{N}k∈N, α∈R\alpha\in\mathbb{R}α∈R (unrestricted), S⊆ES\subseteq ES⊆E and u:E→Ru : E\to\mathbb{R}u:E→R. The statement "u∈Ck,α(S)u \in C^{k,\alpha}(S)u∈Ck,α(S)" means all three of the following:

  1. uuu is kkk times continuously differentiable on SSS, in the sense of derivatives taken within SSS. For k=0k=0k=0 this just means uuu is continuous on SSS.
  2. For every j≤kj\le kj≤k, sup⁡x∈S∥DSju(x)∥<∞\sup_{x\in S}\|D^j_S u(x)\| < \inftysupx∈S​∥DSj​u(x)∥<∞. Here DSju(x)D^j_S u(x)DSj​u(x) is the jjj-th iterated derivative of uuu within SSS, a jjj-linear map with its operator norm. For j=0j=0j=0 it is ∣u(x)∣|u(x)|∣u(x)∣.
  3. The Hölder constant [DSku]α;S[D^k_S u]_{\alpha;S}[DSk​u]α;S​ is finite.

Derivatives within SSS are uniquely determined only where SSS has enough tangent directions, for example when SSS is open. On thin sets such as a boundary piece, the derivatives of order ≥1\ge 1≥1 are whatever the within-SSS construction produces.

CkC^kCk up to the closure (IsCkClosure\mathrm{IsCkClosure}IsCkClosure). For a real normed space EEE, k∈Nk\in\mathbb{N}k∈N, U⊆EU\subseteq EU⊆E and u:E→Ru:E\to\mathbb{R}u:E→R, this requires two things:

  • uuu is kkk times continuously differentiable on UUU (derivatives within UUU).
  • For each j≤kj\le kj≤k, there is a function FjF_jFj​ from EEE to continuous jjj-linear maps Ej→RE^j\to\mathbb{R}Ej→R such that FjF_jFj​ is continuous on U‾\overline UU and Fj(x)=DUju(x)F_j(x)=D^j_U u(x)Fj​(x)=DUj​u(x) for every x∈Ux\in Ux∈U.

CkC^kCk convergence (TendstoCk\mathrm{TendstoCk}TendstoCk). For a sequence hn:E→Rh_n : E\to\mathbb{R}hn​:E→R and u:E→Ru:E\to\mathbb{R}u:E→R, this means: for every j≤kj\le kj≤k, the jjj-th iterated derivatives within UUU, DUjhnD^j_U h_nDUj​hn​, converge uniformly on UUU (in operator norm) to DUjuD^j_U uDUj​u as n→∞n\to\inftyn→∞.

Bounded domain (IsBoundedDomain\mathrm{IsBoundedDomain}IsBoundedDomain). A set U⊆RdU\subseteq\mathbb{R}^dU⊆Rd is bounded, open, and connected. Connectedness here includes non-emptiness.

Lipschitz domain (IsDomainC01\mathrm{IsDomainC01}IsDomainC01). UUU is a bounded domain, and for every point x0x_0x0​ of the topological boundary ∂U\partial U∂U there exist:

  • a radius r>0r>0r>0,
  • a map ψ:Rd→Rd\psi:\mathbb{R}^d\to\mathbb{R}^dψ:Rd→Rd,
  • a constant K>0K>0K>0,
  • a coordinate index i∈{1,…,d}i\in\{1,\dots,d\}i∈{1,…,d},

such that:

  • (i) for all x,yx,yx,y in the open ball B(x0,r)B(x_0,r)B(x0​,r), dist⁡(ψx,ψy)≤Kdist⁡(x,y)\operatorname{dist}(\psi x,\psi y)\le K\operatorname{dist}(x,y)dist(ψx,ψy)≤Kdist(x,y) and dist⁡(x,y)≤Kdist⁡(ψx,ψy)\operatorname{dist}(x,y)\le K\operatorname{dist}(\psi x,\psi y)dist(x,y)≤Kdist(ψx,ψy);
  • (ii) ψ(x)i>0\psi(x)_i>0ψ(x)i​>0 for every x∈B(x0,r)∩Ux\in B(x_0,r)\cap Ux∈B(x0​,r)∩U;
  • (iii) ψ(x)i=0\psi(x)_i=0ψ(x)i​=0 for every x∈B(x0,r)∩∂Ux\in B(x_0,r)\cap\partial Ux∈B(x0​,r)∩∂U.

Nothing is required of ψ\psiψ on B(x0,r)∖U‾B(x_0,r)\setminus\overline UB(x0​,r)∖U, and nothing requires ψ\psiψ to map onto a half-ball. For d=0d=0d=0, the only bounded domain is the one-point space, whose boundary is empty, so the boundary condition is vacuous.

Cube (cube\mathrm{cube}cube). For z∈Rdz\in\mathbb{R}^dz∈Rd and ε∈R\varepsilon\in\mathbb{R}ε∈R,

Hε(z)={y∈Rd:∣yi−zi∣≤ε/2 for all i}.H_\varepsilon(z)=\{y\in\mathbb{R}^d : |y_i-z_i|\le \varepsilon/2 \text{ for all } i\}.Hε​(z)={y∈Rd:∣yi​−zi​∣≤ε/2 for all i}.

This set is empty if ε<0\varepsilon<0ε<0, and is all of R0\mathbb{R}^0R0 when d=0d=0d=0.

Cube partitions (HasCubePartitions\mathrm{HasCubePartitions}HasCubePartitions). Given S⊆RdS\subseteq\mathbb{R}^dS⊆Rd, an arbitrary measure μ\muμ, c∈Rc\in\mathbb{R}c∈R and s∈Ns\in\mathbb{N}s∈N, the condition is: for every real ε>0\varepsilon>0ε>0 with c εs≤1c\,\varepsilon^s\le 1cεs≤1, there exist K∈NK\in\mathbb{N}K∈N, sets P1,…,PKP_1,\dots,P_KP1​,…,PK​ and points z1,…,zKz_1,\dots,z_Kz1​,…,zK​ such that:

  • each PjP_jPj​ is measurable;
  • the PjP_jPj​ are pairwise disjoint;
  • ⋃jPj=S\bigcup_j P_j = S⋃j​Pj​=S;
  • for every jjj: zj∈Pjz_j\in P_jzj​∈Pj​, Pj⊆Hε(zj)P_j\subseteq H_\varepsilon(z_j)Pj​⊆Hε​(zj​), and μ(Pj)≥(c εs)+\mu(P_j)\ge (c\,\varepsilon^s)^+μ(Pj​)≥(cεs)+.

Some consequences:

  • If c≤0c\le0c≤0, the constraint cεs≤1c\varepsilon^s\le1cεs≤1 holds for all ε>0\varepsilon>0ε>0 and the measure lower bound is trivial.
  • K=0K=0K=0 is possible only if S=∅S=\emptysetS=∅.
  • Each PjP_jPj​ is nonempty.

Data distribution assumption (DataDistAssumption\mathrm{DataDistAssumption}DataDistAssumption). Given U,Γ⊆RdU,\Gamma\subseteq\mathbb{R}^dU,Γ⊆Rd, measures μr,μb\mu_r,\mu_bμr​,μb​ and reals cr,Cr,cb,Cbc_r,C_r,c_b,C_bcr​,Cr​,cb​,Cb​, all of the following hold:

  • UUU is a Lipschitz domain as above.
  • Γ\GammaΓ is closed and Γ⊆∂U\Gamma\subseteq\partial UΓ⊆∂U.
  • μr\mu_rμr​ and μb\mu_bμb​ are probability measures.
  • There is a measurable ρr:Rd→[0,∞]\rho_r:\mathbb{R}^d\to[0,\infty]ρr​:Rd→[0,∞] with μr=ρr⋅(Lebesgue measure restricted to U)\mu_r = \rho_r\cdot(\text{Lebesgue measure restricted to }U)μr​=ρr​⋅(Lebesgue measure restricted to U). There is also some ρ0∈(0,∞]\rho_0\in(0,\infty]ρ0​∈(0,∞] with ρr≥ρ0\rho_r\ge\rho_0ρr​≥ρ0​ on UUU.
  • There is a measurable ρb\rho_bρb​ with μb=ρb⋅(Hd−1 restricted to Γ)\mu_b=\rho_b\cdot(\mathcal H^{d-1}\text{ restricted to }\Gamma)μb​=ρb​⋅(Hd−1 restricted to Γ), where Hd−1\mathcal H^{d-1}Hd−1 is the Hausdorff measure of real dimension d−1d-1d−1 (which is −1-1−1 when d=0d=0d=0). There is also some ρ0′∈(0,∞]\rho_0'\in(0,\infty]ρ0′​∈(0,∞] with ρb≥ρ0′\rho_b\ge\rho_0'ρb​≥ρ0′​ on Γ\GammaΓ. Since μb\mu_bμb​ is a probability measure, Γ\GammaΓ must be nonempty.
  • cr,Cr,cb,Cb>0c_r,C_r,c_b,C_b>0cr​,Cr​,cb​,Cb​>0.
  • UUU has cube partitions for (μr,cr,s=d)(\mu_r,c_r,s=d)(μr​,cr​,s=d), and Γ\GammaΓ has cube partitions for (μb,cb,s=d−˙1)(\mu_b,c_b,s=d\dot-1)(μb​,cb​,s=d−˙​1). Here d−˙1d\dot-1d−˙​1 is truncated natural subtraction, so it equals 000 for d∈{0,1}d\in\{0,1\}d∈{0,1}.
  • For all ε>0\varepsilon>0ε>0 and x∈Ux\in Ux∈U: μr(Bˉ(x,ε)∩U)≤(Crεd)+\mu_r(\bar B(x,\varepsilon)\cap U)\le (C_r\varepsilon^d)^+μr​(Bˉ(x,ε)∩U)≤(Cr​εd)+.
  • For all ε>0\varepsilon>0ε>0 and x∈Γx\in\Gammax∈Γ: μb(Bˉ(x,ε)∩Γ)≤(Cbεd−˙1)+\mu_b(\bar B(x,\varepsilon)\cap\Gamma)\le (C_b\varepsilon^{d\dot-1})^+μb​(Bˉ(x,ε)∩Γ)≤(Cb​εd−˙​1)+, using closed balls.

No condition d≥2d\ge2d≥2 is imposed.

Layer input width (inWidth\mathrm{inWidth}inWidth). Given ddd and widths n:N→Nn:\mathbb{N}\to\mathbb{N}n:N→N, the input width of layer lll (layers indexed from 000) is ddd for l=0l=0l=0 and nl−1n_{l-1}nl−1​ for l≥1l\ge1l≥1.

Layer outputs (layerOut\mathrm{layerOut}layerOut). Given σ:R→R\sigma:\mathbb{R}\to\mathbb{R}σ:R→R, real matrices WlW^lWl of size nl×(input width of l)n_l\times(\text{input width of } l)nl​×(input width of l), vectors bl∈Rnlb^l\in\mathbb{R}^{n_l}bl∈Rnl​ (for every l∈Nl\in\mathbb{N}l∈N), and x∈Rdx\in\mathbb{R}^dx∈Rd, the outputs are defined recursively:

h0(x)=W0x+b0,hl+1(x)=Wl+1 σ(hl(x))+bl+1,h^0(x)=W^0x+b^0,\qquad h^{l+1}(x)=W^{l+1}\,\sigma\big(h^l(x)\big)+b^{l+1},h0(x)=W0x+b0,hl+1(x)=Wl+1σ(hl(x))+bl+1,

with σ\sigmaσ applied entrywise.

Architecture (IsArch\mathrm{IsArch}IsArch). The pair (L,n)(L,n)(L,n) satisfies L≥1L\ge1L≥1, nl≥1n_l\ge1nl​≥1 for all l<Ll<Ll<L, and nL−1=1n_{L-1}=1nL−1​=1.

Network evaluation (nnEval\mathrm{nnEval}nnEval). The network value is

h(x)=∑i=1nL−1hL−1(x)i,h(x)=\sum_{i=1}^{n_{L-1}} h^{L-1}(x)_i,h(x)=i=1∑nL−1​​hL−1(x)i​,

where L−1L-1L−1 is truncated, so L=0L=0L=0 uses layer 000. This is the sum of all coordinates of the output of layer L−1L-1L−1; it is an empty sum (value 000) if nL−1=0n_{L-1}=0nL−1​=0. No activation is applied at the output. Parameters of layers l≥Ll\ge Ll≥L do not affect the value.

Network class (nnClass\mathrm{nnClass}nnClass). For fixed σ,d,L,n\sigma,d,L,nσ,d,L,n, this is the set of all functions Rd→R\mathbb{R}^d\to\mathbb{R}Rd→R that equal the network evaluation for some real weights WWW and biases bbb (unbounded).

Neural network (IsNeuralNet\mathrm{IsNeuralNet}IsNeuralNet). h:Rd→Rh:\mathbb{R}^d\to\mathbb{R}h:Rd→R is a neural network with activation σ\sigmaσ if there exist L,nL,nL,n forming an architecture with hhh in the corresponding network class. With L=1L=1L=1, h(x)=W0x+b0h(x)=W^0x+b^0h(x)=W0x+b0 for a single row W0W^0W0, so every affine function Rd→R\mathbb{R}^d\to\mathbb{R}Rd→R qualifies, regardless of σ\sigmaσ.

Bounded parameters (ParamsBounded\mathrm{ParamsBounded}ParamsBounded). For every l<Ll<Ll<L, every entry satisfies ∣Wijl∣≤M|W^l_{ij}|\le M∣Wijl​∣≤M and ∣bil∣≤M|b^l_i|\le M∣bil​∣≤M. The condition is vacuous if L=0L=0L=0.

Empirical PINN loss (pinnLossEmp\mathrm{pinnLossEmp}pinnLossEmp). The inputs are:

  • arbitrary maps L,B\mathcal L,\mathcal BL,B from functions E→RE\to\mathbb{R}E→R to functions E→RE\to\mathbb{R}E→R;
  • f,g:E→Rf,g:E\to\mathbb{R}f,g:E→R and reals λr,λb\lambda_r,\lambda_bλr​,λb​ of any sign;
  • points xr1,…,xrmrx_r^1,\dots,x_r^{m_r}xr1​,…,xrmr​​ and xb1,…,xbmbx_b^1,\dots,x_b^{m_b}xb1​,…,xbmb​​.

The value is

λrmr∑i=1mr(L[h](xri)−f(xri))2+λbmb∑j=1mb(B[h](xbj)−g(xbj))2.\frac{\lambda_r}{m_r}\sum_{i=1}^{m_r}\big(\mathcal L[h](x_r^i)-f(x_r^i)\big)^2+\frac{\lambda_b}{m_b}\sum_{j=1}^{m_b}\big(\mathcal B[h](x_b^j)-g(x_b^j)\big)^2.mr​λr​​i=1∑mr​​(L[h](xri​)−f(xri​))2+mb​λb​​j=1∑mb​​(B[h](xbj​)−g(xbj​))2.

Division by 000 yields 000, so a term vanishes when mr=0m_r=0mr​=0 or mb=0m_b=0mb​=0.

Expected PINN loss (pinnLossExp\mathrm{pinnLossExp}pinnLossExp). The value is

λr+∫(L[h]−f)2 dμr+λb+∫(B[h]−g)2 dμb∈[0,∞].\lambda_r^+\int\big(\mathcal L[h]-f\big)^2\,d\mu_r+\lambda_b^+\int\big(\mathcal B[h]-g\big)^2\,d\mu_b\in[0,\infty].λr+​∫(L[h]−f)2dμr​+λb+​∫(B[h]−g)2dμb​∈[0,∞].

These are lower Lebesgue integrals, and no measurability or integrability is assumed. Negative weights are replaced by 000.

Regularized empirical loss (lossEmp\mathrm{lossEmp}lossEmp). The empirical PINN loss plus λrRRr+λbRRb\lambda_r^R R_r+\lambda_b^R R_bλrR​Rr​+λbR​Rb​, where Rr,RbR_r,R_bRr​,Rb​ are given real numbers that do not depend on hhh in this definition.

Hölder-regularized loss (holderRegLoss\mathrm{holderRegLoss}holderRegLoss). The value is

(empirical PINN loss)++(λrR)+ [L[h]]α;U2+(λbR)+ [B[h]]α;Γ2∈[0,∞].(\text{empirical PINN loss})^+ + (\lambda_r^R)^+\,[\mathcal L[h]]_{\alpha;U}^2 + (\lambda_b^R)^+\,[\mathcal B[h]]_{\alpha;\Gamma}^2 \in[0,\infty].(empirical PINN loss)++(λrR​)+[L[h]]α;U2​+(λbR​)+[B[h]]α;Γ2​∈[0,∞].

A non-positive weight annihilates the corresponding term even if the Hölder constant is ∞\infty∞.

Constant CmC_mCm​ (constCm\mathrm{constCm}constCm). The value is

Cm=3max⁡(Crcrd dmr, Cbcbd d−˙1mb),C_m=3\max\Big(\tfrac{C_r}{c_r}\sqrt d^{\,d}\sqrt{m_r},\ \tfrac{C_b}{c_b}\sqrt d^{\,d\dot-1}\sqrt{m_b}\Big),Cm​=3max(cr​Cr​​d​dmr​​, cb​Cb​​d​d−˙​1mb​​),

with natural-number exponents, d−˙1d\dot-1d−˙​1 truncated, and x/0=0x/0=0x/0=0.

Weight λ^rR\hat\lambda^R_rλ^rR​ (lamHatR\mathrm{lamHatR}lamHatR). The value is

λ^rR=3λr (d)2α cr−2α/dCm mr−α/d,\hat\lambda^R_r=\frac{3\lambda_r\,(\sqrt d)^{2\alpha}\,c_r^{-2\alpha/d}}{C_m}\,m_r^{-\alpha/d},λ^rR​=Cm​3λr​(d​)2αcr−2α/d​​mr−α/d​,

with real exponents and the following conventions:

  • x/0=0x/0=0x/0=0, so for d=0d=0d=0 both exponents −2α/d-2\alpha/d−2α/d and −α/d-\alpha/d−α/d are 000, and a zero CmC_mCm​ makes the value 000.
  • 0y=00^y=00y=0 for y≠0y\neq0y=0.
  • Real powers of negative bases follow the convention xy=exp⁡(ylog⁡∣x∣)cos⁡(πy)x^y=\exp(y\log|x|)\cos(\pi y)xy=exp(ylog∣x∣)cos(πy).

Weight λ^bR\hat\lambda^R_bλ^bR​ (lamHatB\mathrm{lamHatB}lamHatB). The value is

λ^bR=3λb(d)2αcb−2α/(d−1)Cm mb−α/(d−1),\hat\lambda^R_b=\frac{3\lambda_b(\sqrt d)^{2\alpha}c_b^{-2\alpha/(d-1)}}{C_m}\,m_b^{-\alpha/(d-1)},λ^bR​=Cm​3λb​(d​)2αcb−2α/(d−1)​​mb−α/(d−1)​,

where d−1d-1d−1 is real subtraction. For d=1d=1d=1 the exponents are 000 by the division-by-zero convention.

Regularization weight condition (RegWeightCondition\mathrm{RegWeightCondition}RegWeightCondition). Given mb:N→Nm_b:\mathbb{N}\to\mathbb{N}mb​:N→N and sequences λrR(m),λbR(m)\lambda^R_r(m),\lambda^R_b(m)λrR​(m),λbR​(m), take mr=mm_r=mmr​=m and mb=mb(m)m_b=m_b(m)mb​=mb​(m). The condition is:

  • (i) For every m≥1m\ge1m≥1: λ^rR≤λrR(m)\hat\lambda^R_r\le\lambda^R_r(m)λ^rR​≤λrR​(m) and λ^bR≤λbR(m)\hat\lambda^R_b\le\lambda^R_b(m)λ^bR​≤λbR​(m).
  • (ii) There is a real KKK (of any sign) with
max⁡(λrR(m),λbR(m))≤Kmax⁡(λ^rR,λ^bR)for all m≥1.\max(\lambda^R_r(m),\lambda^R_b(m))\le K\max(\hat\lambda^R_r,\hat\lambda^R_b)\quad\text{for all } m\ge1.max(λrR​(m),λbR​(m))≤Kmax(λ^rR​,λ^bR​)for all m≥1.

Plain maxima are used, not maxima of absolute values.

i.i.d. sampling (IsIIDSampling\mathrm{IsIIDSampling}IsIIDSampling). Let PPP be a measure on a measurable space Ω\OmegaΩ; it is not required to be a probability measure. For every m≥1m\ge1m≥1, the map ω↦(XRm(ω),XBm(ω))∈(Rd)m×(Rd)mb(m)\omega\mapsto(X_R^m(\omega),X_B^m(\omega))\in(\mathbb{R}^d)^m\times(\mathbb{R}^d)^{m_b(m)}ω↦(XRm​(ω),XBm​(ω))∈(Rd)m×(Rd)mb​(m) is PPP-a.e. measurable, and its pushforward under PPP equals

μr⊗m⊗μb⊗mb(m).\mu_r^{\otimes m}\otimes\mu_b^{\otimes m_b(m)}.μr⊗m​⊗μb⊗mb​(m)​.

For mb(m)=0m_b(m)=0mb​(m)=0, the second factor is the point mass on the empty tuple. Nothing relates samples for different mmm.

Network class assumption (NetClassAssumption\mathrm{NetClassAssumption}NetClassAssumption). For classes H(m,ω)H(m,\omega)H(m,ω) of functions Rd→R\mathbb{R}^d\to\mathbb{R}Rd→R, all of the following hold:

  • 0<α≤10<\alpha\le10<α≤1.
  • f∈C0,α(U)f\in C^{0,\alpha}(U)f∈C0,α(U) and g∈C0,α(Γ)g\in C^{0,\alpha}(\Gamma)g∈C0,α(Γ).
  • For every mmm (including m=0m=0m=0), every ω\omegaω, and every h∈H(m,ω)h\in H(m,\omega)h∈H(m,ω):
    • hhh is a neural network with activation σ\sigmaσ;
    • h∈Ck,α(U)h\in C^{k,\alpha}(U)h∈Ck,α(U) and h∈C0,α(U‾)h\in C^{0,\alpha}(\overline U)h∈C0,α(U);
    • L[h]∈C0,α(U)\mathcal L[h]\in C^{0,\alpha}(U)L[h]∈C0,α(U) and B[h]∈C0,α(Γ)\mathcal B[h]\in C^{0,\alpha}(\Gamma)B[h]∈C0,α(Γ).
  • For every ω\omegaω (not merely almost every), there is a sequence um∗u^*_mum∗​ such that:
    • for all m≥1m\ge1m≥1, um∗∈H(m,ω)u^*_m\in H(m,\omega)um∗​∈H(m,ω) and the empirical PINN loss of um∗u^*_mum∗​ on the samples XRm(ω)X_R^m(\omega)XRm​(ω) (mmm points) and XBm(ω)X_B^m(\omega)XBm​(ω) (mb(m)m_b(m)mb​(m) points) is exactly 000;
    • sup⁡m≥1[L[um∗]]α;U<∞\sup_{m\ge1}[\mathcal L[u^*_m]]_{\alpha;U}<\inftysupm≥1​[L[um∗​]]α;U​<∞ and sup⁡m≥1[B[um∗]]α;Γ<∞\sup_{m\ge1}[\mathcal B[u^*_m]]_{\alpha;\Gamma}<\inftysupm≥1​[B[um∗​]]α;Γ​<∞.

Because λr,λb\lambda_r,\lambda_bλr​,λb​ are unrestricted in sign, a zero loss means exact fitting at all sample points only when both weights are positive. Otherwise the two terms may cancel or vanish.

Partial derivative (pd\mathrm{pd}pd). DiF(x)D_iF(x)Di​F(x) is the Fréchet derivative of FFF on all of Rd\mathbb{R}^dRd at xxx, applied to the iii-th standard basis vector. It equals 000 wherever FFF is not differentiable.

Elliptic operator (ellipticOp\mathrm{ellipticOp}ellipticOp). For coefficient functions aij,bi,ci,ea^{ij},b^i,c^i,eaij,bi,ci,e, the operator is

L[u](x)=∑iDi(∑jaijDju+biu)(x)+∑ici(x)Diu(x)+e(x)u(x),\mathcal L[u](x)=\sum_i D_i\Big(\sum_j a^{ij}D_ju+b^iu\Big)(x)+\sum_i c^i(x)D_iu(x)+e(x)u(x),L[u](x)=i∑​Di​(j∑​aijDj​u+biu)(x)+i∑​ci(x)Di​u(x)+e(x)u(x),

at every x∈Rdx\in\mathbb{R}^dx∈Rd. The derivatives are full-space derivatives with the zero convention above.

Modified drift (btilde\mathrm{btilde}btilde). The value is

b~i(x)=∑jDjaij(x)+bi(x)+ci(x).\tilde b^i(x)=\sum_j D_ja^{ij}(x)+b^i(x)+c^i(x).b~i(x)=j∑​Dj​aij(x)+bi(x)+ci(x).

Modified zeroth-order coefficient (ctilde\mathrm{ctilde}ctilde). The value is

c~(x)=∑iDibi(x)+e(x).\tilde c(x)=\sum_iD_ib^i(x)+e(x).c~(x)=i∑​Di​bi(x)+e(x).

Classical solution (IsClassicalSol\mathrm{IsClassicalSol}IsClassicalSol). The function uuu satisfies:

  • uuu is twice continuously differentiable on UUU, in the within-UUU sense;
  • uuu is continuous on U‾\overline UU;
  • L[u](x)=f(x)\mathcal L[u](x)=f(x)L[u](x)=f(x) for all x∈Ux\in Ux∈U, with L\mathcal LL computed with full-space derivatives and the zero convention, and no differentiability of a,ba,ba,b assumed;
  • u(x)=g(x)u(x)=g(x)u(x)=g(x) for all x∈∂Ux\in\partial Ux∈∂U.

UUU is not required to be open.

Elliptic assumption (EllipticAssumption\mathrm{EllipticAssumption}EllipticAssumption). The conditions are:

  • 0<α<10<\alpha<10<α<1 and λ0>0\lambda_0>0λ0​>0.
  • Uniform ellipticity: for all x∈Ux\in Ux∈U and ξ∈Rd\xi\in\mathbb{R}^dξ∈Rd,
λ0∑iξi2≤∑i,jaij(x)ξiξj.\lambda_0\sum_i\xi_i^2\le\sum_{i,j}a^{ij}(x)\xi_i\xi_j.λ0​i∑​ξi2​≤i,j∑​aij(x)ξi​ξj​.
  • Symmetry: aij=ajia^{ij}=a^{ji}aij=aji on UUU.
  • Regularity:
    • each ci∈C0,α(U)c^i\in C^{0,\alpha}(U)ci∈C0,α(U) and e∈C0,α(U)e\in C^{0,\alpha}(U)e∈C0,α(U);
    • each aij∈C1,α(U)a^{ij}\in C^{1,\alpha}(U)aij∈C1,α(U) and bi∈C1,α(U)b^i\in C^{1,\alpha}(U)bi∈C1,α(U);
    • f∈C0,α(U)f\in C^{0,\alpha}(U)f∈C0,α(U) and g∈C0,α(∂U)g\in C^{0,\alpha}(\partial U)g∈C0,α(∂U).
  • Exterior sphere condition: for every x0∈∂Ux_0\in\partial Ux0​∈∂U there are yyy and R>0R>0R>0 with Bˉ(y,R)∩U‾={x0}\bar B(y,R)\cap\overline U=\{x_0\}Bˉ(y,R)∩U={x0​}.
  • Bounds: Λ≥0\Lambda\ge0Λ≥0, v≥0v\ge0v≥0, and for every x∈Ux\in Ux∈U,
∑i,jaij(x)2≤Λandλ0−2(∑ibi(x)2+∑ici(x)2)+λ0−1∣e(x)∣≤v2.\sum_{i,j}a^{ij}(x)^2\le\Lambda\quad\text{and}\quad \lambda_0^{-2}\Big(\sum_ib^i(x)^2+\sum_ic^i(x)^2\Big)+\lambda_0^{-1}|e(x)|\le v^2.i,j∑​aij(x)2≤Λandλ0−2​(i∑​bi(x)2+i∑​ci(x)2)+λ0−1​∣e(x)∣≤v2.

UUU is not required to be a domain here.

Squared H1H^1H1 distance (h1DistSq\mathrm{h1DistSq}h1DistSq). The value is

∫U(∥D(u−w)(x)∥2+∣u(x)−w(x)∣2) dx∈[0,∞],\int_U\Big(\|D(u-w)(x)\|^2+|u(x)-w(x)|^2\Big)\,dx\in[0,\infty],∫U​(∥D(u−w)(x)∥2+∣u(x)−w(x)∣2)dx∈[0,∞],

a lower Lebesgue integral. Here D(u−w)(x)D(u-w)(x)D(u−w)(x) is the full-space Fréchet derivative (taken as 000 where u−wu-wu−w is not differentiable), measured in operator norm, which equals the Euclidean norm of the gradient. No differentiability or measurability of u,wu,wu,w is assumed by this definition.

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

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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