Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma B.1: the expected PINN loss is bounded by a regularized empirical loss on covering samples

Proved
PINNConvergence.expected_loss_le_of_covering

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

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

Assume Assumption 3.1 with d≥2d\ge2d≥2 and constants cr,Cr,cb,Cbc_r,C_r,c_b,C_bcr​,Cr​,cb​,Cb​. Let 0<α≤10<\alpha\le10<α≤1 and λr,λb≥0\lambda_r,\lambda_b\ge0λr​,λb​≥0. Suppose [L[h]]α;U[\mathcal L[h]]_{\alpha;U}[L[h]]α;U​, [B[h]]α;Γ[\mathcal B[h]]_{\alpha;\Gamma}[B[h]]α;Γ​, [f]α;U[f]_{\alpha;U}[f]α;U​ and [g]α;Γ[g]_{\alpha;\Gamma}[g]α;Γ​ are finite. Let xr1,…,xrmr∈Ux_r^1,\dots,x_r^{m_r}\in Uxr1​,…,xrmr​​∈U and xb1,…,xbmb∈Γx_b^1,\dots,x_b^{m_b}\in\Gammaxb1​,…,xbmb​​∈Γ (mr,mb≥1m_r,m_b\ge1mr​,mb​≥1) be such that every x∈Ux\in Ux∈U lies within εr>0\varepsilon_r>0εr​>0 of some xrix_r^ixri​, and every x∈Γx\in\Gammax∈Γ within εb>0\varepsilon_b>0εb​>0 of some xbjx_b^jxbj​. With Cm=3max⁡{Crmrεrd, Cbmbεbd−1}C_m=3\max\{C_rm_r\varepsilon_r^d,\,C_bm_b\varepsilon_b^{d-1}\}Cm​=3max{Cr​mr​εrd​,Cb​mb​εbd−1​},

LossPINN(h;λ)≤Cm[LossmPINN(h;λ)+3λrεr2αCm[L[h]]α;U2+3λbεb2αCm[B[h]]α;Γ2]+3λrεr2α[f]α;U2+3λbεb2α[g]α;Γ2.\mathrm{Loss}^{PINN}(h;\lambda)\le C_m\Big[\mathrm{Loss}^{PINN}_m(h;\lambda)+\frac{3\lambda_r\varepsilon_r^{2\alpha}}{C_m}[\mathcal L[h]]^2_{\alpha;U}+\frac{3\lambda_b\varepsilon_b^{2\alpha}}{C_m}[\mathcal B[h]]^2_{\alpha;\Gamma}\Big]+3\lambda_r\varepsilon_r^{2\alpha}[f]^2_{\alpha;U}+3\lambda_b\varepsilon_b^{2\alpha}[g]^2_{\alpha;\Gamma}.LossPINN(h;λ)≤Cm​[LossmPINN​(h;λ)+Cm​3λr​εr2α​​[L[h]]α;U2​+Cm​3λb​εb2α​​[B[h]]α;Γ2​]+3λr​εr2α​[f]α;U2​+3λb​εb2α​[g]α;Γ2​.

This is the deterministic half of Theorem 3.1. Lemma B.2 supplies the covering with high probability.

Formalization Note The operators L,B\mathcal L,\mathcal BL,B are arbitrary maps on functions. Only the values L[h]\mathcal L[h]L[h] and B[h]\mathcal B[h]B[h] enter. The expected loss takes values in [0,∞][0,\infty][0,∞] and is compared with the real right-hand side.

Preamble
import Mathlib
import Definitions.Def_PINNConvergence_Basic

open MeasureTheory Filter Topology
Formal statement
namespace PINNConvergence

theorem expected_loss_le_of_covering {d : ℕ} (hd : 2 ≤ d) (U Gam : Set (Rd d))
    (μr μb : Measure (Rd d)) (cr Cr cb Cb : ℝ) (hA : DataDistAssumption U Gam μr μb cr Cr cb Cb)
    (α : ℝ) (hα : 0 < α ∧ α ≤ 1) (Lop Bop : (Rd d → ℝ) → Rd d → ℝ) (f g h : Rd d → ℝ)
    (lr lb : ℝ) (hl : 0 ≤ lr ∧ 0 ≤ lb)
    (hLh : holderConst α U (Lop h) < ⊤) (hBh : holderConst α Gam (Bop h) < ⊤)
    (hf : holderConst α U f < ⊤) (hg : holderConst α Gam g < ⊤)
    {mr mb : ℕ} (hmr : 1 ≤ mr) (hmb : 1 ≤ mb) (xr : Fin mr → Rd d) (xb : Fin mb → Rd d)
    (hxr : ∀ i, xr i ∈ U) (hxb : ∀ j, xb j ∈ Gam) (er eb : ℝ) (her : 0 < er) (heb : 0 < eb)
    (hcovr : ∀ x ∈ U, ∃ i, ‖x - xr i‖ ≤ er) (hcovb : ∀ x ∈ Gam, ∃ j, ‖x - xb j‖ ≤ eb) :
    let Cm := 3 * max (Cr * mr * er ^ d) (Cb * mb * eb ^ (d - 1))
    pinnLossExp Lop Bop f g lr lb μr μb h ≤
      ENNReal.ofReal (Cm * (pinnLossEmp Lop Bop f g lr lb xr xb h +
          3 * lr * er ^ (2 * α) / Cm * (holderConst α U (Lop h)).toReal ^ 2 +
          3 * lb * eb ^ (2 * α) / Cm * (holderConst α Gam (Bop h)).toReal ^ 2) +
        3 * lr * er ^ (2 * α) * (holderConst α U f).toReal ^ 2 +
        3 * lb * eb ^ (2 * α) * (holderConst α Gam g).toReal ^ 2) := by sorry

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), Appendix B, Lemma B.1, eq. (B.1), p. 22
Read-back

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

Setting. Fix an integer d≥2d \ge 2d≥2 and work in Rd\mathbb{R}^dRd with the Euclidean norm ∥⋅∥\|\cdot\|∥⋅∥. The data are:

  • sets U,Γ⊆RdU, \Gamma \subseteq \mathbb{R}^dU,Γ⊆Rd;
  • Borel measures μr,μb\mu_r, \mu_bμr​,μb​ on Rd\mathbb{R}^dRd;
  • real constants cr,Cr,cb,Cbc_r, C_r, c_b, C_bcr​,Cr​,cb​,Cb​;
  • a real exponent α\alphaα with 0<α≤10 < \alpha \le 10<α≤1;
  • two completely arbitrary maps L,B\mathcal{L}, \mathcal{B}L,B, each sending a function Rd→R\mathbb{R}^d \to \mathbb{R}Rd→R to another function Rd→R\mathbb{R}^d \to \mathbb{R}Rd→R. No linearity, continuity or differential structure is assumed.
  • arbitrary functions f,g,h:Rd→Rf, g, h : \mathbb{R}^d \to \mathbb{R}f,g,h:Rd→R. No measurability, continuity or boundedness is assumed, and hhh is not required to be a neural network.
  • real weights λr≥0\lambda_r \ge 0λr​≥0 and λb≥0\lambda_b \ge 0λb​≥0;
  • integers mr≥1m_r \ge 1mr​≥1 and mb≥1m_b \ge 1mb​≥1, with points xr1,…,xrmr∈Ux_r^1, \dots, x_r^{m_r} \in Uxr1​,…,xrmr​​∈U and xb1,…,xbmb∈Γx_b^1, \dots, x_b^{m_b} \in \Gammaxb1​,…,xbmb​​∈Γ. The points need not be distinct.
  • radii εr>0\varepsilon_r > 0εr​>0 and εb>0\varepsilon_b > 0εb​>0.

Hölder constant. For a set SSS and a function uuu, write

[u]α;S=sup⁡x,y∈S, x≠y∣u(x)−u(y)∣∥x−y∥α∈[0,∞].[u]_{\alpha;S} = \sup_{x,y \in S,\ x \ne 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,∞].

This value is 000 if SSS has at most one point.

Hypotheses on the data distribution.

  1. UUU is bounded, open and connected, so in particular it is nonempty.

  2. At every boundary point x0∈∂Ux_0 \in \partial Ux0​∈∂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 iii,

    such that, for all x,yx, yx,y in the open ball B(x0,r)B(x_0,r)B(x0​,r),

∥ψ(x)−ψ(y)∥≤K∥x−y∥and∥x−y∥≤K∥ψ(x)−ψ(y)∥,\|\psi(x)-\psi(y)\| \le K\|x-y\| \quad\text{and}\quad \|x-y\| \le K\|\psi(x)-\psi(y)\|,∥ψ(x)−ψ(y)∥≤K∥x−y∥and∥x−y∥≤K∥ψ(x)−ψ(y)∥,

with ψ(x)i>0\psi(x)_i > 0ψ(x)i​>0 for x∈B(x0,r)∩Ux \in B(x_0,r)\cap Ux∈B(x0​,r)∩U and ψ(x)i=0\psi(x)_i = 0ψ(x)i​=0 for x∈B(x0,r)∩∂Ux \in B(x_0,r)\cap \partial Ux∈B(x0​,r)∩∂U. Nothing further is required of ψ\psiψ; for example, surjectivity onto a half-space is not required. 3. Γ\GammaΓ is closed and Γ⊆∂U\Gamma \subseteq \partial UΓ⊆∂U. 4. μr\mu_rμr​ and μb\mu_bμb​ are probability measures. 5. μr\mu_rμr​ has a density with respect to Lebesgue measure restricted to UUU. That is, μr=ρr dx∣U\mu_r = \rho_r \, dx|_Uμr​=ρr​dx∣U​ for some measurable ρr:Rd→[0,∞]\rho_r : \mathbb{R}^d \to [0,\infty]ρr​:Rd→[0,∞], and there is some ρ0∈(0,∞]\rho_0 \in (0,\infty]ρ0​∈(0,∞] with ρr≥ρ0\rho_r \ge \rho_0ρr​≥ρ0​ on UUU. 6. μb\mu_bμb​ has a density with respect to the (d−1)(d-1)(d−1)-dimensional Hausdorff measure restricted to Γ\GammaΓ. That is, μb=ρb Hd−1∣Γ\mu_b = \rho_b \, \mathcal{H}^{d-1}|_\Gammaμb​=ρb​Hd−1∣Γ​ for some measurable ρb\rho_bρb​, and there is some ρ0′∈(0,∞]\rho_0' \in (0,\infty]ρ0′​∈(0,∞] with ρb≥ρ0′\rho_b \ge \rho_0'ρb​≥ρ0′​ on Γ\GammaΓ. 7. cr,Cr,cb,Cb>0c_r, C_r, c_b, C_b > 0cr​,Cr​,cb​,Cb​>0. 8. Cube partitions of UUU. For every ε>0\varepsilon > 0ε>0 with crεd≤1c_r\varepsilon^d \le 1cr​εd≤1, UUU is the disjoint union of finitely many measurable sets P1,…,PKP_1,\dots,P_KP1​,…,PK​. Each PjP_jPj​ contains a point zjz_jzj​ and satisfies

Pj⊆{y:∣yi−(zj)i∣≤ε/2 ∀i}andμr(Pj)≥crεd.P_j \subseteq \{y : |y_i - (z_j)_i| \le \varepsilon/2 \ \forall i\} \quad\text{and}\quad \mu_r(P_j) \ge c_r \varepsilon^d.Pj​⊆{y:∣yi​−(zj​)i​∣≤ε/2 ∀i}andμr​(Pj​)≥cr​εd.

The left condition says PjP_jPj​ lies in the closed cube of side ε\varepsilonε centred at zjz_jzj​. 9. Cube partitions of Γ\GammaΓ. The same holds for Γ\GammaΓ, with μb\mu_bμb​, cbc_bcb​ and exponent d−1d-1d−1, for every ε>0\varepsilon > 0ε>0 with cbεd−1≤1c_b\varepsilon^{d-1} \le 1cb​εd−1≤1. 10. Ball bounds. For every ε>0\varepsilon > 0ε>0, with Bˉ(x,ε)\bar B(x,\varepsilon)Bˉ(x,ε) denoting the closed ball,

μr(Bˉ(x,ε)∩U)≤Crεdfor all x∈U,\mu_r(\bar B(x,\varepsilon)\cap U) \le C_r\varepsilon^d \quad \text{for all } x \in U,μr​(Bˉ(x,ε)∩U)≤Cr​εdfor all x∈U, μb(Bˉ(x,ε)∩Γ)≤Cbεd−1for all x∈Γ.\mu_b(\bar B(x,\varepsilon)\cap\Gamma) \le C_b\varepsilon^{d-1} \quad \text{for all } x \in \Gamma.μb​(Bˉ(x,ε)∩Γ)≤Cb​εd−1for all x∈Γ.

Further hypotheses.

  • The four Hölder constants [L[h]]α;U[\mathcal{L}[h]]_{\alpha;U}[L[h]]α;U​, [B[h]]α;Γ[\mathcal{B}[h]]_{\alpha;\Gamma}[B[h]]α;Γ​, [f]α;U[f]_{\alpha;U}[f]α;U​ and [g]α;Γ[g]_{\alpha;\Gamma}[g]α;Γ​ are all finite.
  • Covering. Every x∈Ux \in Ux∈U satisfies ∥x−xri∥≤εr\|x - x_r^i\| \le \varepsilon_r∥x−xri​∥≤εr​ for some iii. Every x∈Γx \in \Gammax∈Γ satisfies ∥x−xbj∥≤εb\|x - x_b^j\| \le \varepsilon_b∥x−xbj​∥≤εb​ for some jjj.
  • No relation between εr,εb\varepsilon_r, \varepsilon_bεr​,εb​ and mr,mbm_r, m_bmr​,mb​ or the constants is imposed beyond the covering property.

Conclusion. Set

Cm=3max⁡{Cr mr εrd, Cb mb εbd−1}.C_m = 3\max\{C_r\, m_r\, \varepsilon_r^{d},\ C_b\, m_b\, \varepsilon_b^{d-1}\}.Cm​=3max{Cr​mr​εrd​, Cb​mb​εbd−1​}.

This is strictly positive under the hypotheses. Define the empirical loss

Lossm(h)=λrmr∑i=1mr(L[h](xri)−f(xri))2+λbmb∑j=1mb(B[h](xbj)−g(xbj))2.\mathrm{Loss}_m(h) = \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 .Lossm​(h)=mr​λr​​i=1∑mr​​(L[h](xri​)−f(xri​))2+mb​λb​​j=1∑mb​​(B[h](xbj​)−g(xbj​))2.

Define the expected loss, valued in [0,∞][0,\infty][0,∞], as

Loss(h)=λr∫(L[h]−f)2 dμr+λb∫(B[h]−g)2 dμb.\mathrm{Loss}(h) = \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 .Loss(h)=λr​∫(L[h]−f)2dμr​+λb​∫(B[h]−g)2dμb​.

These are lower Lebesgue integrals of nonnegative functions. They are defined without any measurability or integrability assumption and may be +∞+\infty+∞.

The theorem asserts the inequality in [0,∞][0,\infty][0,∞]:

Loss(h)≤Cm(Lossm(h)+3λrεr2αCm[L[h]]α;U2+3λbεb2αCm[B[h]]α;Γ2)+3λrεr2α[f]α;U2+3λbεb2α[g]α;Γ2.\mathrm{Loss}(h) \le C_m\Big(\mathrm{Loss}_m(h) + \frac{3\lambda_r\varepsilon_r^{2\alpha}}{C_m}[\mathcal{L}[h]]_{\alpha;U}^2 + \frac{3\lambda_b\varepsilon_b^{2\alpha}}{C_m}[\mathcal{B}[h]]_{\alpha;\Gamma}^2\Big) + 3\lambda_r\varepsilon_r^{2\alpha}[f]_{\alpha;U}^2 + 3\lambda_b\varepsilon_b^{2\alpha}[g]_{\alpha;\Gamma}^2 .Loss(h)≤Cm​(Lossm​(h)+Cm​3λr​εr2α​​[L[h]]α;U2​+Cm​3λb​εb2α​​[B[h]]α;Γ2​)+3λr​εr2α​[f]α;U2​+3λb​εb2α​[g]α;Γ2​.

Notes on the right-hand side:

  • It is computed as a real number and then embedded in [0,∞][0,\infty][0,∞], with negative values clamped to 000. Under the hypotheses all its terms are nonnegative, so no clamping occurs.
  • The Hölder constants enter as their (finite) real values.
  • Multiplying out, the right-hand side equals
Cm Lossm(h)+3λrεr2α([L[h]]α;U2+[f]α;U2)+3λbεb2α([B[h]]α;Γ2+[g]α;Γ2).C_m\,\mathrm{Loss}_m(h) + 3\lambda_r\varepsilon_r^{2\alpha}\big([\mathcal{L}[h]]_{\alpha;U}^2 + [f]_{\alpha;U}^2\big) + 3\lambda_b\varepsilon_b^{2\alpha}\big([\mathcal{B}[h]]_{\alpha;\Gamma}^2 + [g]_{\alpha;\Gamma}^2\big).Cm​Lossm​(h)+3λr​εr2α​([L[h]]α;U2​+[f]α;U2​)+3λb​εb2α​([B[h]]α;Γ2​+[g]α;Γ2​).
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